Skip to content
Jonathan Chan edited this page Jul 24, 2018 · 3 revisions

File substitution contents

Files at the app or module directory named as any of the below will substitute its contents into the described areas upon compilation for iOS.

IOS_objc_defines

C #define macros.

IOS_objc_additions

Additional Objective-C code.

IOS_objcpp_additions

Additional Objective-C++ code.

IOS_framework_additions

A list of frameworks to include when compiling, in the format -framework <your-framework>.

IOS_framework_searchpath

A list of framework paths to include when compiling, in the format -F<framework-path>

IOS_launcherappdelegate_additions

Additional Objective-C code that will be included in the main UIApplicationDelegate. This file is commonly used to override other methods of UIApplicationDelegate (excluding application:didFinishLaunchingWithOptions:, applicationWillResignActive:, applicationDidBecomeActive:, applicationDidEnterBackground:, applicationWillEnterForeground:, applicationWillTerminate:, and dealloc), as listed here.

IOS_launcherappdelegate_didfinishlaunching

Objective-C code to be executed in the main UIApplicationDelegate's override of application:didFinishLaunchingWithOptions:. This will be inserted before the call to trigger the EVENT_INIT event in Scheme. Its UIApplication* argument is named application and its NSDictionary* argument is named launchOptions.

IOS_xml_backgroundmodes

XML that will be inserted into the app's Info.plist file under the key UIBackgroundModes; that is, it will be inserted as marked below by @HERE@.

<key>UIBackgroundModes</key>
<array>
@HERE@
</array>

IOS_xml_requireddevicecap

XML that will be inserted into the app's Info.plist file under the key UIRequiredDeviceCapabilities, similar to how IOS_xml_backgroundmodes is inserted.

IOS_xml_additions

XML that will be inserted into the app's Info.plist file under the <dict> tag. Entries will need a <key> entry followed by its value entry, commonly an <array>, a <dict>, or a <string>. For instance, in ShareVitalSigns, to add the URL schemes svs-rr, svs-rrtaps, and svs-rrate, we have the following in this file:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>org.ecemgroup.sharevitalsigns</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>svs-rr</string>
            <string>svs-rrtaps</string>
            <string>svs-rrate</string>
        </array>
    </dict>
</array>
Clone this wiki locally