Skip to content

AppfigurateExample

Electric Bolt edited this page Jun 21, 2020 · 22 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
  Resetting configuration

Demonstrates all possible variations of the configuration property types: BOOL, NSInteger, float, double, plain NSString and encrypted NSString.

Setup

  • Assumes you've followed the prerequisites to install example app metadata.
  • Select AppfigurateExample (ObjC iOS) or AppfigurateExample (Swift iOS) in the Xcode scheme drop down. Tap run to install into the Simulator (or connected device). The app will display the following screen:

Reading current configuration

  • Run Appfigurate.
  • Note that the app name is currently listed as example. The first successful launch of AppfigurateExample will see the app name, version number and icon updated.
  • Tap the example row. AppfigurateExample will now be launched. You will need to give Appfigurate permission to launch AppfigurateExample, and vice versa (these prompts will occur only once).
  • The screen will briefly flash and control will be given back to Appfigurate. The current configuration of AppfigurateExample will be displayed:

In the header section, you'll see the following text:

  • Appfigurate library version 2.0.0 - this tells us what version of AppfigurateLibrary.xcframework was linked into AppfigurateExample.
  • Signature is valid - the digital signature of the configuration payload is correct. The public key in the example app is correctly paired with the private key in the app metadata in Appfigurate.
  • Debug build - App allows invalid signature - this tells us that the allowInvalidSignatures method in the app returned YES - which means this is a DEBUG build.

Changing and applying configuration

Below the header section, the table rows list all of the configuration properties coded into the ExampleConfiguration.h/ExampleConfiguration.m (Objective-C) or ExampleConfiguration.swift (Swift) files. We will now change some of the configuration property values:

  • boolean - toggle the switch to the OFF position.
  • string_List - select Medium from the list.

We are now ready to apply the updated configuration to the AppfigurateExample app.

  • Tap the Apply ⌄ button in navigation bar. The AppfigurateExample app will now be launched, and the configuration applied. A dialog will appear: Appfigurate - Configuration applied. Tap OK to dismiss.
  • The AppfigurateExample app should now display the following:
  • The configuration is persisted to the keychain, and will reset to defaults after 7 days.
  • The APLConfigurationLabel on the left hand side of the view controller is optional. For more information see displaying overridden configuration.

Resetting configuration

  • Tap the < Appfigu... text in the status bar to relaunch Appfigurate.
  • Tap Example 2.0.0. Notice how the name, version and icon have been updated.
  • The screen will briefly flash and control given back to Appfigurate. The current configuration of AppfigurateExample will be displayed.
  • To reset the app's configuration back to defaults, long press the Apply ⌄ button in the navigation bar. The following menu will be displayed:
  • If you're running on a real device rather than the Simulator, you'll have some additional options for applying configuration remotely (through SMS/Email).
  • Tap the Reset this device option.
  • The AppfigurateExample app will now be launched, and it's configuration reset back to defaults.