altf

iOS Wireless (OTA) App Distribution

Posted in Apple, mobile, QA, Tech by AltF on May 18, 2011

One of the major annoyance of developing a native mobile application for iOS is distributing internal builds to enterprise users/beta testers. Using the ad-hoc distribution method developer has to create a release build (.ipa or .app) with provisioning profile (.mobileprovision) and send both the files to the users who then copies these files to iTunes and syncs their device to the computer. And the users have to repeat this process each time there is a new build.

With iOS 4 you can now have over-the-air installation of applications. You can distribute in-house software to users without have them to use iTunes/Computer. Installing the app is simple. Users download the manifest file from your website to their iOS 4 device, which instructs the device to download and install the apps referenced in the manifest. You can distribute the URL for downloading the manifest file via SMS or email. You can also create a custom, easy-to-remember tiny url (http://tinyurl.com/) and share with your users.

It’s up to you to design and host the website used to distribute apps (I use simple touch friendly template for nested list of directories http://dev.sencha.com/deploy/touch/examples/nestedlist/) . You need to make sure that users are authenticated, perhaps using basic auth or directory-based authentication, and that the website is accessible via your intranet or the Internet. The app and manifest can be placed in a hidden directory, or in any other location that’s readable using HTTP or HTTPS.

Step 1. Creating the app (.ipa) and the manifest (.plist) file

  • In Xcode, you create an app archive using the “Build > Build and Archive” command.
  • Then, in the Archived Applications source in Xcode’s Organizer, select the app and click the “Share Application…” button.
  • Then click the “Distribute for Enterprise…” button.
  • In the distribution window, enter the title and the full url to the app (.ipa) file (path to the app on your webserver) for example, http://apollo42.com/testapp.ipa.
  • Xcode will then create the app (.ipa) and manifest (.plist) file based on the information you provided
  • The manifest file is a file in XML plist format. It’s used by an iOS 4 device to find, download, and install apps from your web server.

Step 2. Hosting the files on your web server

  • Along with the generated .plist and the .ipa files, you’ll need the provisioning profile and a simple index file.
  • Create a simple index file with the following href

<a href=”itms-services://?action=download-manifest&url=http://apollo42.com/testapp.plist”>Install app</a>

Note: When you archive using XCode4 + iOS 4.3 you might see “No Packager exists for the type of archive” message in the organizer when you click on share and Distribute for Enterprise option may also be missing in XCode4. This happens when you have some linked projects inside your main project. Go to the Build settings of linked projects and set the setting “Skip install” (Deployment section) to “Yes” (leave the “Skip install” of the main project to “No”). Build and Archive again and you should be able to select the ipa and the identity and when you click next you should see an option to “Save for Enterprise Distribution”

Editing APN on iPhone (3G/2.x fw) for carriers who don’t allow editing the APN

Posted in Apple by AltF on October 3, 2008

The new iPhone firmware 2.x doesn’t allow users to edit the APN for some carriers. In the new iPhone 2.0 Apple gave service providers the ability to disable this setting so you’ll automatically connect to the Internet through their network and incur their data access fees. What this also means is that you wont be able to edit the APN if its set to something else and you wont be able to access the Internet on their network until you change the APN. This means even if you have an officially unlocked iPhone, you can’t access Internet if you are on the network of service providers who don’t allow editing the APN setting.

So editing APN is useful in both scenarios 1. Those who want to change the APN to be able to access Internet 2. Those who want to change the APN value to some random string to avoid the hefty data charges.

Generally APN can be easily edited by going to Settings>General>Network>Cellular Data Network. Here’s the official guide to view/edit APN settings for the carriers who do allow editing.

For those who don’t allow editing – there are 2 ways to do it:

1. For those who have officially unlocked iPhone (Not Jailbroken): This is for people who have an officially unlocked iPhone (from Hong Kong, Singapore, Europe etc…) traveling to other countries and using a local sim on their unlocked iPhone. This is for users like me – I recently travelled to India (Bombay), i was using a local Vodafone sim card and wanted to change the APN so that i could use the Internet on my iPhone. Since my iPhone didn’t allow me to do so, i contacted the vodafone customer service and they were extremely clueless about the APN stuff – instead they advised me to get on a more expensive Internet data plan when i was already on a basic data plan. Knowing how clueless they were it was pointless to expect any help from them. Finally I figured out a way myself –

  1. Download and Install the iPhone Configuration Web Utility 1.0 for Windows (Mac version also available here) – This is basically for the enterprise customers to help them deploy configurations within their organization.
  2. After installation, open your web browser and access http://localhost:3000/ (Mac users – refer the guide)
  3. Enter Username/Password – admin/admin
  4. On the General tab – Edit Name, Identifier and Organization
  5. Click on Advanced tab – Edit the Access Point Name (APN)
  6. Back on the General tab click on Export Profile and save the configuration profile as a file
  7. Email yourself the configuration file as an attachment and open it on your iPhone
  8. Once you click on the attachment on iPhone it will prompt you about making configuration changes and warn you about no trusted signature, just click continue
  9. Once installed you will be able to access Internet if you entered proper APN string in step 5 or you wont be able to access Internet if your purpose was to disable Internet and you entered a random string in step 5.

2. For those who have unlocked/jailbroken iPhone: All you need to do is SSH to your phone and edit the carrier.plist file in /System/Library/Carrier Bundles/<YourCarrier>. (Example – in my case it was ../Carrier Bundles/Vodafone_in.bundle). Add the following:

<key>AllowEDGEEditing</key>
<true/>

just after

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”&gt;
<plist version=”1.0″>
<dict>

once done -you should be able to edit the APN on the iPhone by going to Settings>General>Network>Cellular Data Network.

For more help on edting .plist refer to the forums.

%d bloggers like this: