How to Create a Provisioning Profile for Mac App Distribution - macos

After completing all MAC development, only the deployment stage remains.
I'm a complete beginner developer on MAC.
But when I was deploying, the gatekeeper blocked me, and when I deployed I knew I had to build with a new provisioning file.
So I tried to make it on the Apple Developer site but all failed )-:
Please see below for the steps I followed
Generate a certificate on the MAC PC (.CSR)
Create a Developer ID Application certificate in the Certificates, Identifiers & Profiles screen (using the .CSR created in step 1)
After that, I went to Profile and selected the option to deploy using Developer ID and proceeded, but only the message that there is no certificate is displayed as shown below.
Does anyone know how to solve this problem?

Failure to create a provisioning profile using Developer ID when there is an actual certificate is an Apple problem, and the problem has been resolved in Apple Korea.
It took Apple about 3 weeks to solve the problem, and when I got a response and checked, it worked normally.

Related

Xcode: "Your account does not have permission to create iOS Distribution Certificates" as Team Member

Forward: There are many similar SO questions with regard to this error. I've visited dozens of them over the past days, but none seem to have a solution to my problem. They mostly are from developers with full admin rights, unlike myself. Most solutions are also hacks or unclear.
I am a member of a developer team at Apple's developer.apple.com site. I've been charged with uploaded an iOS application I've developed to iTunesConnect, in order to be able to deploy it with TestFlight.
In order to successfully accomplish this. I asked for the following to be done.
That I be added as a member developer. See certificates here.
A matching App with the same bundle-ID be created for me on iTunesConnect.
A Distribution provisioning profile be added at developer.apple.com for my specific App.
Despite all of this. When I try to validate the app, I'm met with the following message.
It would appear from a manual signing attempt that because the provisioning profile was created by a team administrator, that I cannot sign it without their private key. Assuming this is correct, then how can any developer ever distribute apps if:
A distribution provisioning profile requires you be the creator in order to be validated.
Only a team admin can create a distribution provisioning profile.
This appears to be a paradox.
What can be done to resolve this conflict? I am only a member of this development team temporarily, and would like to formulate a clear solution to this problem so that I do not test their patience with repeated troubleshooting questions. To make it easier to answer this question, I've attached some extra images that might be useful.
My app's general panel in Xcode when using automatic signing. It shows I am signing on behalf of the team.
Solving this problem required two steps.
A certificate signing request (CSR) was created and sent to the developer who had created the distribution provisioning profile. You can create a CSR by going to: Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority. Once I received this CSR back from the developer, I double clicked it to install it in my keychain. It then appeared as so:
Next, the developer had to add the certificate they sent me to the provisioning profile for the app on developer.apple.com. I then downloaded this provisioning profile again and selected it in within Xcode as seen below.
Once this is completed, you should be able to validate the application.
I got this error when my ExportOptions.plist file had the wrong value for the method. I had "enterprise" rather than "ad-hoc". (This is the file passed to xcodebuild via the -exportOptionsPlist option.)

How to test submitted Mac App that uses iCloud locally? Re-sign it with Development Profile?

