Swift
Output source code snippets
In Appfiguate Simulator app, under the SWIFT/IOS LIBRARY INTEGRATION section:
Tap Output implementation
then tap Console
.
Tap Output UIAppDelegate snippet
then tap Console
.
Tap Output UIWindowSceneDelegate snippet
then tap Console
.
Tap Output Info.plist snippet
then tap Console
.
The output will appear in the macOS Console.app
. Select the iOS Simulator device in the left hand pane. Type process:appfigurate
in the search box in the top right.
Create APLConfiguration subclass
In your app, add a new Swift class, subclassing APLConfiguration
, called Configuration
.
In your apps Configuration.swift
file, paste the .swift implementation file output to the Console in Output source code snippets.
Note: your public key output to the Console in Output source code snippets will be different to the public key in the following example.
The APLConfigurationClass
function with C calling convention must be implemented in your app otherwise a linker error will be issued. The recommended place to implement is at the bottom of your APLConfiguration
subclass.
Edit Info.plist
In your apps Info.plist
file (right click, Open As ‣ Source Code). Paste the Info.plist
snippet output to the Console in Output source code snippets.
If you already have an existing CFBundleURLTypes
array in your Info.plist
file, then insert just the <dict> ... </dict>
portion.
Update UIApplicationDelegate
In your apps AppDelegate.m
file, include calls to APLApplicationOpenURL
and APLDidFinishLaunchingWithOptions
. Paste the UIApplicationDelegate
snippet output to the Console in Output source code snippets.
Update UIWindowSceneDelegate
If your app targets iPadOS 13+, in your apps SceneDelegate.m
file, include a call to APLApplicationOpenURL
. Paste the UIWindowSceneDelegate
snippet output to the Console in Output source code snippets.
Test your configuration
To test that you've successfully updated your app to use Appfigurate:
Compile and run Quickstart
to the same Simulator instance that Appfigurate Simulator was run from previously.
Press Shift-Cmd-H
to get back to the Simulator home screen.
Tap the Appfigurate app icon.
Tap the Quickstart
row. The Simulator screen will briefly flicker as it swaps to the Quickstart
app, reads its configuration and swaps back to Appfigurate.
Appfigurate will now be displayed and showing the following screen:
Since we added a
@BoolProperty
fordebugLogging
and@StringPropertyListEdit
forserverURL
, you can now change these configuration items at runtime. TapApply⌄
to apply the configuration to theQuickstart
app.
Now jump to Supported property types.
Last updated