[GH-ISSUE #96] How do you use an Apple developer Distribution certificate? #45

Closed
opened 2026-03-04 00:23:23 +03:00 by kerem · 9 comments
Owner

Originally created by @rzbergme on GitHub (Aug 22, 2021).
Original GitHub issue: https://github.com/SignTools/SignTools/issues/96

Hi, I hope you can help me. I set up the ios-signer-service on Heroku as per instructions.
Under PROFILE_CERT_BASE64 I pasted the base64 for my Apple developer Distribution certificate (as I want to enable various entitlements such as push notifications) and pasted the cert password in PROFILE_CERT_PASS.
Is this the correct way to use my Apple Distribution certificate?

When I try to sign an IPA I get this error:
error: Revoke certificate: Your account already has an Apple Development signing certificate for this machine, but its private key is not installed in your keychain. Xcode can create a new one after revoking your existing certificate. (in target 'SimpleApp' from project 'SimpleApp')\nerror: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "SOMETEAMID" with a private key was found.

Any idea what I might be doing wrong?

Thank you!

Originally created by @rzbergme on GitHub (Aug 22, 2021). Original GitHub issue: https://github.com/SignTools/SignTools/issues/96 Hi, I hope you can help me. I set up the ios-signer-service on Heroku as per instructions. Under PROFILE_CERT_BASE64 I pasted the base64 for my Apple developer Distribution certificate (as I want to enable various entitlements such as push notifications) and pasted the cert password in PROFILE_CERT_PASS. Is this the correct way to use my Apple Distribution certificate? When I try to sign an IPA I get this error: error: Revoke certificate: Your account already has an Apple Development signing certificate for this machine, but its private key is not installed in your keychain. Xcode can create a new one after revoking your existing certificate. (in target \'SimpleApp\' from project \'SimpleApp\')\nerror: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "SOMETEAMID" with a private key was found. Any idea what I might be doing wrong? Thank you!
kerem closed this issue 2026-03-04 00:23:24 +03:00
Author
Owner

@ViRb3 commented on GitHub (Aug 23, 2021):

Hey there. For Distribution certificate you need to add the following 4 items to your cert.p12 file:

  • Development certificate + key
  • Distribution certificate + key

Then simply add that to PROFILE_CERT_BASE64. Your error says you're missing the development certificate.

<!-- gh-comment-id:903457794 --> @ViRb3 commented on GitHub (Aug 23, 2021): Hey there. For Distribution certificate you need to add the following 4 items to your cert.p12 file: - Development certificate + key - Distribution certificate + key Then simply add that to PROFILE_CERT_BASE64. Your error says you're missing the development certificate.
Author
Owner

@rzbergme commented on GitHub (Aug 23, 2021):

Thank you @ViRb3 I am now making some progress. Once I figured out I need to select all 4 lines (on the Keychain Access) and export into one Certs.p12 file (which I then base64 into PROFILE_CERT_BASE64) I am not facing a new error when I try to sign an app (uYou from https://github.com/MiRO92/uYou-for-YouTube):

error: Provisioning profile "iOS Team Provisioning Profile: com.fyTubA.B8C.diFswIh.MessagesExtension" doesn't include the com.apple.developer.coremedia.allow-alternate-video-decoder-selection entitlement. (in target 'SimpleApp' from project 'SimpleApp')', 'stderr': '2021-08-23 19:36:12.930 xcodebuild[3954:56330] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called\n** ARCHIVE FAILED **'}

Any idea?

<!-- gh-comment-id:904067516 --> @rzbergme commented on GitHub (Aug 23, 2021): Thank you @ViRb3 I am now making some progress. Once I figured out I need to select all 4 lines (on the Keychain Access) and export into one Certs.p12 file (which I then base64 into PROFILE_CERT_BASE64) I am not facing a new error when I try to sign an app (uYou from https://github.com/MiRO92/uYou-for-YouTube): error: Provisioning profile "iOS Team Provisioning Profile: com.fyTubA.B8C.diFswIh.MessagesExtension" doesn\'t include the com.apple.developer.coremedia.allow-alternate-video-decoder-selection entitlement. (in target \'SimpleApp\' from project \'SimpleApp\')', 'stderr': '2021-08-23 19:36:12.930 xcodebuild[3954:56330] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called\n** ARCHIVE FAILED **'} Any idea?
Author
Owner

@ViRb3 commented on GitHub (Aug 24, 2021):

I have fixed the issue in github.com/SignTools/ios-signer-ci@f6a173fb5b. Update/re-create your ios-signer-ci and it will work.

<!-- gh-comment-id:904573968 --> @ViRb3 commented on GitHub (Aug 24, 2021): I have fixed the issue in https://github.com/SignTools/ios-signer-ci/commit/f6a173fb5bd6a28213e975905018a6ca24a3a85f. Update/re-create your `ios-signer-ci` and it will work.
Author
Owner

@rzbergme commented on GitHub (Aug 24, 2021):

Thank you!

<!-- gh-comment-id:904713203 --> @rzbergme commented on GitHub (Aug 24, 2021): Thank you!
Author
Owner

@rzbergme commented on GitHub (Aug 24, 2021):

Hi @ViRb3, I deleted my ios-signer-ci and recreated it (from your template) and then re-deployed my Heroku app. Now I am getting this error:

error: Failed to register bundle identifier: The app identifier "com.fyTubA.B8C.diFswIh.BroadcastUploadExtension" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again. (in target 'SimpleApp' from project 'SimpleApp')\nerror: No profiles for 'com.fyTubA.B8C.diFswIh.BroadcastUploadExtension' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.fyTubA.B8C.diFswIh.BroadcastUploadExtension'. (in target 'SimpleApp' from project 'SimpleApp')', 'stderr': '2021-08-24 15:05:36.103 xcodebuild[4546:64575] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called\n** ARCHIVE FAILED **'}

What do you think?

<!-- gh-comment-id:904727661 --> @rzbergme commented on GitHub (Aug 24, 2021): Hi @ViRb3, I deleted my ios-signer-ci and recreated it (from your template) and then re-deployed my Heroku app. Now I am getting this error: error: Failed to register bundle identifier: The app identifier "com.fyTubA.B8C.diFswIh.BroadcastUploadExtension" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again. (in target \'SimpleApp\' from project \'SimpleApp\')\nerror: No profiles for \'com.fyTubA.B8C.diFswIh.BroadcastUploadExtension\' were found: Xcode couldn\'t find any iOS App Development provisioning profiles matching \'com.fyTubA.B8C.diFswIh.BroadcastUploadExtension\'. (in target \'SimpleApp\' from project \'SimpleApp\')', 'stderr': '2021-08-24 15:05:36.103 xcodebuild[4546:64575] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called\n** ARCHIVE FAILED **'} What do you think?
Author
Owner

@ViRb3 commented on GitHub (Aug 24, 2021):

You'll probably need to delete these app IDs from your developer portal and then try signing again. I'm not sure why this happens, I think it's something to do with the previous error you had.

<!-- gh-comment-id:904729667 --> @ViRb3 commented on GitHub (Aug 24, 2021): You'll probably need to delete these app IDs from your developer portal and then try signing again. I'm not sure why this happens, I think it's something to do with the previous error you had.
Author
Owner

@rzbergme commented on GitHub (Aug 24, 2021):

@ViRb3 Thanks! I apologize for bugging you :-(

Deleting these app IDs helped. Now it builds:

image

But when I try to launch it, I get:

image
<!-- gh-comment-id:904745430 --> @rzbergme commented on GitHub (Aug 24, 2021): @ViRb3 Thanks! I apologize for bugging you :-( Deleting these app IDs helped. Now it builds: <img width="276" alt="image" src="https://user-images.githubusercontent.com/6178252/130645016-fcdc8edc-b769-43e5-a44d-316100004510.png"> But when I try to launch it, I get: <img width="608" alt="image" src="https://user-images.githubusercontent.com/6178252/130645400-0b66fec5-64b6-4303-abb6-244d2595728e.png">
Author
Owner

@ViRb3 commented on GitHub (Aug 24, 2021):

Don't worry about bugging me, I am happy to help. I will take a look at this later today.

<!-- gh-comment-id:904751926 --> @ViRb3 commented on GitHub (Aug 24, 2021): Don't worry about bugging me, I am happy to help. I will take a look at this later today.
Author
Owner

@ViRb3 commented on GitHub (Aug 25, 2021):

After further investigation, it seems like in that particular IPA file, the main app is not signed at all, while every app extension is signed and uses keychain groups. This is a problem, because if an app extension uses the keychain, the main app needs to have the same entitlement too, otherwise you get this error. So essentially, this IPA file is corrupted. I cannot do anything to fix it, so you will have to contact the developer. As a workaround, you can use a wildcard manual provisioning profile, since that will override any signing/entitlements.

<!-- gh-comment-id:905366792 --> @ViRb3 commented on GitHub (Aug 25, 2021): After further investigation, it seems like in that particular IPA file, the main app is not signed at all, while every app extension is signed and uses keychain groups. This is a problem, because if an app extension uses the keychain, the main app needs to have the same entitlement too, otherwise you get this error. So essentially, this IPA file is corrupted. I cannot do anything to fix it, so you will have to contact the developer. As a workaround, you can use a wildcard manual provisioning profile, since that will override any signing/entitlements.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SignTools#45
No description provided.