This example demonstrates configuring an iOS app extension. This specific example is an Action extension, but any iOS app extension type can be configured.
For Appfigurate to be able to configure app extensions the following must be observed:
APLConfigurationsubclass must be shared between the iOS app and app extension.
- Since the configuration is stored in the keychain, the keychain must be shared between the iOS app and app extension.
For more information on keychain sharing and associated
Info.plist attributes, see Advanced Configuration.
Assuming you've followed the AppfigurateExample instructions, testing the Action extension is easy.
ActionExample Extension (iOS)in Xcode scheme. Tap run.
- Xcode will prompt you with the following:
Photos, then tap the
- The Photos app will be launched on the Simulator (or connected device).
- Select a photo.
- Tap the
- A toolbar will appear. Swipe right to reveal the
- The ActionExample app extension will now be launched. The example doesn't do anything with a photo, but it does display a storyboard of the current configuration that is shared with the containing iOS app AppfigurateExample.
- Launch Appfigurate. Tap
- The screen will briefly flash and control will be given back to Appfigurate. The current configuration will be displayed.
- Change the boolean switch to the opposite value.
- Tap the
Apply ⌄button in navigation bar. The AppfigurateExample app will now be launched, and the configuration applied.
- Launch the Photos app again. The ActionExample Extension should still be displayed, if not follow the instructions above to redisplay.
- The ActionExample app extension storyboard of the current configuration will be displayed. The value of the boolean should be updated to reflect the value you applied.