Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for Swift v.4.2 support #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down