My client asked me to get the review of the app on which I am working. So, I want to get the ipa file and mobile provision file from Xcode 4.2 to share my app to run in real device. I have a paid account of apple with me. Please tell me the procedure to get it.
Thanks in advance.
STEP-1:
You need to refer steps for AdHoc Distribution
I think you need to login with your credentials at Developer Apple Login
Once you are logged in go through this link and read through it step by step.
I think this is the best solution you can get as this documentation guide is given by Apple
https://developer.apple.com/ios/manage/certificates/team/howto.action
This has multiple steps like:
1. Generating a Certificate Signing Request
2. Submitting a Certificate Signing Request for Approval
3. Approving Certificate Signing Requests
4. Downloading and Installing Development Certificates
5. Saving your Private Key and Transferring to other Systems
I think if you read all this steps on the apple documentation at the given link then you don't need to refer to any other guide.
STEP-2:
Then just you need to download your certificates and provisioning profile.
STEP-3:
Just set the profile into your Project and Target Settings and then put proper Entitlements using "Entitlements.plist".
STEP-4:
Once you have done that, just set up your project in AdHoc Scheme.
STEP-5:
Clean your Project.
STEP-6:
Go to Product -> Click on Build For -> "Build For Archiving"
STEP-7:
Product -> Archive
Now your Archive can be obtained in your Organizer where in you can save it to disk with an IPA extension and send it your client.
EDIT:
Here are some of the useful links you can refer to for creating provisioning profile and IPA file:
Create IPA file in Xcode 4.2, iOS 5.0 Beta
http://www.makebetterthings.com/iphone/how-to-create-ipa-file-for-your-iphone-app-xcode-build-and-archive/
http://www.wikihow.com/Create-a-Provisioning-Profile-for-iPhone
Create provisioning profile in iphone application
Hope this helps you.
If you want to test application on device, then you need to create debug profile for it. You need to get it for your device from the provisioning section of developer portal. If you are creating the distribution profile, then you need to put the generated ipa file from build folder to itunes to install it on device.
Then you can install the application on device. But in that case you will not be able to see the logs.
So if you want to see the logs in Xcode console, Create a developer provisioning profile for the device & install it on XCode & then run the code on device using Xcode.
Maybe I think this is the entitlements.plist problem please follow the steps
In XCode, go to "new file" and select "code signing" in left box. Select the "Entitlements" file type. And change the name to "Entitlements.plist". Give the name in project getinfo entitlements plist please check the image below
• Get their device ID and add their device to "Devices" in your iOS Provisioning Portal
Create or edit a distribution profile to include their device (wildcard app id or your app's app id)
• In Xcode: Product -> Archive
• In Xcode's Organizer: Go to archives and "Share" your archive. This creates an ipa that you can give to your client
• The client can install it in iTunes by adding the ipa and syncing apps (I haven't done this last step in a while)
OR
Get to know testflight. Using testflight will replace the final step above and streamline the installation process for your client.
After build with your provisioning profile or distribution for device(not simulator). You can follow this tutorial.
It can be done, in fact I just did it.
After Xcode 6 you have to go to:
Product-->Archive
Then wait for it to finish. Then on the screen that pops up right click on your newly created archive-->Show file in finder
Then head there with a terminal and run this command on that dir:
xcodebuild -exportArchive -archivePath <PROJECT_NAME>.xcarchive -exportPath <PROJECT_NAME> -exportFormat ipa -exportProvisioningProfile "Name of Provisioning Profile"
DONE
For example this command for me was:
xcodebuild -exportArchive -archivePath ACCESS\ 04-02-16\ 02.21.xcarchive/ -exportPath MyTestApp -exportFormat ipa -exportProvisioningProfile "iOS Team Provisioning Profile: eu.sudoplz.myTestApp"
This created a MyTestApp.ipa file for me.
i am about to launch app in app store,
i am trying to run code in release mode , i downloaded the release mode profile
but when i compile code from iphone they say
"A valid provisioning profile for this executable was not found."
how to solve this pls help
############## EDIT
now i can run release mode on my iphone but i got this msg
The program being debugged is not being run.
so now can i upload this release file to appstore???
my setting
Code Sign Entitlements:Entitlements.plist
Code Sign Identity: my iphone dist release profile
any iphone dev: my iphone dist release profile
are these parameters sufficient to lauch app??
You need to make sure your connected device is provisioned through the iPhone Provisioning Portal. Check it's status by opening the Organiser in Xcode (Window -> Organizer) or press crtl + command + O.
Your iPhone will have to have a valid provisioning profile on an active iPhone developer account in order for you to run your app on your device.
However, running in Release mode and Device mode are different things, if you're trying to run in Device mode without a certified Device, that would cause this error. It wouldn't matter whether it was in Debug or Release mode though.
You shouldn't be trying to run in release mode. You can't actually do that, it would use the Distribution provisioning profile which can't be installed on devices. (it's used for signing the code for App Store submission)
Create/install the Development profile (make sure you have the correct bundle and device list set) and set "code signing" for Debug to use that profile.
You can compile the code in release but you have to use a Certificate file that you have provisioned for the device. If you use the Distribution Certificate then you can only install the file through the normal distribution channels, (e.g. AppStore)
If you want to run your code in release on your device however you will sign it with the same Certificate you signed it with before. Only sign with the Distribution Cert if you are Uploading it to Apple.
EDIT:
Running in Release should be a fairly easy process.
Setup the project just like you would for debug.
Use the same signing certificate, and your developer profile.
Edit the selected scheme.
And Select Release rather than debug.
You may also want to change the Debugger to None
The rest of the settings should work the same as when you debug.
Therefore if you are using the Entitlements.plist when you run in debug, then you will use them when you run in release.
once again. (DO NOT USE DISTRIBUTION PROFILE)
I am getting this error while I am trying to debug my app on device.
I created development provisioning profile as it is mentioned at the developer portal. My development device is selected in the profile and I am selecting the correct profile from Target's code signing identity menu. I recreated provisioning profile for several times and also removed and reinstalled it and recreated the project but I am getting that whenever I try to debug on device.
Btw, the adhoc distribution provision profile works.
I spent my whole day to find out a solution but nothing. Anyone have a solution?
It could be because your iphone is not recognized by the provisioning portal.
Solution:
In Xcode, Goto --> Build --> clean all targets.
In "Groups & Files" -->Target --> expand it --> right click your app and select Clean "your app"
Goto->Window-->Organizer
In the Devices tab on the left, select your iphone
In the Provisioning section of the selected iphone delete all the current profiles (if any)
Unplug your iPhone and replug it in.
Goto->Window-->Organizer-->right click your iPhone -->Add device to provisioning portal
Now make sure you have selected the appropriate code signing identity in edit project settings -> build --> code signing
Build and run.
In Xcode 10, I solved this by switching the project's build system from "new build system" to "legacy build system" (File -> project Settings).
I had the same problem. Everything was ok:
the device was registered in IOS Provisioning Portal; the certificate was downloaded and the Development Provisioning Profiles for my app was downloaded.
So the solution!!!
Target> Get Info
Select Configuration to Release (here's the devil)
In code signing, Code Signing Identity check iPhone Developer. Close.
On Target chose Clean Target and then Run the app.
Good Luck.
In my case this was because there where a couple of versions of the developer certificate in the keychain.
Deleting the iPhone Developer cert from both My Certificates and Certificates and then downloading the latest one from the dev centre and installing that (double click on the .cer file)
sorted my problem
Finally i could solve the problem. One of my colleagues has revoked the developer certificate at iOS Provisioning Portal for his test apps. for fixing; i removed the existing developer certificate at my keychain, requested a new certificate with the existing private key, revoked the certificate from provisioning portal and submitted the newly requested certificate.then i downloaded and installed it.
now i can debug my app on my device :)
This caught me out because someone had changed the "Run" configuration's "Build Configuration" setting to "Release" (under "Product" > "Edit Scheme.." > "Run *.app").
This is normally set to "Debug" and hence it was NOT using the developer certificate and provisioning profile that I was expecting, it was using the distribution certificates instead.
In addition to this I found that if you look in the Console Log for the device (via Organiser), there may be an error code that better indicates your problem. For example I had...
Mon Sep 5 09:39:56 unknown installd[304] <Error>: profile not valid: 0xe8008012
I then googled "0xe8008012" and got the following page which indicates a "0xE8008012 - The UUID of the device does not match any in the Provisioning Profile being loaded" error.
MobileInstallation
Xcode->Click your app -> TARGETS -> click the app-> Build Setting-> Code Signing : Make sure that both Debug and Any iOS SDK are set to iPhone Development
Xcode -> Product -> Scheme -> Edit Scheme: Make sure Build Configuration is set to Debug.
I had the same issue with Xcode 10.0 beta 5 (10L221o) and a device running iOS 12.0 (16A5345f) - that's also beta.
After installing the app alert titled "App installation failed" showed up, "A valid provisioning profile for this executable was not found.".
I got rid of it by going to: ~/Library/MobileDevice/Provisioning Profiles and finding the certificate Xcode was trying to use. Then in the "Devices and Simulators" window in Xcode, I right clicked on my device, choose "Show Provisioning Profiles" and with a plus button added the provisioning profile to the device there.
I don't remember when I've done it last time, it's been years. I guess that Xcode normally does it for us but for some reason, it fails when we see that message.
In my case this problem occurred because another provisioning profile was selected for the unit tests. Just took me hours to find this ...
With Xcode 6 and a new device:
Press cmd + shift + 2 to open devices.
Press the "register device" button. If there is no such button (like in the screenshot) go to developer.apple.com and add it manually. Copy the Identifier into the field.
Go to Xcode -> Preferences -> Accounts -> Doubleclick on your account -> Press the little refresh button on bottom left to refresh the profiles
Go to Code Signing and set the new profiles.
We can try this: This has solved my problem . You need to reset the profile for which your device id has been added into your member area of Apple.com . .
Assuming you have your development and distribution certificate installed correctly:
Under Project your main code signing identity should be the developer profile for that app.
Under Targets your main code signing identity should be the distribution profile for that app, except that you should change Debug > Any iOS SDK to your Development profile... and make sure Release > Any iOS SDK is your Distribution profile. This should build and run on your provisioned phone and should archive without any codesign warnings.
Only thing that worked for me when my phone crashed and I had to restore it from a previous iTunes image.
This solution worked for me
Go to Xcode --> Preferences --> Account.
In the provisioning profiles section, right click and open with finder.
Delete all provisioning profiles from the provisioning profile folder.
Finally, go back to Xcode and click the refresh button.
I hope that helps!
I had the same problem. what I did is:
1. clean the target
2. exit the xcode
3. restart xcode
4. rebuild.
and it worked.
Another cause (verified):
Apple has a major bug in Xcode going back to version 3.x, where it magically overwrites the OS X keychain with a fake keychain from inside Xcode, re-installing certs (and private keys!) that you already deleted
...so, if you have "new cert" installed, and nothing else, Xcode will sometimes get into an infinite loop where it will keep ALSO installing "old cert" (that doesn't exist anywhere except inside XCode!).
...and because of ANOTHER bug in Xcode (unfixed for 3+ years now...), Xcode sometimes automatically selects the "oldest cert I can find" (whcih, by definition, is incorrect - I think someone at Apple got mixed up between "oldest" and "newest" :( )
...and EVEN THOUGH you've selected the correct provisioning profile, Xcode sends the "old" provisioning profile to the device, then signs with the "new" profile, causing this error
Solution: you have to un-FUBAR Xcode's FUBAR of your Keychain.
This is harder than it sounds (there are multiple SO posts on this topic) - it involves multiple reboots of your machine, deleting the key every time.
Eventually, Xcode gives up on corrupting your OS, and accepts the reality you present it with :).
Changing the provisioning profile to automatic then running prompted Xcode to "fix" the issue. I then changed back to my original provisioning profile and everything worked fine.
In my case a valid provisioning file is because I didn't add the device to the very provisioning file.
Had the same problem. My solution was very easy. I checked If I have my device's UDID in developer.apple.com and it was absent. After I added it, it starts working. It is very annoying that Apple developers give error "A valid provisioning profile for this executable was not found" instead of "UDID is not found". Actually I mentioned it first in XCode 6...
In my case, it was the problem when I setup my time manually two month earlier on my iPhone. But when I changed to set time automatically, it worked fine.
Setting -> General -> Date & Time -> set time automatically
If it does not work set time automatically of both mac & iPhone, will work fine.
Remove certificate, profiles and recreate it. Install it. Thats the best soultion.
In my experience this problem happens if you try to build on a device that is not registered in your developer center or is not enabled inside provisioning profile that you are using.
1) Add the device to the developer center.
In XCode 5 you'll still find a button "add to member center" inside the Organizer window.
In XCode 6 i suggest to copy the device ID and manually add it to the device section of your member center.
2) Edit the provisioning profile you're using to include the device you have just added. Save and synchronize provisioning profiles from XCode.
Clean, and it is on.
One of the cause could be your "project => Build Settings => Signing => Development Team" is different from your "target => Build Settings => Signing => Development Team", just make them same
After select auto manager signing
You may still need to check the selection in settings. Sometime, it's not correct there.
I had a certificate that expired (which generated the error).
Step 1. Go to developer.apple.com, login, and go to IOS provisioning portal
Step 2. Go to certificates (which is now empty), and follow the instructions listed to create a new certificate (open keychain on your computer, create a signing request, save it to disk, upload it to apple)
Step 3. Download and install the files created by apple to your keychain
Step 4. Problem: all of your previous provisioning profiles were associated with your OLD certificate, so you need to go back to developer.apple.com->IOS provising portal-> provisioning profiles and 'modify' each profile you care about. You will see that your identity is no longer assicated with the profile, so just click the check box
Step 5. Download all the profiles you changed
Step 6. Plugin your phone and drag and drop the .mobileprovision file onto xcode icon in the dock bar to install them on the device
I saw this problem because I had obtained a new Mac, and was still using my old Computer's certificate. I had created a new certificate for the new Mac, but had both certificates in my keychain.
In the Organizer, the profile warned that "XCode could not find a valid private-key/certificate pair for this profile in your keychain" even though the old certificate existed in my Keychain.
The solution was to delete the old certificate from my Keychain and delete/revoke of all the profiles which used this old certificate. Then create a new profile with the new certificate and use this.
Hope this helps!
Bringing an app up from Xcode 3 to 4.3 I found the Bundle name and Bundle identifier had to be set to match the AppId.
If all else fails, give that a whirl.
I faced same issue there may some other reasons too:
While testing i set my date to some future date and profile got expired. As result this issue was generated.
But i solved by setting date of iphone to current date as a result profile was not expired.
I'm compiling my app in Adobe Air for iOS, not Xcode. I was trying to copy the .ipa using iTunes, and got a mysterious "Error installing app" message. It wasn't until I used the iPhone Configuration Utility (iCU) that I got the real error message.
The problem was that I was compiling the app with a provisioning profile for ad hoc distribution and a certificate for development. I didn't understand that there are 2 types of certificates, and 2 types of provisioning profiles. There's one of each for development and one for distribution. If they don't match... then you get that error message. It's obvious once you understand it...
The solution was to download the distribution certificate (.cer), double click to open in Keychain, and export that as P12 from KC directly. Then use that P12 distribution certificate in the publish settings (Flash IDE or Flash builder), and also use the provisioning profile used for ad hoc distribution (.mobileprovision). Then finally install the provisioning profile and the .ipa file using the iPhone Configuration Utility.
That did it for me.
In my case my provisioning profile was invalid because apple has changed some of its terms and conditions. To fix problem I had to
delete previous profile.
I had to accept terms and condition from this website of apple.
Click Your app from Xcode Under Targets. (Under project.) Here you see Summary info, build settings, Build phases, build rules.
Okay go to Build Settings. Go down to Code Signing.
You see you have two fields Debug and Release. You have two profiles to choose from in each of those fields, Distributing and developing.
Let distributing be the one from the Release field. Let Developing be the one from the Debug field.
Doing this solved this problem, and let that error message go away. Now I can run my application fine.
I have a question on how exactly to do the final distribution build for my app. I have actually successfully built this app already but now I am trying to make an updated version and to remember what I did right the first time. It all seemed to go wrong when my provisioning profile expired....
Anyway, I have my distribution certificate and distribution provisioning profile. I have followed the instructions from Apple, an iPhone programming book and several online sources to create a build that checks against the right certificate etc. But the build always fails unless I connect a device, which is strange as the distribution provisioning profiles do not allow the inclusion of a device (which makes perfect sense in itself). However when I build with a device connected I am asked
'Can’t run XXX on the iPod “iPod
touch”
The iPod “iPod touch” doesn’t have the
provisioning profile with which the
application was signed.
Click “Install and Run” to install the
provisioning profile XXX on “iPod
touch” and continue running XXX.'
When I click install and run it fails with the message that
A valid provisioning profile for this
executable was not found.
So my basic question is how exactly should the final distribution build be done? An new executable appears, but it has a forbidden symbol on top of the application icon suggesting the build was unsuccessful.
Any help massively appreciated.
Don't click "Build and Go".
Either just build, and then locate the app and upload it, or use Xcode's "Build and Archive" option.
It is best to use "Build and Archive" as Xcode will look after the app bundle, and the important .dSYM file which is used to symbolicate crash reports for your app.
And you cannot upload and execute app that signed with 'Distribution' certificate on your device. Such app can only be uploaded to AppStore.