Xcode 5 - Can no longer validate archives - ios

I upgraded from Xcode 4 to 5 and I can no longer validate archives created for Ad-Hoc distribution.
After creating an archive, I hit Validate, log into iTunes Connect (as prompted) and get the error "No identities are available for signing":
If I click 'Download Identities...' then pick my team name (me) it just takes me back to this error prompt.
Specifics
I have created and signed an Ad Hoc distribution profile called 'survey_dist_9'
The Code Signing settings in my Target look like this, although I have tried many combinations of these profiles:
My unchanged, existing project that worked fine in Xcode 4 no longer works in Xcode 5. I validated 15 versions of my app without fail before upgrading to XCode 5.
In My Xcode organizer it shows no provisioning profiles except under my iPad device. Has this changed since Xcode 4? (Sure they used to be there)
There are similar sounding questions here but the solutions I've found are not applicable.
No crashes are occurring as described in similar sounding questions. I can distribute as Ad Hoc. The problem is we're using Ad Hoc as a production solution (distributing an in-house app to a small company) so I'm reticent to skip the Validation process.
Any suggestions?

Make sure that the bundle identifier in Xcode matches your App's bundle ID in iTunes connect.

Here you go, follow the screens below, it should help you..
And yes they have removed Profiles from Organizers, instead you can use iPhone Configuration Tool.
Hope it helps..
Cheers

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.

Related

Xcode 8.0 - App Installation Failed - The executable contains an invalid signature