I submitted a new version of my Mac OS App to the App Store. It was rejected because it crashed in review due to an iCloud exception. The problem: No matter what I try, I am not able to reproduce the problem locally.
Apple told me that I have to run my tests on the exact same version I submitted for review. That makes sense of course, but how can I do this?
Since the App uses iCloud the iCloud entitlement is included. Since I submitted this version to the App Store it is signed with a Distribution Profile. When I try to execute the app file I extracted from the submitted .xcarchive it is killed immediately. Console shows:
taskgated-helper[51673]: Starting taskgated-helper
taskgated-helper[51673]: embedded provisioning profile not valid: file:///Users/AUser/Library/Developer/Xcode/Archives/2014-02-07/MyApp.xcarchive/Products/Applications/MyApp.app/Contents/embedded.provisionprofile
taskgated-helper[51673]: returning 2 provisioning profiles
taskgated-helper[51673]: none of the 2 applicable provisioning profile(s) apply
taskgated-helper[51673]: CPValidateProvisioningDictionaries returning NO with error: (null)
taskgated[13]: killed com.example.MyApp[pid 51671] because its use of the com.apple.developer.ubiquity-container-identifiers entitlement is not allowed (error code -67050)
So, how can I test the exact version I submitted when I cannot run it? Running a version that was compile in Release mode using a Development Profile is not problem. Is there any way to resign the submitted version with a Development Profile?
However, even if I am able to resign and run the submitted version, would this still be the exact version I submitted?
meanwhile I got an answer directly from Apple. I add it here in case someone has the same trouble:
Running an App that uses iCloud and that was signed with a Distribution Profile on a local machine is NOT possible. This will only work once the app was downloaded from App Store.
To be able to test such an app locally one can simply re-distribute it using the organizer:
Open the Organizer in Xcode
Select the Archive that was submitted for review
Click on "Distribute..."
Select "Export as" and "Application"
Click on Next and select a Development Profile to re-sign the app
This way you will re-sign the exact same build that was submitted to review with your Development Profile and you will be able to execute the app locally. You can also attach the Xcode debugger to this app to get all the information you need.
Of course this is not the exact same app as the one that was submitted for review but according to Apple this does not matter. Only the signature is different but the actual build is the same.
In my case I was still not able to re-produce the crashes that happend in review but this is another story...

Xcode 4.6 - "Valid signing identity not found" for Distribution provisioning profile

