Demystify code signing and its importance in app development. Get help troubleshooting code signing issues and ensure your app is properly signed for distribution.

All subtopics

Post

Replies

Boosts

Views

Activity

Signing to run locally does not work with network access
I'm trying to sign an app to run locally because development provisioning does not work for unspecified reasons. I'm adding NSAllowsLocalNetworking to the app transport security section of the entitlements and the result is that the selection to sign the app locally vanishes from the signing section in Xcode. I need to access a local web application which does not provide HTTPS. I'm not only very confused about this but actually pretty ******. Is this once again Apple playing games for absolutely no reason? Why can't I build and run an application on my system that does not have to do anything with Apple, the app store, customers or anything? This is just for me and I cannot make it work.
3
0
451
4w
Embedded helper app fails to launch
I recently changed the architecture of my app by moving some of the logic into a helper app, which is embedded together with the main app. The main app's bundle looks like this: Main.app - Contents - MacOS - Main - Helper.app It all works fine during development, and I could successfully archive and notarize it. However, when I try to launch the notarized version of the helper app, it fails with the signing issues. failed to fetch Main.app/Contents/MacOS/Helper.app/Contents/_CodeSignature/CodeRequirements-1 error=-10 I have tried a few things, but could not find any working solution. Any help is appreciated!
1
0
399
4w
Previously unseen problem with certificate signing
I first built WordPuzzleAids over 2 years ago. I built it on my MacBook Pro, using Xcode and Swift. The destination for the build was my iPhone. Two weeks ago, the app stopped working on the iPhone: I thought I might need to rebuild it on the on the MacBook and "re-deliver" it to the iPhone. The build failed with: CodeSign /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app (in target 'WordPuzzleAids' from project 'WordPuzzleAids') cd /Users/paddy/Projects/ThirdParty/WordPuzzleAids Signing Identity: "Apple Development: John Patterson (G9M8AH9CTD)" Provisioning Profile: "iOS Team Provisioning Profile: *" (650d11d4-ecd2-4458-a146-3cb55438e9dc) /usr/bin/codesign --force --sign 1FC4588FA2EAD7DCF9AAC9CDC823B567D76BCBE8 --entitlements /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Intermediates.noindex/WordPuzzleAids.build/Debug-iphoneos/WordPuzzleAids.build/WordPuzzleAids.app.xcent --timestamp\=none --generate-entitlement-der /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app: errSecInternalComp I have attached the build documentation file Build WordPuzzleAids_2024-08-29T21-17-09.txt
6
0
429
Aug ’24
productbuild: notarize .pkg with non-binary sub package
Hi, we have .pkg install package consisting of various sub packages. One of them contains presets and needs to be installed the the default preset location /Library/Audio/Presets. If this non-binary preset package is the only one in a .pkg choice notarization fails with: "logFormatVersion": 1, "jobId": "*", "status": "Invalid", "statusSummary": "Archive contains critical validation errors", "statusCode": 4000, "archiveFilename": "mypackage.pkg.zip", "uploadDate": "2024-08-22T21:24:03.251Z", "sha256": "*", "ticketContents": null, "issues": [ { "severity": "error", "code": null, "path": "mypackage.pkg.zip", "message": "Package mypackage.pkg.zip has no signed executables or bundles. No tickets can be generated.", "docUrl": null, "architecture": null }, { "severity": "warning", "code": null, "path": "mypackage.pkg.zip/mypackage.pkg", "message": "b\"Invalid component package: mypackage_vstpreset Distribution file's value: #com.mycompany.mypackage.vstpreset.pkg\\n\"", "docUrl": null, "architecture": null } ] } Not sure, but maybe its worth noting that the causing sub packge only generates a warning, but the parent package seems to escalate this into an error. How can a non-binary sub package be included in a notarized parent package? Any hints or thoughts are highly appreciated, Thanks!
3
0
363
Aug ’24
Failure to launch despite successful notarization
I have a project that notarizes and runs successfully, but then I went to change one of the .a static libraries that it links against, and despite a successful signing and notarization, when it is launched, it pops up a dialog saying that the app "cannot be opened because the developer cannot be verified." The notarization report looks like this: { "logFormatVersion": 1, "jobId": "24ca9c37-77c6-41fd-a5be-d743aa195b5a", "status": "Accepted", "statusSummary": "Ready for distribution", "statusCode": 0, "archiveFilename": "MyApp.dmg", "uploadDate": "2024-08-27T15:19:36.381Z", "sha256": "88f510690da80f0b682774d4240afef05cfe6123ba8427db6afb6006f401ed42", "ticketContents": [ ... ], "issues": null } How can I get more information about how to diagnose this?
2
0
386
Aug ’24
Has the Apple Notarization Service Recently Changed to Inspect Files Inside ZIP Archives?
Hi everyone, Been working with Apple's notarization process for a while, and we've recently noticed some unexpected behavior. It seems like the notarization service might be looking inside ZIP archives contained within my app's distribution package. In the past, we don't recall the notarization process digging into ZIP files like this—only the main app bundle and its contents were scanned for signatures. Has there been a recent change or update to the notarization service that now includes inspecting files within ZIP archives? If so, are there specific guidelines or documentation updates regarding this change? Can anyone point me to what to expect and how to adjust my workflow accordingly. While "signing all the files" is the default answer, is there a more cohesive answer to this question? Thanks
1
0
425
Aug ’24
Notarization issue not fixed for 1.5 years
I've the common "Team is not yet configured for notarization" issue and I've had it since the beginning of last year, where I contacted Apple about the issue, after going through some generalized useless advice that the support agent gave me I was finally able to escalate the issue and they supposedly had their "engineers" working on it. About every month I would send 1-2 emails asking for status update and everytime the response was "the engineers are working on it", and about the 8th-9th month they stopped responding. Now I've paid for developer program again, I have the same issue, it has not been fixed. I am in fact being scammed at this point and I've opened an issue via the provided link in the related thread below, it's been a week, Apple has not responded and the fact is, this is the worst platform to develop for. I really am starting to hate this company.
1
0
231
Aug ’24
can't see my distribution profile anywhere except Xcode
I created a distribution profile (many, many, many times now) but no matter what I do, when I go to Accounts under Xcode it lists it there, no problem, but when I go to VS for Mac or even VS Code the distribution profile simply doesn't seem to exist. In VSCode it just doesn't;t appear as an option but in VS For Mac it at least tells me that "No valid profile was found" and it instructs me to make sure everything is setup properly. Normally when this happens I delete every single last key and certificate from KeyChain and on the Apple dev portal and I start from scratch making sure to add all my devices, creating a new certificate using a new CSR, selecting Apple Distribution and... nope, Xcode sees it just fine, bat I can't build any MAUI apps because "No valid profile was found" Once in a while, doing the same thing for the n-th time actually works and lo-and-behold there is the profile! Hallelujah! Then I install the latest version of MacOS or Xcode or Visual Studio and poof goes my profile. So I create it again and no luck. So I delete it and this time say "iOS publishing only, please" and lo and behold the profile appears... then I go to sleep / drink a coffee / reboot / think of pizza and lo-and-behold my profile is gone again. I restart the entire process deleting everything and after n attempts it finally shows ... until it doesn't, any more. When it comes to development, I click a button and the app is on my phone. When it comes to TestFlight it takes me weeks to get a profile visible so I can send it to Apple. Now as an added bonus the "Archive for distribution" option vanished from VS For Mac also. Fun. This prompted me to try and use VS Code, which is when I found that I have the same problem there as I do in VS For Mac. So the TL;DR version is that VS For Mac has a simple GUI interface while VS Code requires a simple keyboard shortcut before clicking the mouse a few times, both apps make life super simple... but neither can do the job of generating a distribution build because neither can see the distribution certificate. The only thing that can see it is Xcode What am I doing wrong? Why does it take weeks of doing the same thing over and over, praying for different results, only to be blessed with a success every n-th time lasting for n2 days before the loop restarts?
0
0
290
Aug ’24
SignatureCollection failed when archive in Jenkins
I am having an issue when archiving in Jenkins. The log says: SignatureCollection /Users/***/Library/Developer/Xcode/DerivedData/***/Build/Intermediates.noindex/ArchiveIntermediates/***/BuildProductsPath/Release-iphoneos/Some.xcframework-ios.signature error: signature-collection failed: The operation couldn't be completed. (XCBUtil.CodeSignatureInfo.Error error 0.) I am able to build and archive without any issue locally.
0
0
317
Aug ’24
macOS App Group Entitlements
We have a cross platform App available on Mac, iOS & soon tvOS. We are adding a new App Group to be used by this app. We also have a as yet unpublished future Mac Catalyst app that will need access to the App Group. The Apple docs suggest prefixing app groups on Mac with the team ID but not on other platforms. We would like to avoid prefixing with the team ID because: my understanding is that Mac Catalyst apps don't use the team ID and we would like to support that use case to communicate between our current cross platform app and the future catalyst app. Having a single code base but different group container IDs per platform means a bunch of extra conditional logic in the project we would rather avoid. So with that context our aim is to have an app group that is named consistently across platforms and meets sandboxing requirements for App Store distribution. However when developing using the non-team prefixed app group name on macOS Sequioa I see the following alert every time I launch the app. I have the App Group listed correctly in the entitlements file and if I change the app group name on macOS from group.com.example to (TEAMID).com.example then it works as expected so I think the rest of the setup is correct. Looking at the Sequoia Beta release notes it states: Specifically, the app must use FileManager to get the app group container path and meet one of the following requirements: the app is deployed through Mac App Store; the app group identifier is prefixed with the app’s Team ID; or the app group identifier is authorised by a provisioning profile embedded within the app. I am using Xcode managed signing and looking at the provisioning profiles I can see that the iOS one includes the app group but the macOS one does not. I assume that if I could somehow get the app group correctly add to the macOS provisioning profile then all would be good. But I am now stuck on how to get the app group added to the macOS provisioning profile. It seems whatever I try Xcode does not want to add it. Presumably this is because it expects you to instead use a team ID prefixed app group which would not need to be added. Is there any magic I can do to make this work with automatic signing? If not then how would I go about setting it up manually and is that the best solution?
1
1
325
Aug ’24
After entitlements add system-extension.install , The app cant run on Macos 10.15
Hello, My app used camera extension to implement virtual camera. After cosigned with Developer ID Application, My app can run on other mac. But can't run on MacOS 10.15. Print system log as follows: Aug 22 16:08:11 YL1150-C01177PG com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x10000060.Presentation Assistant[95558]): Binary is improperly signed. Aug 22 16:08:20 YL1150-C01177PG com.apple.xpc.launchd[1] (com.yealink.PresentationAssistant.app.4612[95559]): removing service since it exited with consistent failure - OS_REASON_CODESIGNING | When validating /Applications/Presentation Assistant.app/Contents/MacOS/Presentation Assistant: Code has restricted entitlements, but the validation of its code signature failed. Unsatisfied Entitlements: Aug 22 16:08:20 YL1150-C01177PG com.apple.xpc.launchd[1] (com.yealink.PresentationAssistant.app.4612[95559]): Binary is improperly signed. Aug 22 16:08:51 YL1150-C01177PG com.apple.xpc.launchd[1] (com.apple.mdworker.shared.04000000-0700-0000-0000-000000000000[95551]): Service exited due to SIGKILL | sent by mds[114] My app entitlements is: ??qq?<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <false/> <key>com.apple.security.application-groups</key> <array> <string>xxxxx.com.yealink.PresentationAssistant.app</string> </array> <key>com.apple.security.network.client</key> <true/> <key>com.apple.security.network.server</key> <true/> <key>com.apple.security.device.microphone</key> <true/> <key>com.apple.security.device.camera</key> <true/> <key>com.apple.security.device.usb</key> <true/> <key>com.apple.security.device.bluetooth</key> <true/> <key>com.apple.security.device.print</key> <true/> <key>com.apple.security.device.audio-input</key> <true/> <key>com.apple.security.files.user-selected.read-write</key> <true/> <key>com.apple.security.assets.pictures.read-write</key> <true/> <key>com.apple.security.files.downloads.read-write</key> <true/> <key>com.apple.security.assets.music.read-write</key> <true/> <key>com.apple.security.assets.movies.read-write</key> <true/> <key>com.apple.security.files.all</key> <true/> <key>com.apple.security.files.bookmarks.app-scope</key> <true/> <key>com.apple.security.cs.allow-unsigned-executable-memory</key> <true/> <key>com.apple.security.cs.allow-jit</key> <true/> <key>com.apple.security.cs.disable-executable-page-protection</key> <true/> <key>com.apple.security.cs.disable-library-validation</key> <true/> <key>com.apple.security.cs.allow-dyld-environment-variables</key> <true/> <key>com.apple.security.automation.apple-events</key> <true/> <key>com.apple.developer.system-extension.install</key> <true/> </dict> </plist> I found that it works on macos 10.15 as long as I remove system-extension.install. What should I do?
3
0
254
Aug ’24
Notarization Status: Accepted. What does it mean?
I submitted my macOS app for notarization. Here's what I see: Successfully received submission info createdDate: 2024-08-21T11:25:46.063Z id: 9e787992-5737-4ca8-b8b5-23d267f6476c name: MacOSapp.zip status: Accepted What does it mean? Are there more stages in this process? The reason I am asking is because trying to staple a ticket gives me 'error 65' which means there is no ticket.
1
0
231
Aug ’24
Notarization consistently taking days to complete
Hi all — Hoping you all have insights on notarization. We are a small startup using Apple Business Essentials as our company MDM, managing our fleet of Macs. ABE has the capability (as with every MDM) to deploy custom software to those Macs via .pkg files. We create the package files with no problem, and also codesign them with no problem. We discovered that the Macs will fail to install the packages if the package is not notarized (which makes sense from the perspective of Gatekeeper). Notarizing the package was easy. Submitting them is easy. But the processing time has been crazy! I've read from posts here that the first submissions can take a long time, and indeed ours did — iirc, about 48 hours. But the pattern has continued. Our most recent submission (submission id 2a714bbf-83e7-4a25-b936-e002c94e1704 if someone from Apple is reading) has now taken almost 4 days and is still In Progress. I have no idea how to resolve this, or even to understand what's holding up the submission. Anyone have any ideas? We are not intending to deploy any of these packages to the public (only to our corporate Macs). I'd love to avoid the notarization but it doesn't seem possible. Any ideas?
1
0
269
Aug ’24
Attempted to install a Beta profile without the proper entitlement.
I'm trying to install from Xcode (15.4) to my physical device but I get the following error: Failed to install embedded profile for : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.) The project was successfully building previously, but after encountering an issue while implementing Infobip (a 3rd party library for push notifications) where we weren't getting notifications sent from the Infobip dashboard, we had to change Provisioning Profile to one with a production setup for the aps-environment (given that the suggestion from the Infobip support team was to ensure that the provisioning profile and environment match). Note that it was development before. After downloading the new Provisioning Profile onto Xcode, the project fails to build now with the error mentioned above. I don't know what to do now, and I'm stuck.
0
1
364
Aug ’24
multiprocessing.Queue() python method sandbox problem
multiprocessing.Queue() method of python getting "PermissionError: [Errno 1] Operation not permitted" error if it is sandboxed: CODE: import multiprocessing tensorflow_coordinates_queue = multiprocessing.Queue() ERROR: ./test_temp9 Traceback (most recent call last): File "/Applications/test_temp9.app/Contents/MacOS/test_temp9.py", line 4, in <module> File "/Applications/test_temp9.app/Contents/MacOS/multiprocessing/context.py", line 103, in Queue File "/Applications/test_temp9.app/Contents/MacOS/multiprocessing/queues.py", line 43, in __init__ File "/Applications/test_temp9.app/Contents/MacOS/multiprocessing/context.py", line 68, in Lock File "/Applications/test_temp9.app/Contents/MacOS/multiprocessing/synchronize.py", line 162, in __init__ File "/Applications/test_temp9.app/Contents/MacOS/multiprocessing/synchronize.py", line 57, in __init__ PermissionError: [Errno 1] Operation not permitted BUNDELED WITH NUITKA: echo *** | sudo -S python3.9 -m nuitka --run --standalone --macos-disable-console --macos-create-app-bundle --macos-app-mode=ui-element --enable-plugin=pyside6 --macos-app-icon=icons/app_icon.png --include-data-dir=icons=icons test_temp9.py SIGNED WITH FOLLOWING SH: sign.txt sign2.txt ENTITLEMENTS: app.entitlements.txt
2
0
297
Aug ’24
forgot to specify platform as iPadOS while bulk uploading UDID's for iPad app
I had used the bulk uploading template for uploading UDIDs for multiple iPads (43) to create a ad hoc provisioning profile , however I had mentioned only iOS in platform section while bulk uploading and everything got registered in the apple developer platform. Is there anyway for me to re-upload / change the platform to include iPadOS as well. As all my devices are iPads
0
0
161
Aug ’24
Help With Provisioning Profile(s) for Development & Distribution
I've followed all the posts (most of which are fairly stale). I've generated dozens of certificates both for "Apple Development" and "Apple Distribution", created several profiles of "iOS App Development" and "App Store Connect". Up until now I have had very little problem installing my app (generated using Ionic/Capacitor v5/Angular v16, Xcode 15.4, macos 14.6). Now when I try to install directly on a test device (I've used regularly, previously), I get "Failed to verify code signature of... The identity used to sign the executable is no longer valid..." I've restarted Xcode and macbook. I've deleted all certificates and revoked all profiles, and started over. I have tried using automatic signing and manual signing. Nothing is working. I just want be able to install the app on a test device (mostly to see logs in Xcode's console), and to be able to upload the same app to appstoreconnect. What am I doing wrong?
6
0
401
Aug ’24
App Sandbox and UDP broadcast
When using the following API, is it expected that the app would require both incoming and outgoing permissions with App Sandbox? public func sendto(_: Int32, _: UnsafeRawPointer!, _: Int, _: Int32, _: UnsafePointer<sockaddr>!, _: socklen_t) -> Int Since I'm only sending UDP broadcasts, I would have expected outgoing to be sufficient. Thanks!
1
0
247
Aug ’24
codesign command fails with errSecInternalComponent
I’m facing the dreaded codesign command fails with 'errSecInternalComponent' and looking for some guidance. I have removed the “Apple World Wide Developer Relations Authority” certificate that expired in 2023 from both the Login and System Keychain and have downloaded the latest intermediate certificates I found. I have verified all the Trust Settings are configured to “Use System Default”. I did the basic codesign check suggested in an earlier post [https://forums.developer.apple.com/forums/thread/712005]: % security find-identity -p codesigning Policy: Code Signing Matching identities 675CE18312BFBE2735918BA897908D20DB0A774D "Apple Development: Peter Sichel (537G2NTM55)" 1 identities found Valid identities only 675CE18312BFBE2735918BA897908D20DB0A774D "Apple Development: Peter Sichel (537G2NTM55)" 1 valid identities found % cp "/usr/bin/true" "MyTrue" % codesign -s "Apple Development" -f "MyTrue" MyTrue: replacing existing signature MyTrue: errSecInternalComponent —— It seems I’m still missing something. What else can I check to debug the problem?
4
0
250
Aug ’24