Made an app called MyFirstApp in Xcode 8.0 and I was ready to test it on my iPhone 6s. Plugged it in with the lightning cable it came with and pressed Window > Devices > iPhone 6s. Went down to the Installed Apps section pressed the + and selected the built application. Received the error "App Installation Failed - The executable contains an invalid signature."
Under the general tab for the app project I have "Automatically manage signing" checked with my name selected as the Team.
Provisioning Profile: Xcode Managed Profile
Signing Certificate: iPhone Developer (my name) (############)
Tried Product > Clean and Product > Build.
It feels like I'm doing something wrong, but I don't know what my options are for fixing this. I'm building this in Swift 3 if that matters.
ok I somehow stumbled across a fix.
Product > Destination > my iphone.
Then I pressed the run button. It asked if I wanted to add my phone as a valid developers device. After pressing yes, it then asked me 700 times to validate the app was ok to place on the phone.
Very strange I couldn't just press to send the app to the phone, but this works. If anyone has anything to add please do. This was a very confusing process for me.
This error indicates that an App Store distribution provisioning profile was mistakenly used to sign the Ad Hoc build. Please note that builds signed with an App Store distribution provisioning profile cannot be installed onto development or testing iOS Devices; they can only be submitted to iTunes Connect for App Review. To resolve this issue, sign the app with an Ad Hoc distribution provisioning profile instead.
https://developer.apple.com/library/content/technotes/tn2319/_index.html#//apple_ref/doc/uid/DTS40013778-CH1-ERRORMESSAGES
I have cleaned, rebuilt, uninstalled and reinstalled the app again. It fixed the problem for me.
I installed AppSync Unified from Cydia and it worked. However, this method requires a jailbreak.

IOS: Code signing error Xcode 6.3.1 [duplicate]

I've build a new application which is going to support IOS 7. I got the new XCode 5 GM and tried to sign my apps using my fresh provisioning profile and distribution certificate, but i'm having trouble with distribution. I constantly get the following error:
"Invalid Code Signing Entitlements. The entitlements in your app
bundle signature do not match the ones that are contained in the
provisioning profile. According to the provisioning profile, the
bundle contains a key value that is not allowed:
'[XXXX.com.sample.company ]' for the key 'keychain-access-groups".
Also the same error for a key value called application-identifier.
Screenshot of the errror:
The solution lies in the new option in Xcode 5 which says provisioning profile. Just set the project target's provisioning profile to the right one and it'll work.
If you are like me and you think you tried EVERYTHING, archived your project over ten times, banged your head on the keyboard and still get this error. Please do yourself a favor and simply Restart XCode, it worked for me. Sometime Apple... I hate you.
I went through many of the steps above but what finally worked for me was refreshing my profiles in Xcode. Not sure why it was necessary since my app's distribution profile was showing up in the list already. Here are the steps:
Xcode Preferences
Accounts tab
Select your Apple ID
Hit the View Details button in the Apple ID detail panel
Hit the Refresh button in the lower left corner
In my case, i activated the same capabilities in Xcode that in Application services in developer.apple.com. Thats works for me
In my case (sorry) I switched "Team" to "None" in -> General -> Identity
In another case I needed to switch this identity from "None" to the developer account managing the identities and profiles.
Xcode sometimes messes up greatly with code signing, it seems. Or, we mere mortals simply aren't clever enough to understand what it is doing, of course. Don't give up, we're all going through some code signing torture at times!
In my case, I had to set correct Provision Profile for Release, and then had to restart Xcode. Before restarting, it had same provision profile, and didn't work. So, sometimes a restart can do miracles. Maybe this helps somebody.
If someone uses a GameCenter then check this section in your target. I worked with some old project and there were 2 errors (but everything worked fine). Disabling and enabling it back solved this problem.
Most likely this action adds Game Center entitlement to App ID and and handle it itself.
1.Go to project folder, delete *.entitlements files.
2.Then go yo in xcode project target -> build settings -> code signing entitlements - delete values
3.Clean
4.Run
Ah, this glorious error. For me whenever I see this error I check the following things:
1. Allow XCode to access your provisioning profile info all the time - If XCode keeps asking when you start it up to have access to your computer's private files so that it can get provisioning profile information with the options to allow access always, not now, or just one time - set it to ALWAYS ALLOW access
2. If you have any old entitlement files kicking around your project get rid of them and any sign of them - if you see a .entitlements file in your project delete it (or at least remove the reference to it if you aren't sure you are ready to outright delete it), then make sure the 'Code Signing Entitlements' line under the 'Code Signing' section in Build Settings is empty
3. Check your Application Services online and match them up with your Services in XCode for the app - Go to the Apple Member Center and check the App ID for your app, click on the app to see its 'Application Services' and see what you have checked, then go to XCode and check your 'Capabilities' section to make sure the two have the same list of Apple services on both
4. Make sure you assign a valid Provisioning Profile to your app before validating - double check your provisioning profile for your app in the Apple Member Center, make sure it isn't expired, has the right App ID with the correct bundle id and distribution. Download and click on the new provisioning profile to make sure XCode has it, or go to XCode > Preferences > Accounts > click on your account and 'View Details' then click the bottom corner button to Sync all the profiles to XCode. You should have the profile available to select now in the 'Code Signing' section. Once you have the correct provisioning profile then you can set the 'Code Signing Identity' lines to the correct option for that provisioning profile.
Note - if doing a distribution certificate it can help to set all the 'Code Signing Identity' lines to the identity you use for distribution including the debug lines
5. IF ALL ELSE FAILS - Clean your project and Restart XCode and some Apple magic may just work fine the next time you open your project and try to Validate
If you're building an old 3.1.5 project, Xcode 5 has some bugs which unfortunately makes Benjamin's answer impossible, as there are no Provisioning profiles to pick from. After many a late hour of tormented reading of Xcode project files I came up with this solution that worked for me:
In the Utilities pane (to the right) in Xcode 5, under project Document, change from Xcode 3.1-compatible to Xcode 3.2 compatible.
Enter your organization name.
Close project.
Open your project file, e.g. open -a TextEdit path/to/name.xcodeproj/project.pbxproj
Remove the two Distribution clauses (isa=XCBuildConfiguration).
Remove the two accompanying lines in buildConfiguration (one in PBXNativeTarget and one in PBXProject XCConfigurationLists)
Now you're ready to re-open, archive and submit to App store - voilà! It works again!
How I think it works
I assume this works because Apple somewhere along the line decided to drop the need for any separate distribution config, which is a good thing. When I archive, Xcode automatically code signs for distribution. That's the way it should have been implemented in the first place, it's just a shame that Apple can't make auto-migration part of the IDE; instead they force us developers to spend man-decades to make this stuff work.
I have been struggling with this problem for more than a day now, trying all kinds of solutions suggested here and elsewhere on the internet. Nothing worked...
But, I finally managed to solve the problem!
The problem I had was with an old app that I haven't touched in over 3 years, and now I was about to release a long awaited update. Since the time I released the app, Apple has been updating how the certificates and App Id works. They have introduced the concept of Team Id which seems to be recommended to use.
In particular, the Apple's "Certificates, Identifiers & Profiles" site, has seen a lot of changes since then.
There I realized that the Provisioning Profile I was using for App Store Distribution were connected to the App Id ED8xxxxxxx.com.rostsolutions.* but looking at the App Id for the game I was about to submit I notice that the App Id was ATMxxxxxxx.com.rostsolutions.Swisch. So the App Id prefix did not match!
That seemed to be the root of the problem. So what I did was to create a new Provisioning Profile connected to the App Id ATMxxxxxxx.com.rostsolutions.Swisch instead. Using that Provisioning Profile I successfully submitted my app to App Store and now I just keep my fingers crossed that everything else works fine at Apple's side.
(I first tried to connect to new Provisioning profile to the wildcard Id ATMxxxxxxx.com.rostsolutions.* instead, but that didn't seem to work).
But what puzzles me is that when I look at the old App in iTunes Connects and goes to Binary Details, it says that the App Id is ED8xxxxxxx.com.rostsolutions.Swisch. So why is the "Certificates, Identifiers & Profiles" page listing the App Id as ATMxxxxxxx.com.rostsolutions.Swisch?
My problem was solved by removing my Apple ID from Preferences->Accounts and then adding it back again. Then all my provisioning profile files showed up on the View Details utility panel. I was mistakenly choosing "Mac Team Provisioning Profile:*" instead of the actual distribution provisioning profile for the project thinking that it was a generic selection. Provisioning files must be specific to the project. Oh, and BTW, make sure your provisioning profile has the correct entitlements (for example, Maps). I managed to release an app with OSX Maps without the entitlement and Apple approved it -- but no Maps showed up on the production version!
In my case, I had the same problem, my solution was to change the 'Release Provisioning Profile' in the Build Settings before doing Archive. I do this twice, once for App Store distribution, and another one for Ad Hoc distribution. I also add a comment on my archives. My conclusion is that there is something broken about the "archive re-signature".
There is a very good tutorial for solving that problem on this website.
It says that this problem can occur when your Projects Bundle Identifier is different to the one you entered on the iTunes Connect Website.
I think xcode 5 uses "release" instead of "distribution" that you may created yourself.
If all above didn't work (in my case after couple of days no luck trying everything) I have only one Mac application. BE CAREFULL WITH REVOKE!
1) Revoke by hand all "Mac App Distribution" & "Mac Installer Distribution"
2) Clean relevant certificates and open-keys in Keychain (Warning: export before delete)
3) Restart Xcode
4) Go to (in Safari) developer.apple.com -> certificates etc.
5) Create CertificateSigningRequest.certSigningRequest in Keychain->Certificate assistant
6) Create by hand on developer.apple.com both "Mac App Distribution" & "Mac Installer Distribution" with your *.certSigningRequest
7) Provisioning Profiles -> Distribution -> create/fix custom provision for AppStore (I'm specially named it as "Mac provision profile for AppStore"
8) Xcode -> Settings -> Account -> Your account -> Refresh
9) Xcode Clean -> Archive -> Validate
I have been struggling with similar problem (I was building for Ad-Hoc distribution). Only thing that has changed since last successful deploy, was adding two devices to provisioning profile.
After double- and triple- checking all build settings, I regenerated provisioning profile (without changing anything), re-downloaded and it worked fine.
So note to self: if there is no logic explanation, you can always try good old IT voodoo.
I also recommend iPhone Configuration Utility, which despite its name, is useful for checking what provisioning profiles you have on computer.
ERROR ITMS-9000: “This bundle is invalid. New apps and app updates submitted to the App Store must be built with public (GM) versions of XCode 5.1.1 or higher and iOS 7 SDK. Do not submit apps built with beta software.
If multiple developers are using the same member center account. One of them can't use a certificate created by others cause they used a certificate request created using their computers.
You need to use a certificate created by you (certificate request
created using your computer).
Alternative, told them to send you the Developer Profile. not sure of the name. to use a certificate created on another computer.
Code signing Entitlements occur because of your resource does not contain Entitlements file in resources,Just go to build setting and search code signing Entitlements delete entry for debug and release, build project again you will see there is no error. Cheers
I had the same problem, but nothing written here worked for me. However, I found a simple way that worked for me. Here's how to do it:
1) In your Project and your Target(s) build settings, choose "None" for all Provisioning profiles, and choose "Don't Code Sign" for all Code Signing Identities.
2) Now, choose your Target and go to build settings. In Code Signing Identity Release setting, choose "iOS Distribution" for "Any iOS SDK". And then, in Provisioning Profile Release setting, choose your distribution profile for "Any iOS SDK". After that your Code Signing Identity Release setting should automatically change to "iPhone Distribution".
3) Archive your build and validate. Now it should work fine. That's it!

