From a97e36f15c35ef8a66f82478e8535967538c38c2 Mon Sep 17 00:00:00 2001 From: Maxim Petrenko Date: Fri, 28 Sep 2018 17:37:23 +0300 Subject: [PATCH] fixes for Swift v.4.2 support --- .../Classes/ApplicationServicesManager.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PluggableApplicationDelegate/Classes/ApplicationServicesManager.swift b/PluggableApplicationDelegate/Classes/ApplicationServicesManager.swift index e14fdcb..f97a688 100644 --- a/PluggableApplicationDelegate/Classes/ApplicationServicesManager.swift +++ b/PluggableApplicationDelegate/Classes/ApplicationServicesManager.swift @@ -59,7 +59,7 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate { @available(iOS 6.0, *) - open func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { + open func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { var result = false for service in __services { if service.application?(application, willFinishLaunchingWithOptions: launchOptions) ?? false { @@ -70,7 +70,7 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate { } @available(iOS 3.0, *) - open func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { + open func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { var result = false for service in __services { if service.application?(application, didFinishLaunchingWithOptions: launchOptions) ?? false { @@ -118,7 +118,7 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate { } @available(iOS 9.0, *) - open func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { + open func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { var result = false for service in __services { if service.application?(app, open: url, options: options) ?? false { @@ -381,7 +381,7 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate { // Constants representing common extension point identifiers are provided further down. // If unimplemented, the default behavior is to allow the extension point identifier. @available(iOS 8.0, *) - open func application(_ application: UIApplication, shouldAllowExtensionPointIdentifier extensionPointIdentifier: UIApplicationExtensionPointIdentifier) -> Bool { + open func application(_ application: UIApplication, shouldAllowExtensionPointIdentifier extensionPointIdentifier: UIApplication.ExtensionPointIdentifier) -> Bool { var result = false for service in __services { if service.application?(application, shouldAllowExtensionPointIdentifier: extensionPointIdentifier) ?? true { @@ -393,7 +393,7 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate { @available(iOS 6.0, *) - open func application(_ application: UIApplication, viewControllerWithRestorationIdentifierPath identifierComponents: [Any], coder: NSCoder) -> UIViewController? { + open func application(_ application: UIApplication, viewControllerWithRestorationIdentifierPath identifierComponents: [String], coder: NSCoder) -> UIViewController? { for service in __services { if let viewController = service.application?(application, viewControllerWithRestorationIdentifierPath: identifierComponents, coder: coder) { return viewController @@ -461,7 +461,7 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate { // invoked with the user activity. Invoking the restorationHandler is optional. It may be copied and invoked later, and it will bounce to the main thread to complete its work and call // restoreUserActivityState on all objects. @available(iOS 8.0, *) - open func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Swift.Void) -> Bool { + open func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { let returns = apply({ (service, restorationHandler) -> Bool? in service.application?(application, continue: userActivity, restorationHandler: restorationHandler) }, completionHandler: { results in @@ -495,7 +495,7 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate { // You should use the CKShareMetadata object's shareURL and containerIdentifier to schedule a CKAcceptSharesOperation, then start using // the resulting CKShare and its associated record(s), which will appear in the CKContainer's shared database in a zone matching that of the record's owner. @available(iOS 10.0, *) - open func application(_ application: UIApplication, userDidAcceptCloudKitShareWith cloudKitShareMetadata: CKShareMetadata) { + open func application(_ application: UIApplication, userDidAcceptCloudKitShareWith cloudKitShareMetadata: CKShare.Metadata) { for service in __services { service.application?(application, userDidAcceptCloudKitShareWith: cloudKitShareMetadata) }