iOS app extension integration
Integrating Appfigurate Library into iOS app extensions
Last updated
Integrating Appfigurate Library into iOS app extensions
Last updated
iOS app extensions can be developed in both Swift and Objective-C.
Appfigurate Library works in most types of iOS app extensions.
You must perform the following before starting iOS app extension integration:
of Appfigurate Library.
In Xcode, tap on your iOS app extension target.
Tap the General
tab. Tap the +
button under the Frameworks, Libraries
section.
Select AppfigurateLibrary
package.
Share the iOS app's subclass with the iOS app extension.
Open your subclass (e.g. Configuration.swift/m
file) into the Xcode editor.
In the Target Membership
inspection pane tick on your iOS app extension target.
Tap on your iOS app extension target.
Tap the Signing & Capabilities
tabs. Add a Keychain Sharing
capability with a Keychain Groups
value that will be common across the iOS app and iOS app extension.
We recommend you have a .shared
suffix on your Keychain Groups value.
Tap on your iOS app target.
Tap Signing & Capabilities
tabs.
Add a Keychain Sharing
capability with the same Keychain Groups
value you entered for the iOS app extension above.
In your iOS app's Info.plist
file (right click, Open As
‣ Source Code
) include the APLKeychainAccessGroup
key replacing the value nz.co.electricbolt.appfigurateexample.shared
with your Keychain Sharing
's Keychain Groups
value.
Info.plist
example
If the APLKeychainAccessGroup
key is not defined, then keychain access group functionality is not used. Do not specify an empty or otherwise invalid APLKeychainAccessGroup
value.
iOS app extensions automatically use the Info.plist
file from the containing iOS app. You do not need to modify the iOS app extension's Info.plist
file.
To test that you've successfully updated your iOS app extension to use Appfigurate:
Compile and run your app to the Simulator instance.
Launch the Appfigurate Simulator app.
Tap your applications row. The app will be run and made visible, it's configuration read, and then swap back to Appfigurate.
Invoke your app extension. It should be using the shared configuration applied to the app.
Appfigurate's screen will now be displayed. You can now change the debugLogging
and serverURL
properties. Tap Apply⌄
to apply the configuration to your app.