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

Update FIAM for iOS 13 Scene lifecycle paradigm #3927

Merged
merged 6 commits into from Oct 2, 2019
Merged

Conversation

christibbs
Copy link
Contributor

@christibbs christibbs commented Sep 25, 2019

Two key fixes:

  • Throw both UIScene and UIApplication lifecycle notifications
  • Update UIWindow creation logic to initialize based on a foregrounded scene (if iOS 13 is available)

Fixes #3524 with the exception around concerns with opening URL from a scene. From testing, though, current URL opening logic still works as intended.


#if defined(__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
if (@available(iOS 13.0, *)) {
[[NSNotificationCenter defaultCenter] addObserver:self
Copy link
Member

@ryanwilson ryanwilson Sep 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there situations where appWillBecomeInactive could be called twice, i.e. could UIApplicationWillResignActiveNotification and UISceneWillDeactivateNotification both be fired for the same app close?

Copy link
Contributor

@mikehaney24 mikehaney24 Sep 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing for becoming active.


#if defined(__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
if (@available(iOS 13.0, *)) {
[[NSNotificationCenter defaultCenter] addObserver:self
Copy link
Contributor

@mikehaney24 mikehaney24 Sep 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing for becoming active.

@ryanwilson ryanwilson merged commit eca2170 into master Oct 2, 2019
2 checks passed
@ryanwilson ryanwilson deleted the fiam-ios-13-scene branch Oct 2, 2019
schmidt-sebastian pushed a commit that referenced this issue Oct 2, 2019
* Add UIScene lifecycle notifications alongside UIApplication ones

* Run styles.sh and update window helper to work on iOS 13

* Refactor foregrounded scene logic into its own method

* Conditional compilation for iOS 13 code

* Add notification parameter to notification selectors

* Fix placeholder
@firebase firebase locked and limited conversation to collaborators Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants