Command Line Tools

RSS for tag

Command line tools allow for easy installation of open source software or development on UNIX within Terminal.

Posts under Command Line Tools tag

200 Posts

Post

Replies

Boosts

Views

Activity

Command Line Tools bundled Python 3.9.6 flagged by vulnerability scanner
We need guidance regarding the Python runtime bundled with Apple Command Line Tools. Environment: macOS Tahoe 26.5.2 (25F84) Xcode 26.6 (17F113) Device type: Mac Command Line Tools Python path: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/ Version confirmed locally with: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3 --version Output: Python 3.9.6 Our vulnerability-management platform, Qualys, reports this Apple Command Line Tools Python runtime as vulnerable under QID 387170, referencing CVE-2022-4303 and CVE-2023-0286. The detection points to: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Resources/Python.app My understanding is that this runtime is bundled and managed by Apple as part of Command Line Tools, and that manually replacing or modifying this framework is not a supported remediation path. Installing a separate standalone Python version also does not remediate the finding at this Apple-managed path. Could Apple or the community confirm the supported approach for this scenario? Specifically: Is Python 3.9.6 intentionally bundled with the current Command Line Tools release for this macOS/Xcode version? Has Apple applied security fixes or backports to this bundled Python runtime that are not reflected in the upstream Python version number? Is updating Command Line Tools/Xcode the only supported remediation method for this component? Is manually replacing or modifying the bundled Python framework unsupported? Is there any known mitigation or official guidance for vulnerability-management exceptions while waiting for an Apple-provided update? I have also filed this through Feedback Assistant: FB23893693. Any official Apple guidance or reference to existing documentation would be very helpful, as we need to provide an auditable response to our internal security and audit teams.
14
0
1.9k
1d
Xcode 27.0 Metal Toolchain download stuck at "Beginning asset download..."
Hi everyone, I downloaded Xcode 27.0 today because I need the Metal Toolchain for Unreal Engine 5.6 on my Mac. Xcode itself is installed and working, but Unreal is having issues because the Metal Toolchain doesn't seem to be installed. When I run: xcrun metal --version I get: error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain I tried: sudo xcodebuild -downloadComponent MetalToolchain but it just stays on: Beginning asset download... If I cancel it, I get: xcodebuild: error: Download was cancelled. (Asset download for com.apple.MobileAsset.MetalToolchain ...) I've also run: xcodebuild -runFirstLaunch and installed the latest Command Line Tools for Xcode 27.0 through Software Update. xcrun --find metal does find the executable, but the actual Metal Toolchain appears to be missing. I'm mainly trying to get this working so I can use Unreal Engine 5.6. Has anyone had this issue with Xcode 27, or know the correct way to install the Metal Toolchain when xcodebuild -downloadComponent gets stuck at "Beginning asset download"? Thanks!
0
0
77
3d
Orphaned 9GB Simulator Runtime in /System/Library/AssetsV2 - Cannot Delete (SIP protected)
I have an orphaned asset folder taking up 9.13GB located at: /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/c0d3fd05106683ba0b3680d4d1afec65f098d700.asset It contains SimulatorRuntimeAsset version 18.5 (Build 22F77). Active Version: My current Xcode setup is using version 26.2 (Build 23C54). I checked the plist files in the directory and found what seems to be the cause of the issue: The "Never Collected" Flag: The Info.plist inside the orphaned asset folder explicitly sets the garbage collection behavior to "NeverCollected": <key>__AssetDefaultGarbageCollectionBehavior</key> <string>NeverCollected</string> The Catalog Mismatch: The master catalog file (com_apple_MobileAsset_iOSSimulatorRuntime.xml) in the parent directory only lists the new version (26.2). Because the old version (18.5) is missing from this XML, Xcode and mobileassetd seem to have lost track of it entirely. What I Have Tried (All Failed) Xcode Components: The version 18.5 does not appear in Settings -> Components, so I cannot delete it via the GUI. Simctl: xcrun simctl list runtimes does not list this version. Running xcrun simctl runtime delete 22F77 fails with: "No runtime disk images or bundles found matching '22F77'." Manual Deletion: sudo rm -rf [path] fails with "Operation not permitted", presumably because /System/Library/AssetsV2 is SIP-protected. Third-party Tools: Apps like DevCleaner do not detect this runtime (likely because they only scan ~/Library or /Library, not /System/Library). Has anyone found a way to force the system (perhaps via mobileassetd or a specific xcrun flag) to re-evaluate this folder and respect a deletion request? I am trying to avoid booting into Recovery Mode just to delete a cache file. Any insights on how AssetsV2 handles these "orphaned" files would be appreciated.
27
16
8.5k
5d
Unable to install iOS 18 simulator using xcodebuild 27
We are planning to upgrade our CI setup to run on Xcode 27, but we want to run tests on several older iOS simulator runtimes: 26, 18, 17… With Xcode 26.6, we had no trouble installing the needed runtimes by running: $ xcodebuild -downloadPlatform iOS -buildVersion 18.6 $ xcodebuild -downloadPlatform iOS -buildVersion 17.5 $ xcodebuild -downloadPlatform iOS -buildVersion 16.4 When using Xcode 27.0 (27A266a), however, the command fails to work for any runtime older than iOS 26.0: $ xcodebuild -downloadPlatform iOS -buildVersion 18.6 Finding content... iOS 18.6 is not available for download. At the same time, the runtimes can be installed just fine by using the "Add Platforms…" dialog from the Components pane in Xcode settings. Unfortunately, that's not an option in a headless CI machine. The same issue also reproduces in the beta versions 27.1 (27A9269) and 27.2 (27B5019j), and regardless of macOS version (26.7 or 27.0). Any idea how to work around the issue? I wonder if's a broken backend configuration or a regression in Xcode 27? Posted as FB24836279.
0
2
179
1w
Xcode Command Line Tools update not wanted, but persists
I am running Tahoe 26.4.1 on a MacBook Air, M4, 2025. In System Settings, I have an item heading of Software Update Available. Clicking on that brings up "Command Line Tools for Xcode 26.4". The only available choices are to Update Now or Cancel. In the past, I was developing a game, but have quit working on that, and deleted Xcode and Command Line Tools. Wanting the "Command Line Tools ..." line to disappear from System Settings, I called Apple Support, and at their request have followed the steps in "https://developer.apple.com/documentation/xcode/installing-the-command-line-tools" to delete this entry in System Settings, namely the 2 sudo's in that article under the section "Uninstall the command line tools". This did not cause the "Command Line Tools for Xcode 26.4" line in System Settings to disappear (as I was told by Apple support that it would, because I would be deleting the receipt). In Terminal, I did indeed receive a response of "No receipt for 'com.apple.dt.commandlinetools' found at '/'.". I have called developer support, but the individual I spoke with had no useful guidance on how to finish this issue, except to post to the Forum. I would appreciate any guidance on how to delete the "Command Line Tools ..." entry from System Settings.
16
0
1.4k
1w
rvictl broken on iOS 27 Beta3
Using rvictl with iOS 27 beta3 doesn't work anymore. RVICTL reports a successful creation of the remote virtual interface, but the interface rvi0 fails to spawn. rvictl -s Starting device [SUCCEEDED] with interface rvi0 rvictl -l Could not get list of devices iPhone 16 pro iOS 27 Beta3 macOS 27 Xcode 27 beta Confirmed that the command still works on iOS 26.6 on an iPhone 15 Pro.
2
0
540
Jul ’26
CoreSimulator runtime registry becomes inconsistent after upgrading to macOS 27 beta 2: simctl list runtimes reports an old runtime that cannot be deleted
Environment • macOS 27 beta 2 • Xcode 27 beta • Apple Silicon Mac Summary After upgrading to macOS 27 beta 2 and Xcode 27 beta, an old iOS 18.5 simulator runtime remains registered internally but cannot be removed. There appears to be an inconsistency between different CoreSimulator commands. Observed Behavior xcrun simctl runtime list only reports the current runtime: == Disk Images == -- iOS -- iOS 26.1 (23B86) - 0753590B-CF3F-4944-899E-4F70698DB87C (Ready) Total Disk Images: 1 (7.8G) However, xcrun simctl list runtimes -j still reports an additional runtime: identifier: com.apple.CoreSimulator.SimRuntime.iOS-18-5 SimulatorVersion: 18.5 Build: 22F77 bundlePath: /Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime runtimeRoot: /Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot The runtime is reported as: "isAvailable": true The runtime no longer appears anywhere in Xcode. Attempting to remove it using the documented command fails: xcrun simctl runtime delete 22F77 Output: No runtime disk images or bundles found matching '22F77'. No matching images found to delete Using the runtime identifier also fails. The corresponding MobileAsset still exists: /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/ It contains: c0d3fd05106683ba0b3680d4d1afec65f098d700.asset Its Info.plist contains: SimulatorVersion = 18.5 Build = 22F77 Another asset exists for the current runtime: SimulatorVersion = 26.1 Build = 23B86 The directory /Library/Developer/CoreSimulator/Volumes/iOS_22F77 exists as an empty directory. It appears to become active only when CoreSimulator queries the runtime. The runtime asset is no longer referenced by /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/com_apple_MobileAsset_iOSSimulatorRuntime.xml Expected Result After upgrading Xcode/macOS: • old runtimes should either be removable through xcrun simctl runtime delete or • they should no longer remain registered if Xcode has already removed them. Actual Result Different CoreSimulator commands report different runtime states. simctl runtime list only reports iOS 26.1. simctl list runtimes -j still reports iOS 18.5 as available. The old runtime cannot be deleted using the official command. The MobileAsset remains on disk and occupies storage, but there appears to be no supported method to remove it. Notes This looks like CoreSimulator's runtime registry and the runtime deletion mechanism have become inconsistent after upgrading to macOS 27 beta 2 and Xcode 27 beta.
0
0
689
Jul ’26
Getting error that bundle version is not high enough (which isn't true)
A couple months ago, I got an error when attempting to deploy our app to App Store Connect (see error further below). I used the CLI command xcrun altool --upload-app, and I was trying to upload a new version 1.0.26 build 0, when the previous uploaded version was 1.0.25 build 2 (so the new version is definitely a higher number). I later tried to upload a version 1.0.27 build 1, and that still failed. Note that I have an identical staging app, and I was able to go from 1.0.25 build 2 to 1.0.26 build 0 just fine there. And I have never had issues with version incrementation in the past for either our production or staging app. What could be going wrong here? Here are the error logs: 2026-04-30 23:18:19.430 ERROR: [ContentDelivery.Uploader.6000012404C0] The provided entity includes an attribute with a value that has already been used (-19232) The bundle version must be higher than the previously uploaded version: ‘0’. (ID: 71a9077b-807a-476c-b8a2-04cb8357bc32) NSUnderlyingError : The provided entity includes an attribute with a value that has already been used (-19241) The bundle version must be higher than the previously uploaded version. status : 409 detail : The bundle version must be higher than the previously uploaded version. Failed to upload archive at '[MyApp].ipa'. source : pointer : /data/attributes/cfBundleVersion id : 71a9077b-807a-476c-b8a2-04cb8357bc32 code : ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE title : The provided entity includes an attribute with a value that has already been used meta : previousBundleVersion : 0 previousBundleVersion : 0 iris-code : ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE 2026-04-30 23:18:19.431 ERROR: [altool.6000012404C0] Failed to upload package. 2026-04-30 23:18:19.431 ERROR: [altool.6000012404C0] The provided entity includes an attribute with a value that has already been used (-19232) The bundle version must be higher than the previously uploaded version: ‘0’. (ID: 71a9077b-807a-476c-b8a2-04cb8357bc32) NSUnderlyingError : The provided entity includes an attribute with a value that has already been used (-19241) The bundle version must be higher than the previously uploaded version. status : 409 detail : The bundle version must be higher than the previously uploaded version. source : pointer : /data/attributes/cfBundleVersion id : 71a9077b-807a-476c-b8a2-04cb8357bc32 code : ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE title : The provided entity includes an attribute with a value that has already been used meta : previousBundleVersion : 0 previousBundleVersion : 0 iris-code : ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE
1
0
683
Jun ’26
Could Apple consider replacing traditional BSD utilities with uutils?
This idea is based on a few key points: GNU Coreutils has essentially become the de facto standard with the widespread adoption of GNU/Linux. Apple has been attracting modern developers by being 'Linux-like' (via POSIX-compliant), especially since Linux has largely won the race in the general-purpose Unix-like OS space. Adopting uutils would allow scripts to run much more seamlessly across macOS and Linux. uutils is compatible with GNU Coreutils, and its MIT license avoids the strict restrictions associated with GPLv3. By aligning base commands more closely with Linux, I think this would give macOS another compelling advantage over WSL2 for developers.
3
0
640
Jun ’26
Can DEVELOPER_DIR or xcode-select support Command Line Tools at custom paths?
I'm trying to manage multiple Command Line Tools versions side-by-side (e.g., 16.2 and 26.2). I renamed the CLT directory to /Library/Developer/CommandLineTools-26.2.0 and set: xcode-select -s /Library/Developer/CommandLineTools-26.2.0 or DEVELOPER_DIR=/Library/Developer/CommandLineTools-26.2.0 Both result in: c++: error: unable to find Xcode installation from active developer path "/Library/Developer/CommandLineTools-26.2.0" It appears CLT only works at the fixed path /Library/Developer/CommandLineTools, unlike Xcode which can be at any location. Is this by design? Is there a supported way to use multiple CLT versions in parallel, similar to how multiple Xcode versions can coexist?
2
0
869
May ’26
Falcon application is intermittently not detected using system_profiler command
Issue - Falcon application is intermittently not detected using system_profiler command Use case - We are trying to fetch the list of installed applications on macOS using the system_profiler command. While this works for most applications, we are observing inconsistent behavior with the Falcon application — it is sometimes detected as installed and sometimes missing from the results, even though it is present on the system. This inconsistency is causing issues in reliably tracking installed security software. Command used - /usr/sbin/system_profiler SPApplicationsDataType
0
0
1.1k
Apr ’26
xcodebuild fails if build tool plugins are installed
After having built the SwiftUI project numerous times from Xcode and allowing the plugins after the first build post install using xcodebuild -scheme <SchemeName> build fails with: The following build commands failed: Validate plug-in “SwiftLintBuildToolPlugin” in package “swiftlintplugins” Validate plug-in “OpenAPIGenerator” in package “swift-openapi-generator” How are we supposed to grant the plugins permission to run in the CLI? Everything I'm getting from Gemini is for packages, not apps.
0
0
373
Mar ’26
Can't specify platform version for xcodebuild download 26.x
Prior to iOS 26.0 we were able to download specific simulator runtimes from the command line by using a command like xcodebuild -downloadPlatform iOS -buildVersion 18.0 This is described in the documentation here. This no longer works for 26.x. If I run the following command: "xcodebuild -downloadPlatform iOS -buildVersion 26.0" it fails with the following error: "Finding content... iOS 26.0 is not available for download." If I omit the -buildVersion flag it will download the latest version, currently 26.2, but if I try and specify 26.2 as the buildVersion I still get "iOS 26.2 is not available for download". This behavior has been confirmed on Xcode 26.2. Perhaps related, it appears these runtimes are also no longer being made available for download on https://developer.apple.com/download/all
1
1
1.3k
Mar ’26
Built in ssh-add doesn't read ~/.ssh/config
I'm trying to authenticate to a git host using SSH keys stored in 1Password. I have ~/.ssh/config with mode 600 set with a symlink: Host * IdentityAgent "~/.1password/agent.sock" But ssh-add -l shows no identities. If I set $SSH_AUTH_SOCK, ssh-add -l works just fine. I'd love to not have to do this, though. Why doesn't ssh-add seem to read ~/.ssh/config? The built-in version is OpenSSH_10.0p2, LibreSSL 3.3.6. I've searched fruitlessly for an answer anywhere else.
0
0
688
Feb ’26
Inconsistency in returning nanoseconds in /bin/date
I am using macOS’s /bin/date command, both in Terminal and via AppleScript (do shell script). I noticed inconsistent behaviour with the %N format specifier for nanoseconds: • On some Macs, date +%s%N returns numeric nanoseconds as expected. • On other Macs, the same command returns a literal N or fails when coerced to a number. • This occurs across different macOS versions and on both Intel and Apple Silicon machines. My understanding is that macOS ships BSD date, which does not officially document %N. I am trying to determine: 1. Is %N in /bin/date officially supported on macOS, and if so, on which versions? 2. If %N is not supported, what is Apple’s recommended, portable method for obtaining sub-second or millisecond timestamps in shell scripts or AppleScript across all macOS versions?
1
0
900
Jan ’26
Package created with pkgbuild installs zero-byte file
Just recently, any pkg file that I create with pkgbuild will install the Payload's application as a zero-byte file in the /Applications directory. This has been working for years without issue for me. Here are the commands I am using with company specific items replaced: pkgbuild --analyze --root MyApplicationRootDirectory standalone.plist plutil -replace BundleIsRelocatable -bool NO standalone.plist pkgbuild --identifier MyIdentifier --version 1.0 --install-location /Applications --root MyApplicationRootDirectory --component-plist standalone.plist --sign 'Developer ID Installer: MyCompany (MySignId)' --timestamp installer.pkg Any ideas on what could be causing the issue? I have verified the following: The application being added to the pkg is both signed and notarized using the correct Developer ID Application certificate. The resultant pkg file is both signed and notarized using the Developer ID Installer certificate. Verified the pkg contents using "pkgutil --expand" to dump the contents. Verified the pkg's Payload contents by extracting the data using "cat Payload | gunzip | cpio -1". This results in an application file that is a binary match for file added in the "pkgbuild --root" argument. My application is the only file within the directory passed to the "pkgbuild --root" argument. There are no warnings in the System Settings / Privacy & Security Panel when running the package installer. I have a valid Mac Developer account. I am building the application and the pkg file on the same computer. Thank you for any insight.
6
0
606
Dec ’25
Activating application from Terminal occasionally fails on macOS 26
On macOS Tahoe 26 activating GUI apps from command-line often fails. It launches the app but not brings to the foreground as expected. For example, running the following commands in Terminal is expected to launch Pages and bring it to the foreground. open /Applications/Pages.app or osascript -e `tell application "Pages" to activate` Moreover, they sometimes not return in Terminal. These commands worked as expected until macOS 15 but no more in macOS 26. The tricky part is that this failure doesn't happen 100% of the time; it occurs randomly. However, since multiple users of my app have reported the same symptoms, and I can reproduce it not only with my app but also with apps bundled to macOS, I don't believe this is an issue specific to my environment alone. I’ve already filed this issue: FB21087054 Open version: https://github.com/1024jp/AppleFeedback/issues/87 However, I’d like to know if any workaround exists or my understanding is wrong, especially for case with osascript.
3
1
1.7k
Nov ’25
Command Line Tools bundled Python 3.9.6 flagged by vulnerability scanner
We need guidance regarding the Python runtime bundled with Apple Command Line Tools. Environment: macOS Tahoe 26.5.2 (25F84) Xcode 26.6 (17F113) Device type: Mac Command Line Tools Python path: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/ Version confirmed locally with: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3 --version Output: Python 3.9.6 Our vulnerability-management platform, Qualys, reports this Apple Command Line Tools Python runtime as vulnerable under QID 387170, referencing CVE-2022-4303 and CVE-2023-0286. The detection points to: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Resources/Python.app My understanding is that this runtime is bundled and managed by Apple as part of Command Line Tools, and that manually replacing or modifying this framework is not a supported remediation path. Installing a separate standalone Python version also does not remediate the finding at this Apple-managed path. Could Apple or the community confirm the supported approach for this scenario? Specifically: Is Python 3.9.6 intentionally bundled with the current Command Line Tools release for this macOS/Xcode version? Has Apple applied security fixes or backports to this bundled Python runtime that are not reflected in the upstream Python version number? Is updating Command Line Tools/Xcode the only supported remediation method for this component? Is manually replacing or modifying the bundled Python framework unsupported? Is there any known mitigation or official guidance for vulnerability-management exceptions while waiting for an Apple-provided update? I have also filed this through Feedback Assistant: FB23893693. Any official Apple guidance or reference to existing documentation would be very helpful, as we need to provide an auditable response to our internal security and audit teams.
Replies
14
Boosts
0
Views
1.9k
Activity
1d
Xcode 27.0 Metal Toolchain download stuck at "Beginning asset download..."
Hi everyone, I downloaded Xcode 27.0 today because I need the Metal Toolchain for Unreal Engine 5.6 on my Mac. Xcode itself is installed and working, but Unreal is having issues because the Metal Toolchain doesn't seem to be installed. When I run: xcrun metal --version I get: error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain I tried: sudo xcodebuild -downloadComponent MetalToolchain but it just stays on: Beginning asset download... If I cancel it, I get: xcodebuild: error: Download was cancelled. (Asset download for com.apple.MobileAsset.MetalToolchain ...) I've also run: xcodebuild -runFirstLaunch and installed the latest Command Line Tools for Xcode 27.0 through Software Update. xcrun --find metal does find the executable, but the actual Metal Toolchain appears to be missing. I'm mainly trying to get this working so I can use Unreal Engine 5.6. Has anyone had this issue with Xcode 27, or know the correct way to install the Metal Toolchain when xcodebuild -downloadComponent gets stuck at "Beginning asset download"? Thanks!
Replies
0
Boosts
0
Views
77
Activity
3d
Orphaned 9GB Simulator Runtime in /System/Library/AssetsV2 - Cannot Delete (SIP protected)
I have an orphaned asset folder taking up 9.13GB located at: /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/c0d3fd05106683ba0b3680d4d1afec65f098d700.asset It contains SimulatorRuntimeAsset version 18.5 (Build 22F77). Active Version: My current Xcode setup is using version 26.2 (Build 23C54). I checked the plist files in the directory and found what seems to be the cause of the issue: The "Never Collected" Flag: The Info.plist inside the orphaned asset folder explicitly sets the garbage collection behavior to "NeverCollected": <key>__AssetDefaultGarbageCollectionBehavior</key> <string>NeverCollected</string> The Catalog Mismatch: The master catalog file (com_apple_MobileAsset_iOSSimulatorRuntime.xml) in the parent directory only lists the new version (26.2). Because the old version (18.5) is missing from this XML, Xcode and mobileassetd seem to have lost track of it entirely. What I Have Tried (All Failed) Xcode Components: The version 18.5 does not appear in Settings -> Components, so I cannot delete it via the GUI. Simctl: xcrun simctl list runtimes does not list this version. Running xcrun simctl runtime delete 22F77 fails with: "No runtime disk images or bundles found matching '22F77'." Manual Deletion: sudo rm -rf [path] fails with "Operation not permitted", presumably because /System/Library/AssetsV2 is SIP-protected. Third-party Tools: Apps like DevCleaner do not detect this runtime (likely because they only scan ~/Library or /Library, not /System/Library). Has anyone found a way to force the system (perhaps via mobileassetd or a specific xcrun flag) to re-evaluate this folder and respect a deletion request? I am trying to avoid booting into Recovery Mode just to delete a cache file. Any insights on how AssetsV2 handles these "orphaned" files would be appreciated.
Replies
27
Boosts
16
Views
8.5k
Activity
5d
move files with mv command inside bash shell script
I have a shell script that moves files from one external drive to another. When I do the mv command from the terminal (which is iTerm2), I can do it. When I run the script from the terminal command prompt mv complains : rename, no such file or directory. I have given mv the full disk access permission iTerm2 has it too.
Replies
1
Boosts
0
Views
110
Activity
6d
Unable to install iOS 18 simulator using xcodebuild 27
We are planning to upgrade our CI setup to run on Xcode 27, but we want to run tests on several older iOS simulator runtimes: 26, 18, 17… With Xcode 26.6, we had no trouble installing the needed runtimes by running: $ xcodebuild -downloadPlatform iOS -buildVersion 18.6 $ xcodebuild -downloadPlatform iOS -buildVersion 17.5 $ xcodebuild -downloadPlatform iOS -buildVersion 16.4 When using Xcode 27.0 (27A266a), however, the command fails to work for any runtime older than iOS 26.0: $ xcodebuild -downloadPlatform iOS -buildVersion 18.6 Finding content... iOS 18.6 is not available for download. At the same time, the runtimes can be installed just fine by using the "Add Platforms…" dialog from the Components pane in Xcode settings. Unfortunately, that's not an option in a headless CI machine. The same issue also reproduces in the beta versions 27.1 (27A9269) and 27.2 (27B5019j), and regardless of macOS version (26.7 or 27.0). Any idea how to work around the issue? I wonder if's a broken backend configuration or a regression in Xcode 27? Posted as FB24836279.
Replies
0
Boosts
2
Views
179
Activity
1w
Xcode Command Line Tools update not wanted, but persists
I am running Tahoe 26.4.1 on a MacBook Air, M4, 2025. In System Settings, I have an item heading of Software Update Available. Clicking on that brings up "Command Line Tools for Xcode 26.4". The only available choices are to Update Now or Cancel. In the past, I was developing a game, but have quit working on that, and deleted Xcode and Command Line Tools. Wanting the "Command Line Tools ..." line to disappear from System Settings, I called Apple Support, and at their request have followed the steps in "https://developer.apple.com/documentation/xcode/installing-the-command-line-tools" to delete this entry in System Settings, namely the 2 sudo's in that article under the section "Uninstall the command line tools". This did not cause the "Command Line Tools for Xcode 26.4" line in System Settings to disappear (as I was told by Apple support that it would, because I would be deleting the receipt). In Terminal, I did indeed receive a response of "No receipt for 'com.apple.dt.commandlinetools' found at '/'.". I have called developer support, but the individual I spoke with had no useful guidance on how to finish this issue, except to post to the Forum. I would appreciate any guidance on how to delete the "Command Line Tools ..." entry from System Settings.
Replies
16
Boosts
0
Views
1.4k
Activity
1w
rvictl broken on iOS 27 Beta3
Using rvictl with iOS 27 beta3 doesn't work anymore. RVICTL reports a successful creation of the remote virtual interface, but the interface rvi0 fails to spawn. rvictl -s Starting device [SUCCEEDED] with interface rvi0 rvictl -l Could not get list of devices iPhone 16 pro iOS 27 Beta3 macOS 27 Xcode 27 beta Confirmed that the command still works on iOS 26.6 on an iPhone 15 Pro.
Replies
2
Boosts
0
Views
540
Activity
Jul ’26
Is Sandboxing possible for Command line app run with sudo
Hi Team, If I want to create a command line app in swift which needs to be invoked using sudo, will I be able to sandbox this app?
Replies
2
Boosts
0
Views
703
Activity
Jul ’26
CoreSimulator runtime registry becomes inconsistent after upgrading to macOS 27 beta 2: simctl list runtimes reports an old runtime that cannot be deleted
Environment • macOS 27 beta 2 • Xcode 27 beta • Apple Silicon Mac Summary After upgrading to macOS 27 beta 2 and Xcode 27 beta, an old iOS 18.5 simulator runtime remains registered internally but cannot be removed. There appears to be an inconsistency between different CoreSimulator commands. Observed Behavior xcrun simctl runtime list only reports the current runtime: == Disk Images == -- iOS -- iOS 26.1 (23B86) - 0753590B-CF3F-4944-899E-4F70698DB87C (Ready) Total Disk Images: 1 (7.8G) However, xcrun simctl list runtimes -j still reports an additional runtime: identifier: com.apple.CoreSimulator.SimRuntime.iOS-18-5 SimulatorVersion: 18.5 Build: 22F77 bundlePath: /Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime runtimeRoot: /Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot The runtime is reported as: "isAvailable": true The runtime no longer appears anywhere in Xcode. Attempting to remove it using the documented command fails: xcrun simctl runtime delete 22F77 Output: No runtime disk images or bundles found matching '22F77'. No matching images found to delete Using the runtime identifier also fails. The corresponding MobileAsset still exists: /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/ It contains: c0d3fd05106683ba0b3680d4d1afec65f098d700.asset Its Info.plist contains: SimulatorVersion = 18.5 Build = 22F77 Another asset exists for the current runtime: SimulatorVersion = 26.1 Build = 23B86 The directory /Library/Developer/CoreSimulator/Volumes/iOS_22F77 exists as an empty directory. It appears to become active only when CoreSimulator queries the runtime. The runtime asset is no longer referenced by /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/com_apple_MobileAsset_iOSSimulatorRuntime.xml Expected Result After upgrading Xcode/macOS: • old runtimes should either be removable through xcrun simctl runtime delete or • they should no longer remain registered if Xcode has already removed them. Actual Result Different CoreSimulator commands report different runtime states. simctl runtime list only reports iOS 26.1. simctl list runtimes -j still reports iOS 18.5 as available. The old runtime cannot be deleted using the official command. The MobileAsset remains on disk and occupies storage, but there appears to be no supported method to remove it. Notes This looks like CoreSimulator's runtime registry and the runtime deletion mechanism have become inconsistent after upgrading to macOS 27 beta 2 and Xcode 27 beta.
Replies
0
Boosts
0
Views
689
Activity
Jul ’26
Getting error that bundle version is not high enough (which isn't true)
A couple months ago, I got an error when attempting to deploy our app to App Store Connect (see error further below). I used the CLI command xcrun altool --upload-app, and I was trying to upload a new version 1.0.26 build 0, when the previous uploaded version was 1.0.25 build 2 (so the new version is definitely a higher number). I later tried to upload a version 1.0.27 build 1, and that still failed. Note that I have an identical staging app, and I was able to go from 1.0.25 build 2 to 1.0.26 build 0 just fine there. And I have never had issues with version incrementation in the past for either our production or staging app. What could be going wrong here? Here are the error logs: 2026-04-30 23:18:19.430 ERROR: [ContentDelivery.Uploader.6000012404C0] The provided entity includes an attribute with a value that has already been used (-19232) The bundle version must be higher than the previously uploaded version: ‘0’. (ID: 71a9077b-807a-476c-b8a2-04cb8357bc32) NSUnderlyingError : The provided entity includes an attribute with a value that has already been used (-19241) The bundle version must be higher than the previously uploaded version. status : 409 detail : The bundle version must be higher than the previously uploaded version. Failed to upload archive at '[MyApp].ipa'. source : pointer : /data/attributes/cfBundleVersion id : 71a9077b-807a-476c-b8a2-04cb8357bc32 code : ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE title : The provided entity includes an attribute with a value that has already been used meta : previousBundleVersion : 0 previousBundleVersion : 0 iris-code : ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE 2026-04-30 23:18:19.431 ERROR: [altool.6000012404C0] Failed to upload package. 2026-04-30 23:18:19.431 ERROR: [altool.6000012404C0] The provided entity includes an attribute with a value that has already been used (-19232) The bundle version must be higher than the previously uploaded version: ‘0’. (ID: 71a9077b-807a-476c-b8a2-04cb8357bc32) NSUnderlyingError : The provided entity includes an attribute with a value that has already been used (-19241) The bundle version must be higher than the previously uploaded version. status : 409 detail : The bundle version must be higher than the previously uploaded version. source : pointer : /data/attributes/cfBundleVersion id : 71a9077b-807a-476c-b8a2-04cb8357bc32 code : ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE title : The provided entity includes an attribute with a value that has already been used meta : previousBundleVersion : 0 previousBundleVersion : 0 iris-code : ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE
Replies
1
Boosts
0
Views
683
Activity
Jun ’26
Could Apple consider replacing traditional BSD utilities with uutils?
This idea is based on a few key points: GNU Coreutils has essentially become the de facto standard with the widespread adoption of GNU/Linux. Apple has been attracting modern developers by being 'Linux-like' (via POSIX-compliant), especially since Linux has largely won the race in the general-purpose Unix-like OS space. Adopting uutils would allow scripts to run much more seamlessly across macOS and Linux. uutils is compatible with GNU Coreutils, and its MIT license avoids the strict restrictions associated with GPLv3. By aligning base commands more closely with Linux, I think this would give macOS another compelling advantage over WSL2 for developers.
Replies
3
Boosts
0
Views
640
Activity
Jun ’26
C++ STL bug
Hello, everyone! I've discovered a bug similar to libstdc++/115939 in GCC. This bug exists for a while. Did someone face it too? I'd be glad to accept any advise. Thank you in advance!
Replies
9
Boosts
0
Views
786
Activity
May ’26
Can DEVELOPER_DIR or xcode-select support Command Line Tools at custom paths?
I'm trying to manage multiple Command Line Tools versions side-by-side (e.g., 16.2 and 26.2). I renamed the CLT directory to /Library/Developer/CommandLineTools-26.2.0 and set: xcode-select -s /Library/Developer/CommandLineTools-26.2.0 or DEVELOPER_DIR=/Library/Developer/CommandLineTools-26.2.0 Both result in: c++: error: unable to find Xcode installation from active developer path "/Library/Developer/CommandLineTools-26.2.0" It appears CLT only works at the fixed path /Library/Developer/CommandLineTools, unlike Xcode which can be at any location. Is this by design? Is there a supported way to use multiple CLT versions in parallel, similar to how multiple Xcode versions can coexist?
Replies
2
Boosts
0
Views
869
Activity
May ’26
Falcon application is intermittently not detected using system_profiler command
Issue - Falcon application is intermittently not detected using system_profiler command Use case - We are trying to fetch the list of installed applications on macOS using the system_profiler command. While this works for most applications, we are observing inconsistent behavior with the Falcon application — it is sometimes detected as installed and sometimes missing from the results, even though it is present on the system. This inconsistency is causing issues in reliably tracking installed security software. Command used - /usr/sbin/system_profiler SPApplicationsDataType
Replies
0
Boosts
0
Views
1.1k
Activity
Apr ’26
xcodebuild fails if build tool plugins are installed
After having built the SwiftUI project numerous times from Xcode and allowing the plugins after the first build post install using xcodebuild -scheme <SchemeName> build fails with: The following build commands failed: Validate plug-in “SwiftLintBuildToolPlugin” in package “swiftlintplugins” Validate plug-in “OpenAPIGenerator” in package “swift-openapi-generator” How are we supposed to grant the plugins permission to run in the CLI? Everything I'm getting from Gemini is for packages, not apps.
Replies
0
Boosts
0
Views
373
Activity
Mar ’26
Can't specify platform version for xcodebuild download 26.x
Prior to iOS 26.0 we were able to download specific simulator runtimes from the command line by using a command like xcodebuild -downloadPlatform iOS -buildVersion 18.0 This is described in the documentation here. This no longer works for 26.x. If I run the following command: "xcodebuild -downloadPlatform iOS -buildVersion 26.0" it fails with the following error: "Finding content... iOS 26.0 is not available for download." If I omit the -buildVersion flag it will download the latest version, currently 26.2, but if I try and specify 26.2 as the buildVersion I still get "iOS 26.2 is not available for download". This behavior has been confirmed on Xcode 26.2. Perhaps related, it appears these runtimes are also no longer being made available for download on https://developer.apple.com/download/all
Replies
1
Boosts
1
Views
1.3k
Activity
Mar ’26
Built in ssh-add doesn't read ~/.ssh/config
I'm trying to authenticate to a git host using SSH keys stored in 1Password. I have ~/.ssh/config with mode 600 set with a symlink: Host * IdentityAgent "~/.1password/agent.sock" But ssh-add -l shows no identities. If I set $SSH_AUTH_SOCK, ssh-add -l works just fine. I'd love to not have to do this, though. Why doesn't ssh-add seem to read ~/.ssh/config? The built-in version is OpenSSH_10.0p2, LibreSSL 3.3.6. I've searched fruitlessly for an answer anywhere else.
Replies
0
Boosts
0
Views
688
Activity
Feb ’26
Inconsistency in returning nanoseconds in /bin/date
I am using macOS’s /bin/date command, both in Terminal and via AppleScript (do shell script). I noticed inconsistent behaviour with the %N format specifier for nanoseconds: • On some Macs, date +%s%N returns numeric nanoseconds as expected. • On other Macs, the same command returns a literal N or fails when coerced to a number. • This occurs across different macOS versions and on both Intel and Apple Silicon machines. My understanding is that macOS ships BSD date, which does not officially document %N. I am trying to determine: 1. Is %N in /bin/date officially supported on macOS, and if so, on which versions? 2. If %N is not supported, what is Apple’s recommended, portable method for obtaining sub-second or millisecond timestamps in shell scripts or AppleScript across all macOS versions?
Replies
1
Boosts
0
Views
900
Activity
Jan ’26
Package created with pkgbuild installs zero-byte file
Just recently, any pkg file that I create with pkgbuild will install the Payload's application as a zero-byte file in the /Applications directory. This has been working for years without issue for me. Here are the commands I am using with company specific items replaced: pkgbuild --analyze --root MyApplicationRootDirectory standalone.plist plutil -replace BundleIsRelocatable -bool NO standalone.plist pkgbuild --identifier MyIdentifier --version 1.0 --install-location /Applications --root MyApplicationRootDirectory --component-plist standalone.plist --sign 'Developer ID Installer: MyCompany (MySignId)' --timestamp installer.pkg Any ideas on what could be causing the issue? I have verified the following: The application being added to the pkg is both signed and notarized using the correct Developer ID Application certificate. The resultant pkg file is both signed and notarized using the Developer ID Installer certificate. Verified the pkg contents using "pkgutil --expand" to dump the contents. Verified the pkg's Payload contents by extracting the data using "cat Payload | gunzip | cpio -1". This results in an application file that is a binary match for file added in the "pkgbuild --root" argument. My application is the only file within the directory passed to the "pkgbuild --root" argument. There are no warnings in the System Settings / Privacy & Security Panel when running the package installer. I have a valid Mac Developer account. I am building the application and the pkg file on the same computer. Thank you for any insight.
Replies
6
Boosts
0
Views
606
Activity
Dec ’25
Activating application from Terminal occasionally fails on macOS 26
On macOS Tahoe 26 activating GUI apps from command-line often fails. It launches the app but not brings to the foreground as expected. For example, running the following commands in Terminal is expected to launch Pages and bring it to the foreground. open /Applications/Pages.app or osascript -e `tell application "Pages" to activate` Moreover, they sometimes not return in Terminal. These commands worked as expected until macOS 15 but no more in macOS 26. The tricky part is that this failure doesn't happen 100% of the time; it occurs randomly. However, since multiple users of my app have reported the same symptoms, and I can reproduce it not only with my app but also with apps bundled to macOS, I don't believe this is an issue specific to my environment alone. I’ve already filed this issue: FB21087054 Open version: https://github.com/1024jp/AppleFeedback/issues/87 However, I’d like to know if any workaround exists or my understanding is wrong, especially for case with osascript.
Replies
3
Boosts
1
Views
1.7k
Activity
Nov ’25