iOS & XCode5 App publishing fails - Error ITMS-9000: "The binary you tried to upload was invalid"

I was already looking through some other threads here with the ITMS-Error 9000, but they didn't help me to get my App passing the submission to the App Store.
I have NO errors or warnings inside XCode.
The App is perfectly working on iOS Devices & Simulators.
EDIT: What I have already tried:
Changed Deployment Target from iOS 7.1 to 7.0
Checked the Bundle ID in iTunesConnect and inside Xcode
Checked for any errors and warnings --- removed / fixed them
Do you have any additional ideas what it could be? Without any errors or further information it is hard to find out what the reason is.
UPDATE2::
If I try "just" to "Validate" instead of "Distribute" in the organizer after Archiviing it i get the following Error
Its an Issue with Apple's Server I tried validating the app it said "Unable to process app at this time due to general error" a quick search about it on SO said its got nothing to do with our code or project but some process running at Apples server
Assuming that your binary icons does not meet as per apple's human interface guidelines.
It most probably seems to be the issue with the profile you are signing your app with. You got to make sure that your are signing the app rightly with proper distribution profile. Also check out for the bundle identifier and make sure that it is same as the one you have given in itunes connect.
Check this link!
You should be creating the binary with the simulator or some device connected.
Try it:
Unconnect iOS device from your Mac,
Dont select any simulator, just leave it as it is, iOS device option
Archive it
Publish it
Make sure you're using a provisioning profile for the App Store (not for Ad Hoc distribution)
Then select this profile when building your app.
I would guess this all has something to do with Apple making system changes to prepare for iOS 8 and in doing so somethings got broken.
The issues look to have just been resolved by Apple. I just successfully submitted an app that was previous showing the same problem you had. If you look at your Provisioning Profiles, you should notice that Apple has removed your app's previous Distribution Profiles.
To get your submission working again, all you have to do is recreate your App Store and Ad Hoc provisioning profile, but make sure to use a new name and you should be good to go. You were not alone on this one. A bunch of people experienced the same problem and there were a lot of posts about it on the official Apple Dev forums.
Please check the Distribution Profile that you are signing your app with at iTunes Connects. make sure that it is still valid. I had same issue couple days back and after a struggle , i found out that somehow my provisioning profile was not valid anymore. Creating a new profile and submitting app with it solved my issue.
Apple have deleted corrupted provisionning, you just have to regenerate it and make submission works again !
Connect to your iOS Developer
Certificates, Identifiers & Profiles
Provisioning Profiles / Distribution
Here you can see some certificates missing. You have to re-create (Distribution / AdHoc). Note, you have to change certificates name !
In Xcode, refresh your certificates, set the right one in Build Settings, and submit...
I called today the Apple Developer Support and i get one very very simple answear to this issue.
You have to create all your certificates, provisioning profiles etc with Apples SAFARI browser.
It is not working "always" proper with Mozilla Firefox or other Browsers. So if you get such an error, try to recreate it with Safari! It worked like a charm!

