diff --git a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist index 7b70d1af8..da1d80e90 100644 --- a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist @@ -12,7 +12,7 @@ CoreDataStack.xcscheme_^#shared#^_ orderHint - 27 + 21 Mastodon - ASDK.xcscheme_^#shared#^_ @@ -37,7 +37,7 @@ NotificationService.xcscheme_^#shared#^_ orderHint - 26 + 20 SuppressBuildableAutocreation diff --git a/Mastodon/Info.plist b/Mastodon/Info.plist index 26dcf5cc6..1a9dadce9 100644 --- a/Mastodon/Info.plist +++ b/Mastodon/Info.plist @@ -2,6 +2,17 @@ + CFBundleURLTypes + + + CFBundleURLSchemes + + mastodon + + CFBundleURLName + org.joinmastodon.app + + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable diff --git a/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift b/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift index 2885fe7ea..9e9235baf 100644 --- a/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift +++ b/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift @@ -171,7 +171,7 @@ extension MastodonConfirmEmailViewController { func showEmailAppAlert() { let clients = ThirdPartyMailClient.clients() let application = UIApplication.shared - let avaliableClients = clients.filter { client -> Bool in + let availableClients = clients.filter { client -> Bool in ThirdPartyMailer.application(application, isMailClientAvailable: client) } let alertController = UIAlertController(title: L10n.Scene.ConfirmEmail.OpenEmailApp.openEmailClient, message: nil, preferredStyle: .alert) @@ -180,9 +180,9 @@ extension MastodonConfirmEmailViewController { UIApplication.shared.open(URL(string: "message://")!, options: [:], completionHandler: nil) } alertController.addAction(alertAction) - _ = avaliableClients.compactMap { client -> UIAlertAction in + _ = availableClients.compactMap { client -> UIAlertAction in let alertAction = UIAlertAction(title: client.name, style: .default) { _ in - _ = ThirdPartyMailer.application(application, openMailClient: client, recipient: nil, subject: nil, body: nil) + _ = ThirdPartyMailer.application(application, openMailClient: client) } alertController.addAction(alertAction) return alertAction diff --git a/Mastodon/Supporting Files/AppDelegate.swift b/Mastodon/Supporting Files/AppDelegate.swift index 70d259ca7..392d2944c 100644 --- a/Mastodon/Supporting Files/AppDelegate.swift +++ b/Mastodon/Supporting Files/AppDelegate.swift @@ -56,6 +56,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } + func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { + return true + } + } extension AppDelegate {