Commit 77a5258
committed
fix(share_plus): avoid iOS 26 share sheet crash for non-image files
Fixes #3784.
Pre-iOS 26 the plugin set LPLinkMetadata.originalURL to a fake file URL
built from a display string (e.g. "DOCX • 500 KB") so the share sheet
would show the file size/extension as a subtitle. iOS 26 tightened
validation of originalURL: when SHSheetActivityItemsManager tries to
fetch link metadata for the bogus URL — reproducible when sharing .docx
files — it crashes with NSArrayM insertObject:atIndex: object cannot be
nil.
Gate the fake-URL trick on iOS < 26. On iOS 26 and later, leave
originalURL unset; the share sheet works without the size subtitle but
no longer crashes.1 parent 6427bc6 commit 77a5258
1 file changed
Lines changed: 13 additions & 1 deletion
File tree
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
251 | 263 | | |
252 | 264 | | |
253 | 265 | | |
| |||
0 commit comments