Can't archive without device in Xcode 6 - ios

I'm trying to distribute an iOS app without having a device. I did purchase a developer account and set up signing and provisioning profiles for distribution.
I can see my profiles in Xcode. But when I choose the "Archive" menu item, Xcode reports "No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found."
and suggests I click on "Fix issue" to download one. But then I get "Unable to create a provisioning profile because your team has no devices registered in the Member Center. Please connect a device, enable it for development, and add it to the Member Center using the Organizer."
My problem is similar to Could I submit app to appstore without ios device?. But I have a provisioning profile. Interestingly Clocksmiths question to AmitApollo's answer seems to be spot on but doesn't have an answer.

Related

Failed to create provisioning profile for uploading app to store

Ok I have created a ios app that was working fine and running in the simulator.
I am now looking to upload it to the app store.
My boss has created a developer team and add me as a admin.
When I try to create an archive (I have the scheme set to generic ios device) now I get
Failed to create provisioning profile.
Showing Recent Messages
:-1: No profiles for '****.*****' were found: Xcode couldn't find any
iOS App Development provisioning profiles matching '*****.******'. (in
target '******')
There are no devices registered in your account on the developer
website. Plug in and select a device to have Xcode register it.
on the Apple developer website I have gone to
Certificates, Identifiers & Profiles and added Development certificates
What else do I need to do? Note I don't have a iphone or ipad to provision.
I was only testing in a simulator and was then going to upload to the store.
I am new to xcode. Sorry if this is simple.
Thanks
Have you tried manually assigning provisioning profiles rather than letting XCode automatically sign your project?
You can do this by deselecting "Automatically manage signing" and
manually selecting provisioning profiles.
Also ensure that you Download the profiles you create on your Apple Developer account to XCode.

None of the valid provisioning profiles include the devices - Distribution

I read online we need a separate distribution provisioning profile if we want to distribute an app to the app store. I know there are answers already on StackOverflow for this error but I think mine pertains to my Distribution provisioning profile.
So right now I have two provision profiles, one for developer, and another for distribution. The app will build and run successfully on the same device when Code Signing Identity under "Build Settings" is set to iOS Developer. But when I switch Code Signing Identity to iOS Distribution and run on the same device, I get the error "None of the valid provisioning profiles include the devices". When I try the option to let Xcode "fix the issue", it says that
"Xcode failed to resolve the issue. Check your code signing settings; ensure you have a matching signing certificate and provisioning profile installed; and try again."
The provisioning profile for distribution is active on the Apple Developer site. When I try to reset in Preferences I still get the error
You can not run on a device with the Distribution profile. That's just for doing a build/archive and then submitting that to the store. If you want to run the production build on your device, submit to iTunes Connect and use TestFlight to install that build on your device.

Xcode 7.1 certificate issue and invalid profiles

We are two devs working on the same ios project, using same developer id. When one of us runs app on device, xcode offers to fix a certificate issue. After agree, xcode kills all existing certificates and invalidates provisioning profiles. This kills each other provisioning profiles.
Steps to Reproduce:
1. Create developer certificate and provisioning profile.
2. Share it with other developer.
3. Create new profile by xcode when it says "there is no profile to run on device" (and gets "Fix issue" button).
Expected Results:
Previously created provisioning profiles and developer certificates should remain valid.
Actual Results:
It invalidates existing developer certificates and provisioning profiles.
Version:
xcode 7.1
How we can fix this issue?
Never use the "Fix issue" button is one of the best tips given by this article : http://blog.jaredsinclair.com/post/116436789850/follow-these-guidelines-and-never-struggle-with).
Instead learn how to manage provisioning profiles:
1/ Connect to your member center from http://developer.apple.com
2/ Generate a developer certificate, you will have to share the private key with your other developer to use the same account (or you could invite him if you had an entreprise account)
3/ Register your device UDIDs
4/ Generate a development provisioning profile
5/ Configure your project to use this provisioning profile and developer certificate
6/ Build and run on your devices (and never struggle again with provisioning with provisioning profiles!)
Here is all the documentation you need: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
Hope that helps.
Cyril

Xcode 6 error when building app for release

