Enable/Disable ShareExtension from host app

Is there a way that the host app for a file share extension can dynamicaly enable or disable its file share extension on IOS?

Replies

Is there a way that the host app for a file share extension can dynamicaly enable or disable its file share extension on IOS?

No. The choice of enabled app extensions is something that’s explicitly under the user’s control.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

So there is no way that the app itself can provide the user with a switch to enable/disable the feature?

Similarly for iTunes file sharing, it would be nice if the user could enable/disable the feature for possible security reasons.

So there is no way that the app itself can provide the user with a switch to enable/disable the feature?

Correct.

Similarly for iTunes file sharing, it would be nice if the user could enable/disable the feature for possible security reasons.

Securitywise, there is a mechanism to enable or disable app extensions, it’s just not an API. Speaking personally, I’d rather have such security enforced by the OS rather than by each individual app.

The iTunes file sharing case is more interesting. I don’t think there’s any UI to disable that, but there is a configuration profile option (

allowiTunesFileSharing
). You could file an enhancement request requesting that we surface that via Settings > General > Restrictions.

In both cases your app could disable this functionality internally:

  • Your app extension could refuse to do anything based on an app setting

  • Your app could ignore the Documents directory, storing its content elsewhere, based on an app setting

However, that seems rather extreme.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"