In a GeneXus model there are several ways available to run and prototype an application for iOS, such as via a simulator or an actual device. The purpose of this property is to set an execution option.

Values

iPhone Simulator (Mac)

It transfers to a Mac the XCode project corresponding to the application and starts the iPhone emulator. This is the default value.

iPad Simulator (Mac)

It transfers to a Mac the XCode project corresponding to the application and starts the iPad emulator.

iOS Device (Mac)

It transfers the XCode project to a Mac, compiles the application and runs it in the device connected to the Mac.
The Development Team ID property must be set.

iTunes Sync (Local) (*)

It transfers the XCode project to a Mac and compiles the application generating an .ipa file. Next, it copies it from the Mac to a PC (note that the Output window of the GeneXus IDE shows the path where it was copied to) and automatically opens iTunes to show the application in the application catalog.

Build IPA (Local) (*)

It compiles the application in a Mac and generates an .ipa file in the GeneXus model directory without opening iTunes.

Build for Distribution (Local) (*)

It compiles the application on a Mac using the distribution signature and generates an .zip file in the GeneXus model directory.

Knowledge Base Navigator

It allows running the application in a device (not in the emulator) that is registered in a gxtechnical.com user profile and has the corresponding KBN installed.

(*) Deprecated as of GeneXus 15 Upgrade 1 / Evolution 3 Upgrade 11.

 

Scope

Applies to Smart Devices Generator
Platforms Apple

 

Considerations

GeneXus uses the Xcode command Line tools package to generate the application on the MAC environment using the xcodebuild command. The output of the build operation is a .app file under the build/Release folder of your project.

Then, depending on the Execution Type selected option, a .ipa or zip file is generated. A .ipa file is an iOS application archive file which stores an iOS app.

When generating the application an iOS Development provisioning profile matching your application 'iOS Bundle Identifier' will be automatically selected; otherwise an error will appear.

A .ipa file (Build IPA (Local)) is generated by copying the folder with the extension .app from the application Products folder to a folder called Payload and compressing the latter. This is an example of this procedure:

sshExec: cd ~/Documents/Projects/samplekb/MyApp;
security list-keychains -s ~/Library/Keychains/login.keychain;
security unlock-keychain -p <password> ~/Library/Keychains/login.keychain;
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk iphoneos8.0 -configuration Release clean build 2>&1
Building IPA
sshExec: mkdir -p /Users/user/Documents/Projects/samplekb/MyApp/build/Release-iphoneos/ipa/Payload
sshExec: cd /Users/user/Documents/Projects/samplekb/MyApp/build/Release-iphoneos/;cp -RHp MyApp.app ipa/Payload/
sshExec: cd /Users/user/Documents/Projects/samplekb/MyApp/build/Release-iphoneos/;ditto -c -k -X --rsrc ipa ./MyApp.ipa
c:\models\samplekb\JavaModel\mobile\iOS\MyApp\MyApp.ipa

A .zip file (Build for Distribution(Local)) is generated by copying the folder with the extension .app to a zip file; notice that GX creates a secondary zip file with the dSYM files too. dSYM files store the debug symbols for your app. It allows you to match up the debugging symbols with the application’s crash log to help determine the cause of a crash.

When using this option an iOS Distribution certificate is needed to sign the application; notice that a matching profile with your 'iOS Bundle Identifier' will be selected.

cd ~/Documents/Projects/samplekb/MyApp;
security list-keychains -s ~/Library/Keychains/login.keychain;
security unlock-keychain -p <password> ~/Library/Keychains/login.keychain;
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk iphoneos8.1 -configuration Distribution build 2>&1
Building ZIP
sshExec: cd /Users/user/Documents/Projects/samplekb/MyApp/build/Distribution-iphoneos/;ditto -c -k -X --rsrc --keepParent MyApp.app ./MyApp.zip
sshExec: cd /Users/user/Documents/Projects/samplekb/MyApp/build/Distribution-iphoneos/;ditto -c -k -X --rsrc --keepParent MyApp.app.dSYM ./MyApp.dSYM.zip

Note: Options described in this section are deprecated as from GeneXus 15 Upgrade 1 / Evolution 3 Upgrade 11

 

See also

Generate Apple property
Mac Host, Mac User and Mac Password properties
Building from the Command Line with Xcode FAQ
http://en.wikipedia.org/wiki/.ipa_(file_extension)
iOS File System