Step 3: Modify configFile.txt
-
In the Xcode Custom Application Resources folder, click configFile.txt.
-
Update the following information:
-
launchSolution: Specify the custom app file to open when your app is launched. The filename is case sensitive.
-
(optional) helpURL: Specify the URL for your app's Help menu. If no URL is specified, the Help menu is removed from the app.
-
-
Update the value for solutionCopyOption to specify when to copy the files in the Solution Files folder to the Documents directory on the iOS device. You can specify either the number or the string.
Warning Set this option to 1 only for testing your app. Enabling this option causes all custom app files to be replaced every time the app is launched.
-
1 (always): The custom app files are copied every time the app is launched.
-
2 (once): The custom app files are copied only the first time the app is launched.
-
3 (versionChange): The custom app files are copied the first time the app is launched or whenever the app's version number changes. You specify the version number in Step 7: Specify the version and build number.
-
4 (buildVersionChange): The custom app files are copied the first time the app is launched or whenever the app's build number changes. You specify the build number in Step 7: Specify the version and build number.
-
-
(optional) If you used FileMaker Pro to encrypt your custom app files, use the dbePassword option to specify the encryption passwords. The passwords will be embedded in the app, but obfuscated to make reconstructing them difficult.
-
(optional) To add your own app delegate, add the Swift or Objective-C file that includes the app delegate to your project in Xcode. Then use the applicationDelegateClass option in configFile.txt to specify the name of the class that defines your app delegate. When the app launches, an instance of the class is created to receive the UIApplicationDelegate messages. You need to implement only the UIApplicationDelegate messages that you want your app delegate to receive. For a list of UIApplicationDelegate methods, see the Apple UIKit documentation.
To find out when your app returned to the foreground and finished reauthentication and reconnecting to remote files, use the following app delegate method:
- (void)completedReturnToForegroundActive
Example 1
In the following example, a FileMaker script called MyScript is invoked if the device orientation changes.
#import <UIKit/UIKit.h>
#import "FMX_Exports.h"
@interface MyDelegate : NSObject
@end
@implementation MyDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"MyDelegate: %s", __func__);
return YES;
}
- (void)completedReturnToForegroundActive
{
NSLog(@"MyDelegate: %s", __func__);
}
- (void)application:(UIApplication *)application didChangeStatusBarOrientation: (UIInterfaceOrientation)oldStatusBarOrientation
{
NSLog(@"MyDelegate: %s Calling FMX_Queue_Script", __func__);
NSDictionary<NSString *, NSString *> *variables = @
{
@"$a": @"Value of $a",
@"$z": @"Value of $z"
};
if (FMX_Queue_Script(@"MyFile", @"MyScript", kFMXT_Pause, @"A script param", variables))
{
NSLog(@"MyDelegate: FMX_Queue_Script Succeeded");
}
else
{
NSLog(@"MyDelegate: FMX_Queue_Script Failed");
}
}
@end