Preparing Ad Hoc Distribution for my app
Asked Answered
R

3

11

I have been reading several tutorials and watching some iTube videos to see how I best prepare my app for Ad Hoc distribution. However the information I got is not really consistent, it goes from the 5 step explanation from the Developer Center of Apple to a almost 3 minutes video, where I would have to set some Code Signing options in XCode, create and zip the Archive etc. My questions:

1. Is there a tutorial available, which explains everything required, but not too much? I somehow feel, for instance, that code signing is not really required.

2. After I tried to install the app using iTunes, the synch claimed that it was not able to install it. Is there some log available in iTunes, so I can check for further error details?

3. How about switching from Ad Hoc distribution mode to normal developer mode? After I followed the steps from the video and prepared my app for Ad Hoc distribution, I was not able to install it on my device anymore, I got the error

Build target Abiliator Check dependencies [BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 5.0'

This is the video tutorial on iTube I followed: Demo of iPhone app Ad Hoc distribution

Thanks for your feedback and have a great weekend.

Ramonramona answered 18/2, 2012 at 13:0 Comment(0)
R
14

OK, looked up the Error " the following job tried to hijack the service..." and saw that a reboot of the iPhone may solve the issue... and guess what, I was chasing a phantom all day long..... It works perfectly. So last hint for anyone, having a similar issue, after installing an app via Ad Hoc the first time: Reboot iPhone, otherwise the app may crash.

Cheers and now good nite :-)

PS: Just to round this thread up here the steps I did at the end (as mentioned, I am using XCode 4.2.1) :

  1. Added my device on the Provisioning Portal (this had been done long time ago, however it is an important step, as the beta testers device IDs also need to be registered here before you re-create and download the distribution profile)
  2. Created and downloaded an iOS Distribution Certificate in the Provisioning Portal
  3. Imported the certificate in my Keychain
  4. Created a Ad Hoc Provisioning File in the Provisioning Portal
  5. Downloaded that profile
  6. Double clicked the profile, which added it to the XCode Organizer Provisioning Profile Section)
  7. Added the options Any SDK and Any iOS SDK in for Ad Hoc Distribution Code Signing Identity in the Code Signing section of my project AND my target and set the values with my Ad Hoc Provisioning File I just created and imported
  8. Made sure the option in my app .plist file "Application requires iPhone environment" was set to true
  9. Ran a clean (Product / Clean) and then a build only (Product Build)
  10. Made sure the app was not installed on my iPhone (as I was testing before via XCode)
  11. Copied the target (group Products via Show in Finder) to iTunes via Drag and Drop (I dropped it into the Media section)
  12. Copied the Ad Hoc Provisioning File into iTunes via Drag and Drop (also to the Media section)
  13. Made sure the app was checked for the synch, synched iTunes with the iPhone
  14. Lastly rebooted my iPhone! However, I am pretty sure, that this might occur on the Developers device only. I assume that the reason for that was a process, still remaining on the iPhone, from my last test via XCode.

I did not use an entitlements file. I have actually to find out, what that file is really for, I have read that it might be required only, if using iCloud. And XCode 4.2 developers, there is nothing like File / New / Entitlement Template anymore in XCode. The file is created as soon as you check the option Entitlements and give the file your desired name in the Summary tab of your target.

You may also want to download the iPhone Configuration Utility from apple

I will also recommend this to my beta testers, as it allows you to see the console log of the iPhone, which of course might be very helpful in case of errors.

Hope this summary helps others, setting up their app for the first Ad Hoc distribution.

Cheers, René

Ramonramona answered 19/2, 2012 at 3:10 Comment(0)
C
3

code signing is simple.

first you create a mobileprovisioning profile for your apps bundle identifier also add the devices you want to built the app for. for adhoc build do it in distibution tab. download it, double click add it to keychain.

now you tak your app in xcode.select coreect profile(code signing). set command line build to distribution, oh i forgot create a new file(entitlements.plist) set debug inside it to false, add its relative path in the target, just above codesigning specified. now select the iosdevice on top left(where you select the simulator) press command+b to build the app. the app would be in the products folder(at the bottom) locate it in finder drag it to itunes, may be provisioning profile too, and sync it. done.

Contingent answered 18/2, 2012 at 17:10 Comment(1)
I disagree that code signing for iOS is "simple", and the fact that your explanation has more than 10 steps supports that. But thank you for listing out the steps, they were helpful.Particularly
M
0

Go to https://developer.apple.com/devcenter/ios/index.action and login. You can find 'iOS provisioning portal'. And after going there, choose 'Distribution' section. Select "HOW TO", you can find necessary steps there.

Mayst answered 18/2, 2012 at 13:18 Comment(5)
Thanks Rakesh, I was there already, just by reading the other tutorials and posts, thought that might not be all. I am unclear though about step 4, sharing the app. Is that simply the .app file from within XCode or do I have to create an archive (.ipa) as explained in the tutorials? ThanksRamonramona
@Ramonramona Both app and ipa are suitable for sharing. Actually ipa is a zip archive with itunes icon and an app inside it.Surtout
I tried it on my own iPhone. Imported the .app and the distribution profile. Only thing that happens is that it appears as an Icon on the iPhone. As soon as I start it though it seems to crash. I have tested it already via Xcode and it runs smoothly without any problems both on my simulator and my device. Guess I still miss something? Maybe I have to compile it different? I suppose it may have something to do with the code signing mentioned in other tutorials. I made a build for iOS Device as I suppose a build for simulator wont be ok.Ramonramona
I think the issue with the settings inside Xcode. One tip: Check in .plist file for 'Application requires iphone environment' is YES. I had some issue when that property accidentally set to NOMayst
@Ramonramona : You only need distribution profile if you want to make an ipa or to submit on AppStore. If you want to run the app on your device (throught XCode) you need to code-sign with a provisioning profile. If you want to share the app with someone , you can give them the .app file (found under Products in your XCode project) and the provisioning profile used to sign the app. One more thing , the provisioning profile MUST recognize that device. So first add the UDID of the device you want to test on in the provisioning portal.Seltzer

© 2022 - 2024 — McMap. All rights reserved.