Recents

Execution Type propertyOfficial Content
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

Build for Distribution (Local) It compiles the application on a Mac using the distribution signature and generates a *.ipa file in the GeneXus model directory.
Build IPA (Local) It compiles the application in a Mac and generates a *.ipa file in the iOS GeneXus model directory without opening iTunes.
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.
Knowledge Base Navigator (Device) 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.
Simulator (Mac) It transfers to a Mac the XCode project corresponding to the application and starts the iPhone or iPad emulator. This is the default value.

Description

Warning: Local building options have been reintroduced as of GeneXus 15 Upgrade 5, but there are unavailable for GeneXus 15 U1, U2, U3, U4, in such case, refer to HowTo: Create an .ipa file from XCode for creating it manually.

Considerations

  • 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 is an iOS application archive file which stores an iOS app.

  • GeneXus uses a XCode command Line tools package called xcodebuild to generate the application in the MAC environment.
    This is an example of the process that GeneXus executes in order to build an *.ipa file.

sshExec: cd /Users/<MacUser>/Documents/Projects/<KBame>/<Environment>/<Main object name>;
    security list-keychains -s ~/Library/Keychains/login.keychain;
    security unlock-keychain -p <password> ~/Library/Keychains/login.keychain;
    /Applications/Xcode_<X>_<Y>.app/Contents/Developer/usr/bin/xcodebuild 
        -scheme "<MainObjectName>" -configuration Release archive -archivePath build/<MainObjectName>.xcarchive SYMROOT=\$SRCROOT/build 2>&1
sshExec: cd /Users/<MacUser>/Documents/Projects/<KBame>/<Environment>/<MainObjectName>;
    echo -e '<?xml version="1.0" encoding="UTF - 8"?>\n
        <!DOCTYPE plist PUBLIC " -//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n
        <plist version="1.0">\n
        <dict>
            <key>method</key>
            <string>development</string>
        </dict>
        </plist>' > build/GXArchiveExportOptions.plist;
    security list-keychains -s ~/Library/Keychains/login.keychain;
    security unlock-keychain -p <password> ~/Library/Keychains/login.keychain;
    /Applications/Xcode_<X>_<Y>.app/Contents/Developer/usr/bin/xcodebuild 
         -exportArchive -archivePath build/<MainObjectName>.xcarchive -exportOptionsPlist build/GXArchiveExportOptions.plist -exportPath build 2>&1
C:\<ModelPath>\<KBame>\<Environment>\mobile\iOS\<MainObjectName>\<MainObjectName>.ipa
  • The 'development' method value is used for iTunes sync and Build IPA optionsIn the other hand, the 'app-store' method value is used for Build for Distribution option. This value is stored in an intermediate file build/GXArchiveExportOptions.plist

  • It's highly recommended that the developer stores the build/<MianObjectName>.xcarchive file in every release of the application.

 

Scope

Platforms: Smart Devices(IOS)

See Also

Generate iOS property
HowTo: Prototyping My iOS Application on My Mac
Building from the Command Line with Xcode FAQ
http://en.wikipedia.org/wiki/.ipa_(file_extension)
iOS File System

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.