Search results for

codesign

3,113 results found

Post

Replies

Boosts

Views

Activity

"Asset validation failed, Invalid Code Signing" but certs match
I have an internal customer who is trying to submit an IPA to TestFlight via a Jenkins pipeline, and they are submitting their IPA to our central code signing service first. But they're seeing failures in their logs such as: { id : bb07c32d-b4d6-48c4-abfe-390a46dec3ca, status : 409, code : STATE_ERROR.VALIDATION_ERROR.90179, title : Asset validation failed, detail : Invalid Code Signing. The executable 'Payload/their.app/Frameworks/Pods_their.framework/Pods_their' must be signed with the certificate that is contained in the provisioning profile. } I obtained the signed IPA file, and examined one of the items flagged as incorrectly signed with codesign -d -vvvv. I see the correct team identifier in the output, along with the correct (Distribution) authority. I unbundled the IPA with ditto -xk, extracted the plist from the embedded provisioning file with security cms -D -i, and examined the lone developer certificate with plutil -extract DevelopCertificates.0 and certtool d. The subject name fields cor
1
0
523
Nov ’24
App intermittently disappearing after installation
We're build a pkg with three apps in it from the command line. There is one primary app and two supporting apps. We build a folder structure inside a temp directory like below (some folder names replaced with generic ones): mkdir -p ./tmp/Applications/.hiddenfolder/ mkdir -p ./tmp/Library/Application Support/Company/ mkdir -p ./tmp/Library/Preferences/ mkdir -p ./tmp/Library/Logs/Company/ mkdir -p ./tmp/Library/LaunchAgents/ mkdir -p ./tmp/Library/Company/ mkdir -p ./tmp/Library/LaunchDaemons/ #Grant Logs Folder Read-Write Access to All chmod a+rw ./tmp/Library/Logs/Company/ chmod a+rw ./tmp/Library/Application Support/Company/ We then build and sign each app dependency and place them into the temporary folder. For each app we're calling: xcodebuild -workspace $PROJECT -scheme $TARGET -configuration Release -derivedDataPath $WORKING clean build codesign --force --deep -o runtime --entitlements ../$TARGET/$APPLICATION.entitlements --sign $DEVKEY $WORKING/Build/Products/Release/$APPLICATION.app cp -R $
1
0
324
Nov ’24
Reply to My MacOS application has been accepted when submitted for notarisation but I am getting an error 65 when submitting for stapling. Further, notarisation fails even when run on a clean mac. It throws an unknown developer error.
When posting preformatted code, it helps if you put it in a code block. See Quinn’s Top Ten DevForums Tips for advice on how to do that. Error 65 means that you’re trying to staple a ticket to an item that’s not been validated by the notary service. However, you’ve clearly submitted that disk image to the notary service. I suspect that the disk image isn’t signed, and thus isn’t included in the resulting ticket. Do this: Dump the code signature of the disk image: % codesign -d -vvv SendFiles.dmg Note down the cdhash value. Run stapler in verbose mode. You should see it looking for a ticket for that cdhash value. Fetch the notary log for your request. Does it list the cdhash value you get in step 1. For advice on how to sign a disk image, see Packaging Mac software for distribution. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Nov ’24
Unable to Write Files Within App Bundle After Codesigning and Notarization
I have already posted asking about this: [quote='768005021, CynthiaSun, /thread/768005, /profile/CynthiaSun'] Codesigned and notarized app cannot directly write files inside the app bundle... [/quote] But there are still some doubts that have not been answered. We use Qt to develop an application on the macOS platform, and we are attempting to perform code signing and notarization to ensure our the application is trusted by Apple. However, there are a few things that seem weird regarding this statement: App bundles are read-only by design. Let me provide more details. Currently, when our application starts, it needs to create folder (e.g. Temp) in the root directory of the executable For example: Myapp.app/Contents/MacOS/Myapp ---> Myapp.app/Contents/MacOS/Temp The folder is designed for storing runtime logs or config files for our application. In the past, users may also modify the settings inside target folder if needed. However, the strange thing is that after the application is codesigned
2
0
592
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
[quote='814996022, dongkeqiang, /thread/768361?answerId=814996022#814996022, /profile/dongkeqiang'] Is there any difference between the two ? [/quote] It’s hard to say for sure without seeing the binaries involved, but it’s most likely that one has the hardened runtime enabled and the other doesn’t. To see if an app has the hardened runtime enabled, look for the runtime flag in its signature. For example, Pacifist does: % codesign -d -vvv /Applications/Pacifist.app … CodeDirectory v=20500 size=11364 flags=0x10000(runtime) … … but Apple Configurator does not: % codesign -d -vvv /Applications/Apple Configurator.app … CodeDirectory v=20400 size=17981 flags=0x2000(library-validation) … … The hardened runtime is required for directly distributed apps. It’s optional for Mac App Store apps. I generally recommend that you enable it everywhere. [quote='814993022, dongkeqiang, /thread/768361?answerId=814993022#814993022, /profile/dongkeqiang'] Now, if it can't be opened, no crash record will be genera
Nov ’24
Reply to "How to" for dext distribution
I've been able to re-test all of these automatic codesigning/provisioning/notarization suggestions on Xcode 16.1, by modifying all of the bundle IDs, changing to Automatically Manage Signing and attempting again with my Admin developer portal credentials. It does not work. I still get all 3 errors of: There is a problem with the request entity - you already have a current Developer ID Application Managed (With Kext) certificate or pending certificate request. No profiles for com.company.HostingApp.Driver were found - Xcode couldn't find any Developer ID provisioning profiles matching 'com.company.HostingApp.Driver'. No profiles for com.company.HostingApp were found - Xcode couldn't find any Developer ID provisioning profiles matching 'com.company.HostingApp'. It seems you are correct, the Admin level does not have authority to manipulate the developer portal side of the automatic process. Tightly controlled account access does not really work in the modern world of two-factor authentication and remot
Nov ’24
Reply to task_for_pid error 5
Sorry to hijack, but that didn't work for me. I'm trying a command-line utility, doing: static size_t get_thread_count(pid_t pid) { mach_port_t me = mach_task_self(); mach_port_t task; kern_return_t res; thread_array_t threads; mach_msg_type_number_t n_threads; res = task_for_pid(me, pid, &task); if (res != KERN_SUCCESS) { fprintf(stderr, Unable to get task for pid %d: %dn, pid, res); return 0; } res = task_threads(task, &threads, &n_threads); if (res != KERN_SUCCESS) { fprintf(stderr, Could not get threads: %dn, res); return 0; } res = vm_deallocate(me, (vm_address_t)threads, n_threads * sizeof(*threads)); // Ignore error return n_threads; }``` and using an entitlements plist of and using codesign --sign - --entitlements ./ent.plist --deep ./t3 --force to get it in there, but it fails with error 5. (Even when run as root. 😄) This could be how I'm codesigning it, of course; I was just doing a simple CLI tool test first.
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’24
Why is my notarized and signed macOS .app rejected by Gatekeeper during installation?
I'm trying to distribute my macOS application (a .dmg file) to customers, and I've followed all the steps to sign and notarize the application. However, when I try to install the .dmg containing the app, Gatekeeper rejects it with the error AppName cannot be opened because developer is not verified. Even though I’ve signed the app with my Developer ID, notarized it, and verified the signature using codesign, I am still encountering issues when attempting to install or open the app on a clean macOS environment. Here’s the error I see when using spctl to check the .dmg: spctl --assess --type open --verbose=4 output/App.dmg output/App.dmg: rejected source=Insufficient Context When trying: spctl -a -t open -vvv --context context:primary-signature output/App.dmg output/Unbounded.dmg: accepted source=Notarized Developer ID origin=Developer ID Application: My .app is signed and notarised by electron builder and I explicitly signed and notarised dmg too but still not working
3
0
604
Nov ’24
Reply to "How to" for dext distribution
That failed in the automatic process, though - it kept bringing in the old dext bundle ID, and it was only AFTER involving the Team Agent and registering a new dext bundle ID that I got the correct results So, the issue here is that automatic works by having Xcode modify the portal, so if you're account type can't modify the portal configuration, Xcode can't fix it. You can fix this in two ways: You can have the Team Agent log in to Xcode and configure the project, which will then cause Xcode to modify the portal. You can modify the portal configuration yourself so that it's configuration matches what it should. This is ultimately a business decision, but my personal experience has been that out development flow works MUCH better with admin accounts. With a large company (which obviously has concerns about legitimate app distribution), my own inclination would be to have two different accounts- a development account where all developers could be admins but which never actually shipped software and a company a
Nov ’24
Reply to "How to" for dext distribution
Hi Kevin, First, thank you for your patience on all of this. It turns out you can't do that from an Admin role. I kept looking at the output of the security command and seeing the older bundle ID showing up for com.apple.developer.driverkit.userclient-access., which was not the updated bundle ID I was developing now. FYI, this is one of the pitfalls of manual codesigning, as automatic codesigning will not allow that. That's actually the biggest issue with manual codesigning- it allows you to force configuration that won't actually work, so unless you understand EXACTLY why automatic is failing, you can easily end up replacing an error at signing with a different error somewhere else. That's the issue, though. I don't know EXACTLY why automatic codesigning is failing - at least with manual code signing I can look at what settings I am using and try something else. If I just press automatic and it doesn't work (it hasn't yet), there does not seem to be anything further I can
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
You're right, I'm not using XCode for development. I know why this issue didn't occur, and I hope it can be helpful for those who come across this blog in the future. But now I have encountered another problem and need your help The following entitlement is not set in my entitlement. plist file: The reason for this issue is that when using @ electron/osx sign for signing, some parameters in the old option were invalid, resulting in the execution of the default entitlement. plist file in the node_module package. But now, I have encountered a new problem and I hope you can help me take a look: When I submitted a new binary file for review, I received a response saying that the software could not be opened, and other phenomena included: Before I signed the app, it could run normally, but after I signed it, I found that the app package could no longer run. I submitted the version to Apple Connect, but even after downloading it through TestFlight, I couldn't open it. Even if I turn off sandbox mode in the entities
Nov ’24
Xcode Build for React App fails in codesigning step
I tried building the React App for Any iOS device (Arm64) but I get error. Although I can build successfully for any iOS Simulators In the codesigning step I get the following error, Warning: unable to build chain to self-signed root for signer Apple Development: my email address ( ... ) I don't have paid membership of Apple Developer Program, does that cause this failure? Also, to archive also do I need Apple Developer Program paid membership?
Topic: Code Signing SubTopic: General
1
0
451
Nov ’24
Reply to codesign use of Cloud-managed Developer ID
[quote='768573021, fraapaul, /thread/768573, /profile/fraapaul'] Is it correct that codesign only uses certificates from the local Keychain … ? [/quote] Correct. If you use the Xcode organiser to export a Developer ID signed app [1], you can look at Packaging.log to see how this works. codesign is used to generate the data to be signed and then to apply the signature, but the actual signing is done using a web service. AFAIK all of this is considered an implementation detail and not documented for third-party use (other than via Xcode and xcodebuild, of course). Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] You have to remove your Developer ID signing identity from the keychain in order to get cloud signing. I have mine in a separate keychain — I talk about that more in The Care and Feeding of Developer ID — so I just removed that keychain from the search list in Keychain Access.
Nov ’24
Reply to Pkg installation package uploaded to macstore email prompt ITMS-90296
[quote='813976022, dongkeqiang, /thread/768361?answerId=813976022#813976022, /profile/dongkeqiang'] Amazing, it worked. [/quote] Yay! [quote='813976022, dongkeqiang, /thread/768361?answerId=813976022#813976022, /profile/dongkeqiang'] But now I have encountered another problem and need your help The following entitlement is not set in my entitlement. plist file: [/quote] My understanding is that you’re not using Xcode to sign and package your app. Given that, there’s a limit to how much I can help you with. Your third-party tooling is probably based on Apple’s low-level tools, xcodebuild (perhaps), Clang, codesign, and so on. Those tools don’t add entitlement claims spontaneously. They only do that if you instruct them to. So you have two choices: Seek help from the support channel for the tools you’re using. Or take ownership of the tool, and work through the steps that it takes to create your package to see where it’s adding these entitlement claims. If you get to a point where you see an Apple tool
Nov ’24