Validating Archive in Xcode 5 with an Ad Hoc Provisioning Profile - ios

I am trying to distribute an iPhone app for beta testing using an ad hoc provisioning profile.
I am getting what appears to be a typical issue in Xcode when you attempt to validate an archive that uses an ad hoc provisioning profile. It is the same code signing issue that several other Stackoverflow users have sought advice about. A couple (out of many) of the threads I've read:
Xcode 5 - Can no longer validate archives
Signing identity problems in XCode 5
I have tried "all" of the recommendations I've seen on SO to resolve this issue (there are many other threads beyond the two I've referenced above that I've walked through step by step), but when I read through all of the replies on this specific thread (Xcode 5 - Can no longer validate archives) there's a reply by "Ade" that resonates with my experience.
To quote Ade:
"It looks like Apple disabled the ability to validate with just an ad hoc provisioning profile in XCode 5.
"If you wish to validate an app that is intended only for Ad Hoc distribution, you must also have an App Store provisioning profile for the app too, against which to validate it."
Abe communicates my exact experience: I cannot validate the archive with the ad hoc provisioning profile, but CAN validate the archive as soon as I create an archive with the App Store Distribution Provisioning Profile.
So my question is: contrary to what Apple suggests here (https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/TestingYouriOSApp/TestingYouriOSApp.html) is it true that in Xcode 5 you cannot validate an archive using an ad hoc provisioning profile because of code signing issues? I'd like to know if this is true is so that I can go ahead and distribute the ad hoc version of the app for beta testing WITHOUT validating the archive. And once I'm done beta testing, as long as the archive created with the App Store Distribution Provisioning Profile validates, I can confidently submit the app to the App Store.

No. You can always validate the archive as long as you have the Right version of the app with the Right bundle ID on iTunes connect after the app is in Waiting For Upload status.
I dont know about other developers. I always have 3 provisioning profiles for all the apps that I developed. Under the release, I always toggle between Ad-Hoc or Distribution. I use ad-Hoc most of the time, including validating, send the IPA to testflight for Beta Testers and etc. After all the satisfies testings, then only I will change the final version to distribution profile and compile a new archive. Then I will validate again and submit to app store.

Related

Submitting binary for Appstore review with Appstore provisioning and AdHoc Provisioning profile

I have submitted approx 20+ Application on App Store with Ad-Hoc provisioning profile and all have been approved and working perfectly.
I just want to make sure that If we submit binary with Ad-Hoc Provisioning this will create any problem.
What is the best way to submit build on Appstore with the Ad-Hoc provisioning or Appstore provisioning and why?
If we go to developer account then Here are 2 options to create provisioning profile for distribution build.
App Store-
Create a distribution provisioning profile to submit your app to the App Store.
Ad Hoc-
Create a distribution provisioning profile to install your app on a limited number of registered devices.
Please share your thoughts So next time I will keep it in mind and will use best way to upload build.
Thanks
If you are submitting your application for the beta testing through the test flight than you can use Appstore or Ad Hoc provisioning profile.
But in case when you are uploading for publishing the application you must use the App Store provisioning profile only. This is more preferred. There is no meaning for using the Ad Hoc provisioning profile which has limited devices added & has limited access.
Hope this helps to everyone.

ios ad-hoc profile ignored when archiving

I have created an ad-hoc distribution profile. I am trying to load the app to the app store for beta testing only. However, when I run the xcode (using xcode 7) archive it ignores the build settings and switches to the non-ad-hoc distribution profile.
I have read many threads and I am still not clear if
I should care that it is doing that
If I should care then why is it happening? The ad-hoc profile is active.
Since you're uploading to the AppStore, you need to use AppStore distribution provisioning profile. You can still use your ad-hoc profile when exporting for ad-hoc deployment. (TestFlight is an integral part of the AppStore now, and is not considered ad-hoc distribution platform anymore...)
From Test Flight Beta Testing:
You should take the following steps to set up prerelease versions of
your app for testing in iTunes Connect:
...
Generate a new
App Store Distribution profile containing the beta entitlement to
distribute builds via TestFlight.
...

iOS: Is a Distribution build supposed to work on my Developer device?

