fix(share_plus): Avoid crash on iOS 26 on iPhones with no sharePositionOrigin#3699
fix(share_plus): Avoid crash on iOS 26 on iPhones with no sharePositionOrigin#3699
Conversation
|
Fellow devs remember: (It happened to me, so leaving it here as a help!) |
|
This error recently reappeared in my app's logs, with the notable exception that the device in question is an iPad. Could it be that this error is occurring only on that device? I haven't had any issues on the iPhone since I updated the package to version 12.0.1. iPad (9th generation) with iPadOS 26.4.1 |
Please read the README of the package. iPads need |
Description
After investigation of the issue with
share_pluscrashing apps on iPhones when nosharePositionOriginprovided and app is build with Xcode 26 I made an interesting discovery - when project is built with Xcode 26 hasPopoverPresentationController returnstrueboth for iPhones and for iPads, while in the same project, but built with Xcode 16.4 and older value istrueonly for iPads.Here is example app built with Xcode 16.4 running on iPhone:

Here is example app built with Xcode 26.0.1 running on iPhone:

Due to this difference plugin was throwing exception when no
sharePositionOriginwas provided causing multiple bug reports here.I have added an additional check for iPad which should solve the problem. With this change
sharePositionOriginis not required on iPhones as it was before.Related Issues
Closes #3645
Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
!in the title as explained in Conventional Commits).