NSExtensionFileProviderSupportsEnumeration set to NO not respected on first run

I support an app that has used the document picker interface since iOS 8. It has worked fine without mods up through iOS 12. We did not elect the richer Files app integration APIs that were implemented in iOS 11 for a few reasons. Starting with iOS13/iPadOS13, interactions between the provider and consumer apps broke (albeit somewhat inconsistently across beta releases). The steps below show that toggling the value of NSExtensionFileProviderSupportsEnumeration in the Info.plist for the file provider across releases enables existing code to work, but this is not a viable solution. Simply setting the value to NO from the outset does not work. Steps to reproduce are these:


  1. Clone https://github.com/Purebred/KeyShareConsumer and https://github.com/Purebred/SampleKeyProvider projects from GitHub (fixing up bundle identifiers and team identifiers as needed)
  2. Edit the Info.plist in the SampleKeyProvider project's SampleKeyProviderFileProvider target to include NSExtensionFileProviderSupportsEnumeration with BOOLEAN value NO in the NSExtension dictionary
  3. Build and run both projects
  4. Import Sample PKCS #12 Files in SampleKeyProvider
  5. Try to import key into KeyShareConsumer by clicking Import Key in top left corner and following usual document picker flow
  6. This does not work because it never invokes the file provide (trying without step 2 yields the same result too)
  7. Edit NSExtensionFileProviderSupportsEnumeration to be set to YES
  8. Build and run both projects trying to import key into KeyShareConsumer
  9. Does not work but does so in a different way (because SampleKeyProvider does not support enumeration)
  10. Edit NSExtensionFileProviderSupportsEnumeration to be set to NO
  11. Build and run both projects trying to import key into KeyShareConsumer
  12. Works fine (and with no changes to existing consumer code)


This seems like a bug registering the file provider when NSExtensionFileProviderSupportsEnumeration is either absent or NO.

We also hitted the similiar issue with our app on iOS 13 and iPad 13 beta devices when importting the p12 certificate via file provider.

@Apple, any update on the issue?

This is still unresolved in beta 6.

This is still unresolved in iOS13.1 beta 1 and iPadOS13.1 beta 1. As an additional data point, the exact same behavior described above can be repeated using Apple's NewBox sample code. A copy of the code that accompanied the talk is available here: https://github.com/master-nevi/WWDC-2014.These steps reproduce the behavior:


1) Clone https://github.com/master-nevi/WWDC-2014.git and fix up the bundle identifiers so it will compile and run.

2) Without modifying Info.plist in the file provider provider project run the app, click Open, click the lone file displayed, observe the file is never returned to the caller.

3) Modify Info.plist in the file provider provider project to include NSExtensionFileProviderSupportsEnumeration with BOOLEAN value NO in the NSExtension dictionary.

4) Build and run the app, click the lone file displayed, observe the file is never returned to the caller.

5) Edit NSExtensionFileProviderSupportsEnumeration to be set to YES.

6) Build and run the app. Observe failure due to lack of enumeration support.

7) Edit NSExtensionFileProviderSupportsEnumeration to be set to NO.

8) Build and run the app, click the lone file displayed, observe the file is returned to the caller.


The only changes between these executions is to change the presence and value of NSExtensionFileProviderSupportsEnumeration.

This issue was fixed in iOS13.1 beta 2.

NSExtensionFileProviderSupportsEnumeration set to NO not respected on first run
 
 
Q