in Blog Posts, iOS Development, Solution

“Distribute” an under development app without enrolling iOS Developer Program

You are developing an iOS App.

Prior to Xcode 7, you have to enroll into Apple’s iOS Developer Program (IDP) to install an App to a device, either yours or your friend’s.

Now in Xcode 7, you can compile and deploy an under development App to your device.
The problem is: How do you “distribute” your App to your friend?

I quoted the “distribute” here, because I am talking about a casual situation that it is not a serious distribution but only within a small scope.

If your friend lives nearby, this is easy. You do the something you did for yourself. You connect his/her device to your Mac/Macbook and use Xcode to install the App.

If you need to make this happen remotely, we need some work. This solution only works if your friend has a Mac with Xcode 7 installed.

There are two options.

1. You send the whole project to your friend and ask him/her to compile it and deploy it to the device. This requires advanced knowledge if your project is somehow complex.

2. After you compiled your App, you can get the actually “AppName.app” file after compiling it for device from Xcode. You send this “AppName.app” to your friend. He/she can open Xcode and follow “Window->Device”, then drag-n-drop the “AppName.app” to his/her device.

However, it is very likely that the second option will show an error “a valid provisioning profile for this executable was not found” on your friend’ screen.

This is because without IDP, the provisioning file we get from Xcode contains the exact UDID (unique device ID) of the device connected to Xcode during compilation. Any other device would not accept the App unless its UDID is listed in the provisioning file. But without IDP, we can not explicitly add UDID to an provisioning file.

Here is the workaround.

1. Register a new Apple ID if you don’t want to share your Apple ID with your friend (for good reason).
2. Ask your friend to add this new Apple ID to your Xcode Account (Preference -> Account -> + button).
3. Your friend will need to create an iOS project (simply choose the single-view Application template), compile it and install it to the device. During this process, Xcode will prompt to ask to “fix issues”. Confirm that and make sure the right “Apple ID” is selected in the “Team” field.
4. Now the UDID of the remote device is associated with the Apple ID.
5. On your local machine, use the same Apple ID to compile the App for device and send out the “AppName.app” file. Now because the UDID of both your device and the remote device are all listed in the provisioning file, the “AppName.app” can be installed into the remote device by either iTunes or Xcode.

This solution is not perfect but it works well without paying $99 each year. Good luck!

Write a Comment

Comment

  1. Why not use the beta testing feature of iTunes Connect? It does require a app store review. But it’s pretty trivial and usually you can hear back in one day. After that, you have the quota of 1000 friends per project, who can be invited via email. The installation experience of them is pretty similar to App Store.

      • It requires the enrollment of you (obviously, otherwise you cannot deploy to device), but doesn’t require the testers (your friends) to join.

      • Oh wow, just realized what you mean in the post. That’s very cool! Thanks for sharing!