Preparing AdHoc distribution in Titanium Mobile

Xcode project schema

For each schema (KitchenSink, KitchenSink-iPad, KitchenSink-universal) select Archive and make sure that

Build Configuration is set to debug

 

Configure code signing for build targets

For each target, select Build Settings -> Code Signing -> Code Signing Identity

code signing configuration for Titanium

Make sure to select valid provisioning identity that you previously created on Apple’s provisioning portal for a particular iOS device/application. In my case, it was called com.nimble.KitchenSink and provisioning profile was called KitchenSink_AdHoc.  For identities to be recognized by Xcode you should have been installed Apple Developer’s certificate as well as your organization certificate into MacOS keychain.

Archive (produce final IPA file)

Select KitchenSink target, then from the main menu choose Product->Archive

Produce IPA file

Wait for Xcode to compile & archive. You may find resulting Archive in Xcode Organizer:

Kitchensink archive

Click “Share” and provide the same identity which was used for Code Signing section above:

IPA provisioning

Save resulting IPA file along with corresponding KitchenSink_Adhoc.mobileprovision   profile.

 

Install it on device

That’s the easiest part if you’ve done everything right.  Just drag&drop  mobileprovision & ipa  files into iTunes and run sync with an actual iOS device.

If you missed something for code signing, during iTunes sync, you might encounter errors like this:

The executable was signed with invalid entitlements.

The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.

Page 2 of 2 | Previous page

  • Jeff

    Or you can do a ‘Install to iOS Device’ from Titanium Studio and you never need to open XCode.  It even prompts you upload the correct provision profiles and installs them into XCode for you.

    • Anonymous

      The scenario you’re mentioning works OK when all you have to do is run app on your own device. When you want to showcase app for other people, meaning that they should be able to install it on their devices — you must tackle Xcode & provisioning stuff. Sadly, Titanium does not provide such functionality out of the box

      • Jeff

        Unless I’m mistaken, you can just copy the .ipa from your build/iPhone folder (after you do a Install to IOS device) for distribution without going into Xcode. I use testflight and just upload my .ipa from my build folder to share it. Does the process you are describing above do something different?

        • Anonymous

          Before you choose “Install to iOS”, Titanium will ask you for dev certificate & provisioning profile for your app. This works OK if you’re using your personal provisioning profile, but the whole process fails if you select AdHoc provisioning profile specifically created to distribute your app for other iOS devices. If you have not experienced those kind of issues, probably testflight does some magic for you behind the scenes

  • Pingback: This Week in Titanium Mobile Development: 20 Feb 2012 | Titanium Development()

  • Tim

    i’m not sure if you can see my reply or not. i follow up your steps exactly as above but now i get a weird problem: all the build / archive / install processes are successful, and i can start my app on my iPad.  BUT the app shows the startup picture and then nothing else (means it shows that picture forever but doesn’t run the real ‘app.js’)?

    attach is my console log in Titanium and the iPad console log. it’s weird that on my iPad the app runs successfully but the console doesn’t have the message ‘[INFO] Application started’ (i can run my app on iOS simulator successfully, through Titanium studio).

    thanks a lot.

    • Anonymous

      Hi!  not sure that I can help you in your iPad case, I have not tried preparing provisioning profiles for iPads, but process should be fairly similar to iPhone.  My suggestion would be to update your Titanium Studio/SDK to the latest available version (this writing was done before version 2.0 came up) and try to reproduce above steps

      p.s. If your app starts and shows startup screen on the device — that’s not a provisioning profile problem, you should debug your app logic to figure out what’s going on

  • Pingback: This Week in Titanium Mobile Development: 20 Feb 2012 | TiDev()