I am confused with profiles and certificates for the build I am trying to put on the Appstore.
In developer.apple.com/ I have properly created both a developer and distribution certificate. they are both linked to the single app I have created.
I have registered my device (iphone)
I also have properly created 1 development provisioning profile and 1 distribution provisioning profile.
When I build with dev certificate + dev provisioning profile: app works fine on my device
But I know the build needs a distribution certif and provisioning profile in order to get approved on the appstore.
However when I build with distribution certificate + distribution provisioning profile, the build is succesful, but I can't launch the app on my iphone, other iphone (with http://www.diawi.com/ or iTunes). It immediately crashes with the infamous error popup: "unable to download. "XXX" could not be installed at this time".
When I look at the device's log from Xcode, it clearly states the crash comes from a profile issue.
Is the distribution build supposed to work on my iPhone?
You can check you Beta release build to your developer device using 'Apple Ad Hoc Distribution profile/certificat'. Here are Apple Dev link Beta Testing Your iOS App
No. A distribution build will not just be installable on your device. You are meant to submit it to iTunes Connect from Xcode, where you build it from an archive, or from Application Launcher where you would submit it as an IPA.
you should have created adhoc distributed provisioning profile and add your device to that profile.
But you need iTunes Connect to submit the app to App Store. This time you can create provisioning profile for app store.
Advantages of iTunesConnect.
1. You need not to add new device to the provisioning profile every
time you want to test the app in new device.
2. You can add as many as new test users to the app and can mark them as internal and external users.
3. You can upload as many builds as you want and test those builds.

Xcode 5 crashing when trying to validate archives

I had a couple questions when trying to put an app on the app store.
1) With Xcode 5 when trying to validate the archived project, Xcode 5 keeps crashing when trying to download the provisioning profile from the net. I have refreshed the provisioning profiles using the Preferences >> Accounts >> View Details and have clicked the refresh button but it still crashes when I try to validate.
2) Is it best practice to have a separate distribution certificates and provisioning profiles for each app you put on the app store? right now I have a separate provision profile for my apps but they are under one certificate. Can you guys tell me what the best practice is?
3) And can you try to explain what the certificates and the provision profiles are doing? Also, what would the difference between distribution provision profiles and development provisioning profiles.
1) - Check what version of Xcode you're running. I had a similar issue where I was running a developer preview - you can't submit an app from a DP version of Xcode, and mine was crashing at the exact same point as yours.
2) - Having 2 certificates - 1 for dev, 1 for distribution seems to be the norm. I would suggest that you use explicit app ids and not the wildcard ID when you go to create your App ID though.
3) The way I see it, Provisioning profiles are your wrappers for your different things that make it up - mainly the signing certificate, the app id and the device id(s) - You select either a distribution or a dev signing certificate to determine if the app is being developed or submitted to the app store. You select the App ID to tell the app what functions it will have (iCloud, Data protection, etc) and what teams can work on the app. The Devices are what UDIDs are authorised to run this app that has this associated provisioning profile. The provisioning profile is how it's all packaged up.
As another way to look at it, You have your .ipa file (your app) and your provisioning profile. The device looks at the profile, checks if the devices UDID is present in the provisioning profile, checks the App ID to see what features it's allowed to run, and the certificate is used to sign it all off.
Hope this helps.

Never know which profile(s) combination to sign with

I never know which profiles I am supposed to be signing a build and signing a release for ad-hoc distribution with.
I've tried signing the build with the ad-hoc distribution profile and then the package with the push profile but that didn't work, so just tried many combinations until I hit one that worked.
Yesterday after months of hassle-free operation regarding signing I had to re-install XCode after it kept crashing and then I could no longer sign for development on my own phone nor for ad-hoc distribution onto other's phones.
I tried dozens of combinations of different profiles until eventually I got an ad-hoc release that I could install on somebody else's phone, but then XCode crashed again and I've lost what that combination was, making me want to cry, and I don't want to go through that process of trying all possible combinations again.
Within XCode in the Code Signing Identity section I have the following choices:
a) Apple Push Profile
b) iOS Team Provisioning Profile
c) NNN Development Profile, where NNN is the name of the project/product being developed
d) iPhone Distribution Company Name which is described as an identity without provisioning profiles.
e) ad hoc distribtion
Which of these 5 above should I be using to sign a build to run on my own device using XCode? Do I need to change it to ad-hoc distribtion when building to send a package to others to install via itunes?
Secondly, once I've built an archive and want to create an ad-hoc deployment to send it to testers for them to install via iTunes, there is the additional step of signing the built package, for this I am offered the following choices:
1) Apple Push Profile
2) NNN Development Profile
3) iOS Team provisioning Profile
Which of these 3 should be used to sign the ad-hoc deployment.
Thank you very much.
I have 4 provisioning profiles for my apps.
One is the iOS Team provisioning profile supplied by Xcode
The other 3 I've generated via the Apple iOS Provisioning Portal.
1 development profile that is general for my company:BlahBlah.com.myCompany.*
1 adhoc distribution profile that is also general for my company:differentBlaBlah.com.myCompany.*
1 Distirubution profile that is product-specific: BlahBlah.com.myCompany.NNN
When I test on my machine, I use the Xcode-generated one. When I run it on my devices, I use the dev. profile. When I build for distribution to testers, I use the adhoc. When I upload to iTunes, the 3rd.
No entitlements anywhere.
HTH!
Janene

Resources