Follow the instructions for setting up the development environment for building iOS applications.
Alternatively, you can create the device builds remotely with RhoMobile hosted builds. Refer to our remote build guide for more info.
The iOS SDK that is specified in your build.yml will need to be in the default XCode folder or the build process will not be able to find it.
iphone: SDK: iphoneos7.0
iphone: SDK: iphonesimulator7.0
With these SDKs specified, you need to make sure the SDKs are in the right folder. To find your default XCode installation directory, you can run the command
xcode-select --print-path in your terminal. This will return something like this:
$ xcode-select --print-path /Applications/Xcode.app/Contents/Developer
This is the path that the build process will use when looking for your iOS SDKs. If you have an SDK that you will be using but, it’s in another folder you’ll need to move it to the appropriate folder in this directory. For Example, if I have an iphoneos6.0 SDK that I want to use but it’s in my downloads folder, I’ll need to move it
The iphoneos and iphonesimulator SDKs go in two different folders:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs– iPhoneOS SDKs, for running apps on your iOS device.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs– iPhoneSimulator SDKs, for running apps in your iOS simulator.
Note: These paths are solely for your information, they do not need to be copied into any files to be used. These are simply the directories in which you need to store your SDKs for them to work with the RhoMobile build process.
To start the build process, create a Run Configuration: select your project in the Project Explorer, and do one of the following actions.
The Run Configurations window appears.
To run on the iOS simulator, select iPhone in Platform, Simulator in Simulator type, and select iPhone or iPad. Then click the Run button.
If you wish to run your RhoMobile application on an iOS device, you need to build and run it using an Xcode project. There are two ways to do this:
Both from the command line:
This will create the xcode project but will also run the app in the iphone simulator.
$ rake run:iphone
If you want to create the XCode project without running your app in the simulator, use this command instead.
$ rake build:iphone:setup_xcode_project
After the app has built, it will create an XCode project and place it in your project folder in the app’s root directory. e.g.
<path to app>/project/iphone/<name of app>.xcodeproject.
Then in XCode open the
<path to app>/project/iphone/<name of app>.xcodeproject project.
In the Xcode Scheme menu, select the proper scheme before you build and run your project. Click on the Scheme menu.
Select the scheme rhorunner and what platform you would like to build to.
Now you can build and run in Xcode to run your project in the iOS simulator.
If you are an Apple developer, you can run your RhoMobile application on your iOS device. In Xcode, select your rhorunner target, click on the Build Settings tab, and see that your code signing information that you installed as an Apple developer is set up and selected.
You should see your app’s XCode project listed in the XCode window title. In the case below, my app’s name is build-ios-test and the .xcodeproject file is Buildiostest.xcodeproject.
Plug in your iOS device. In Xcode, under Scheme, select iOS device under rhorunner, then build and run.
For more information on running on your iOS device from Xcode, go to the Apple developer site, go to the iOS Developer Library, and search on “managing devices”, or “run applications on a device,” or similar.
You can edit your RhoMobile code for your RhoMobile application in a text editor, save your changes, do a Clean in Xcode so that your changes will register in Xcode, and then rebuild and run your project from Xcode.
The resulting application package (*.app) is located in your RhoMobile source code folder under /platform/iphone/build/, in a folder named like [Debug/Release]–[iphoneos/iphonesimulator]/rhorunner.app.
Note: After any modification to the build.yml file, you’ll want to regenerate the XCode project using the command
By default, the scheme name, product name, and target name are “rhorunner”. This is simply cosmetic at this point but you can change it if you like. To change these items:
Click the name rhorunner as if to change the scheme. You’ll get a dropdown menu with the option “Manage schemes”. Click this and you’ll be presented with a list of schemes. Click the rhorunner scheme and either click it again or press the Enter key to rename it to your app’s name.
In the middle pane of XCode, click the “Build Settings” option at the top. In the list of build settings you’ll find the heading “Packaging” and in this section, expand the “Product Name” item. You can then click on the name “rhorunner” to change this name to you app’s name.
In the middle pane of XCode, click the drawer button to expand the drawer and reveal the “Project” and “Target” items. Just as before, you can single-click the highlighted “rhorunner” item to rename it to your app’s name.
Here are the pieces that can be renamed to match your app’s name:
From XCode 4.2 on, Apple removed default support of the armv6 architecture. In this case there are two issues.
Your distribution build should include code for both armv6 and armv7. The XCode projects included with RhoMobile and used for build RhoMobile-based applications for iOS are already fixed for this.
If you want to build/run/debug your application on devices before iPhone4/iPad (for example, on iPhone 3G), you should manually path all your native extension xcode projects used in your application for Architecture settings. In your project, under Build Settings –> Architectures, click the Debug or Release row (depending on if you are debugging or releasing), and choose “Other”. In the pop-up box, modify as follows.
$(ARCHS_STANDARD_32_BIT)and replace by typing
Unlike building the application from the Xcode GUI, when you build the application from the command line, use the rake command from the directory of the application that you had just generated with the rhodes command.
From the command line, navigate to the folder for your RhoMobile application.
To run your RhoMobile application in the iPhone simulator, run this rake command:
$ rake run:iphone
After you have modified and debugged your RhoMobile application, you can prepare your application to install to your iOS device.
First, in your application’s build.yml file, change sdk to iphoneos instead of iphonesimulator, configuration to Release instead of Debug, and add information such as codesignidentity.
sdk: iphoneos4.3 configuration: Release codesignidentity: "iPhone Developer" entitlements: ""
The default build.yml settings generated for iphone are:
name: myapp version: 1.0 iphone:
provisionprofile: sdk: iphonesimulator3.0 entitlements: codesignidentity: configuration: Debug emulator: 3.0 emulatortarget: iphone BundleIdentifier: com.yourcompany.yourapp BundleURLScheme: yourapp entitlements_file: "./production/Entitlements.plist" production: app_plist_title: "myapp" app_plist_subtitle: "myapp" app_plist_icon_url: "www.yourcompany.com/icon.png" app_plist_ipa_url: "www.yourcompany.com/myapp.ipa" ipa_itunesartwork_image: "./production/image.jpg"
** > Note: BundleIdentifier and BundleURLScheme can contain only next symbols : “a”–“z”, “A”–“Z”, “0”–“9”, “–”, “.” !
Here is an example of the iPhone settings in build.yml for a finished application:
name: JS App version: 1.0 iphone:
provisionprofile: E5931D39-CA68-48E4-A3AF-BB538E1C8CE6 sdk: iphoneos4.2 codesignidentity: "iPhone Developer: John Smith (MF99RW67WY)" entitlements: "" configuration: Release emulator: 4.2 emulatortarget: ipad BundleIdentifier: com.johnsmithcompany.jsapp BundleURLScheme: jsapp
Now you can create your .app file with this rake command:
$ rake device:iphone:production
The package named your application name.app will be placed to
<your application folder>/bin/target/iOS/[sdkname]/[configuration]/[your application name].app if you are using RhoMobile from 2.2.4 version.
Result package named rhorunner.app will be placed to
<sdk directory>/platform/iphone/build/[Debug/Release/Distribution]-[iphoneos/iphonesimulator]/rhorunner.app if you are using RhoMobile before 2.2.4 version.
Use iTunes for installing your application package (your_application_name.app) to the iOS device:
After you have tested your RhoMobile application on your iOS device and tweaked it as required, you can prepare your application for publishing to the App Store.
Update your application’s
build.yml file, change configuration to Distribution, and make sure
sdk is set to to iphoneos and add information such as codesignidentity.
Here is an example of the iPhone settings in build.yml for distribution:
name: JS App version: 1.0 iphone: provisionprofile: E5931D39-CA68-48E4-A3AF-BB538E1C8CE6 sdk: iphoneos4.2 codesignidentity: "iPhone Developer: John Smith (MF99RW67WY)" entitlements: "" configuration: Distribution BundleIdentifier: com.johnsmithcompany.jsapp BundleURLScheme: jsapp
You will need to provide a name and icon for the application that the user will see on the device. You can also customize the loading screen that is shown while your application is launching. Refer to the Application Icon and Splash Screen guide for detailed information.
You must also include the following icon sizes for your app in order for it to pass App Store requirements:
In addition to these, you need to also add icons for iTunes artwork images to be shown in iTunes and the AppStore application. Rhodes now generates iOS apps with the following image files:
Simply put your images in place of these with the same names to customize the images.
Update your application’s configuration files to make sure developer / debug / profile options are turned off.
The below values can be used as a guide for
rhoconfig.txt, skip any setting which is not already present.
MinSeverity = 3 LogToOutput = 0 net_trace = 0 log_skip_post = 0
The below values can be used as a guide for
build.yml, skip any setting which is not already present.
Once you have finished configuration, you can run:
$ rake device:iphone:production
The signed package named
[app-name].app will be created in
When your application is ready to be distributed to other users, either for beta testing or for deployment, you have several options:
All options require you to be enrolled in one of Apple’s iOS Developer Programs and to have created signing certificates. iOS code signing and certificate management are often a stumbling block for newcomers to the platform; refer to About App Distribution and read the instructions carefully.
For application testing purposes, Apple allows you to designate up to 100 devices that will be able to install your application. When you have the devices signed up in iTunes Connect (Apple’s app management portal), create a distribution certificate and ad-hoc provisioning profile. Together, these two files allow you to digitally sign your application and install it on the registered devices.
See the section called Beta Testing Your iOS App in Apple’s documentation for the details.
You need a “distribution provisioning profile” to sign your application before it can be submitted to the App Store. See Creating Store Provisioning Profiles for steps to create and download a distribution provisioning profile.
To ensure that your application passes the app store approval process go through the Guidelines carefully.
Many applications can benefit from using native UI elements, like the native tab bar, to better integrate with the rest of the platform. There are plenty of RhoMobile applications on the App Store available already; in general, if your application follows the iOS Human Interface guidelines and does not otherwise violate any App Store rule, it will be accepted.
Once your application is submitted successfully you can view its review status by referring to these steps.
In iOS7, the system status bar does not have a size and does not shift the application window down, because it is transparent and always drawn over the application window. This can be an issue for older applications because the system status bar is drawn over the WebView content located at the top.
To resolve this issue we reserve some room at the top of the application (with a gray color fill) and shift the WebView down, as with the old status bar. In this case all applications using an SDK older that iOS7 will work without content placing/showing issues.
If you want to use the whole space for the WebView you can use the following special build.yml parameter which works only for applications using the iOS 7.0 S
To enable the new iOS7 look for the status bar, simply add iphone_use_new_ios7_status_bar_style: 1 to your build.yml file.
Newer iPhones (iPhone 5 and up) have larger screen (longer screen), so applications that want to use whole screen should have a special loading splash screen image –
email@example.com with 640 x 1136 size. Only applications with this loading image use the whole screen. Other applications that detect that the device is older that iPhone 5 should start with reduced screen size splash which is appropriate for that device, most likely equal to old phones' resolution, 640x960.
Any RhoMobile app originally built with 4.1 and then later rebuilt with 5.1 to target Apple iPhone 5, 5C or other Apple devices that incorporate the ARM v7 instruction set, might return the error:
“Undefined symbols for architecture armv7 lD: symbol(s) not found for architecture armv7”
Although support for the ARMv7 architecture was implemented in RMS 5.1, apps built with previous versions contain incompatible components that will cause the app to fail when rebuilt.
To solve the problem: