Skip to content

WatchExample

Electric Bolt edited this page Jun 21, 2020 · 6 revisions

Documentation

HOME

UPGRADE 1.4.0 to 2.2.0
UPGRADE 2.1.1 to 2.2.0

INTEGRATION

EXAMPLES
    AppfigurateExample
    ActionExample Extension
    WatchExample
    WatchExample Intent Extension

CONFIGURATION
    APLConfiguration subclass
        Custom executable actions
        Supported property types
            BOOL
            NSInteger
            float
            double
            plain NSString
            encrypted NSString
               ENCRYPTED_STRING
               Best practice
               String Encryption util
                  Troubleshooting
        UISlider icon types
        Overrides
    Advanced configuration
        App Startup
        Info.plist
        WCSession
    Additional functions
    Display overridden config

SECURITY
    Export compliance
    Best practice
    App Store compliance

TESTING
    Automation testing

Clone this wiki locally

  Setup
  Reading current configuration
  Changing and applying configuration

For Appfigurate to be able to configure watchOS apps the following must be observed:

  • APLConfiguration subclass can optionally be shared between the iOS app and watchOS app.
  • When configuring with Appfigurate, the app on the watch must be running in the foreground.
  • If your watchOS app uses WCSessionDelegate, then you may need to call APLSessionDidReceiveMessage() programmatically. See WCSession section of Advanced configuration.

Setup

  • Assumes you've followed the prerequisites to install example app metadata.
  • Select WatchExample (ObjC watchOS) or WatchExample (Swift watchOS) in Xcode scheme drop down.
  • Tap run to install WatchExample onto the Apple Watch, and AppfigurateExample onto the paired iPhone.
  • The Apple Watch will display the following:
  • The example displays a storyboard of the current configuration.

Reading current configuration

  • On the paired iPhone, run Appfigurate.
  • Note that your app name is currently listed as example. The first successful launch of WatchExample will see the app name, version number and icon updated.
  • Tap the example row. AppfigurateExample will now be launched on the paired iPhone. The iPhone will proxy the configuration request to the Watch.
  • The screen will briefly flash and then control will be given back to Appfigurate, at which point the current configuration of WatchExample will be displayed on the screen:

Changing and applying configuration

  • Change the boolean switch to the opposite value.
  • Tap the Apply ⌄ button in navigation bar. The AppfigurateExample app will now be launched on the iPhone. The iPhone will proxy the configuration payload to the Watch.
  • The WatchExample will have the configuration payload applied, and the screen will update reflecting the new boolean value.