Post not yet marked as solved
Hello,
It looks like the softwareupdate CLI is having different behaviours, depending on the architecture it runs on, when trying to install OS patches:
Intel works as expected and is able to install both OS patches and software patches (e.g. Safari), silently, without the need of any user interaction
ARM (M1) requires the end-user to input the root password, in order to install OS patches, but works as expected for software patches (e.g. Safari) - doesn't need any user interaction
Need to mention that the above happens only on macOS Big Sur, for example updating 12.3 to 12.4.
Is this an expected behaviour? Anyone else seeing this? Wondering why the additional step, for inputting the credentials, is required.
I know there were mentions of softwareupdate being deprecated, but if this is happening, does anyone know if Apple would provide other means of installing OS patches automatically, but orchestrated? Maybe some Swift / ObjectiveC / C++ APIs?
Thank you
Post not yet marked as solved
I have a command line tool that zsh refuses to run when built for Apple Silicon or as a univerisal binary (the specific message is zsh: killed TOOL_NAME). I can only get it to run if I build it exclusively for Intel/Rosetta.
Running/debugging from within Xcode works fine for any architecture.
The tool is a very simple C/C++ unix command-line tool; it doesn't have any external dependencies beyond the C runtime and the C++ STL.
I suspect something in code signing is going awry, but I've tried various team and certificate combinations without any luck. I've also tried enabling/disabling the app sandbox, also without any luck. (The app is not for distribution so it doesn't really need to be code signed at all.)
Any suggestions?
Post marked as Apple Recommended
Hello!
We have some resources included as part of our test target like so:
.testTarget(
name: "MyProjectTests",
dependencies: ["MyProject"],
resources:
							[.process("Assets/Test_5s.mov")])
However, when running the following command:
swift package generate-xcodeproj the generated package does not include the assets. Additionally the code to access the resources won't compile because there is no auto-generated file to provide the 'module' extension for 'Bundle'.
Bundle.module.url(forResource: "Test_5s", withExtension: "mov")
results in a "Type 'Bundle' has no member 'module'" compilation error.
Is this a known issue, or am I approaching this incorrectly if I want to have a project for the package?
Currently using Xcode 12 beta 2
Post not yet marked as solved
I’m using Xcode 12.2 to build a tool I normally run from a script. (Previously on macOS 10.14 and earlier.)
When I build and run it from Xcode, it runs fine.
If I try to run it from Terminal, I get the message
Killed
This is the first time I’ve used Big Sur, do I now need to worry about signing my own tool? I’ve attempted to have Xcode manage this, and Sign to Run Locally. But nothing seems to make a difference.
How can I build a program to be run from command line, for Apple Silicon?
Post not yet marked as solved
I have updated Xcode to Version 13.4.1 (13F100), Then tried to run an existing iOS project.
This repetitively occurs even if I press the "Install" button.
Showing All Messages
failed to read asset tags: The command `(cd /Volumes/Code/Git/Bulseye && /usr/bin/actool --print-asset-tag-combinations --output-format xml1 '/Volumes/Code/Git/Bulseye/Bulseye/Preview Content/Preview Assets.xcassets' /Volumes/Code/Git/Bulseye/Bulseye/Assets.xcassets)` exited with status 72. The command's standard error was:
actool: error: Failed to locate 'actool'.
xcode-select: Failed to locate 'actool', requesting installation of command line developer tools.
Post not yet marked as solved
I have an .app which I want to distribute on the AppStore. The AppStore page is set up. I would like to upload a first build. I create a .pkg file with
pkgbuild --install-location ~/Applications --component ./AppName.app ./PkgFileName.pkg
This succeeds, and if I run this file created locally it correctly installs in the applications folder. After this I would like to validate this file with altool:
xcrun altool --validate-app -f ./PkgFileName.pkg -t osx -u <my_apple_id> -p @keychain:"altoolpass"
This fails with the following message:
*** Error: Validation failed for 'PkgFileName.pkg'.
*** Error: Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in ‘PkgFileName.pkg’. Unable to validate your application. (-21017)
{
NSLocalizedDescription = "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in \U2018<app_name>\U2019.";
NSLocalizedFailureReason = "Unable to validate your application.";
}
I'm stumped by this, because the original .app file contains an Info.plist in .app/Contents/Info.plist, and this file has the CFBundleIdentifier key, and the value is the same as we set up on the AppStore page. Why is it still giving me this error?
Post not yet marked as solved
How to take multiple inputs separated by space in swift??
Post not yet marked as solved
I am attempting to build an AR app using Storyboard and SceneKit. When I went to run an existing app I have already used it runs but nothing would happen. I thought this behavior was odd so I decided to start from scratch on a new project. I started with the default AR project for Storyboard and SceneKit and upon run it immediately fails with an unwrapping nil error on the scene. This scene file is obviously there. I am also given four build time warnings:
Could not find bundle inside /Library/Developer/CommandLineTools
failed to convert file with failure reason: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
Conversion failed, will simply copy input to output.
Copy failed file:///Users/kruegerwilliams/Library/Developer/Xcode/DerivedData/ARtest-bjuwvdjoflchdaagofedfxpravsc/Build/Products/Debug-iphoneos/ARtest.app/art.scnassets/ship.scn -> file:///Users/kruegerwilliams/Library/Developer/Xcode/DerivedData/ARtest-bjuwvdjoflchdaagofedfxpravsc/Build/Products/Debug-iphoneos/ARtest.app/art.scnassets/ship.scn error:Error Domain=NSCocoaErrorDomain Code=516 "“ship.scn” couldn’t be copied to “art.scnassets” because an item with the same name already exists." UserInfo={NSSourceFilePathErrorKey=/Users/kruegerwilliams/Library/Developer/Xcode/DerivedData/ARtest-bjuwvdjoflchdaagofedfxpravsc/Build/Products/Debug-iphoneos/ARtest.app/art.scnassets/ship.scn, NSUserStringVariant=(
I currently am unsure how to fix these errors? It appears as if they must be in the command line tools because after moving the device support files back to a stable version of Xcode the same issue is present. Is anyone else having these issues?
Post not yet marked as solved
I have a certificate and private key imported into the System Keychain which is used for client authentication in mTLS connections.
I can go into the Keychain Access UI and open up the options for the private key, navigate to the "Access Control List" tab and whitelist certain applications which have access to this key.
I am aware of the "security import" CLI command which allows me to set up the private key permissions using either the -A (allow all applications to access imported key) or -T (allow specific application to access imported key). But these only work for scenarios where I am importing a completely new Certificate + Private Key.
However, is there a way to make these "Access Control List" changes from a CLI command for a private key that is already present in the keychain?
I am deploying an application to a large number of machines and it is not feasible to have a manual step for adding the application to a whitelist in Keychain Access. Need to automate this stuff
Post not yet marked as solved
Running Xcode-select -v will display version 2384, however, no trace of it exists in the /Library/Developer folder, and it only shows up in usr/bin as an executable file. I've tried numerous ways of installing, updating and removing with no success. I'm running Big Sur 11.6. Anyone run into a problem like this with Xcode?
Post not yet marked as solved
To solve a dependency tangle on an app, I’m trying to write a simple command line tool that would display all the dependencies of a given app or library, and output it in a format suitable for post-processing by graphviz. The idea here is to collect and lay out the output of the otool -L utility, recursively called on all the dependencies of the target app/lib.
Unfortunately, when I try otool -L with, say, otool itself, I get this:
Dev > otool -L /usr/bin/otool
/usr/bin/otool:
/usr/lib/libxcselect.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.0.0)
Fine. But now:
otool -L /usr/lib/libxcselect.dylib
/Library/Developer/CommandLineTools/usr/bin/objdump: error: '/usr/lib/libxcselect.dylib': No such file or directory
Oops. Indeed, /usr/lib seems mostly empty, and most of what lies inside are links on missing (I assume: invisible) libs.
So my question is: where are all the libs gone, and it is possible to bring them back to the surface?
It looks like CoreBluetooth is completely broken in macOS 12 – at least for command line apps. I have a pretty simple scanning app and I no longer get any delegate calls for discovered devices. I DO get the "power up" state change delegate call though.
Any idea?
Post not yet marked as solved
sudo gem install cocoapods
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
cc -static file_name.c command is not working, it's showing an error
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
how to solve this error?
Post not yet marked as solved
Since the last update of xCode in my macbook m1 2021 and my mac mini m1 2021 i am facing with am build issue using the xcode command line tools:
Xcode build done. 55,3s
168Failed to build iOS app
169Error output from Xcode build:
170↳
171 objc[22207]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1fb051eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1080984f8). One of the two will be used. Which one is undefined.
172 objc[22207]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1fb051f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108098548). One of the two will be used. Which one is undefined.
173 objc[22207]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1fb051f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108098598). One of the two will be used. Which one is undefined.
174 objc[22207]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x1fb051fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1080985e8). One of the two will be used. Which one is undefined.
175 objc[22207]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x1fb051ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108098638). One of the two will be used. Which one is undefined.
176 objc[22207]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x1fb052040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108098688). One of the two will be used. Which one is undefined.
177 2022-04-14 22:34:54.390 xcodebuild[22207:90732] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
178 2022-04-14 22:34:54.390 xcodebuild[22207:90732] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
179 ** BUILD FAILED **
I saw a lot of workarround but they are not working in my case.
Any suggestion or update about the fix of this issue ?
Post not yet marked as solved
Is there a simple way to convert the 'new-style' JSON crash report into a human readable format through Terminal? Similar to how viewing it directly in Xcode or Console reverts it to the old-format.
I want to update my automation scripts to utilize the new CrashSymbolicator.py utility, but I'm having trouble easily reading its output.
Post not yet marked as solved
Hi,
I'm trying to build and upload an iOS app from the command line but when using altool to upload the IPA file, i get the following error:
Error: Could not determine the package’s bundle ID. The package is missing an Info.plist or the CFBundlePackageType is not ‘APPL’ or ‘FMWK’. Unable to validate your application. (-21017)
I'm building the app with the following steps:
xcodebuild archive -scheme MyApp -workspace ./ios/MyApp.xcworkspace -configuration Release -archivePath "~/Downloads/test.xcarchive"
xcodebuild -exportArchive -archivePath "~/Downloads/test.xcarchive" -exportOptionsPlist ./ios/MyApp/exportOptions.plist -exportPath "~/Downloads/test.ipa"
altool --upload-app -f "~/Downloads/test.ipa" --type ios -u "REDACTED" -p "REDACTED"
My Info.plist actually has a CFBundlePackageType key with the APPL value.
I noticed there is no Info.plist file in the output folder (~/Downloads/test.ipa/), but i'm not even sure it should have one.
My exportOption.plist file loks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>REDACTED</string>
</dict>
</plist>
I'm using XCode 13.4.
Thank you for your help
Post not yet marked as solved
Hello,
Using a MacBook Pro running Monterey 12.3.1, I uninstalled Xcode and the "Developer" folder. According to Terminal app there is no trace of Xcode or Command Tools, but I still keep on getting the warning to install a couple of huge updates: 13.3 and 13.4, which I do not need.
After some research I opened a case in Apple Communities where I got some interesting suggestions that did not work, and finally addressed Apple Support 101699894156, out of one of those suggestions.
I am not an IT guy, just a regular user, but I do use the Mac for my work.
Please tell me what can I do to cancel those updates since they are no use to me right now and really heavy on the drive.
Post not yet marked as solved
HI!
I've compiled a command line utility written in plain C on macOS Monterey on macBook m1 pro. The compilation command is just following:
clang -std=gnu11 -Wall -o my_run_ht run_ht.c ht.c
It compiles fine but when I try running it, it is aborted with the following message:
dyld[8385]: dyld cache '/System/Library/dyld/dyld_shared_cache_arm64e' not loaded: syscall to map cache into shared region failed
dyld[8385]: Library not loaded: /usr/lib/libSystem.B.dylib
Referenced from: /Users/sasha/Src/my/ht/run_ht
Reason: tried: '/usr/lib/libSystem.B.dylib' (no such file), '/usr/local/lib/libSystem.B.dylib' (no such file)
What is more strange that I can compile and run other command line utilities. So I'm quite puzzled and have no idea what is the reason for that and how to fix it.
Could anybody please help me with this?
Thanks in advance.
Post not yet marked as solved
Not really a "developer" question per se, but related to the Xcode developer tools as run on a new M1 Mac running Monterey (12.1).
When running various tools, such as "opendiff" I receive the following error reported on stderr:
objc[6599]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1e30deb90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108f7c2c8). One of the two will be used. Which one is undefined.
objc[6599]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1e30debe0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108f7c318). One of the two will be used. Which one is undefined.
I'm working on the assumption that two conflicting libraries have been installed that provide a definition for the same symbol, and (since the opendiff program loads and runs) that at least for now, both symbols are defined in a similar enough way that whichever one is actually loaded works.
I was at first very confused because there is actually no file on my system with the name /usr/lib/libauthinstall.dylib
While this makes the error message rather confusing, I found this thread https://developer.apple.com/forums/thread/692383 that makes clear that many of the files in /usr/lib in an earlier part of the release process are amalgamated, and I assume that libauthinstall.dylib is one of these files.
Given that this implies that the /usr/lib versions are likely the "more authoritative" versions, I am not actually sure why the directory /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework even exists -- I don't do any mobile development on this machine, so I assume that it came out of the setup, or possible from a migration of the user content from a machine running BigSur (content transferred using TimeMachine).
Does anyone have any ideas regarding:
(a) how this came about (as it appears that both sources are installed by Apple), and
(b) how I can remove the conflict.
I'm using opendiff in a project workflow and really don't want to see the workflow polluted with spurious error messages, not to mention the fragility of not being able to control which symbol these tools are actually using.
Thanks in advance for any thoughts.
EDIT: There are a number of posts around the 'net linking this error with "homebrew". I believe that this is at least partially a red herring, because:
a) I don't use homebrew (though I do use MacPorts) -- I avoid hombrew largely because of its plan to play in /usr while MacPorts keeps everything well out of the way in /opt
b) both of the named sources are from Apple.