I am trying to put my build up for testing on TestFlightApp. In my previous version of xcode, I was able to view the "share" option after archiving, which I used to create the ipa file. The ipa file was uploaded to testflight and everything worked as expected. With the upgrade to xcode 4.3.1, I don't see the share option. I tried using the distribute option and created the ipa. Then when I tried uploading the ipa to testflight, got the following error.
'Invalid IPA: values for key com.apple.developer.ubiquity-kvstore-identifier are mismatched between profile and binary'
can someone help.
I know an answer has been provided to this question, but looking at the comments (and my own request having sending me here also) it seems that help might be needed to those like #Yuchen or #Kent in the comments that only have two options in the distribute panel ("Submit to the iOS App Store" and "Export as Xcode Archive"), and can't see the "Save for Enterprise or Ad-Hoc Deployment" option.
If your target includes other targets (e.g. libraries), you should put the "Skip Install" flag to YES in the "sub" target Build settings. This will allow yourself to distribute your archive as an IPA file.
More information can be found on this StackOverflow answer.
Hope this will help,
Thibault
Here is how I fixed it.
com.apple.developer.ubiquity-kvstore-identifier is specifically for iCloud. See iOS Developer Library. So I used the following procedure:
Verify App ID in iOS provisioning Portal iCloud status (mine is enabled)
Removed old entitlements from project (I had manually created them)
Use the Target editor to enable the entitlements (at the bottom of the Target editor window), matching the App ID iCloud setting, added Container and Keychain Access.
Clean and Archive
Select the archive and click on Distribute...
Save for Enterprise or Ad-Hoc Deployment
Select your development code signing identity
Save the bundle to disk - did not check for enterprise
Drag ipa to TestFlightApp.com builds
At this point, TestFlight accepted the bundle and my testers were able to download!
In Xcode 4.3.1 there is no "share" option in Archives tab of Organizer to create IPA.
Hence to create IPA just click the available "Distribute" option and select Method - "Save for Enterprise or Ad-Hoc Deployment" then we have an option to save the build in IPA format.
See the Attached Screen Shots,
thanks,
Naveen Shan
You can use
Distribute... and Save for Enterprise or Ad-Hoc Deployment
It is same as the old Share... menu.
Related
I have created an ad hoc archive and a .ipa file for the application I am trying to distribute. I have also created a distributing provisioning profile with the UDIDs of the devices that I plan on distributing my application to. When I drag the .ipa and .mobileprovision files into iTunes and try to sync the application to the device, an error message on the phone pops up reading "'myapp' failed to install". By the way, I have a standard iOS developer's license ($99 per year) and am using Xcode version 4.2.1. I am pretty new to the developer program, so please try to keep your answers as simple as possible. Let me know if you need any extra information. Thank you!
I had the exact same issue. My issue was simple to fix. Check your Code Signing Identities for Project & Target in your project Build Settings. Mine were pointing to my Development Profile.
The Code Signing Identities need to point to the Ad hoc Distribution Profile that you created.
Make this change and then recreate the Archive and .ipa file. I then deleted the old App in iTunes, and then dragged the .ipa file onto the iTunes icon (Windows). Then I was able to use iTunes to install the App successfully.
My problem seemed to be Xcode. I had multiple copies of the Ad_Hoc profile with different expirations (all valid) and a few with different names from the days. I deleted them all and the app still failed to install, but I noticed all the Ad_Hoc profiles had been resurrected by iTunes. Tried it several times and including deleting them from the Organizer, but they always resurrected (reappeared installed on the device). Finally I drug out a copy of the supposedly extinct iPhone Configuration utility and used it to delete the app and all Ad_Hoc profiles. Then tried to install just the profile. That got it down to 2. Finally got all deleted and got iTunes to install the right profile. Still took 2 more attempts for iTunes to finally install my archive file!
Check this .
Don't need to drag both .ipa and Provisioning Profile.
Just Drag the .IPA File Follow Further steps as you.
Set install owner param in Xcode project / Deployment to the name you specified in apple dev license. I set both install owner and alternative install owner and Install Group and Alternative Install Group to my name which the 100% exactly as in my apple development license.
And the error was gone.
I was having a similar issue where my project was stored on a secondary NTFS drive. After moving the project over to my desktop [aka MacOS Extended (Journaled) drive], I was able to load the ipa file via itunes.
Another point: If the store version of the app installed on your device (or a version deployed another provision), you have to remove it from your device before installing the ad-hoc version.
I solved the issue by not trying to sync with iTunes but instead to sync it within Xcode (from the window->devices menu)
I am very desperate at the moment. I developed an iPhone application and when I am "building for archiving" I get the message "Build succeded" but actually no app-file is created.
My guess is that it has sthg to do with the provisioning but I checked all profiles, I even deleted all profiles and my certificate and reinstalled them but nothing changes.
When I am using building for testing it does create the app though.
Edit the scheme you are using and check that a target is ticked for Archive in the Build section.
You need to select the just a Achieve under Project menu. If you cannot see that Achieve menu is not active, then you have configure your distribution profile.
I'm trying to do ad hoc distribution. When I use XCode, the application installs fine on my phone.
In preparation for ad hoc distribution, I created the default entitlements file, unchecked the get-task-allow box, added the entitlements file name to the code signing entitlements line, and tried to install on my phone.
If I have the file in the entitlements in build settings, I get the (dreaded) error
The entitlements specified in your application's Code Signing Entitlements file do not match those specified in your provisioning profile.
(0xE8008016).
This ONLY happens if I have the entitlements file listed in the code signing section.
I created a brand new application to test this, to see what could have gone wrong and this happens with a completely new test application (so it doesn't seem like clean builds, opening and closing XCode, etc will help).
What am I missing? I've read all of the other times this has occurred and nothing seems to apply.
You need to follow these steps
Have you changed the bundle identifier in your project's info.plist???
Please make sure that this also matches with your provisioning profile's identifier.
go to your projects info. select the configuration you want your build to be deployed then check in build settings that you have added the dist.plist file and the provisioning profile is the same thta you need to run with.
If you are making the build for distribution then set the get-task-allow mark as unchecked
Hope this helps.
I've made it! The reason is you got wrong Certificates! If you're using development Certificates, you can't use the distribution Certificates.
Do the following steps:
Remove the provisiong file from the Xcode -> Organizer
Download again from your developer account. Make sure that you have downloaded profile from distribution tab.
Drag and drop that profile to Xcode
Change the bundle identifier of your plist that match with your provisioning profile App ID.
Go to application setting target and active target and choose your profit from there.
Now rebuild and run the app.
It's also worth noting that this problem may be rooted in trying to install properly authored programs on Jailbroken devices. At least in my case, all my development units and I kept getting this error. By adding the get-task-allow BOOL type to a Entitlements.plist file, I still got the error but the files were installed on the devices (live debugging doesn't work though).
Have you checked that the Code Signing Identity values under Project > Build Settings and Targets > Build Settings are correct?
I found I had to add the new device I was testing on to my Provisioning Profile, on the IOS Provisioning Profile Site.
I had not agreed to the new updated licensed agreement from apple.
Briefly :
Please log in to your developer's account -> profile's -> review -> read the agreement or get your lawyer read it for you -> agree (at your own will) -> and again click profile's to check the status of your profile.
In my scenario the valid code signing entity was not showing up. When i followed the above procedure it was visible and i was able to run the app on the device and/or create the iPA file without much difficulty.
For what its worth, I had this issue with one app but not another. Seems the "Provisioning Profile" in Target->BuildSettings->Code Signing had to be set to "Automatic". If you selected one of the ones in the list it failed with this error.
me too got this type of error, i resolved this by deleting current Entitlement.plist and adding new Entitlement.plist.
Because the project i was trying to run was build on 3.2 sdk and current i am using 4.2.
That was the only reason i was getting error
It seems this error code is used for many situations. In my case, the problem started to happen after we set our DataProtectionClass to NSFileProtectionComplete. I'm not sure of the fix yet.
Removing the entitlement wasn't and option for me as I wanted to use "iCloud", so after digging a little I found that the problem was that "iCloud" not being enabled on the app configuration on the "iOS Provisioning portal".
Enabling it and regenerating the provisioning did the trick for me.
My issue was that the Distribution Profile was created as Ad hoc rather than In House making the device I was running the app on not accept it.
Make sure that the device is added to the Provisioning Profile or create an Enterprise Profile.
Another pitfall while trying to correct this error: you'll also need to replace provisioning profiles from embedded extensions.
In my case, the provisioning profile of my iOS app was just fine. It took me hours to figure out that the provisioning profile of my widget (or Today Extension) needed an update, due to a new device to test on.
Make sure you check all relevant and related targets, not only the target you're trying to execute.
Go to Target -> Capabilities - > Associated Domains
Press Fixed issue Button
Run Project
I'm trying to upload an iPhone app binary to iTunesConnect and keep getting the following error message "The binary you upload was invalid. the file was not a valid zip file". I had an app upload ok recently but this app is having problems. So after a while I carefully went through the following steps trying to make sure everything was ok. Any help is appreciated.
The steps:
renamed the project
(Project->Rename... enter name into
Rename project to:) to release name
making sure the name has no spaces.
Cleaned project
Make sure
references in build setting reflect
new app name
Create new app ID
matching project name in iPhone
Provisioning Portal
Destroyed old
developer and distributer
provisioning profiles in
Provisioning Portal, in XCode and on
iPhone.
Create new development
provisioning profile using new app
name.
Install development
provisioning profile into XCode 8)
Build (Release) for iPhone OS 3.1.3
(highest my phone will upgrade to,
I'm assuming current released
version)
Builds, Installs and Runs on actual
iPhone: To me this implys App and
developer ID's are OK.
Create a distributor provisioning profile
using existing Distributer ID.
Install distributer ID into XCode
Clean
Checked that "Code
Signing Identity" and "Any iPhone OS
Device" lines in Build settings are
set to Distributor ID
Build for
release for OS 3.1.3
Check Build
results to make sure code is signed
with Distributor Profile
Reveal
.app file and compress (alt click >
Compress "appName.app")
Upload
to iTunes connect
Gives "The binary you uploaded was invalid. The file was not a
valid zip file"
Here's some additional steps I try: Quit Xcode after clean (or clean all) then delete the Build folder. I don't "Build and Go", just "Build". The AppName.app is generally in the "App Store" folder (or whatever you name your build configuration for App Store release. I right click only that AppName.app file and choose "Compress" in the Finder.
You could also try uploading it with Safari.
It seems like your problem isn't with the provisioning profiles, but with the way the file is being zipped (or maybe uploaded). Try repeating that part, changing details.
Thanks for the help. It turned out the problem was to do with the fact my project folder was on an ntfs HD. As an experiment I copied it onto my macs HD and it worked perfectly. I don't really understand why this is.
NTFS (New Technology File System) is a windows format. You may like to read this:
https://en.wikipedia.org/wiki/NTFS
Now if you will have a NTFS format iTunes will not recognize that format. And iTunes will support or recognize mac extended versions.
So try not to use NTFS or FAT format for ziping up the projects.
Regards
Rajeev
I am having a problem with ad-hoc distribution on my iPhone. I have developed an application with SDK 3.0. I have a developer's license. I have added certificates and provisioning profiles in my project. So, no problem with that.
But, when I try to install the app on my iPhone, it compiles the project and then displays the error: "The executable was signed with invalid entitlements" in the Organizer window. Am I missing something? I have upgraded my iPhone from 2.2.1 and have downloaded latest SDK from Apple.
Please help me with this issue.
There are pretty good instructions in the 'Portal Program'. If you log into
http://developer.apple.com/iphone
Then click Distribution on the left, and click the
Creating and Downloading a Distribution Provisioning Profile for Ad Hoc Distribution
link at the bottom.
Here's the key bit:
For Ad Hoc Distribution, complete the following:
In the File Menu, select New File -> iPhone OS -> Code Signing -> Entitlements.
Name the file “Entitlements.plist" and click ‘Finish’. This creates a copy of the default entitlements file within the project.
Select the new Entitlments.plist file and uncheck the “get-task-allow” property. Save the Entitlements.plist file. (in Xcode 4, get-task-allow is called "Can be debugged" )
Select the Target and open the Build settings inspector. In the ‘Code Signing Entitlements’ build setting, type in the filename of the new Entitlements.plist file including the extension. There is no need to specify a path unless you have put the Entitlements.plist file somewhere other than the top level of the project.
Click ‘Build’. (Note: Your binary must contain a flattened, square-image icon that is 57x57 pixels. This icon is displayed on the iPhone or iPod touch home screen.)
This error also may occur if you're trying to profile an app where the device is not included in the provisioning profile.
Make sure your device is included in the dev provisioning profile you want to use. Somehow the error message is misleading. My entitlements were actually ok.
I have found that "get-task-allow" needs to be checked for Development builds but unchecked for Distribution builds. The easiest way to accomplish this (AFAIK) is to have two entitlements files in your project: Entitlements.plist and EntitlementsDebug.plist - and to reference the proper one in the build project settings for the various configurations in your project.
Code signing entitlements are no longer necessary for Ad Hoc builds in Xcode 4 - see details notes in Apple Technical Note TN2250
If you once come into the situation, that checking "get-task-allow" seems to be required in order to deploy your debug (!) build to your phone, check this:
a) Check the build setting. There should be no entry in "Code Signing Entitlements" for Debug
b) Remove Entitlements.plist temporarily and build your debug version. If it complains about a missing Entitlements.plist, then you probably have the same situation, I had to fight today.
c) Build again with Entitlements.plist and enable "get-task-allow". If it works now, you probably have the same problem:
After messing around with new profiles I couldn't deploy my Debug build to the phone. AdHoc was fine. I checked a) - empty.. Hmm. I checked b) - complains. c) - worked...
After all I examined project.pbjproj in an editor and - although the GUI did claim, that there was no entry for "Code Signing Entitlements" in fact there was one in the Debug section. I emptied it and was done.
This is because your device, on which you are running your application is not selected with your provisioning profile.
So just go through Certificates, Identifiers & Profiles select your iOS Provisioning Profiles click on edit then select your Device
I have just had an exciting three hours battling with this. I have just upgraded a project to 4.2 and for some reason it just wouldn't work.
I eventually removed the Entitlements.plist file and then created a new one.
File > New File > Code Signing > Entitlement
Name the file Entitlements.plist
Make sure it's in the Resources group in xCode.
It didn't put in the get-task-allow BOOL type in the Entitlements.plist file. I added it, checked it, saved it, unchecked it, saved it. This made me feel better.
I then removed the Adhoc and Release profiles I had created. Re-downloaded them from the Provisioning Portal and droped them back into the xCode organizer.
I then went into Build Settings and made sure the correct profiles were assigned to the Debug and Release profiles.
I then changed the to Release / Device. Hit the build button and it worked.
I have no idea why.
John's answer is 99% correct. I found that (at least in my configuration), you have to open the Build settings inspector for the PROJECT. The build settings for the target do not contain "Code Signing Entitlements". Perhaps this doesn't make a difference if you have only one target in your project. But if you have multiple targets, you need to go to the project build settings. In any case, after doing what John said, my ad-hoc distribution build worked perfectly.
In Xcode 5.1, if you go into Preferences -> Accounts -> View Details...
Make sure the Signing Identity status is Valid. If it says Revoked, hit the Plus button and add the appropriate signing identity: iOS Development or iOS Distribution. Xcode will replace it with a new, valid one.
For me that solved it:
https://coderwall.com/p/-ckobg
Open Project.xcodeproj > project.pbxproj
Remove all lines like these:
PROVISIONING_PROFILE = ...
"PROVISIONING_PROFILE[sdk=iphoneos*]" = ...
CODE_SIGN_IDENTITY = ...
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ...
Set provisioning profiles & code signings for the target again
pJosh, this might help understanding. In my case, my Team Provisioning Profile was expiring (the Provisioning Portal indicated it is managed by XCode), as well as the device testing profile for the app. (I still don't know why, but the portal had a "Renew" button next to the team profile, but it wouldn't do anything when I clicked it.)
So, I deleted the profiles about to expire, then in XCode go to Organizer (Command-Shift-2), under Library / Provisioning Profiles, I deleted the expiring ones. Then click "Refresh" at the bottom, enter my Apple ID, and it renewed the expiring ones.
Finally, on my Target, I went to Build Settings, Code Signing, and made sure to select the provisioning profile. Voila, now it builds to my device.
Just got this same error code.
It seems there are different things that cause this and therefore different ways to fix it.
In my case, I had two different devices with the same name (an iPhone 4 and an iPhone 4S). Changing the name of one of them fixed this error completely for me...
I was trying to add iCloud support to my existing app, but found that after adding entitlements and configuring iCloud, my app would no longer debug.
I realised that my generic iOS development certificate had a different APPID from the app I was working on. So to fix it, instead of using my generic certificate I created a specific development certificate for that APPID.
I refreshed my provisioning profile in XCode, cleaned out the app, disconnected my device, restarted XCOde and connected device and ran, and it now works a treat!
I also spent several hours fighting with this as well. The fix is real simple. Edit your Entitlements.plist file in the root of your project's directory. Find the line that says <key>get-task-allow</key>. Underneath it should be <false/>. Change that to <true/>.
Sorry that this is very late, but I just was looking at this question and found something that worked for me. I went to PROJECT->Build Settings and found the Code Signing section. Beside debug, my distribution profile that said Iphone Distribution: MY NAME was selected. I instead selected Iphone Developer: MY NAME on the drop-down list under IpodProfile (for bundle identifiers com.myName.myApp which was the provisioning Profile for my device. Hope this helps!
I just had this happen to a developer on the team I administer.
It turned out his developer certificate expired and after renewal, I neglected to add his certificate to the provisioning profile his app used.
I had not agreed to the new updated licensed agreement from apple.
Briefly : Please log in to your developer's account -> profile's -> review -> read the agreement or get your lawyer read it for you -> agree (at your own will) -> and again click profile's to check the status of your profile.
In my scenario the valid code signing entity was not showing up. When i followed the above procedure it was visible and i was able to run the app on the device and/or create the iPA file without much difficulty.
Had this issue occur when everything seemed to be setup correctly, build setting were pointing to correct provisioning profile, code signing was properly setup, etc.
Issue occurred because I had just created a new scheme and hadn't regenerated my CocoaPods for the new configurations. As you can see from the image, the new ad-hoc configuration is pointing to the Pods.production configuration, instead of a Pods.ad-hoc configuration (and test respectively)
To fix:
Set the offending configuration to None -- cocoapods wouldn't generate the configs unless I did this
Close XCode
Run pod install
Re-open XCode and set the new scheme's configurations to the newly generated configurations.
That's it!
Check if you're device is included in the provisioning profile.