TestFlight iOS App get-task-allow Issue

I have an app in testflight for ios called MapItTrackIt. Everything has been working great.
I just updated to xcode 5.1. I built the app exactly the same way I always have. Same profile and ad-hoc cert.
This time when I try to upload my IPA file I get the 'Invalid Profile: developer build entitlements must have get-task-allow set to true.' error.
I didn't change anything at all with provisioning or what not. I just added some more functionality to the app and rev'ed the version.
What the heck do I do now? How do I fix this? My boss wants this deployed right now and I can't.
Same exact issue for about 4 hours today - restarting Xcode seems to be the fix as depressing as that is.
I had this and solved it.
Xcode was using a different provisioning profile from the one I had expected it to - it was signing the build with a distribution certificate, but had created a development provisioning profile.
It turned out that the distribution certificate was somehow invalid. I discovered this by setting the provisioning profile explicitly in the project, which then prompted xcode to give me an error to tell me there were problems.
A good place to start solving these issues is to look in the build log, at the codesign step - there will be a line line:
Using code signing identity "iPhone Distribution: XXXXXX" and provisioning profile "YYYYYY" (<..guid...>)
Check this line says the certificate and profile you expect, and that the signing identity and profile are both distribution ones.
For me the problem was that I had a custom .framework bundled with the app that was not code signed. Apparently this unsigned framework caused the problem.
When I code signed the framework with a distribution certificate the app uploaded without problems.
I fixed this bug by changing my Code Signing Identity - Release part to Distribution certificate
It looks like there are several different issues that can cause this. Mine was similar to JosephH's, but not the same.
For me there was another provisioning profile that was valid, but from a different user. I have several apple accounts that I am a member of for development.
My build was using a different profile from another user account when it went to sign. This was even though I had told it which one to use in the settings.
I solved this by having to delete that other provisioning profile whenever I wanted to build this app for testflight. The provisioning profile would always come back if I did an update from the dev site for that other user account.
The final solution was that I happened to get a new mac for development and didn't install that other user account's profiles into this mac yet. Now everything builds fine without doing anything.
I tried many different ways. None of them works for me.
I thought maybe it's a problem of testflight.
So I used crashlytics to distribute my adhoc build. I had no problems to upload it.
Then I tried to use Organizer to validate this archive to get more information, I got an
error. I was told this archive contains unsupported i386 and x86_64 architectures.It turned out that I used a framework which contains i386 and x86_64 architectures. Then I recreated a new framework which contains device only architectures. It works like a charm.
Same exact issue here with the new Xcode 6.3 beta, solved by deleting the Project.entitlements (along with the Code Signing Entitlements entry on the Build Settings of the target)
Solved. I was trying to update a label in the launch screen to show app name, version and build through a custom ViewController. This proved impossible to too complex so I deleted the View Controller. BUT I left the outlets in the Launch Screen Storyboard. I deleted these (Last icon in Utilities tab, a right arrow in circle) and all is love, peace and joy.

