watchOS app extension integration
Integrating Appfigurate Library into watchOS app extensions
Last updated
Integrating Appfigurate Library into watchOS app extensions
Last updated
watchOS apps can be developed in both Swift and Objective-C.
Appfigurate Library works in most types of watchOS app extensions.
You must perform the following before starting watchOS app extension integration:
of Appfigurate Library.
In Xcode, tap on your watchOS app extension target.
Tap the General
tab. Tap the +
button under the Frameworks, Libraries
section.
Select AppfigurateLibrary
package.
Share the watchOS app's subclass with the watchOS app extension.
Open your subclass (e.g. Configuration.swift/m
file) into the Xcode editor.
In the Target Membership
inspection pane tick on your watchOS app extension target.
Tap on your watchOS app extension target.
Tap the Signing & Capabilities
tabs. Add a Keychain Sharing
capability with a Keychain Groups
value that will be common across the watchOS app and watchOS app extension.
We recommend you have a .shared
suffix on your Keychain Groups value.
Tap on your watchOS 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 watchOS 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.
watchOS app extensions automatically use the Info.plist
file from the containing watchOS app. You do not need to modify the watchOS app extension's Info.plist
file.