-
Notifications
You must be signed in to change notification settings - Fork 78
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
Logical mistake #23
Comments
This is true. It should follow at least a pattern as below at the bare minimum. result && service.application... This can be seen in
Some of these can vary well just pass with the current implementation (e.g. shouldSaveApplicationState) but others should rely on previous results (e.g. will/did finish) |
I agree, maybe something like this?
|
There is an additional issue with the way this is written. If there are no services implementing a function, i.e. willFinishLaunchingWithOptions
Please note that the result returned will be "This method is not called if either application(:willFinishLaunchingWithOptions:) or application(:didFinishLaunchingWithOptions:) returns false." Source: |
@basememara This assumes incorrectly that the initialResult should always be true, which is not the case: All of these expect As such, a refactor to something like this is in order:
You may be wondering why I didn't just use Edit: Additionally, we need to favor the Edit 2: This should also be refactored to
After Swift 4.1 is supported. Edit 3: This iterate function does not support executing completionHandlers of agnostic return types so I am currently trying to figure out a way to do that. |
Thx for the feedback. IMHO, I don't think some of the Instead of worrying about deriving the boolean results for these complex cases, which
My
The core concept still works beautifully and keeps the |
I think, you have logical mistake in will/didFinishLaunching methods.
PluggableApplicationDelegate/PluggableApplicationDelegate/Classes/ApplicationServicesManager.swift
Line 36 in e03cd1e
Now application will be launched if one service has
true
result. Though execution should be ended if one service hasfalse
result.Probably you need create optional/required flag for service, to have control app launching.
The text was updated successfully, but these errors were encountered: