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

iOS 13+ always uses the scenes if there is one registered in the manifest #3454

Merged
merged 5 commits into from
Nov 22, 2021

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Nov 19, 2021

Description of Change

This PR fixes the issue of a secret double init of the main window on iOS 13+ on iPhone. Even though the iPhone does not support multi-window, it still uses the scene delegates and will just throw internally.

Additions made

  • Move and correct the logic in the UIApplicationDelegate to not consider the platform type when scene delegates are used
  • Make sure to return false for RespondsToSelector for GetConfiguration if scenes are not being used

@mattleibow mattleibow added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Nov 19, 2021
@Redth
Copy link
Member

Redth commented Nov 19, 2021

Should we generate a partial info plist with the scene entries for MacCatalyst? I guess that won't work for iPad since that's still iOS tfm. Maybe we could do so off a project property?

At the very least this PR should remove the entry from iOS info plist in the template?

@mattleibow
Copy link
Member Author

There is nothing wrong with using scenes on iOS. In fact, it is "recommended"?

In iOS 13 and later, use UISceneDelegate objects to respond to life-cycle events in a scene-based app.

However, it is also an opt-in feature:

Scene support is an opt-in feature. To enable basic support, add the UIApplicationSceneManifest key to your app’s Info.plist file

https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle

I have updated the PR to do this logic even more correctly and now we can support either scenario.

@mattleibow mattleibow changed the title iOS 13+ always uses the scenes iOS 13+ always uses the scenes if there is one registered in the manifest Nov 19, 2021
@mattleibow mattleibow added this to the 6.0.200-preview.11 milestone Nov 19, 2021
@mattleibow mattleibow enabled auto-merge (squash) November 20, 2021 02:37
mattleibow and others added 3 commits November 22, 2021 22:19
Co-authored-by: Jonathan Dick <jodick@microsoft.com>
Co-authored-by: Jonathan Dick <jodick@microsoft.com>
Co-authored-by: Jonathan Dick <jodick@microsoft.com>
@Redth Redth disabled auto-merge November 22, 2021 20:21
@Redth Redth merged commit 34b35f7 into main Nov 22, 2021
@Redth Redth deleted the dev/multi-window-fix branch November 22, 2021 20:21
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor platform/iOS 🍎
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants