Appfigurate™️
HomeDocumentation
  • Introducing Appfigurate™️ 3
  • Getting Started
    • Getting Started
    • Examples
    • Upgrade guide
      • v1.4.0 to v2.2.0
      • v2.1.1 to v2.2.0
      • v2.2.1 to v3.0.0
      • v3.2.1 to v4.0.0
    • iOS native app integration
      • iOS app extension integration
    • watchOS app integration
      • watchOS app extension integration
    • Android native app integration
    • Mobile Flutter integration
      • Flutter iOS
      • Flutter Android
    • React Native integration
      • iOS native module integration
      • Android native module integration
      • JavaScript integration
    • Third party remote configuration providers
      • Firebase Remote Config
      • Launch Darkly
      • Other third party remote configuration providers
  • Configuration subclasses
    • Supported property types
      • Boolean
      • Integer
      • Float
      • Double
      • Plain String
      • Encrypted String
    • Custom executable actions
    • Slider icon types
  • Additional reading
    • Info.plist options
    • AndroidManifest.xml options
    • Displaying overridden configuration
    • Security
      • Best practice
      • Encryption
      • Export compliance
      • App Store compliance
      • PrivacyInfo.xcprivacy
      • Rotating your private key
  • Automation testing
    • iOS native app automation testing
    • Android native automation testing
  • API
    • iOS and watchOS API
    • Android API
    • Mobile Flutter API
    • React Native API
  • Appfigurate User Guide
    • Introduction
    • Main menu
    • Select app
    • Add app
    • Import app
    • Install example apps
    • Settings
      • Passcode Lock
      • Restore
      • Backup
      • Delete all apps and Settings
      • Analytics
    • Edit app
    • Configure app
    • Permissions
  • Appfigurate SE user guide
    • Introduction
    • Manual encryption
      • ENCRYPTED_STRING macro/function
      • ENCRYPTED_STRING_IOS_WATCHOS macro/function
    • Setup iOS Simulator app
    • Setup Android Emulator app
    • Xcode source editor extension
      • Troubleshooting
    • Real device cloud testing services
      • BrowserStack
  • LEGAL
    • License Agreement
    • Privacy Policy
    • Release History
    • Third party notices
Powered by GitBook
On this page
  • Prerequisites
  • Add AppfigurateLibrary.xcframework to the watchOS app extension target
  • Share the watchOS app APLConfiguration subclass with the watchOS app extension
  • Setup Keychain Sharing in the watchOS app extension
  • Setup Keychain Sharing in the watchOS app
  • Edit Info.plist in the watchOS app
  1. Getting Started
  2. watchOS app integration

watchOS app extension integration

Integrating Appfigurate Library into watchOS app extensions

PreviouswatchOS app integrationNextAndroid native app integration

Last updated 5 months ago

watchOS apps can be developed in both Swift and Objective-C.

Appfigurate Library works in most types of watchOS app extensions.

Prerequisites

You must perform the following before starting watchOS app extension integration:

  • of Appfigurate Library.

Add AppfigurateLibrary.xcframework to the watchOS app extension target

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 APLConfiguration subclass with the watchOS app extension

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.

Setup Keychain Sharing in the watchOS app extension

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.

Setup Keychain Sharing in the watchOS app

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.

Edit Info.plist in the watchOS app

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

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>APLKeychainAccessGroup</key>
     <string>nz.co.electricbolt.appfigurateexample.shared</string>
     ...

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.

watchOS app integration
APLConfiguration
APLConfiguration