Product: macOS,
Notarization Tool: notarytool,
Stapler Tool: xcrun stapler,
Application: master-billing.app,
DMG: master-billing.dmg
I'm attempting to notarize and staple a macOS .dmg file containing a signed .app. Notarization completes successfully, but the stapling step fails with Error 65. All tools are up-to-date and I'm following the official Apple process.
#!/bin/bash
set -e
APP="dist/mac-arm64/master-billing.app"
DMG="dist/mac-arm64/master-billing.dmg"
IDENTITY="Developer ID Application: NAME (TEAM ID)"
PROFILE="notarysiva"
VOLUME_NAME="MasterBilling"
Sign binaries and frameworks
find "$APP" -type f ( -name ".dylib" -or -name ".so" -or -name "*.node" -or -perm -u+x )
-exec codesign --force --options runtime --timestamp --sign "$IDENTITY" {} ;
find "$APP" -type d ( -name ".app" -or -name ".framework" )
-exec codesign --force --options runtime --timestamp --sign "$IDENTITY" {} ;
codesign --deep --force --options runtime --timestamp
--sign "$IDENTITY" "$APP"
Create DMG
hdiutil create -volname "$VOLUME_NAME" -srcfolder "$APP" -ov -format UDZO "$DMG"
Sign DMG
codesign --sign "$IDENTITY" --timestamp "$DMG"
Verify DMG signature
codesign --verify --verbose=2 "$DMG"
Submit for notarization
xcrun notarytool submit "$DMG" --keychain-profile "$PROFILE" --wait
Staple ticket
xcrun stapler staple -v "$DMG"
Signing all binaries, dylibs, and frameworks...
.
.
✅ App signing complete.
💽 Creating DMG...
......................................................................................
created: /Users/one/Documents/MASTER/bill-master/dist/mac-arm64/master-billing.dmg
🔏 Signing the DMG...
✅ Verifying DMG signature...
dist/mac-arm64/master-billing.dmg: valid on disk
dist/mac-arm64/master-billing.dmg: satisfies its Designated Requirement
📤 Submitting DMG for notarization...
Conducting pre-submission checks for master-billing.dmg and initiating connection to the Apple notary service...
Submission ID received
id: 32927c3c-7459-42b4-a90c
Upload progress: 100.00% (123 MB of 123 MB)
Successfully uploaded file
id: 32927c3c-7459-42b4-a90c
path: /Users/one/Documents/MASTER/bill-master/dist/mac-arm64/master-billing.dmg
Waiting for processing to complete.
Current status: Accepted............
Processing complete
id: 32927c3c-7459-42b4-a90c
status: Accepted
📌 Stapling notarization ticket to DMG...
Processing: /Users/one/Documents/MASTER/bill-master/dist/mac-arm64/master-billing.dmg
.
.
.
Downloaded ticket has been stored at file:///var/folders/1l/ht34h5y11mv3rhv8dlxy_g4c0000gp/T/5bb9e667-dfe1-4390-8354-56ced7f48fa0.ticket.
Could not validate ticket for /Users/one/Documents/MASTER/bill-master/dist/mac-arm64/master-billing.dmg
The staple and validate action failed! Error 65.
Demystify code signing and its importance in app development. Get help troubleshooting code signing issues and ensure your app is properly signed for distribution.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have certificates in my xcode>settings>account>manage certificates that I cannot get rid of. I know that they are linked to certificates in developer.apple.com but I've removed them from there and they persist in xcode.
I have one that says "Not in Keychain", which is true. I deleted all the keychains related to these accounts in an attempt to fix something.
I also have ones that say things like "Missing Private key"
Our setup is that we have one main account "Company Inc." which I am setup to be an Admin in. I created a certificate under my credentials and added it to my keychain and showed up properly in xcode but I still have the other ones.
HOW DO I REMOVE THEM :sob:
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
Signing Certificates
Developer ID
We are developing an application for MAC machine using .NET. After developing and signing the package in notarization process was failed with the error in the attached file.
Then we have created the simple Xamarin.MAC to check whether able to notarize it . But with the simple project also we have faced the same error.
Provide us the solution to fix these issues
We have tried to codesiginin the app to resolve the notarization error, but while code signing the below error was thrown
"unable to build chain to self-signed root for signer "Developer ID Application" (not mentioning the certificate id)
SFSecure.app: errSecInternalComponent"
Notarization-error
Topic:
Code Signing
SubTopic:
Notarization
*** Error: ERROR: [ContentDelivery.Uploader] Validation failed (409) Invalid Provisioning Profile. The provisioning profile included in the com.baiyun-shuniu.scss bundle [Payload/HBuilder.app] is invalid. [Missing code-signing certificate]. A distribution provisioning profile should be used when uploading apps to App Store Connect. (ID: e21c7a63-520f-49c5-8298-9afa3aa14dd5)
2025-05-13 09:23:20.382 INFO: [ContentDelivery.Uploader]
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Hello, our app is non-sandboxed app, but we do want to support widget extension and safari extension. Those extensions require sandboxing. Is it possible to do this without sandboxing our app? Thank you!
I get the error message in Xcode signing certificate
Provisioning profile "iOS Team Provisioning Profile: com.example.app" doesn't include the pushkit entitlement.
I have push notifications ticked in my Identifier in the online developer account. There is no other dedicated pushkit capability available to select.
Push notifications, time sensitive notifications and background mode-> voice over ip are added as capabilities in the Xcode project.
The team provisioning profile for the app states under its enabled capabilities: both push notifications and time sensitive notifications.
Is pushkit part of another capability that I need to select?
I have read the guide below and it just says to add the push notification capability. https://developer.apple.com/documentation/pushkit/supporting-pushkit-notifications-in-your-app
I have gone round and round in circles trying to get this profile to work for this, so any pointers would be much appreciated.
Thanks
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
Provisioning Profiles
PushKit
Hello,
I've been trying to notarize a Unity 2023.2 app since yesterday, but our submissions stay stuck in In Progress. The first one has been running for 18 hours now with no signs of stopping, and two more attempts have been made since with no results.
Here are the submission IDs in case someone on the team wants to take a look:
00ef6def-601b-46f3-a94f-699d8956a28f
d03f5748-2261-430c-934e-14fa9679afd9
a42d3b5c-3cdb-4bf2-9c86-c92320358ff3
Thank you!
Topic:
Code Signing
SubTopic:
Notarization
Hello, when building and signing my application in a Github actions workflow, I am facing an issue on the latest version of xCode (16.4). This issue is resolved by downgrading to 16.3.
My CI/CD pipeline is running headless and installing provisioning profile to ~/Library/MobileDevice/Provisioning Profiles.
Can you please help us with the scenario below, including details and Apple’s recommendations?
I've already read through the Notarization and Gatekeeper documentation.
The installed version of our application is 1.2.3, located in /Applications/XYZSecurity.app.
We created an upgrade package for version 1.2.4. As part of the pre-install script in the 1.2.4 installer, we explicitly deleted some obsolete .dylib files from /Applications/XYZSecurity.app/Contents/Frameworks and some executable files from
/Applications/XYZSecurity.app/Contents/MacOS that were no longer needed in version 1.2.4.
The installation of version 1.2.4 completed successfully, but we see the below error logs in installer.log:
PackageKit: Failed to unlinkat file reference /Applications/XYZSecurity.app/Contents/Frameworks/libhelper.dylib
PackageKit: Failed to unlinkat file reference /Applications/XYZSecurity.app/Contents/MacOS/helper-tool
Our Key Questions:
Is it the right practice to remove obsolete files in the pre-install script during an upgrade?
Is this approach recommended by Apple?
Can this cause any issues with Apple Gatekeeper? Is there a possibility of my application getting blocked by Gatekeeper as a result?
Hi,
I am experiencing an issue where Xcode displays a "Provisioning profile doesn't support the capability" error for the User Assigned Device Name capability, despite it being approved by Apple and visible in our provisioning profile on the Developer Portal.
Background
We have completed and submitted the required capability request form to Apple for the User Assigned Device Name capability and received approval. The capability appears correctly in our provisioning profile on the Apple Developer Portal and shows among the enabled capabilities alongside other standard capabilities like In-App Purchase and Push Notifications.
Issue
However, Xcode consistently displays the error message when trying to enable the User Assigned Device Name capability in our project settings, preventing successful builds with this functionality.
Troubleshooting Steps Attempted
We have tried multiple troubleshooting steps including:
Regenerating provisioning profiles
Performing clean builds
Clearing DerivedData
Manually installing profiles
Adding the com.apple.developer.device-information.user-assigned-device-name entitlement manually to our entitlements file
Toggling automatic signing on and off
Environment Details
Xcode Version: 16.4 (16F6)
iOS Deployment Target: iOS 13
Profile Type: Distribution provisioning profile
Capability: User Assigned Device Name
Despite the capability being approved by Apple and visible in our provisioning profile, Xcode does not recognize it. This appears to be a synchronization issue between the Apple Developer Portal and Xcode's capability validation system.
Has anyone encountered similar issues with recently approved capabilities, specifically the User Assigned Device Name capability? Could you please provide guidance on how to resolve this capability recognition issue? Any suggestions for resolving this discrepancy between the Developer Portal and Xcode would be greatly appreciated.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
Xcode
Provisioning Profiles
Hello,
I’m having trouble enabling Background Location updates on my iOS app.
Xcode: 26.0 beta
Team: Individual Developer Program (paid, activated recently)
Device: iPhone (physical device, registered and provisioned)
Problem
When building to device, I get the error:
Provisioning profile "iOS Team Provisioning Profile: com.mybundle.id" doesn't include the com.apple.developer.background-modes entitlement.
Automatic signing failed.
On the simulator the build succeeds, but on device the signing fails unless I remove the background-modes entitlement from .entitlements.
What I tried
Enabled Background Modes → Location updates in Signing & Capabilities (UI only).
Info.plist contains UIBackgroundModes = location and the required NSLocation…UsageDescription keys.
Cleaned Derived Data, removed cached provisioning profiles (~/Library/Developer/Xcode/UserData/Provisioning Profiles).
Changed Bundle Identifier to force regeneration of provisioning profiles.
Deleted and recreated provisioning profiles from Xcode.
Tried both with and without manual .entitlements edits.
Current status
Provisioning profile shows only App Groups, In-App Purchase, Push Notifications.
Entitlements section in the downloaded profile is missing com.apple.developer.background-modes.
As a result, background location cannot be enabled on device.
Question
Is this a known issue with Xcode 16/26 beta or with Individual Developer accounts?
How can I get com.apple.developer.background-modes included in my provisioning profile so that location tracking continues while the screen is locked?
Thank you.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
Xcode
Provisioning Profiles
Core Location
trying to deploy the LotBot app to my physical device, rtd2, which is listed as a device in the App Developer Portal. when I create a provision file it is always for W246SX52AS, as seen in the developer portal, but from Xcode I am showing a app id of "Apple Development: Richard Dukes (86537MF8N2)".
Message:
I am unable to create a "Apple Development: Richard Dukes (W246SX52AS)" so I may deploy to the device and the App Store. I have signed out and back in to Xcode with my account but when creating the profile it is always the 86537MF8N2.
95E07D345D31D45E4589FA7EA6FDF161E079C100 "Apple Distribution: Richard Dukes (W246SX52AS)"
5AC76CE9331F80AE953C4C76FC21DE5C2416293E "Apple Development:
Richard Dukes (86537MF8N2)"
How can I get Xcode to use W246SX52AS?
I have these help tickets open as well.
case ID is 102678952862
case ID is 102678950460
I have been fighting this for a while.
Please help me figure out to get this resolved.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
App Store
iPhone
App ID
Bundle ID
Hello, I've developed an application using Electron with Javacript. I have managed to deploy to both Windows and the web but having trouble deploying the application to my Mac users.
It's my first time deploying an application for Mac but feel like I'm stuck at the last hurdle and out of ideas so I'm reaching out for help.
My application is successfully signing but during the build and when my Notarize.js is running it seems to get stuck indefinitely.
I can check and see the status of the Notarize attempts but they seem to be stuck "In Progress". Here are the logs.
Successfully received submission history.
history
--------------------------------------------------
createdDate: 2025-01-06T00:59:45.245Z
id: 1dc39b5f-fdca-4bf2-a6f6-fa793de2786e
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-04T08:01:36.168Z
id: c575b015-edd6-4e09-8da5-7ae09f4f67db
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T08:30:31.528Z
id: 570ae540-8cce-4418-ab09-7f6be33dc245
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T07:57:56.701Z
id: 42748de8-026a-4663-9fd2-88c7608588d3
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T06:30:19.569Z
id: 5140caa0-df14-491a-b148-82015f9856da
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T05:56:28.916Z
id: 535c6be1-4999-4b3e-9766-42512a8deb67
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T02:51:04.893Z
id: ead2268c-62b2-4b4b-8850-c1cdb5313d6a
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T01:50:51.954Z
id: d0c44281-a788-4704-a057-4620d284516d
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T00:48:54.445Z
id: 3d13727c-06a3-49d7-902b-4001522107c3
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T13:35:26.715Z
id: 1823a550-a9ff-467a-8a60-dd3e42305258
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T13:23:41.894Z
id: cbc341a2-9a51-43d6-83ae-713443c84fec
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T12:21:44.561Z
id: 1af34419-655f-49b8-bea0-05b4232c46a7
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T11:34:03.732Z
id: 8c4ab3b5-2ea9-4220-9667-94011bcf76fb
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T11:19:16.052Z
id: 093dfb8a-9058-417d-acd3-8ea5d0bb654a
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T11:13:14.676Z
id: 556b7c1c-d114-4717-b0f7-4f1614ada845
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T10:52:36.834Z
id: ce3d3c8a-d218-4978-8757-2ca9d12aad76
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T09:27:13.535Z
id: b65ec764-baab-444d-809b-e4242d70548b
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T09:27:01.176Z
id: be228acc-e6a2-48f2-937b-5b2962275052
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T09:19:19.182Z
id: d99fc10b-c424-4d0c-a2aa-37a9e9165d91
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T08:55:43.064Z
id: 2e7f8df7-9c0b-4dd0-8df7-8f3428c0bfa0
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T08:19:48.676Z
id: 678355da-e413-4b1a-92a8-776a6ff6a055
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T07:58:48.278Z
id: 8591f8d7-1d57-4e80-af90-d77190160a20
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T07:54:41.193Z
id: f029dfeb-3f14-4f65-83e2-d9356ef6ac00
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T07:27:50.613Z
id: 574f2563-d533-4885-947a-2f57170196af
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T07:09:54.203Z
id: 589f7f3a-d231-4911-8ad6-9d2c15a61ac0
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T05:39:02.574Z
id: 9edd43de-6d14-4743-87fc-ab570bee7399
name: Popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T04:36:12.342Z
id: ba02116d-1aad-4521-8667-ad086b14c1cb
name: Popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T03:22:49.185Z
id: b8585c81-b7f5-4c35-9bd6-62157c6ce4bc
name: Popcorn.zip
status: In Progress
Hi, hoping someone can help here.
I recently updated my Mac to macOS 15 (Tahoe) and am using Xcode 15+ (possibly 16). I’m working on a Flutter app and testing on a real iPhone device.
Here's the situation:
I’m using the free Apple Developer account.
My signing certificate and provisioning profile both show as valid and active in Keychain and says "signing..." in Xcode.
When I build and run the app from Xcode, it works completely fine on a simulator.
But when I try to run the same project from VS Code using flutter run, whether on an simulator phone or my personal iphone, I get a code signing error, specifically:
Failed to codesign Flutter.framework with identity...
I believe the app is set to use the correct Team ID because it says my name and (team) (my team ID isBDKUKWVRBY), and I can see my certificate in Keychain under "My Certificates".
What I’ve already tried:
flutter clean
pod install / pod update
Manually selecting my team in Xcode Signing settings
Restarting my machine and VS Code
Confirming the same project builds on other machines
Verified provisioning profile is assigned to the project in Xcode
deleting and recreating a certificate
I have even had AI inside VS code take a shot at it and that couldn't fix either
My question:
Why would VS Code / Flutter not be able to use the same certificate and signing setup that works in Xcode? Is this an issue with Flutter tooling on macOS 15, or do I need to reconfigure signing differently now?
Any suggestions or fixes would be greatly appreciated!
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
I have local LLM application, the backend is in python and frontend is in electron.js , all complied in a .pkg file or .dmg file
I have created the valid certifcates for notarization
But it fails everytime, I have attached the logs
steps I followed
Created a certificate all steps related to getting it setup,
ran productsign command on pkg file
ran codesign for dmg
xcruntool submit command
If anyone has any idea on how proceed
codesigningdmg (2).txt
code-singingpkg.txt
Topic:
Code Signing
SubTopic:
Notarization
We have an app which is hybrid using React Native and Native features. We released our app recently which showed issues related to missing packages/corrupt package but xCode didn't gave any error and we were able to Archive and submit app successfully.
Topic:
Code Signing
SubTopic:
General
I developed a macOS application and have already signed the pkg package. However, when I submitted it for notarization using the following command:
xcrun notarytool submit --signed.pkg --apple-id "**@gmail.com" --team-id "2*******M" --password "this is password" --wait
I received a "Rejected" status. The log provided the following details:
"logFormatVersion": 1,
"jobId": "f5f3751d-b449-4a2f-b905-32d38ab5963b",
"status": "Rejected",
"statusSummary": "Team is not yet configured for notarization. Please contact Developer Programs Support at developer.apple.com under the topic Development and Technical / Other Development or Technical Questions.",
"statusCode": 7000,
"archiveFilename": "*********.pkg",
"uploadDate": "2025-03-20T03:16:43.651Z",
"sha256": "3ca39700c531a66571721424a6c00668748011174b4ae20bbbec5c2d3a8a41f9",
"ticketContents": null,
"issues": null```
Can you help me, thank you.
Topic:
Code Signing
SubTopic:
Notarization
Hi,
I recently created and installed new code signing certificates/keys on my main Mac.
How to easily copy these certificates/keys to my another Mac with the same Apple ID?
Earlier Quinn suggested:
"The easiest way to do this is use Xcode’s import/export feature. Launch Xcode, choose Xcode > Settings, select Accounts, select the account in question, then choose Export Apple ID and Code Signing Assets from the action (…) menu."
And it worked fine in 2020-2021. However import/export options are no longer available in XCode 16 anymore.
Please suggest a simple solution.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
I have developed multiple applications in the past using windows Visual studio 2022 and have never had any issues during development. However this time I am receiving the same error The specified iOS provisioning profile '{profile}' could not be found. Please enable Automatic Provisioning from the iOS Bundle Signing page. Everytime I try to deploy even though I can see that all the appropriate entries are in my apple developer portal, and I can see the profiles have been automatically downloaded to my computer. (The App identifier also matches the one establisehd in the apple developer portal and is linked to the profile).
The only thing I can think of, is that my renewal of my developer account got rejected by my bank at first, but on another attempt (about 2 weeks ago) it all went through fine.
Hey, when I try to launch my app it prompts me with a "Apple could not verify" popup. The thing is the app has been signed and stapled.
xcrun stapler validate .app for my app returns "The validate action worked!"
If I also run syspolicy_check distribution .app it returns: "App passed all pre-distribution checks and is ready for distribution"
Any idea?