provisional profile is not found for the device

I know that it has been asked a thousands of times, but I am struggling 4 hours with every possible sollution I read but still I cannot beta test my app in my device.
Here are the facts:
1) My app is uploaded in the IOS store, so I have created a provisioning profile, app id's and so on. I just now want to test it in my iPhone4, with target iOS 6.0.
2) I added my device UDID in the devices, in my developer account.
3)I set the code signing for debug to my provisioning profile.
4) I plugged in my ios device in the mac and I see that picture.
As you can see there is no provisioning profile.
5)If I run the app to my ios device (which is listed in the Xcode) I get the error
No provisioned iOS devices are available with a compatible iOS version.
I tried so many solutions that I found that I cannot even remember all of them. I am following all the steps one by one.
-someone said to log out from developer account
-other said to change deployment target
-other said to change the "edit scheme" to debug.
Can anyone help me? I do not understand what is missing since app is published and I only want to test it in my device. Should I change anything else?
EDIT: I selected the device as Ganee said. Then in my organiser I see the following picture:
If I press refresh, I see "Too few items in team".
So If I remove the provisioning profile, how do I download the new one? I suppose I enter my developer account and press download in the distribution profile under the provisioning tag, right? But is this updated with the selected device?
Here is my picture from the developer account:
I think you followed all steps, but still you have to conform the following steps.
After you added device to developer account, you have to select that device in your provisioning profile.
Remove old profile from your organiser, download new modified profile and install it on your Mac.
Please check wether you modified developer/ distribution profile and select it on your xcode.
Hope this will give some clarity.
I remember having similar problem in the past. I am not sure if yours is similar. But awhile back when I upgraded my iOS device, it was no longer compatible with the xcode version I was running. I had to upgrade to the latest version of xcode. What is Xcode version are you running?
Finally the problem was that I had a distribution profile set up, and not a developer. Thanks for the help!

Resources