I'm examining the process of submitting an app to the App Store and I'm having some kind of trouble here. I've been following this tutorial.
I've created a Distribution Provisioning Profile, which I downloaded and added to Window - Organizer - Devices dragged in 'Provisioning Profiles' under the Library heading in the sidebar. What I see there is this:
I've tried revoking all my certificates and adding them once again to my Keychain Access, but it didn't help. Even after refreshing the provisioning profiles in Xcode.
Also, I've read that this happens often if I change the machine I'm working on, but this is not my case. I've developed the app on the same Mac, I'm on right now.
I'm willing to provide more information to help reach to a solution to this problem if needed. Thanks for your help in advance.
Things to check:
Make sure in Keychain Access that the certificate you are needing to use has the private key stored with it.
Make sure the bundle identifier matches EXACTLY with what you have for the AppID (unless you are using the Wildcard identifier)
Make sure the provisioning profile you selected uses the certificate created.
Make sure that you download that provisioning profile and are using that to sign the distribution settings of the target.
If all this is done, it should work fine.
Also, I gave a talk about certificates and provisioning for iOS. Here is a link to the keynote PDF which explains the process of how I do things.
Just restart XCode.
Sometimes everything done through the documentation, but XCode does not work properly.
If you are still stuck by this problem, try to do the whole process again.
Go to keychain, delete all the iPhone certificate and then do routine stuff. I faced this issue before for some reason, So I just redo it. Good thing is it won't take long time, just 5 mins : )
Hope this can help you.
I solved this issue by opening the KeyChain Utility and deleting expired provisioning profiles. I updated my profile at members page of developers.apple.com following all the instructions.
Then opened up my application with Xcode 4.6 . Under Build Settings selected iPhone Developer with my name.
My issue was the old developer profile id and the new id were the same and I did not realize this. Removing the old one allowed the new to be used.
Solution: I solved my latest run with this issue by simply choosing a Development profile and Identity and building and running and then switching back to the Distribution profile and Distribution Identity.
Background:
My build was working last night, I switched to a different branch, tried signing the same way and it just continued to fail/say that there was no matching valid signing identity).
I tried restarting Xcode, restarting Mac, deleting invalid/expired profiles etc. Then just out of a need to test a run, I switched to the development profile (I am testing IAP with the Distribution profile), then when I switched back, it just worked!
One thing that is weird during this process is that the profile on the device does not seem to match the ones I have on disk, and during that process when I tried to add the one on disk to the device it was not highlighted as a valid selection (my dev one's were).
Even after running, the device still shows some different version of the same mobileprovision (different initial code and expiry is one day different than the one I have. I am working in a shared device environment so I don't have complete access/visibility to where these versions all came from).

Can't validate and submit an App to the Mac App Store

I've done codesigning and submitting for iOS apps countless times. This time it struck me with the Mac App Store. I'm repeatedly getting the same error message:
"My Name" is a valid identity. However,
you do not have the associated package identity.
I've recognized this 2 topics here on stack overflow:
mas-code-signing-identity-private-key and mac-app-package-identity-not-installed
Nothing inside there solved the problem for me.
Thats how I (most reliably) reproduce this message:
I clean up all my certificates and private keys starting with "Mac Developer" or "3rd Party Mac Developer". Of course also the expired ones.
Revoking all the stuff inside the Mac certification portal.
Create App-ID (did it only once)
Create new certificate for Mac Development. I can only assume that this is comparable to the debugging certificates for iOS development.
Create new certificate for Mac App. Once again I can only assume that this could be something similar to a distribution certificate in iOS-development.
For completion reasons create a new certificate/profile for my system.
Create a production provisioning profile. I can only assume that this might be equivalent to an iOS distribution profile.
I then download all the certificate mess and install it properly. Some go into the Keychain, others got into the Preferences and XCode.
For making sure I restart XCode or even the whole Mac (doesn't change the frustrating outcome anyway).
I go to the project build settings and select the production provisioning profile, because I assume "production" is equivalent to "distribution". Changing the codesigning identity in the target build settings doesn't work either. While Apple claims in it's documentation that for App Store submission the signing identity has to be changed in the project build settings.
I run an archive build.
I select the archive in the organizer and click validate.
This error message appears:
"My Name" is a valid identity. However,
you do not have the associated package identity.
I can't find any pointer to what the term "package identity" actually means. What is most frustrating to me is that this terminology mess in Apples documentation concerning the code signing and submission process appears not very clear and precise to me. At least not as clear and precise as the documentation for the same process concerning iOS App submission (which is using completely different terminology).
Probably I understood something wrong? Thanx for any help or pointer in advance.
OK, I have some important pointers (additional to Apples documentation) for people stumbling over similar issues.
The error message is totally misleading.
Don't take every word in Apples documentation too seriously.
For solving the issue, 2 points have been most significant:
Additional to all the other profile-mess you need 2 certificates for submission to the Mac App Store (contrary to the same process for iOS App Store submission). Both have to be installed together with their corresponding public and private key pairs.
Mac App
Mac Installer
The codesigning needs to be set on the build target, not the project. I don't remember where but this was described wrong side around in one of Apples documentations.
Eventually my submission worked by keeping to those 2 points.
There is an additional issue with Keychain & XCode.
When Xcode uses a certificate, they want one and only one certificate in your keychain. If you have an expired one, as well as a valid one, Xcode often fails the operation.
So you look at your keychain using Keychain Access, and do not see an expired certificate. It is still there! The default setting for Keychain Access hides expired certificates. Goto the View menu and select Show Expired Certificates. Delete all the expired ones, they are not good for anything.
Quit Keychain Acces and Relaunch Xcode. Xcode often requires a relaunch when adding/deleting certificates.
At that point, the Archive Validate process worked for me.
This is what it was for me as well.
Just want to clarify, you absolutely need both Mac App Distribution and Mac Installer Distribution certificates. Thanks Jacque for your explanation above. It should look like this:
Yes the problem is Mac Installer Distribution certificate.
The easiest way to have everything fixed and loose all the troubles just go to Xcode->Window->Organizer->Devices and then on the lower right corner press on Refresh and log in with your account... xcode will generate and download all the certificates and provisioning profiles needed.

code signing identity <name> does not match any valid, non-expired code-signing certificate

I'm hoping someone can help me resolve this maddening issue. My friend and I are developing a mac store app, hosted on github. We published the app a month ago from his machine, with his dev center account. I recently pull the source from github onto my machine, to work on an update, but when I try to build it in xcode, I get the error:
"code signing identity does not match any valid, non-expired code-signing certificate in your keychain"
I downloaded the 2 certificates from my friend's account on the dev center and put them in my keychain, along with the general apple certificate, but I still get the same error. Is there a private key issue here? I am not sure why I even have to sign the code? All I am doing is trying to build it and run it in xcode. Any help would be much appreciated.
Change your build to Debug or Release.

Resources