-
Notifications
You must be signed in to change notification settings - Fork 432
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
Remove old app delegate, rename states and introduce Resuming (a.k.a willEnterForeground) #3809
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine for me. Didn't hit any unexpected events.
I left two comments. They are not critical, but would be good to plan for resolving those in your project.
} | ||
|
||
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { | ||
realDelegate.application?(app, open: url, options: options) ?? false | ||
appStateMachine.handle(.openURL(url)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we ok with always returning true
here? I saw there's false
supposed to be returned when onboarding is present (based on the Old Delegate).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this and AFAIU the documentation correctly we can always return true, just like we do inside didFInishLaunching but we do not necessarily have to handle the opening url logic, hence the code inside Foreground state:
guard mainViewController.needsToShowOnboardingIntro() == false else {
return
}
DuckDuckGo/AppDelegate.swift
Outdated
} | ||
|
||
/// It's public in order to allow refreshing on demand via Debug menu. Otherwise it shouldn't be called from outside. | ||
func refreshRemoteMessages() { | ||
realDelegate.refreshRemoteMessages() | ||
// part of debug menu, let's not support it in the first iteration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll need this now, won't we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't work now, as we already use new app delegate by default, but you are correct, this should be brought back, I'll make it work in next PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it in this PR!
Task/Issue URL: https://app.asana.com/0/0/1209022783720243/f
Tech Design URL: https://app.asana.com/0/0/1209144186921382/f
CC: @bwaresiak
Description:
Steps to test this PR: