Trusted execution is a generic name for a Gatekeeper and other technologies that aim to protect users from malicious code.
General:
Forums topic: Code Signing
Forums tag: Gatekeeper
Developer > Signing Mac Software with Developer ID
Apple Platform Security support document
Safely open apps on your Mac support article
Hardened Runtime document
WWDC 2022 Session 10096 What’s new in privacy covers some important Gatekeeper changes in macOS 13 (starting at 04: 32), most notably app bundle protection
WWDC 2023 Session 10053 What’s new in privacy covers an important change in macOS 14 (starting at 17:46), namely, app container protection
WWDC 2024 Session 10123 What’s new in privacy covers an important change in macOS 15 (starting at 12:23), namely, app group container protection
Updates to runtime protection in macOS Sequoia news post
Testing a Notarised Product forums post
Resolving Trusted Execution Problems forums post
App Translocation Notes (aka Gatekeeper path randomisation) forums post
Most trusted execution problems are caused by code signing or notarisation issues. See Code Signing Resources and Notarisation Resources.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Gatekeeper
RSS for tagGatekeeper on macOS helps protect users from downloading and installing malicious software by checking for a Developer ID certificate from apps distributed outside the Mac App Store.
Posts under Gatekeeper tag
42 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I've signed an app, zipped it, and uploaded it to github. When I download it on another Mac, I get "it can't be opened because it could not be verified for malware".
But on that computer, I can verify it with codesign, and it appears to be correct (as far as I can tell).
I can copy/paste the app from my other Mac, and that copy will run without problem.
sys_policy, however, gives:
Notary Ticket Missing
File: ReView.app
Severity: Fatal
Full Error: A Notarization ticket is not stapled to this application.
Type: Distribution Error
This is the same for the copy that runs, and the copy that doesn't.
The difference between them appears to be a quarantine xattr. I can delete this, and the app launches without incident.
Is this expected? Why should a signed app be quarantined just because it's been downloaded?
The whole point of paying the fee is to avoid the security obstacles...! ;-)
We have an application which keeps throwing the error "application is damaged and cannot be opened. You should move it to Trash"
I have already referred to the documentation: https://developer.apple.com/forums/thread/706379 and https://developer.apple.com/forums/thread/706442
I have checked the following possible root causes:
Codesign of the application using the codesign command
Notarization of the application using the spctl command
Executable permissions
Checked for the presence of "com.apple.quarantine" flag for the application using xattr -l <path to executables"
Checked the bundle structure
None of the above listed items seemed to be a problem and are as expected.
Can you please help us understand what could cause this issue and how to resolve this without recommending an uninstall/reinstall of the application?
Hello, We are currently using Apple Notarization (notarytool) for distributing a macOS app, and we are experiencing very long notarization times for large app bundles.
[Issue]
For apps with large binary sizes, notarization consistently takes around 3.5 to 4.5 hours from submission to completion.
This delay is causing practical issues in our release pipeline, especially when:
A hotfix or urgent update is required
Multiple builds must be notarized in a short time
CI/CD-based distribution is expected to complete within a predictable timeframe
[Environment]
Platform: macOS
Notarization method: notarytool
Distribution: Outside Mac App Store
App size: 100 GB~ (compressed ZIP)
Signing: Hardened Runtime enabled, codesigned correctly
Submission status: Successfully accepted, but processing time is very long
[What we have confirmed]
The notarization eventually succeeds (no failures)
Re-submitting the same build shows similar processing times
Network upload itself completes normally; the delay is in Apple-side processing
Smaller apps complete notarization much faster
[Questions]
Is a 3–4+ hour notarization time expected behavior for large macOS apps?
Are there recommended best practices to reduce notarization processing time for large binaries?
For example, splitting components, adjusting packaging, or specific signing strategies
Is there any official guidance or limitation regarding notarization queueing or processing based on app size?
Are there known service-side delays or regional differences that could affect processing time?
Any insight or confirmation would be greatly appreciated, as this directly impacts our production release workflow.
Thank you.
App translocation, officially known as Gatekeeper path randomisation, comes up from time-to-time. The best resource to explain it, WWDC 2016 Session 706 What’s New in Security, is no longer available from Apple so I thought I’d post some notes here (r. 105455698 ).
Questions or comments? Start a new thread here on DevForums, applying the Gatekeeper tag so that I see it.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
App Translocation Notes
Gatekeeper path randomisation, more commonly known as app translocation, is a security feature on macOS 10.12 and later. When you run a newly downloaded app, the system executes the app from a randomised path. This prevents someone from taking an app that loads code from an app-relative path and repackaging it to load malicious code.
IMPORTANT The best way to prevent your app from being tricked into loading malicious code is to enable library validation. You get this by default once you enable the hardened runtime. Do not disable library validation unless your app needs to load in-process plug-ins from other third-party developers. If you have an in-process plug-in model, consider migrating to ExtensionKit.
The exact circumstances where the system translocates an app is not documented and has changed over time. It’s best to structure your app so that it works regardless of whether it’s translocated or not.
App Translocation Compatibility
Most apps run just fine when translocated. However, you can run into problems if you load resources relative to your app bundle. For example, consider a structure like this:
MyApp.app
Templates/
letter.myapp
envelope.myapp
birthday card.myapp
Such an app might try to find the Templates directory by:
Getting the path to the main bundle
Navigating from that using a relative path
This won’t work if the app is translocated.
The best way to avoid such problems is to embed these resources inside your app (following the rules in Placing Content in a Bundle, of course). If you need to make them easily accessible to the user, add your own UI for that. For a great example of this, run Pages and choose File > New.
App Translocation Limits
There is no supported way to detect if your app is being run translocated. If you search the ’net you’ll find lots of snippets that do this, but they all rely on implementation details that could change.
There is no supported way to determine the original (untranslocated) path of your app. Again, you’ll find lots of unsupported techniques for this out there on the ’net. Use them at your peril!
If you find yourself using these unsupported techniques, it’s time to sit down and rethink your options. Your best option here is to make your app work properly when translocated, as illustrated by the example in the previous section.
App Translocation in Action
The following steps explain how to trigger app translocation on macOS 13.0. Keep in mind that the specifics of app translocation are not documented and have changed over time, so you might see different behaviour on older or new systems:
To see app translocation in action:
Use Safari to download an app that’s packaged as a zip archive. My go-to choice for such tests is NetNewsWire, but any app will work.
Safari downloads the zip archive to the Downloads folder and then unpacks it (assuming your haven’t tweaked your preferences).
In Finder, navigate to the Downloads folder and launch the app.
When Gatekeeper presents its alert, approve the launch.
In Terminal, look at the path the app was launched from:
% ps xw | grep NetNewsWire
… /private/var/folders/wk/bqx_nk71457_g9yry9c_2ww80000gp/T/AppTranslocation/C863FADC-A711-49DD-B4D0-6BE679EE225D/d/NetNewsWire.app/Contents/MacOS/NetNewsWire
Note how the path isn’t ~/Downloads but something random. That’s why the official name for this feature is Gatekeeper path randomisation.
Quit the app.
Use Finder to relaunch it.
Repeat step 5:
% ps xw | grep NetNewsWire
… /private/var/folders/wk/bqx_nk71457_g9yry9c_2ww80000gp/T/AppTranslocation/C863FADC-A711-49DD-B4D0-6BE679EE225D/d/NetNewsWire.app/Contents/MacOS/NetNewsWire
The path is still randomised.
Quit the app again.
Use the Finder to move it to the desktop.
And relaunch it.
And repeat step 5 again:
% ps xw | grep NetNewsWire
… /Users/quinn/Desktop/NetNewsWire.app/Contents/MacOS/NetNewsWire
The act of moving the app has cleared the state that triggered app translocation.
Hello,
we have a product package which is structured like this:
/ Installer.pkg
/ Distribution
/ Main Component.pkg
/ Scripts
/ preinstall
/ postinstall
/ helper [ Mach-O executable ]
/ Payload
/ Application Bundle.app
/ Another Component.pkg
...
The helper is our custom CLI helper tool which we build and sign and plan to use it in pre/post install scripts.
I'd like to ask if we need to independently notarize and staple the helper executable or just the top level pkg notarization is sufficient in this case?
We already independently notarize and staple the Application Bundle.app so it has ticket attached. But that's because of customers who often rip-open the package and pick only the bundle. We don't plan to have helper executable used outside of installation process.
Thank you,
o/
I now had the second user with 26.2. complaining about a hang in my app. The hang occurs when the first AppleScript for Mail is run. Here is the relevant section from the process analysis in Activity Monitor:
+ 2443 OSACompile (in OpenScripting) + 52 [0x1b32b30f4]
+ 2443 SecurityPolicyTestDescriptor (in OpenScripting) + 152 [0x1b32a2284]
+ 2443 _SecurityPolicyTest(char const*, void const*, unsigned long) (in OpenScripting) + 332 [0x1b32a2118]
+ 2443 InterpreterSecurity_ScanBuffer (in libInterpreterSecurity.dylib) + 112 [0x28c149304]
+ 2443 -[InterpreterSecurity scanData:withSourceURL:] (in libInterpreterSecurity.dylib) + 164 [0x28c148db4]
+ 2443 -[XProtectScan beginAnalysisWithFeedback:] (in XprotectFramework) + 544 [0x1d35a1e58]
+ 2443 -[XPMalwareEvaluation initWithData:assessmentClass:] (in XprotectFramework) + 92 [0x1d359ada4]
+ 2443 -[XPMalwareEvaluation initWithRuleString:withExtraRules:withURL:withData:withAssessmentClass:feedback:] (in XprotectFramework) + 36 [0x1d359b2a8]
My app is correctly signed and notarised. The first user had to completely uninstall/reinstall the app and the everything worked again.
Why does this happen? How can the problem be fixed?
We package a nightly build of our application for distribution. About 1 month ago, this package has started showing the "Apple could not verify 'Application' is free of malware" message.
This only happens to our development branch package. We run the same pipeline with the same signature for our stable branch and the stable package does not show this message.
$ codesign -dv --verbose=4 KiCad.app
Executable=/Applications/KiCad/KiCad/KiCad.app/Contents/MacOS/kicad
Identifier=org.kicad.kicad
Format=app bundle with Mach-O universal (x86_64 arm64)
CodeDirectory v=20500 size=51931 flags=0x10000(runtime) hashes=1612+7 location=embedded
VersionPlatform=1
VersionMin=722432
VersionSDK=983552
Hash type=sha256 size=32
CandidateCDHash sha256=4f15435c1d3cc056a83432b78a2f6acae8fb0e6d
CandidateCDHashFull sha256=4f15435c1d3cc056a83432b78a2f6acae8fb0e6d03cbe70641719fd1ced3395b
Hash choices=sha256
CMSDigest=4f15435c1d3cc056a83432b78a2f6acae8fb0e6d03cbe70641719fd1ced3395b
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=3915776
Executable Segment flags=0x1
Page size=4096
CDHash=4f15435c1d3cc056a83432b78a2f6acae8fb0e6d
Signature size=9002
Authority=Developer ID Application: KiCad Services Corporation (9FQDHNY6U2)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=Dec 19, 2025 at 5:21:05 AM
Info.plist entries=17
TeamIdentifier=9FQDHNY6U2
Runtime Version=15.2.0
Sealed Resources version=2 rules=13 files=37238
Internal requirements count=1 size=176
codesign --verify --verbose=4 KiCad.app
<snipped all libs validated>
KiCad.app: valid on disk
KiCad.app: satisfies its Designated Requirement
% spctl --assess --verbose=4 KiCad.app
KiCad.app: accepted
source=Notarized Developer ID
We distribute this via dmg. The notarization ticket is stapled to the dmg and the dmg opens without warning.
Any help would be appreciated
I’m facing an issue with my macOS app after code signing and notarization.
The app is signed with my Developer ID and notarized using xcrun notarytool. Everything works fine on the machine where the signing was done — Gatekeeper accepts it, no warning appears, and codesign/spctl checks pass.
However, when running the same .app on other Macs, users receive a Gatekeeper warning saying the app is "malicious software and cannot be opened". The signature is valid and the notarization log shows status: Accepted.
What I've tried:
Verified signature with codesign --verify --deep --strict --verbose=2
Checked notarization status via xcrun notarytool log
Assessed Gatekeeper trust with spctl --assess --type execute
Everything passes successfully on the development machine.
Why would the app be treated as malicious on other systems even after notarization?
I'm happy to share logs and technical details if needed.
Hello,
I've been developing a mac app built with Electron Builder. In August, I was successfully notarizing my app and able to send it to testers without them receiving a malware warning. I took a two month break. When I came back in October, I am not able to distribute my app without the malware warning.
I can't for the life of me figure out what I could be missing, unless my developer account was flagged by Apple for some reason. All the diagnostics I run on my app package show that it is properly signed, notarized, and stapled.
Here are some diagnostics I have run on the app:
Command: codesign -dv --verbose=4 "/Volumes/Form Desktop 1/Form.app"
Output:
Executable=/Volumes/Form Desktop 1/Form.app/Contents/MacOS/Form
Identifier=co.Form.desktop
Format=app bundle with Mach-O thin (arm64)
CodeDirectory v=20500 size=763 flags=0x10000(runtime) hashes=13+7 location=embedded
VersionPlatform=1
VersionMin=720896
VersionSDK=917504
Hash type=sha256 size=32
CandidateCDHash sha256=cedcaef933c003c01b4d9ef6925a413fe6b4a585
CandidateCDHashFull sha256=cedcaef933c003c01b4d9ef6925a413fe6b4a585bf61e19751e8158775600b00
Hash choices=sha256
CMSDigest=cedcaef933c003c01b4d9ef6925a413fe6b4a585bf61e19751e8158775600b00
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=16384
Executable Segment flags=0x1
Page size=4096
CDHash=cedcaef933c003c01b4d9ef6925a413fe6b4a585
Signature size=8973
Authority=Developer ID Application: Jacob LEELAND (92D98F49FU)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=Nov 14, 2025 at 8:25:09 PM
Notarization Ticket=stapled
Info.plist entries=30
TeamIdentifier=92D98F49FU
Runtime Version=14.0.0
Sealed Resources version=2 rules=13 files=35090
Internal requirements count=1 size=176
RESULT: ✅ SIGNED WITH DEVELOPER ID
✅ NOTARIZATION TICKET STAPLED
✅ HARDENED RUNTIME ENABLED
----------------------------------------------------------------
Command: spctl --assess --verbose=4 --type execute "/Volumes/Form Desktop 1/Form.app"
Output:
/Volumes/Form Desktop 1/Form.app: accepted
source=Notarized Developer ID
RESULT: ✅ GATEKEEPER ACCEPTS APPLICATION
----------------------------------------------------------------
Command: xattr -l "/Volumes/Form Desktop 1/Form.app"
Output:
(No extended attributes)
----------------------------------------------------------------
Command: stapler validate "/Volumes/Form Desktop 1/Form.app"
Output:
Processing: /Volumes/Form Desktop 1/Form.app
The validate action worked!
RESULT: ✅ NOTARIZATION TICKET VALID
[signing-verification-report.txt](https://developer.apple.com/forums/content/attachment/45b41936-6e7a-4f4f-8e80-bc1e3136c84e)
code-block
I have attached a more complete diagnostic text file as well. I have tried notarizing the .dmg in addition to the app bundle, but no combination seems to work as far as I can tell.
I appreciate any help or point in the right direction. I've wasted many days of development time on this, lol.
I have a free developer account, and I have been creating applications. When I tried to open one of them, it said that this app has been flagged as malware. It is not malware, so I don't know why it has been flagged as this. Not just this app, but suddenly a whole bunch of my apps have been flagged as malware as well!
The app I have been developing is basically a windows Taskbar for my macbook air, and it has been working well until the latest update i made where it hides in full screen, suddenly it started taking up significant energy, so i reverted to an older version while i was fixing it. Then, when i try to open it another time, it starts to open, and it says "Malware Blocked and Moved to Bin" “Taskbar.app” was not opened because it contains malware. This action did not harm your Mac”. All versions of the taskbar now contain this message. I try opening some of my other apps, a shared storage client and a shared storage server (where i was testing with app groups), and they couldn't open either, the same malware message appeared. ProPermission couldn't open either (changes permissions on files for me so i don't have to use the terminal or finder). I can run these apps through the Xcode environment (attached process), but when I archieve it into an app bundle, the malware flag appears.
Please note that I am certain that these apps do not contain malware, apparently XProtect has incorrectly flagged my apps as malware. Because I do not have the paid developer account, I cannot notarize my apps.
I am using MacOS Tahoe 26.1 with Xcode 26.0, and I have tested it with a iMac Intel 2017 with MacOS Ventura.
Howdy,
I've been developing a packet tunnel extension meant to run on iOS and MacOS. For development I'm using xcodegen + xcodebuild to assemble a bunch of swift and rust code together.
I'm moving from direct TUN device management on Mac to shipping a Network Extension (appex). With that move I noticed that on some mac laptops NE fails to start completely, whilst on others everything works fine.
I'm using CODE_SIGN_STYLE: Automatic, Apple IDs are within the same team, all devices are registered as dev devices. Signing dev certificates, managed by xcode.
Some suspicious logs:
(NetworkExtension) [com.apple.networkextension:] Signature check failed: code failed to satisfy specified code requirement(s)
...
(NetworkExtension) [com.apple.networkextension:] Provider is not signed with a Developer ID certificate
What could be the issue? Where those inconsistencies across devices might come from?
I admit I am doing something unusual, and I would not be surprised if it didn't work. I am surprised, however, because after performing the equivalent operations on four bundles, all of the bundles work fine on macOS 15.6.1, but only two of them work on macOS 26.1 (beta 2). I don't know what causes the different outcomes.
What I am trying to do is get Java to pass the macOS 26 AppKit UI SDK linkage checking without having to rebuild the JDK using Xcode 26. Rebuilding works for the latest SDK, but it is very inconvenient and may not work for older JDKs. It usually takes a while before the JDK build team successfully transitions to a new Xcode release.
My approach is to use vtool to update the sdk version in the LC_BUILD_VERSION load command of $JAVA_HOME/bin/java, which is the launching executable for the JDK.
I performed this operation on four JDKs: 25, 21, 17, and 11. (I ran vtool on macOS 15.)
It was completely successful on JDK 25 and 21. The JDK launches correctly on macOS 15 and macOS 26. On macOS 26, AppKit uses the new UI, which is the desired outcome. The JDK runs despite that fact that I signed the modified $JAVA_HOME/bin/java with my developer ID, which is inconsistent with the JDK bundle signature. (Redoing the bundle signing is part of the JDK build process; if that were necessary, I would stick with rebuilding the JDK.)
The operation was not successful on JDK 17 and 11. I noticed two problems, which are not obviously related.
When vtool created the new version of the java program, it lost the tool definition.
$ vtool -show-build-version java
java:
Load command 10
cmd LC_BUILD_VERSION
cmdsize 32
platform MACOS
minos 11.0
sdk 11.1
ntools 1
tool LD
version 609.8
$ vtool -set-build-version 1 10.0 26.0 -output a.out java
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/vtool warning: code signature will be invalid for a.out
$ vtool -show-build-version a.out
a.out:
Load command 22
cmd LC_BUILD_VERSION
cmdsize 24
platform MACOS
minos 10.0
sdk 26.0
ntools 0
Adding back the tool definition didn't seem to matter.
When I try to run the revised executable (in the context of the JDK bundle), it works on macOS 15, but on macOS 26, it is rejected as damaged. If I run the revised executable outside the JDK bundle, it runs (but fails because it can't find the rest of the JDK, which is expected).
In all cases, GateKeeper rejects the revised executable because it has not been notarized, but that doesn't seem to stop the program from executing.
Topic:
Developer Tools & Services
SubTopic:
General
Tags:
macOS
Linker
Gatekeeper
Signing Certificates
I have a Qt desktop app that I was shipping to users as a dmg on macOS. But now I'll need to kind of rebrand the app to different users, that rebranding involves changing the name and the icon of the app
I'm not sure how feasible that is on macOS but here's what I'm thinking: First I'll include all apps for all brands inside the app resources, and instead of shipping the app directly, I will ship and installer (either .pkg or a custom made installer app) that will be responsible for downloading the main app and also setting some environmental variables somewhere so that I can choose the icon from the resources based on the env var values. And then either change the app icon and name from the installer itself, or implement something inside the app that makes it change the icon and name on launch (both icon in finder and in dock) but maybe one of those methods (or both) will break the codesign/notarization of the app so I want to avoid that too
I'm not sure if someone has done this before or how feasible such scenario is. Is what I'm thinking valid? or is there a whole other way possibly easier than this to go about implementing such feature?
The purpose of this is that I don't want to have to create multiple releases for multiple brands when they're all the same application with different icons/names, and also when releasing an update it will be just one update for all brands
Thank you in advance and feel free to ask any further questions for clarification
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?
I have an application that I have been signing, notarizing and distributing to beta testers for a year with no issues, note: I have never got stapling to work I always get a error 65 in the process. But up until yesterday that hasn't been an issue and online verification has always worked. Yesterday morning around 9am online gatekeeper verification has been failing with:
APP not opened,
apple cannot verify app is free of malware. etc
this keeps happening, with every build I try. redownloading previously successful builds show the same behavior
I know I can allow in privacy and security, but heading towards launch I dont want to have to tell users to do that.
has there been a change in how gatekeeper works or issues with the service?
any help with this or getting stapling working would be very appreciated!
productsign Command Appears to Succeed but Package has No Valid Signature
Category: Security, macOS, Code Signing
Question:
productsign command, when signing a PKG created with productbuild, appears to succeed with a success message (Wrote signed product archive to ...) but spctl verification results in rejected, source=no usable signature, indicating that the signature was not actually applied.
Details:
Goal: To sign a distribution package created with productbuild using a Developer ID Installer certificate.
Certificate Used:
Developer ID Installer: [Company Name] ([Team ID])
This certificate was issued by Previous Sub-CA and is not the latest G2 Sub-CA recommended by Apple. We cannot create a new G2 Sub-CA certificate as we have reached the limit of 5.
productsign Command:
productsign --sign "Developer ID Installer: [Company Name] ([Team ID])" [input.pkg] [output.pkg]
productsign Output:
Wrote signed product archive to [output.pkg] (Appears as a success message).
spctl Signature Verification:
spctl -a -vv [output.pkg]
Result: rejected, source=no usable signature
Notarization Service Results (Behavioral difference between Macs):
On Mac A, the submission status was Accepted.
On Mac B, the status was Invalid, with the notarization log message being The binary is not signed..
Troubleshooting Steps Taken:
We attempted to sign both component and distribution packages with productsign, and in both cases, the signature was not recognized by the system.
We skipped productsign and relied on the notarization service's auto-signing, but the notarization log still reported The binary is not signed., and the notarization failed.
We have confirmed that the certificate and private key are properly associated in Keychain Access.
My Questions:
Given that we are using an older Previous Sub-CA certificate and cannot create a new one, why does productsign appear to succeed when the signature is not being applied?
What could cause the behavioral difference where notarization is Accepted on Mac A but Invalid on Mac B?
Is this a known issue with Apple's tools, or is it possibly caused by the specific structure of our PKG?
What is the recommended workflow or debugging method to successfully sign and notarize a PKG under these circumstances?
Thank you for your assistance
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
Xcode
Gatekeeper
Signing Certificates
Developer ID
A user of my AppKit, document-based app brought to my attention that when setting it as the default app to open a certain file with extension .md (by choosing in the Finder "File > Open With > Other", then selecting my app and enabling "Always open with"), trying to open it with a double-click displays the warning "Apple could not verify [file] is free of malware that may harm your mac or compromise your privacy".
This is what happens for me:
When keeping the default app for a .md file (Xcode in my case), the file opens just fine.
When choosing my app in the "File > Open With" menu, the file opens just fine in my app.
But when setting my app as the default app (see above), the warning is displayed.
From that moment on, choosing my app in the "File > Open With" menu doesn't work anymore. Selecting Xcode doesn't work either.
Only setting Xcode again as the default app allows me to open it in Xcode, but my app still isn't allowed to open it.
Is this a macOS issue, or can I do anything in my app to prevent it? Where should I start looking for the issue in my code?
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?
We distribute our macOS products as a PKG downloaded from our website. To simplify configuration for our customers, we create a PKG for each customer that contains identifying data for that customer. We are currently doing this by notarizing the PKG for each customer and uploading the result. Since we sometimes exceed the notarization limit of 75/day, we began investigating other ways of including the identifying data.
One avenue seemed to be the extended attribute com.apple.application-instance, but after experimentation it appears that this attribute does not persist through downloads. There are very few resources describing this attribute (TN2206) but a close reading seems to confirm that the attribute has to be set on the user’s machine.
Can you confirm that this is the case? Is there any other way for customizing an installer PKG that won’t run afoul of notarization limits?