I am having issues trying to achieve or even build a release build of an app I am working on. Whenever I try to build the app for release I get an error saying:
No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found.
I have the cert for this profile on my computer but in the Developer Portal I only have a certificate for development. Is this causing this error to occur? Do I need to have a Distribution cert to be able to build for release? Any help would be appreciated.
Note: I am a developer(team member) for a company so I do not have direct access to the Apple Developer Portal.
I know provisioning profiles are a pain :) This is what I do to stay organize and develop/distribute my projects:
The developer portal (not xcode) contains the most accurate source of profiles. For example, imagine you created a merchant certificate, turned on apple pay, and then generated a provisioning profile. Then let's say you decide you no longer want to use apple pay - the act of turning it off actually invalidates the provisioning profile. You will see a yellow "invalid" warning in the developer portal, but the provisioning profile may still be available in xcode! Really annoying. So I would always make sure that your provisioning profile is valid in the developer profile before distributing an app.
In the developer portal, always make sure you have two distribution profiles -- one ad hoc to use with testflight, and one to distribute to the apple store. You should also have one developer profile to build and debug your code.
Once you have your profiles set up, go into xcode and refresh the provisioning profiles as described here: https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingProfiles/MaintainingProfiles.html#//apple_ref/doc/uid/TP40012582-CH30-SW26. I.e. go to preferences, accounts, view details..., and click the refresh button on the bottom left hand corner.
Now that xcode's provisioning profiles are updated, you need to now code sign with the right profiles. To do so, go into your project settings, and go into build settings for both the project and the target. Under debug, select your iOS development certificate. Under release, select your iOS distribution certificate. Under provisioning profile, you will want to select your development profile just to build on your device and debug, your ad hoc distribution profile if you want to archive the project and send it via testflight, or your apple store distribution profile if you want to archive the project and submit it to the apple store.
A few things to note, is that when you are creating the provisioning profiles, you need to specify the certificate you are dealing with. So if you are creating one of the two distribution profiles, you will need to select your iOS distribution certificate. And when you select ad hoc distribution, will need to select the devices that you want to be able to distribute too. Testflight will help you register the devices that you want to distribute to, and once registered, you will be able to select those devices to add them to the provisioning profile. If the certificate you select in xcode was not used to generate the provisioning profile you selected in xcode, then you will probably get the error you mentioned. Think of the provisioning profile as the link from you as a developer (i.e. your certificate) and/or your devices to your app id (i.e. your project).

Cannot add distribution provisioning profile to Xcode 5

I'm trying to distribute my Phonegap app on the iTunes. I have done this before successfully before but I have since changed to a new Mac. I'm using Xcode 5.0.2.
I have created development and distribution certificates. I then created an App ID, entering the Bundle ID under "Explicit App ID".
I then created a development provisioning profile for the app, choosing the correct App I.D., the iOS Development certificate, my device, giving the profile a name and clicking "generate". I download it and double click to add to xcode. The xcode organiser opens and I see it added under my device provisioning profiles. I can then successfully run the app on my physical device.
Now I want to distribute it. I created a new provisioning profle, selecting "App Store" under Distribution, selecting the correct App I.D., the iOS Distribution certificate, and clicking "generate". When I double click the downloaded file, the organiser in xcode opens, but the distribution provisioning profile doesn't under the device provisioning profiles. When I click the + button to add the profile, I cannot select the Distribution provisioning profile, but I can select the Development provisioning profile:
I have no idea why this is. I tried closing down and opening xcode, to no avail. I tried waiting a few hours. Again, it didnt work.
I then try to distribute my app by creating an archive. First I go to build settings > code signing and choose iPhone Distribution:
I then select my physical device and choose Product > Archive. I get the error:
No matching provisioning profiles found
None of the valid provisioning profiles include the device Belgian Iphone (identifier: xxxxxxxxxxxxxxxxxxxxxxx).
Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.
I click "Fix Issue" and end up with the error:
There was an error generating the team provisioning profile for AppID 'FT49U8Q9JE'.
The AppID given here is different to the prefix in App ID's in the developer portal. I don't know if it should be the same. Any suggestion? I have spent 3 days on this problem and as stated above, I had no issues on my previous mac (which I no longer have)!
Something that got me recently was having to actually set the provisioning profile in the build settings

Resources