Skip to content

Commit

Permalink
Merge pull request fmo91#2 from surfstudio/logical_fixes
Browse files Browse the repository at this point in the history
Fixed the logic of processing methods
  • Loading branch information
gregoryvit authored Sep 18, 2017
2 parents 5ee2dd2 + 7d1714a commit e4336dd
Showing 1 changed file with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate {

@available(iOS 6.0, *)
open func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
var result = false
var result = true
for service in __services {
if service.application?(application, willFinishLaunchingWithOptions: launchOptions) ?? false {
result = true
if service.application?(application, willFinishLaunchingWithOptions: launchOptions) == false {
result = false
}
}
return result
}

@available(iOS 3.0, *)
open func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
var result = false
var result = true
for service in __services {
if service.application?(application, didFinishLaunchingWithOptions: launchOptions) ?? false {
result = true
if service.application?(application, didFinishLaunchingWithOptions: launchOptions) == false {
result = false
}
}
return result
Expand All @@ -77,32 +77,32 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate {

@available(iOS, introduced: 2.0, deprecated: 9.0, message: "Please use application:openURL:options:")
open func application(_ application: UIApplication, handleOpen url: URL) -> Bool {
var result = false
var result = true
for service in __services {
if service.application?(application, handleOpen: url) ?? false {
result = true
if service.application?(application, handleOpen: url) == false {
result = false
}
}
return result
}

@available(iOS, introduced: 4.2, deprecated: 9.0, message: "Please use application:openURL:options:")
open func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
var result = false
var result = true
for service in __services {
if service.application?(application, open: url, sourceApplication: sourceApplication, annotation: annotation) ?? false {
result = true
if service.application?(application, open: url, sourceApplication: sourceApplication, annotation: annotation) == false {
result = false
}
}
return result
}

@available(iOS 9.0, *)
open func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
var result = false
var result = true
for service in __services {
if service.application?(app, open: url, options: options) ?? false {
result = true
if service.application?(app, open: url, options: options) == false {
result = false
}
}
return result
Expand Down Expand Up @@ -332,10 +332,10 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate {
// 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 {
var result = false
var result = true
for service in __services {
if service.application?(application, shouldAllowExtensionPointIdentifier: extensionPointIdentifier) ?? true {
result = true
if service.application?(application, shouldAllowExtensionPointIdentifier: extensionPointIdentifier) == false {
result = false
}
}
return result
Expand All @@ -355,21 +355,21 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate {

@available(iOS 6.0, *)
open func application(_ application: UIApplication, shouldSaveApplicationState coder: NSCoder) -> Bool {
var result = false
var result = true
for service in __services {
if service.application?(application, shouldSaveApplicationState: coder) ?? false {
result = true
if service.application?(application, shouldSaveApplicationState: coder) == false {
result = false
}
}
return result
}

@available(iOS 6.0, *)
open func application(_ application: UIApplication, shouldRestoreApplicationState coder: NSCoder) -> Bool {
var result = false
var result = true
for service in __services {
if service.application?(application, shouldRestoreApplicationState: coder) ?? false {
result = true
if service.application?(application, shouldRestoreApplicationState: coder) == false {
result = false
}
}
return result
Expand All @@ -396,10 +396,10 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate {
// or application:didFailToContinueUserActivityWithType:error: if an error was encountered.
@available(iOS 8.0, *)
open func application(_ application: UIApplication, willContinueUserActivityWithType userActivityType: String) -> Bool {
var result = false
var result = true
for service in __services {
if service.application?(application, willContinueUserActivityWithType: userActivityType) ?? false {
result = true
if service.application?(application, willContinueUserActivityWithType: userActivityType) == false {
result = false
}
}
return result
Expand All @@ -412,10 +412,10 @@ open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate {
// restoreUserActivityState on all objects.
@available(iOS 8.0, *)
open func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Swift.Void) -> Bool {
var result = false
var result = true
for service in __services {
if service.application?(application, continue: userActivity, restorationHandler: restorationHandler) ?? false {
result = true
if service.application?(application, continue: userActivity, restorationHandler: restorationHandler) == false {
result = false
}
}
return result
Expand Down

0 comments on commit e4336dd

Please sign in to comment.