This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] [iOS] App crashes on iPhone 6 running iOS 11 after updating to XF 4.x. #7109
Labels
i/high
Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often
i/regression
in-progress
This issue has an associated pull request that may resolve it!
p/iOS 🍎
t/bug 🐛
Projects
Milestone
Comments
We've just uplifted our Xamarin libraries to 4.x. We are able to recreate this on a physical device running 11.0. This negatively impacts our release as we have customers running the affected OS version. An urgent fix is needed and much appreciated! |
samhouts
added
i/high
Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often
i/regression
labels
Aug 12, 2019
@StinkyTowel a PR is in the works, please follow the progress in #7114. This is going to be in 4.0, 4.1 and 4.2 which all have frequent releases so it should hopefully be resolved soon. Thanks! |
samhouts
added
the
in-progress
This issue has an associated pull request that may resolve it!
label
Jun 20, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
i/high
Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often
i/regression
in-progress
This issue has an associated pull request that may resolve it!
p/iOS 🍎
t/bug 🐛
Description
Native stack trace of crash:
DEBUG|8/5/2019 8:19:53 PM|App: Failed to init Home View|EX:Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[Xamarin_Forms_Platform_iOS_PlatformRenderer setNeedsUpdateOfHomeIndicatorAutoHidden]: unrecognized selector sent to instance 0x104f8bea0
This issue is due to adding functionality in XF 4.0 to support hiding the home indicator on iPhone X/Xs/Xr devices, as per:
#5717
It would seem that on some devices that run iOS 11 that do not have a home indicator, i.e. any iPhone with a home button, do not have the setNeedsUpdateOfHomeIndicatorAutoHidden selector, so when XF calls:
on a phone running iOS 11 that does not support the home indicator, then the crash occurs.
An easy and seemingly harmless fix would be to check that the calling object responds to that selector, so instead of the above version check do the following selector check:
I also found anther report of the same issue where the fix was to do the resondsToSelector check:
lionheart/openradar-mirror#18762
These are all of the places in XF source code that call that method that I found with a search:
https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/PlatformRenderer.cs#L94
https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/ModalWrapper.cs#L107
https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/PageRenderer.cs#L193
https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/PageRenderer.cs#L528
https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/PhoneMasterDetailRenderer.cs#L342
https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs#L234
Steps to Reproduce
I cannot reproduce since I do not have an iPhone 6 running iOS 11 (or any other < iPhone X device running iOS 11). Issue does not reproduce on simulators.
Basic Information
The text was updated successfully, but these errors were encountered: