Hi, I'm trying to setup background assets hosted on Apple servers.
I currently have installed Xcode 16.4 and Xcode beta 4.
I have also freshly installed the command line tools for both.
When I run
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcrun ba-package template
I get
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find ba-package 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory)
xcrun: error: unable to find utility "ba-package", not a developer tool or in PATH
If I try to use Xcode beta 4:
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
xcrun ba-package template
I get:
dyld[92926]: Library not loaded: /System/Library/PrivateFrameworks/ManagedBackgroundAssetsHelper.framework/Versions/A/ManagedBackgroundAssetsHelper
Referenced from: <7F150064-45BF-31D7-BAFD-32911BB9F569> /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ba-package
Reason: tried: '/System/Library/PrivateFrameworks/ManagedBackgroundAssetsHelper.framework/Versions/A/ManagedBackgroundAssetsHelper' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/System/Library/PrivateFrameworks/ManagedBackgroundAssetsHelper.framework/Versions/A/ManagedBackgroundAssetsHelper' (no such file), '/System/Library/PrivateFrameworks/ManagedBackgroundAssetsHelper.framework/Versions/A/ManagedBackgroundAssetsHelper' (no such file, not in dyld cache)
[1] 92926 abort xcrun ba-package template
Any tip?
Command Line Tools
RSS for tagCommand line tools allow for easy installation of open source software or development on UNIX within Terminal.
Posts under Command Line Tools tag
60 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I am having an issue with signing and provisioning a Vision OS app. I have an iOS app and a VisionOS app. Everything works fine on the iOS but having issues with the VisionOS.
First, I am having issues with xcodebuild -exportArchive. When I run it on an archive of my VisionOS app I get
** EXPORT FAILED **
error: exportArchive No Accounts
error: exportArchive No profiles for 'X' were found
Where X is my bundle ID. Meanwhile the iOS app succeeds. This is on a CI machine but I confirmed the distribution provision profile for the vision OS app is installed on the machine. Even if I change the value of the -exportOptionsPlist to the one I used for the iOS project I get this error. Is the issue in the archive itself?
The archives are generated from building in Unity and archiving the xcodeproject with xcodebuild archive
Second, as a workaround I archived a debug ipa on my machine and uploaded this ipa to my CI machine which has the credentials to sign for distribution. I use this script as an example as how to resign the IPA: https://gist.github.com/lodalo/754a35b48d382ae99b25
I remove the CodeSignatures and codesign both .app and UnityFramework.framework. Using this resigned IPA I get this error when I try to upload to app store connect (via Transporter app and altool)
errors: Validation failed (409) Missing or invalid signature. The bundle 'X' at bundle path 'Payload/Y.app' is not signed using an Apple submission certificate.
To verify the signing I used
codesign -dvvv --entitlements -
On both the iOS and VisionOS app and they have the same values under all the Authority fields. Different profiles, of course. So the certificate I used is eligible to upload the iOS app successfully but doesn't work on the VisionOS ipa?
Any help on solving any of these issues would be great so I can upload the vision OS app. Thank you!
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
App Store Connect
Command Line Tools
Code Signing
visionOS
I am trying to integrate fastlane, which relies on xcodebuild. So this is my first experience with xcodebuild. Whenever I run a command to test or build the target in the folder where all the files of the project are stored, the action failes with Unable to find a device matching the provided destination specifier
For example I might be running this command:
xcodebuild \
-project Hoerspielzentrale.xcodeproj \
-scheme HoerspielzentraleUITests \
-destination 'platform=iOS Simulator,name="Screenshot Simulator”' \
test
However the mentioned error is returned:
xcodebuild: error: Unable to find a device matching the provided destination specifier:
{ platform:iOS Simulator, OS:latest, name:"Screenshot Simulator” }
The requested device could not be found because no available devices matched the request.
I can confirm that the simulator exists, is available and it can be booted. I have tried different simulators, different schemas, referencing them by their identifier, switching Xcode Versions, reset all simulators, derived data and build folder. After the error a complete list of all available destinations can be found, where I can see the simulator I try to use.
Available destinations for the "HoerspielzentraleUITests" scheme:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:iOS Simulator, id:961DC569-9931-419A-B46E-769AAFA73EA2, OS:18.5, name:Screenshot Simulator }
{ platform:iOS Simulator, id:961DC569-9931-419A-B46E-769AAFA73EA2, OS:18.5, name:Screenshot Simulator }
{ platform:iOS Simulator, id:5E51FD98-C451-472F-9CDE-08D49E6B737B, OS:18.5, name:Screenshot Simulator Pro }
{ platform:iOS Simulator, id:5E51FD98-C451-472F-9CDE-08D49E6B737B, OS:18.5, name:Screenshot Simulator Pro }
The rest of the list was omitted.
I am currently completely stuck.
Thank you
Hello,
I am working on a script to update an application which bundle ID changed. Only the bundle ID was modified; all other aspects remain unchanged.
This application requires access to "Screen & System Audio Recording" permissions, which are currently granted to the old bundle ID.
The script performs the following steps:
launchctl bootout gui/$(id -u) /Library/LaunchAgents/com.my_agent_1.plist
pkgutil --forget com.my_agent_1
tccutil reset All com.my_agent_1
rm /Library/LaunchAgents/com.my_agent_1.plist
rm -rf </path/to/com_my_agent_1>
installer -dumplog -allowUntrusted -pkg </path/to/com_my_agent_2.pkg> -target /
...
When running steps #1-6 without a restart between steps #5 and #6, the old bundle ID (com.my_agent_1) remains visible in TCC.db (verified via SQL queries).
Looks like this is the reason why "com.my_agent_2" is not automatically added to the permission list (requiring manual add).
Moreover, "tccutil reset All com.my_agent_1" does not work anymore, the error:
tccutil: No such bundle identifier "com.my_agent_1": The operation couldn’t be completed. (OSStatus error -10814.)
Is there any way to completely clear the "Privacy & Security" permissions without requiring a system restart?
Thank you a lot for your help in advance!
building gcc14-libgcc14 using Macports + Apple clang
returns following error
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/mach/message.h:78,
from /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/mach/arm/thread_status.h:40,
from /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/mach/machine/thread_status.h:35,
from /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/mach-o/loader.h:52,
from /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/mach-o/dyld.h:30,
from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc14/libgcc14/work/gcc-14.2.0/libgcc/config/darwin-crt-tm.c:29:
/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/mach/port.h:510:1: error: conflicting types for 'MPG_PAYLOAD'; have 'uint64_t(uint8_t, uint32_t, uint32_t)' {aka 'long long unsigned int(unsigned char, unsigned int, unsigned int)'}
510 | MPG_PAYLOAD(uint8_t flag, uint32_t a, uint32_t b)
| ^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/mach/port.h:498:1: note: previous definition of 'MPG_PAYLOAD' with type 'uint64_t(uint8_t, uint32_t)' {aka 'long long unsigned int(unsigned char, unsigned int)'}
498 | MPG_PAYLOAD(uint8_t flag, uint32_t a)
| ^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/mach/port.h:523:1: error: conflicting types for 'MPG_PAYLOAD'; have 'uint64_t(uint8_t, uint32_t, uint16_t, uint16_t)' {aka 'long long unsigned int(unsigned char, unsigned int, short unsigned int, short unsigned int)'}
523 | MPG_PAYLOAD(uint8_t flag, uint32_t a, uint16_t b, uint16_t c)
| ^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk/usr/include/mach/port.h:498:1: note: previous definition of 'MPG_PAYLOAD' with type 'uint64_t(uint8_t, uint32_t)' {aka 'long long unsigned int(unsigned char, unsigned int)'}
498 | MPG_PAYLOAD(uint8_t flag, uint32_t a)
libgcxx compiles fine
if forcing compile using clang20/clang19 there is no error.
I want to side load a .ipa file from a Mac to iPhone connected to Mac via USB. I don't want to use ABM or enterprise account. Also these can be any number of unknown devices. Is there any way to set this up automatically?
Topic:
Business & Education
SubTopic:
Device Management
Tags:
Developer Tools
Xcode
Command Line Tools
Hi All,
I am looking for a terminal command to get the exact same output as the file count you recieve when using Get Info in finder.
The closest i can get is using the find command with flags:
find 'path/to/folder' -not -path '*/\.*' -and -not -path '*\.key/*' -and -not -path '*\.numbers/*' -and -not -path '*\.pages/*' -and -not -path '*__MACOSX/*' -and -not -path '*\.pdf/*' -and -not -path '*\.app/*' -and -not -path '*\.rtfd/*' | wc -l
I will be searching on an external volume that sometimes produces keynote save files that finder sometimes sees as a package and sometimes sees as a folder. If a folder finder counts the items contained if a package it doesn't, I need the command or script to mimic this behaviour.
In the example of the screenshot get info on the top folder produces a count of 14 and the find command produces a count of 23.
There are also other behaviours that differ the file count between them but i'm not sure what causes them.
Any help on a solution it being a command or script would be much apreciated.
Thanks,
James
I am using system_profiler command to check on the installed application list from mac device.
**Terminal command to check installed java version - **
But while running /usr/sbin/system_profiler SPApplicationsDataType -xml , I cant able to find Java as an installed application.
Is this a known issue or do we have any alternative workaround to fetch the same?
Topic:
Business & Education
SubTopic:
Device Management
Tags:
Enterprise
Application Services
Command Line Tools
I'm trying to launch a command line app from my objective C application (sandboxed) using NSTask and I keep getting "launch path not accessible"
Here is the path:
[task setLaunchPath:@"/usr/local/bin/codeview"];
I have set the appropriate attributes for codeview and it is working perfectly when I use it from the command line and /usr/local/bin IS in the $PATH
I know I have NSTask configured correctly because this WILL work:
[task setLaunchPath:@"/usr/bin/hexdump"];
With the exception being that I'm using a command already in /usr/bin. But I can't copy codeview into /usr/bin due to SIPS.
I've tried moving codeview to various other non-SIPS protected locations all to no avail. Must all NSTask commands come from /usr/bin? Where might I put codeview so that it can be launched.
Today I'm going to use an older computer and disable SIPS to put my command in /usr/bin and see if that works. If it does. I will do it on my main machine.
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags:
Entitlements
Objective-C
Command Line Tools
App Sandbox
I've been using /usr/bin/shortcuts for various tasks (eg. Quicksilver uses it to list and run shortcuts), and after updating from 14.7.4 to 14.7.5 the tool gets killed on startup. Eg. here is what it looks like in my shell:
❯ shortcuts list
zsh: killed shortcuts list
(And this is regardless of whether I have "full disk access" or "developer tools" toggled on or off for iTerm.)
Looking at system logs it seems like the binary is missing an entitlement, which causes MACF / Gatekeeper to throw a fit:
2025-04-12 18:38:48.847576 kernel: mac_vnode_check_signature: /usr/bin/shortcuts: code signature validation failed fatally: When validating /usr/bin/shortcuts:
in-kernel: com.apple.shortcuts.ShortcutsCommandLine disallowed without com.apple.private.security.restricted-application-groups
2025-04-12 18:38:48.847582 kernel: validation of code signature failed through MACF policy: 1
2025-04-12 18:38:48.847583 kernel: check_signature[pid: 2475]: error = 1
2025-04-12 18:38:48.847587 kernel: proc 95761: load code signature error 4 for file "shortcuts"
2025-04-12 18:38:48.847613 kernel: exec_mach_imgact: not running binary "shortcuts" built against preview arm64e ABI
2025-04-12 18:38:48.855481 syspolicyd: (Security) SecTrustEvaluateIfNecessary
2025-04-12 18:38:48.857970 syspolicyd: [com.apple.syspolicy.exec:default] GK evaluateScanResult: 2, PST: (path: /usr/bin/shortcuts), (team: (null)), (id: (null)), (bundle_id: (null)), 0, 0, 1, 0, 1, 1, 0evaluateScanResult: 2, PST: (path: /usr/bin/shortcuts), (team: (null)), (id: (null)), (bundle_id: (null)), 0, 0, 1, 0, 1, 1, 0
I used Time Machine to compare the binary's entitlements between 14.7.4 and 14.7.5, and looks like in 14.7.5 /usr/bin/shortcuts indeed is missing the com.apple.private.security.restricted-application-groups entitlement that 14.7.4 had. The old binary had these two entitlements that the new one doesn't:
[Key] com.apple.private.security.restricted-application-groups
[Value]
[Array]
[String] group.com.apple.shortcuts
[String] group.is.workflow.my.app
[String] group.is.workflow.shortcuts
[Key] com.apple.security.application-groups
[Value]
[Array]
[String] group.com.apple.shortcuts
[String] group.is.workflow.my.app
[String] group.is.workflow.shortcuts
Is there a sensible workaround for this (and by "sensible" I mean something that'd allow me to keep using the tool)?
(I already asked this on the support forums but I figured I might as well ask here too)
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
Entitlements
Shortcuts
Code Signing
Command Line Tools
After the Update of Latest Command Line Tools 16.3 I am facing issue to compile C++ programs. Like it is giving some kind of library error in the MACOSX15.sdk file and this is the error.
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/machine/_structs.h:35,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/arm/_mcontext.h:36,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/machine/_mcontext.h:34,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/signal.h:146,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:109,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_stdlib.h:70,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/stdlib.h:58,
from /opt/homebrew/Cellar/gcc/14.2.0_1/include/c++/14/cstdlib:79,
from /opt/homebrew/Cellar/gcc/14.2.0_1/include/c++/14/stdlib.h:36,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/assert.h:44,
from /opt/homebrew/Cellar/gcc/14.2.0_1/include/c++/14/cassert:44,
from /opt/homebrew/Cellar/gcc/14.2.0_1/include/c++/14/aarch64-apple-darwin24/bits/stdc++.h:33,
from 1.cpp:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:627:35: error: expected primary-expression before 'unsigned'
627 | } __attribute__((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:627:26: error: '_Alignof' was not declared in this scope
627 | } __attribute__((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:633:35: error: expected primary-expression before 'unsigned'
633 | } __attribute__((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:633:26: error: '_Alignof' was not declared in this scope
633 | } __attribute__((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:639:35: error: expected primary-expression before 'unsigned'
639 | } __attribute__((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:639:26: error: '_Alignof' was not declared in this scope
639 | } __attribute__((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:645:35: error: expected primary-expression before 'unsigned'
645 | } __attribute__((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:645:26: error: '_Alignof' was not declared in this scope
645 | } __attribute__((aligned(_Alignof(unsigned int))));
But after downgrading the version to 16.2 it works fine. I can't understand that it's their any issue with Command Line Tools 16.3??
Hi there,
When using devicectl to manage files:
It's unclear for which domains the username should be provided
It's unclear how to determine the username
Listing files
USAGE: devicectl device info files [<options>] --device <uuid|ecid|serial_number|udid|name|dns_name> --domain-type <domain-type>
FILE OPTIONS:
--username <username> The username of the user we should target. Only relevant for certain domains.
--domain-type <domain-type>
The file service domain. Valid values are: temporary, appDataContainer, appGroupDataContainer, systemCrashLogs. You must specify a valid domain and
identifier pair. Certain domains must be accompanied by an identifier that provides additional context. For example, if the domain is an app data
container, the identifier is the bundle ID of the app. For temporary directories, the identifier is a unique client-provided string which is used to
get your own space, separate from those of other clients.
--domain-identifier <domain-identifier>
A unique string used to provide additional context to the domain.
--username The username of the user we should target. Only relevant for certain domains.
In the domains, the username requirements are not mentioned.
Copying files
USAGE: devicectl device copy to --device <uuid|ecid|serial_number|udid|name|dns_name> --source <source> [--destination <destination>] [--user <user>] --domain-type <domain-type> [--domain-identifier <domain-identifier>] [--remove-existing-content <remove-existing-content>] [--verbose] [--quiet] [--timeout <seconds>] [--json-output <path>] [--log-output <path>]
DEVICE OPTIONS:
-d, --device <uuid|ecid|serial_number|udid|name|dns_name>
The identifier, ECID, serial number, UDID, user-provided name, or DNS name of the device.
FILE OPTIONS:
--source <source> The item which should be copied.
--destination <destination>
The location to which the item should be copied.
-u, --user <user> The name of the user we should target. Only relevant for certain domains.
--domain-type <domain-type>
The file service domain. Valid values are: temporary, appDataContainer, appGroupDataContainer, systemCrashLogs. You must specify a valid domain and
identifier pair. Certain domains must be accompanied by an identifier that provides additional context. For example, if the domain is an app data
container, the identifier is the bundle ID of the app. For temporary directories, the identifier is a unique client-provided string which is used to
get your own space, separate from those of other clients.
--domain-identifier <domain-identifier>
A unique string used to provide additional context to the
-u, --user The name of the user we should target. Only relevant for certain domains.
The "certain domains" are not specified.
user vs username
The list files command takes:
--username <username> The username of the user we should target. Only relevant for certain domains
The copy command takes:
-u, --user <user> The name of the user we should target. Only relevant for certain domains.
Is there a difference between username and user?
How do we figure out the user or username?
From https://developer.apple.com/forums/thread/749649 I learned that about the "mobile" value, but why, and how?
It would help if these arguments could be explained in more detail.
I installed MacOS Sequoia 15.4 and now my backup script no longer works.
My script is using rsync in this way:
rsync -avz —delete —log-file=“$LOG_FILE” “$SRC_DIR” “$DEST_DIR”
This has been working fine for a very long time.
After updating to 15.4, this produces the error “rsync: unrecognized action —log-file=/users/admin/logs/backuplog_xxx.log”.
The log file path is correct (and hasn’t changed).
Interestingly, the man page for rsync no longer shows the —log-file as an option.
I know I can use:
rsync -avz —delete “$SRC_DIR” “$DEST_DIR” > “$LOG_FILE”`
or even
rsync -avz —delete “$SRC_DIR” “$DEST_DIR” > “$LOG_FILE” 2>&1`
to also capture stderr.
However, I liked the output from the built-In log option.
Does anyone know why this might have been removed or if there is a way to get it back?
Thanks.
I'm encountering an issue while trying to build my iOS app in Xcode for the simulator.
Issue:
Xcode Version: 15.x
macOS Version: 14.x (Sonoma)
Simulator: iPhone 16 Pro
Error Message: Command ClangStatCache failed with a nonzero exit code
Steps Taken:
Cleaned build folder (Shift + Cmd + K)
Deleted DerivedData (rm -rf ~/Library/Developer/Xcode/DerivedData)
Updated Xcode and checked iOS SDK updates
Disabled Clang Static Analyzer Cache
None of these steps resolved the issue. Any help would be appreciated!
Thanks in advance.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Developer Tools
Xcode Static Analyzer
Simulator
Command Line Tools
DocC supports treating build warnings as errors using the --warnings-as-errors flag. Is there a way to pass this flag to xcodebuild docbuild command or do I need to use xcrun docc convert after generating the symbol graph?
% mkdir /tmp/test
% cd /tmp/test
% touch {a,b,c}{1,2,3,4,5,6}.txt
% lf
a1.txt a3.txt a5.txt b1.txt b3.txt b5.txt c1.txt c3.txt c5.txt
a2.txt a4.txt a6.txt b2.txt b4.txt b6.txt c2.txt c4.txt c6.txt
% echo [b-z]*.txt
a1.txt a2.txt a3.txt a4.txt a5.txt a6.txt b1.txt b2.txt b3.txt b4.txt b5.txt b6.txt c1.txt c2.txt c3.txt c4.txt c5.txt c6.txt
I filed FB16715590 about this. I have a vague memory this might be related to some code to pretend to be case insensitive, but I can't find it now.
I'm calling this command to export archive:
xcodebuild -exportArchive -archivePath .build/XYZ.xcarchive -exportPath .build/XYZ.ipa -exportOptionsPlist Authenticator/ExportOptions.plist -quiet -allowProvisioningUpdates
Here is my exportOptions file content
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store-connect</string>
<key>signingStyle</key>
<string>automatic</string>
<key>teamID</key>
<string>ABCD</string>
</dict>
</plist>
Most of the time this command fail with this error:
error: exportArchive No Accounts
error: exportArchive No signing certificate "iOS Distribution" found
What we found is that our Apple ID just disappear from Xcode and we need to add it again manually.
So there are two questions here:
Why Apple ID account dissapears and how I can fix this?
Is there an option to not use Apple ID account in Xcode and for example to use -authenticationKeyID flags of xcodebuild?
Just to mention this happens only on our CI machine and not locally.
Xcode 16.2 Framework Signing Issues with Cloud Managed Developer ID in Automated Builds
Issue Description
After upgrading from Xcode 15.4 to 16.2, our macOS app's frameworks are failing notarization with the error "The binary is not signed with a valid Developer ID certificate" for embedded frameworks when building through fastlane. This worked correctly in Xcode 15.4. Importantly, manually archiving and notarizing through the Xcode GUI still works correctly - the issue only occurs during automated builds.
Build Configuration
We use fastlane to build and notarize our macOS app:
build_mac_app(
scheme: 'Runner',
export_method: "developer-id",
xcargs: '-allowProvisioningUpdates'
)
This generates the following xcodebuild commands:
Archive:
xcodebuild -workspace ./Runner.xcworkspace -scheme Runner -destination 'generic/platform=macOS' -archivePath /path/to/archive -allowProvisioningUpdates archive
Export with plist:
xcrun -exportArchive -exportOptionsPlist '/path/to/plist' -archivePath /path/to/archive -exportPath '/output/path' -allowProvisioningUpdates
Export options plist contents:
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
&lt;key&gt;installerSigningCertificate&lt;/key&gt;
&lt;string&gt;Developer ID Installer: Company Inc (1234567891)&lt;/string&gt;
&lt;key&gt;method&lt;/key&gt;
&lt;string&gt;developer-id&lt;/string&gt;
&lt;key&gt;signingStyle&lt;/key&gt;
&lt;string&gt;automatic&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;
Notarization:
ditto -c -k --rsrc --keepParent "My App.app" "My App.app.zip"
xcrun notarytool submit "My App.app.zip" --output-format json --wait --key /path/to/key --key-id ABCDEFGHIJ --issuer 12345678-abcd-1234-5678-fc2d96b1735a
Error Output
Notarization fails with the following errors:
{
"severity": "error",
"code": null,
"path": "My App.app.zip/My App.app/Contents/Frameworks/some_package.framework/Versions/A/some_package",
"message": "The binary is not signed with a valid Developer ID certificate.",
"docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
"architecture": "arm64"
}
Key Details
Using Xcode Cloud managed Developer ID certificates (not local certificates)
✅ Building, archiving, and notarizing through Xcode GUI works correctly
Automatic signing is enabled
Expected Behavior
Frameworks should be automatically signed with the cloud managed Developer ID certificate during the export process, as they were in Xcode 15.4.
Has there been a change in how framework signing is handled with cloud managed certificates in Xcode 16.2's command line tools? Any guidance on how to ensure frameworks are properly signed during automated builds when using automatic signing with cloud managed Developer ID certificates would be appreciated.
Topic:
Developer Tools & Services
SubTopic:
Xcode Cloud
Tags:
Code Signing
Command Line Tools
Notarization
Developer ID
I recently wrote an article on getting gtk auto complete/syntax highlighting on macOS
its a genuinely fun hobby to make portable software, and this method will ultimately help in porting software to the macOS platform
a copy and paste:
before I continue, I want to mention that emacs auto completion, using company-mode, is rather slow when it comes to parsing a ton files, and in some configurations, especially recursively when it comes to parsing and displaying functions and macros, even when using the semantic auto complete system, but I do believe it speeds up when you initially parse and save to ctags or when you build a semanticdb, functions such as g_signal_connect() and macros such as G_APPLICATION however, did not work with company modes auto complete, but worked with flycheck on the fly syntax checking, using this method, and I haven’t had time to perfect an emacs configuration; maybe some time next week
you will need gtk installed from brew or ports, since gtk has trouble compiling from source on some Mac configurations. this method works with whatever version of gtk is reported by pkg-config –cflags (pkg-config --cflags gtk. you will also need pkg-config installed, multiple installations of gtk can be used and utilized
but the emacs plugins you’ll need are (and you’ll need to connect to Melpa using list-packages https://melpa.org/#/getting-started to have these automatically downloaded and configured):
company
company-c-headers
flycheck
flycheck-pkg-config
exec-path-from-shell (this allows x11emacs to read the shells configuration, may be option for terminal based emac uses)
optional: function-args-mode, but when fa-show-auto is used, it breaks themes in emacs
download all of them through M-x list-packages (which means pressing alt+x, macOS option+x, which should issue an input on the bottom of emacs, where the status bar is), after that, type list-packages or use auto completion, aka ctrl+tab to cycle through possible candidates
open a c file (C-f ~/test.c) (which is control+x, macOS control+x)
type in:
M-x semantic-mode
M-x semantic-customize-system-include-path
in semantic-customize-system-include-path, add the path to the gtk version you intend to develop for, in my case /opt/homebrew/Cellar/gtk4/4.16.12/include/gtk-4.0 using the text based interface; you should be able to use your mouse (click ins after where it says /usr/include. semantic is included in emacs. options are automatically saved at command)
M-x exec-path-from-shell-initialize
M-x flycheck-mode
M-x flycheck-pkg-config
in flycheck-pkg-config, press enter, and then type the name of the version of gtk that provides valid input from pkg-config (ie gtk4)
M-x global-company-mode
if you need to bind ctrl+tab to auto complete, you can add this to your config (~/.emacs.d/init.el)
(global-set-key (kbd “C-”) ‘company-semantic)
this will do most of the grunt work when plugins are installed (ctrl-tab shows a window to auto complete, ctrl+` (thats the key before 1, with shift it becomes ~) shows function argument. fa-show-auto automatically shows function prototypes, but can break emacs themes:
(require ‘package)
(add-to-list ‘package-archives ‘(“melpa” . “https://melpa.org/packages/”) t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See package-archive-priorities
;; and package-pinned-packages. Most users will not need or want to do this.
;;(add-to-list ‘package-archives ‘(“melpa-stable” . “https://stable.melpa.org/packages/”) t)
(package-initialize)
(global-company-mode t)
(global-flycheck-mode t)
(semantic-mode t)
(function-args-mode)
(global-company-mode t)
(global-flycheck-mode t)
(semantic-mode t)
(function-args-mode)
(global-set-key (kbd “C-”) ‘company-semantic)
(global-set-key (kbd “C-`”) ‘fa-show)
if you need to compile from inside emacs, I would make a Makefile according to the gtk tutorial on gtk.org
I also have another article on getting Xcode to work with gtk, which is more reliable: https://unix-world.com/2025/01/25/getting-gtk4-to-work-in-xcode-with-auto-complete-and-syntax-highlighting/
website is unix-world.com and I welcome any and all traffic !
Whenever I run anything in xcode it opens an extra terminal that runs the program then exits immediately, but the app still runs through the normal xcode launch. It's not a huge issue but It's getting really annoying to realize I have like 7 windows of terminal open that are just doing nothing.
Has anyone had this issue before?