I am using matlab to create an application (.app) using matlab application compiler.
Along with that, I use matlab to create an installer for that.
Unfortunately, the installer is in (.app) format. So do some custom things to install the dependencies and copying my application to Applications folder.
I am able to sign the original application with Developer ID application certificate.
But I am not able to sign the installer in .app format with Developer ID installer certificate.
Is there any flag in any signing executable that allows me to use Developer ID installer certificate to sign .app file instead of typical (.pkg/.dmg)?
Any help would be much appreciated.
General
RSS for tagDemystify 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 am a new macOS developer, and the codesign issue is persistent. I've been trying to resolve it for days. There are two issues:
1.) When downloading and installing frameworks, they are not showing up in Xcode templates.
2.) Regarding codesigning, even though I've installed it on my external drive and placed it in various locations (Library, Templates, Frameworks, Application Contents, macOS Templates and Frameworks) and added through General Libraries in Xcode, persistently encountering issues. I'm experiencing a codesign problem. I've cleaned the build, cleared derived data, downloaded certificates, added them to the access key, and linked the binary. However, the issue persists. Please help me, as this is making the process much more difficult. I've been stuck on this for weeks.
Topic:
Code Signing
SubTopic:
General
Hi,
I have a project that integrates the Firebase SDK via SPM as a dependency of an internal Swift Package:
My app ⟶ My Library ⟶ Firebase SDK
The project builds successfully and can be archived locally ✅. The uploaded .ipa is valid and gets published 🚀.
However, we are now trying to automate the release process using Xcode Cloud, but the iOS Archive action is failing ❌ on Xcode Cloud.
The logs show the following error ⬇️:
error: exportArchive codesign command failed (/Volumes/workspace/tmp/XcodeDistPipeline/XcodeDistPipeline.~~~oomCvM/Root/Payload/base-ios.app/Frameworks/FirebaseAnalytics.framework: replacing existing signature
/Volumes/workspace/tmp/XcodeDistPipeline/XcodeDistPipeline.~~~oomCvM/Root/Payload/base-ios.app/Frameworks/FirebaseAnalytics.framework: invalid or corrupted code requirement(s)
Requirement syntax error(s):
line 1:178: unexpected token: <COMPANY_NAME>
)
** EXPORT FAILED **
I have been researching this issue for a while and have tried several solutions to fix it, but with no luck. Even though the error points to a specific library—the Firebase SDK—I don’t believe Firebase is the root cause. There were related issues in the past, but those were already fixed by the Firebase team, and as I mentioned, the project archives correctly when built locally.
On the other hand, the error states:
line 1:178: unexpected token: <COMPANY_ACRONYM>
This makes me wonder if there’s an issue parsing our Team Name during the re-signing process, as it contains special characters ":
"name": "Apple Distribution: Company Full Name "COMPANY_ACRONYM""
Can someone please describe what is necessary to perform signing using codesign in a system that runs as LaunchDaemon.
All workarounds like placing the codesigning cert + private key a custom keychain and unlock it in the session of the LaunchDaemon doesn't work anymore on Sequoia.
Or are there alternatives for signing MachO binaries without codesign?
Topic:
Code Signing
SubTopic:
General
I am trying to get a PKG installer through the Apple codesign and notarytool process. When I submit the PKG installer I get a status message of "Invalid" and when I review the log file it has 2 errors. For "status summary" it says: "Archive contains critical validation errors", and for "message" it says" "The binary is not signed".
The installer contains a flat file that is installed in the "Users/Shared" folder via the PKG installer.
Here are the steps I've taken to get the installer through the codesign and notarytool process.
codesign the file that's placed in the "Users/Shared" folder:
codesign --options=runtime --sign 'Developer ID Application: XYZ' -v /Users/.../Documents/folder/"flat file"
which I get a message saying "signed generic".
Create the PKG installer with the signed "flat file".
Sign the PKG installer containing the signed "flat file":
codesign --options=runtime --sign 'Developer ID Application: XYZ' -v /Users/.../Documents/folder/"flat file"
which I get a message saying "signed generic".
Submit the PKG file with notarytool:
xcrun notarytool submit /Users/.../Documents/folder/"flat file" --verbose --apple-id username --password password --team-id ID# --progress
It completes and provides the submission ID.
I check the status and get the error message that it's invalid.
When I check the full details via the log I get the error messages mentioned above.
What am I missing or failing to do?
After upgrading the iOS system to 18.3.1, the APP crashed continuously when it was launched. The following log was seen in the device log:
Bootstrapping failed for <FBApplicationProcess: 0x72ad16b80; app<com.xxxx.yyyy>:> with error: <NSError: 0x300cd4d80; domain: RBSRequestErrorDomain; code: 5; "Launch failed."> {
NSUnderlyingError = <NSError: 0x300cd4ab0; domain: NSPOSIXErrorDomain; code: 85> {
NSLocalizedDescription = Launchd job spawn failed;
};
}
Our APP is in-house distribution
What are the possible causes? How can I solve it?
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’ve been having problems with MacOS builds. I’m making a release Appstore build and uploading it to Testflight. However when running it instantly crashes, and report screen shows the following:
Current flow:
I sign all files in PlugIns/ (we have a number of .bundle), and I’ve tried combinations of signing with/without --entitlements, as well as with/without --deep.
After this I sign Frameworks/GameAssembly.dylib and Frameworks/UnityPlayer.dylib. Again, I’ve tried combinations of with/without --entitlements and --deep, also not signing them at all.
After signing PlugIns and frameworks, I sign the .app, also tried this with/without --deep (always with --entitlements).
Finally I make a .pkg and upload to Testflight.
It’s not the game, as I can make an enterprise version that runs fine.
We have some restricted entitlements, such as Apple Arcade.
Building from an M1 mac, and architecture is Universal (Intel + ARM).
Unity documentation says to use --deep, but Apple documentation highly recommend against it.
So basically, my question is, how and in what order should I sign the files?
Much obliged!
Xcode is prompting I enter a codesign login password when I am archiving my project. My password seems incorrect since there is no action after I enter my password and tap allow. what could be the problem?
Topic:
Code Signing
SubTopic:
General
There is something wrong with my keychain. Can someone point me in the right direction?
codesign --force --sign "Developer ID Application: Denis Putnam (2368694WQF)" --options runtime "/Users/denisputnam/git/expense_tracker/dist/ExpenseTracker.app"
/Users/denisputnam/git/expense_tracker/dist/ExpenseTracker.app: replacing existing signature
Warning: unable to build chain to self-signed root for signer "Developer ID Application: Denis Putnam (2368694WQF)"
/Users/denisputnam/git/expense_tracker/dist/ExpenseTracker.app: errSecInternalComponent
Deniss-MacBook-Pro:expense_tracker denisputnam$
security find-certificate -c "Developer ID Certification Authority" -p /Library/Keychains/System.keychain | openssl x509 -noout -dates
notBefore=Sep 22 18:55:10 2021 GMT
notAfter=Sep 17 00:00:00 2031 GMT
Deniss-MacBook-Pro:expense_tracker denisputnam$
Hi support,
Currently we are in a process of migrating our Qt application for MAC OS - ventura -v13.4.
There is a specific feature in our application in which client tries to communicate with server (Socket communication) using Qt's QsslSocket Apis . To achieve this we are using self signed Ca certificate (.pem ) generated by using openSSl commands which uses IP address of the server.
We are manually installing the certificate inside MAC OS - keychain and trusting it manually as well after installing .
This is working fine in XCode environment in debug mode in MAC OS and client -server handshake is happening successfully. How ever after creating .dmg file (installer) the same handshake is not happening and we are getting error -Connection time out.
Upon investigating this online, we got to know there has to be codesigning (both app bundle and the dmg file )along with notarization of the .dmg file in order to access keychain of MAC OS at runtime to access the self signed certificate installed.
Now we have 2 queries here.
Is code signing mandatory if we want to verify our app through keychain with .dmg file ?
If yes, whats the best way to achieve this ?
We have tried 2 options without any luck.
option1 - Trying to build our specific target among 'ALL_BUILD' with signing key settings inside xcode where we are providing developer provisional certificate with apple team ID . After that we are trying to archive to generate dmg file which is code signed.
We are failing here as the signed dmg is not getting installed due to other app related dependencies are missing .
option 2- Code signing the dmg and the app bundle manually outside the environment of xcode with developer certificate and team ID.
We are failing here as notarization needs to be done it seems to access keychain for certificate verification
If Code signing is not mandatory then whats the best possible way to achieve this considering manually installation of certificate inside keychain with adding trust option is not working at the moment.
Please specify the best solution if possible.
Topic:
Code Signing
SubTopic:
General
My app designer cannot sign his code changes. He says the only way he can sign his code is for me to give him my Admin privileges. I have revoked and recreated my certificate, hoping to get a private passkey, but there was no private passkey issued with the certificate. Help, please?
Topic:
Code Signing
SubTopic:
General
Hi,
I am facing an issue with login persistence using firebase, but basically, it seems that I need to ensure I enable the Keychain Sharing within the Identities capabilities, the problem is, it is not even on the list.
Thank you much
I’ve been wrestling with this for nearly a week now and none of the proposed fixes have worked. I’m trying to resign an app via Jenkins and have done the following:
Created a custom keychain
Imported the required .p12 certificates
Installed the Apple WWDR certificate in the System keychain
Made the login keychain my default
Added my development keychain, the login keychain and the System keychain to the user keychain list
Unlocked my development keychain
Confirmed my signing identity is present
Granted the appropriate partition list access to the keychain
"security set-key-partition-list -S apple-tool:,codesign: -k pwd /Users/ec2-user/Library/Keychains/development.keychain-db"
Yet when I invoke Fastlane’s resign action, I still see:
_floatsignTemp/Payload/EverMerge.app/Frameworks/AppLovinSDK.framework: replacing existing signature
_floatsignTemp/Payload/EverMerge.app/Frameworks/AppLovinSDK.framework: errSecInternalComponent
Encountered an error, aborting!
Any guidance on what might be causing this errSecInternalComponent failure or how to get the resign step to succeed would be highly appreciated.
I will post my app xyz.app uses XY swift package
this swift package is a wrapper for XYSDK.xcframework
XYSDK.xcframework written in c++ and app running on arm64 macos and iphones succesfully.
I got this error when i want to distribute it.
Currently i sign .framework for ios with Apple Distribution Certificate
and same certificate for macos framework there is no other signing step for swift package or xcframework
other than that when i want to archive it validates succesfully.
Exporting step shows that app has signed, has provisining profile.
but .framework is only signed has no provisioning profile.
Also one point i see:
i have one target named xyz and its Frameworks, Lİbraries and Embedded Context has only XY package but Embed part has no option like embed and sign etc. Blank.
I need more info about what am i doing wrong in which step ?
I am stuck and can not move any further like weeks
Error Detail:
Invalid Signature. The binary with bundle identifier XYSDK at path “xyz.app/Frameworks/XYSDK.framework” contains an invalid signature. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose “Clean All” in Xcode, delete the “build” directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/support/code-signing. (90035)
I'm working on a build system similar to Bazel where each build action runs in a sandbox. The sandbox contains only the files that the user defined as input to ensure that the build action doesn't have any implicit dependencies. Bazel achieves this by creating a "symlink forest" to the original source files. This works, but I have observed fseventsd using significant CPU during a Bazel build, presumably because of all the symlinks that get created.
Is there a way to disable file events for a directory or a volume? The "File System Events Programming Guide" in the Documentation Archive mentions placing an empty file named no_log in the .fseventsd directory at the root of the volume, but when testing on macOS 15.5 with APFS that appears to no longer work.
Related, is a "symlink forest" the best way to create a sandbox like this? Or is there a different method one can use to provide a view of a subset of the files in a directory tree? I read up on the App Sandbox but that seems too coarse grained. Something like Linux's overlayfs would work well, and maybe one can achieve a similar functionality with firmlinks? Curious about folks thoughts here.
Thanks in advance!
In XCode I create and export a notarized app for "direct distribution". I then create a tar file of the exported .app to distribute to my users. Until today this worked fine. Now when the users try to run the app it pops up a dialog saying "app is damaged and can't be opened. You should move it to the Trash." It is possible to ctrl-click on the app and force it to run but, I think, whether this works or not will depend on system settings and not all users have root access to modify settings. Even simply copying the .app folder from the command line will cause this error.
Hey,
So i am trying to setup OpenGL on my mac.
Specs : M2 Pro, 15.5 (24F74)
Now i have setup the entire project properly as far as i know. GLFW, GLAD and the OpenGL framework. the build libraries are also reference and everything.
I have also included the glad.c file in the folder. i have also kept it to run locally in signing tab. its still giving me
Command CodeSign failed with a nonzero exit code
All the ss are provided
Topic:
Code Signing
SubTopic:
General
Our app .dmg file was successfully code signed. We then revised the app and created a new .dmg.
Running codesign gave an "app is already signed" message. Then running codesign -dv said "code object is not signed at all"
Older solutions said to use -f to force signing, but that is no longer an option.
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