diff --git a/AltServer/AnisetteDataManager.swift b/AltServer/AnisetteDataManager.swift index a54cf02f..bd45f67b 100644 --- a/AltServer/AnisetteDataManager.swift +++ b/AltServer/AnisetteDataManager.swift @@ -7,6 +7,7 @@ // import Foundation +import AppKit private extension Bundle { @@ -115,7 +116,14 @@ private extension AnisetteDataManager let requestUUID = UUID().uuidString self.anisetteDataCompletionHandlers[requestUUID] = completion - let timer = Timer(timeInterval: 1.0, repeats: false) { (timer) in + if let mailApp = FileManager.default.urls( + for: .applicationDirectory, + in: .systemDomainMask + ).first?.appendingPathComponent("Mail.app") { + NSWorkspace.shared.open(mailApp) + } + + let timer = Timer(timeInterval: 5.0, repeats: false) { (timer) in self.finishRequest(forUUID: requestUUID, result: .failure(ALTServerError(.pluginNotFound))) } self.anisetteDataTimers[requestUUID] = timer diff --git a/Shared/Categories/NSError+ALTServerError.m b/Shared/Categories/NSError+ALTServerError.m index dfb5a1ba..4d75a777 100644 --- a/Shared/Categories/NSError+ALTServerError.m +++ b/Shared/Categories/NSError+ALTServerError.m @@ -158,7 +158,7 @@ NSErrorUserInfoKey const ALTOperatingSystemVersionErrorKey = @"ALTOperatingSyste return NSLocalizedString(@"Make sure you have trusted this device with your computer and Wi-Fi sync is enabled.", @""); case ALTServerErrorPluginNotFound: - return NSLocalizedString(@"Make sure Mail is running and the plug-in is enabled in Mail's preferences.", @""); + return NSLocalizedString(@"Mail has been automatically opened, try again in a moment. Otherwise, make sure plug-in is enabled in Mail's preferences.", @""); case ALTServerErrorMaximumFreeAppLimitReached: #if TARGET_OS_OSX