no way to have file provider extension support both iOS 11 and iOS 10
| Originator: | palmin | ||
| Number: | rdar://32894928 | Date Originated: | June 21 2017 |
| Status: | Closed and duplicate Closed | Resolved: | No |
| Product: | iOS + SDK | Product Version: | iOS 10.3 |
| Classification: | Bug | Reproducible: | always |
Summary: It is not possible to create a file provider extension that supports the new Files app integration in iOS 11 while still supporting earlier version of the file provider extension working with the document picker extension. As soon as the FileProvider framework is imported in any code, the app extension will crash when loaded by a iOS 10.3 device even if the FileProvider framework is linked as "Optional" and even when this framework is not explicitly used by any code. This makes it impossible to support file providers in a way that works with the Files app, without throwing away compatibility with users still on iOS 10. Steps to Reproduce: 1. Configure app with file provider extension and document picker extension that has iOS 10.0 as deployment target but is compiled with the iOS 11 beta SDK. 2. Make file provider implementation entirely empty, not having any implementations of the base class, but importing FileProvider. 3. Launch the file provider from the debugger for example by using Textastic to pick a file from the location of the document picker. Expected Results: 1. File provider extension should be able to load and run. Observed Results: File provider extension crashes during initialisation before leaving system code. Crash happens in: -[NSExtensionContextVendor _setPrincipalObject:forUUID:] with the following information: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: 52226AB1-DE67-4E1C-81FF-2B866AF89E7D)' *** First throw call stack: (0x186512fe0 0x184f74538 0x1863f6528 0x186f99194 0x186f98708 0x1853ca9e0 0x1853ca9a0 0x1853d8ad4 0x1853ce2cc 0x1853daa50 0x1853da7d0 0x1855d3100 0x1855d2cac) libc++abi.dylib: terminating with uncaught exception of type NSException
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!