v2.1.1 to v2.2.0
Runtime compatibility
Appfigurate app 2.2.0 is backwardly runtime compatible with apps and app extensions linked against Appfigurate library 2.1.1.
Source compatibility
Appfigurate 2.2.0 is mostly source compatible with 2.1.1. Some minor changes are required:
Info.plist changes
Remove the
APLConfigurationClass
key/value pair. In order to improve reliability and startup time of your app, Appfigurate Library no longer uses theAPLConfigurationClass
key/value pair to instantiate yourAPLConfiguration
subclass. Instead it calls theAPLConfigurationClass
function that you implement (see Objective-C/Swift changes below):
Objective-C/Swift changes
Add a new C function
APLConfigurationClass
to the bottom of your APLConfiguration subclass:
Objective-C example
Swift example
Upgrading your APLConfiguration subclass from Objective-C ‣ Swift
One of the key features of Appfigurate 2.2.0 is support for Swift 5.3 using property wrappers. It is relatively simple to upgrade your APLConfiguration
subclass from Objective-C to Swift:
Output Swift implementation
Using Appfigurate tap ≡ ‣ App ‣ Output Implementation under the SWIFT LIBRARY INTEGRATION section. The output will be similar to the following:
Delete the debugLogging
and serverURL
properties and port your Objective-C properties across one-by-one as per the following Macros ‣ Property wrappers section below.
Macros ‣ Property wrappers
Appfigurate's swift property wrappers are named the same as the Objective-C macros making it easy to port:
Objective-C macro | Swift property wrapper |
---|---|
BOOL_PROPERTY | @BoolProperty |
STRING_PROPERTY_EDIT | @StringPropertyEdit |
STRING_PROPERTY_LIST | @StringPropertyList |
STRING_PROPERTY_LIST_EDIT | @StringPropertyListEdit |
ENCRYPTED_STRING_PROPERTY_LIST_EDIT | @EncryptedStringPropertyListEdit |
INT_PROPERTY_SLIDER | @IntPropertySlider |
INT_PROPERTY_EDIT | @IntPropertyEdit |
INT_PROPERTY_LIST | @IntPropertyList |
INT_PROPERTY_LIST_EDIT | @IntPropertyListEdit |
FLOAT_PROPERTY_SLIDER | @FloatPropertySlider |
FLOAT_PROPERTY_EDIT | @FloatPropertyEdit |
FLOAT_PROPERTY_LIST | @FloatPropertyList |
FLOAT_PROPERTY_LIST_EDIT | @FloatPropertyListEdit |
DOUBLE_PROPERTY_SLIDER | @DoublePropertySlider |
DOUBLE_PROPERTY_EDIT | @DoublePropertyEdit |
DOUBLE_PROPERTY_LIST | @DoublePropertyList |
DOUBLE_PROPERTY_LIST_EDIT | @DoublePropertyListEdit |
ACTION_METHOD | No Swift equivalent |
Objective-C Example
Swift Example
@objcMembers/@objc
You must either mark the entire APLConfiguration
subclass with @objcMembers
(recommended approach) or mark each configuration property individually with @objc
. Omitting these markers will cause the properties to be unavailable for access by Appfigurate Library.
@objcMembers Example
@objc Example
Last updated