Skip to content

WatchExample Intent Extension

Electric Bolt edited this page Jun 21, 2020 · 2 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
  Changing and applying configuration

For Appfigurate to be able to configure app extensions the following must be observed:

  • APLConfiguration subclass must be shared between watchOS app extension and watchOS intent extension.
  • Since the configuration is stored in the keychain, the keychain must be shared between the watchOS app extension and intent extension

For more information on keychain sharing and associated Info.plist attributes, see 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.
  • Once WatchExample is running, long press the digital crown to invoke Siri.

Siri will be invoked:

Speak the following "send message using watch example".

If Siri responds with "unknown app watch example", then you should try again. Siri can take several minutes to recognise a new intent. See Xcode documentation Test Your Intents App Extension for more details.

Speak the following "bob".

In the console, you will see NSLog output, showing the current configuration of boolean property in the ExampleConfiguration class.

Changing and applying configuration

Using Appfigurate on the paired iPhone, change the boolean property to the opposite value and click Apply. Speak again to Siri, and notice that the NSLog output in console has now changed.