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

96 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Jenkins xcodebuild -exportArchive error "Your session has expired. Please log in."
MacOS14.0 Xcode15.1(已登录开发者账号) Build with Jenkins(fastlane) 1.刚登录开发者账号几个小时内,功能正常;而后使用Jenkins构建时会出现"Your session has expired. Please log in." 2.如果我在出现错误后,手动打开以下Xcode,而后再进行Jenkins构建,则不会出现错误;(但如果之后关闭Xcode,过一段时间错误还会复现) + xcodebuild -exportArchive -exportOptionsPlist /var/folders/8x/c3qf2sz95jd40fk49d5dbg400000gn/T/gym_config20240119-38953-jl7k5y.plist -archivePath '/Users/smg_ios/Library/Developer/Xcode/Archives/2024-01-19/WinTaxProject 2024-01-19 13.45.59.xcarchive' -exportPath /var/folders/8x/c3qf2sz95jd40fk49d5dbg400000gn/T/gym_output20240119-38953-3u2rch -allowProvisioningUpdates 2024-01-19 13:47:15.691 xcodebuild[44905:206740] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x6000024d3400; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100') 2024-01-19 13:47:15.691 xcodebuild[44905:206740] DVTPortal: Error: Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2024-01-19T05:47:15Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"; responseId = "29bf9da6-b667-4025-bd1f-09de9f5c76f1"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.} log
2
0
935
Jan ’24
Very embarrassing beginner's question...
I'm an old C programmer just starting to learn Swift and the X-code environment. In Apple's "Develop in Swift Fundamentals", on page 19 I found the first exercise to print "Hello World" in the Terminal using Swift REPL. Weirdly, after following the instructions, I get the following "Badly placed ()'s" error (I'm omitting the Swift Subcommands menu)- Last login: Tue Dec 26 12:55:07 on ttys000 [MacBook-Pro:~] xxxxx% swift Welcome to Swift! [MacBook-Pro:] xxxxx% print("Hello, World!") Badly placed ()'s. [MacBook-Pro:] xxxxx% This is a pretty discouraging result! Obviously, I'm missing something (and please, no jokes about requisite neurons).
3
0
551
Dec ’23
How can I access contacts using Mac CLI app (XCode 14)?
I'm having some problems accessing contacts inside of mac cli app. The main issue is that the app is not triggering a dialog requesting access to contacts. Some sources state that NSContactsUsageDescription should be added to info.plist. This info.plist is nowhere to be found inside the project in xcode. Then, some sources are stating that there was a xcode update, and now permissions are added on Targets -&gt; Info tab, but this tab does not exist on mac cli project. Here is a code snippet: #import &lt;Contacts/Contacts.h&gt; int main(int argc, const char * argv[]) { @autoreleasepool { CNAuthorizationStatus status = [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts]; if (status == CNAuthorizationStatusNotDetermined) { NSLog(@"Contact access not determined."); CNContactStore *contactStore = [[CNContactStore alloc] init]; [contactStore requestAccessForEntityType:CNEntityTypeContacts completionHandler:^(BOOL granted, NSError * _Nullable error) { NSLog(@"Got response"); }]; } else if (status == CNAuthorizationStatusAuthorized) { NSLog(@"Access granted"); } else { NSLog(@"Access to contacts is denied or restricted."); } } return 0; } Running this outputs: Contact access not determined. and app exits with code 0. How would one access contacts inside of mac cli app project? Or setup proper permissions so that dialog would trigger? PS. I have also tried adding info.plist manually, but there was no difference. Maybe I did something wrong? Is info.plist even used in mac cli project?
1
0
753
Jan ’24
rsync script
I am reasonably new to Mac development, so I know just enough to be dangerous. I want to build a script that will run on command using rsync script to backup my photography folders to my NAS. I can drag the folder names to the terminal and all works fine. When I copy and paste into terminal to test it fails Here is the command line and subsequent error. ichflynn@Richs-MacBook-Pro ~ % rsync -arv --delete /Volumes/Samsung_T5/LRPhotos-T5/ /Volumes/QNAP-USB-2/LRPhotos-T5/ sending incremental file list rsync: [Receiver] mkdir "/Volumes/QNAP-USB-2/LRPhotos-T5" failed: No such file or directory (2) rsync error: error in file IO (code 11) at main.c(793) [Receiver=3.2.7] rsync: [sender] write error: Broken pipe (32) rsync error: error in file IO (code 11) at io.c(848) [sender=3.2.7] richflynn@Richs-MacBook-Pro ~ % Suggestions?
1
0
705
Dec ’23
LLDB always exits abnormally on local code
I am building simple command-line programs in C. When I run LLDB on the command line on any such executable , even though I set a breakpoint in main, LLDB always runs to termination and reports an error. Below is an example: ~ % clang -Wall -g prog.c -o prog aviram@csaamdS278stma ~ % lldb prog (lldb) target create "prog" Current executable set to '/Users/aviram/prog' (x86_64). (lldb) breakpoint set --name main Breakpoint 1: where = progmain + 15 at prog.c:73:21, address = 0x0000000100003ebf (lldb) run Process 99926 launched: '/Users/aviram/prog' (x86_64) Process 99926 exited with status = -1 (0xffffffff) lost connection (lldb) ` Note that it says "lost connection" even though I am _ remote debugging. This happens with every executable I build._ Details: 2019 MacBook Pro (x86_64, Sonoma); Apple Clang 12.0.0 (downloaded with Xcode 15.0.1). Why is this happening and what can I do to debug my program (for real) using LLDB from the command line? Thanks.
3
0
973
Dec ’23
Localised DMG background
Hello. We are currently creating our dmg with hdiutil and I was wondering if it would be possible to have localized resources in it. Right now, we have a single background image for every locale. Would it be possible to have different background image based on user locale, also with default background image as a backup in case we don't have users locale? The use case for this is the Quebec's Bill 96 Law 14, stating that products sold in Quebec have to be localised in Canadian french. Thank you.
0
0
536
Dec ’23
devicectl appIcon command not working
Hi, I'm trying to use the appIcon command of devicectl. I'm connecting to an iPhone 14 Pro running iOS 17.0.2. xcrun devicectl device info appIcon --help OVERVIEW: Request app icon generation from this device. This command searches for an app installed on this device and requests for its icon to be generated. USAGE: devicectl device info appIcon [<options>] --device <uuid|ecid|udid|name> --allow-placeholder <allow placeholder> --width <width> --height <height> --scale <scale> DEVICE OPTIONS: -d, --device <uuid|ecid|udid|name> The identifier, ECID, UDID, or name of the device. COMMAND OPTIONS: --app-bundle-id <app bundle identifier> Look for app icon information with the given application bundle identifier on device. Note: If both app-bundle-id and app-path are provided, only app-path will be used. --app-path <app path> Look for app icon information at the given application path on device. Note: If both app-bundle-id and app-path are provided, only app-path will be used. --allow-placeholder <allow placeholder> Allow placeholder icons to be generated. Note: Passing `true` will allow placeholder icons to be returned. Allowing placeholder icons will ensure no I/O is done on device. If you want to make sure you get the icon most accurate to your request -- which could use more resources on the device -- set this to `false`. --width <width> Request app icon generation with the specified width. --height <height> Request app icon generation with the specified height. --scale <scale> Request app icon generation with the specified scale. --destination <destination> Write the image (in png format) to the provided file on the host device. OUTPUT OPTIONS: -v, --verbose If given, provide more logging output than normal. -q, --quiet If given, output will include only errors. -t, --timeout <seconds> The overall command timeout in seconds. If this limit is exceeded the command is abandoned as a failure. -j, --json-output <path> An optional path to write a JSON file with command results. Note: JSON output to a user-provided file on disk is the ONLY supported interface for scripts/programs to consume command output. -l, --log-output <path> An optional path to write all logging otherwise passed to stdout/stderr. OPTIONS: --version Show the version. -h, --help Show help information. I've tried multiple variations of parameters and both apple-bundle-id and app-path, but always receive an error. xcrun devicectl device info appIcon --device *** --app-bundle-id *** --app-path *** --allow-placeholder true --width 60 --height 60 --scale 3 --destination icon.png -j icon.json -t 10 -v With JSON output "error" : { "code" : 6007, "domain" : "com.apple.dt.CoreDeviceError", "userInfo" : { "NSLocalizedDescription" : { "string" : "CGImage was nil when attempting to write to a destination." } } }, Without JSON output 09:32:42 Acquired tunnel connection to device. 09:32:42 Enabling developer disk image services. 09:32:42 Acquired usage assertion. Application Icon Image Information • Is Placeholder - false • Size • Height - 0.0 • Width - 0.0 • Scale - 0.0 • Pixel Size • Height - 0.0 • Width - 0.0 Has anyone managed to successfully extract an app icon using devicectl?
4
0
1.4k
Oct ’24
defaults tool can't handle app group settings?
I have an app group to share settings between a main app and a helper. This is accessed using [[NSUserDefaults alloc] initWithSuiteName: @"FDHC2KMZ6V.com.jwwalker.autopairs.suite"]. What's puzzling me is that if I go to Terminal and enter defaults read FDHC2KMZ6V.com.jwwalker.autopairs.suite it tells me that the domain does not exist. Is this a bug in the defaults tool, or is there some trick I'm missing?
4
1
914
May ’24
dyld not searching in /usr/local/lib (cmd line tools 2397)
It seems impossible to me, but around the time I installed the latest command line tools (xcode-select version 2397) binaries what were built with linkages to @rpath/libfoo.dyld stopped being able to find their dependency. The error looks like this. dyld[1471]: Symbol not found: _GEOSGeomGetX Referenced from: <16DBE67F-CB32-31EE-BCE0-BFB58EEC9740> /Users/pramsey/tmp/capi_indexed_predicate Expected in: <no uuid> unknown zsh: abort ./capi_indexed_predicate If I turn on DYLD_PRINT_SEARCHING, I can see the linker giving up on the rpath entry. dyld[1501]: find path "@rpath/libgeos_c.1.dylib" dyld[1501]: not found: "@rpath/libgeos_c.1.dylib" I can work around, partially, by setting DYLD_LIBRARY_FALLBACK_PATH to have /usr/local/lib in it, but that is only a partial fix, because SIP will strip that variable for any child processes, which means most of my development and database work is borked. This seems like a very new quirk, maybe related to the XCode 15 update, at least in my personal time line, has anyone else seen it, or have any clue as to what has changed? (Worth noting, nothing changed in my code, just one day my builds wouldn't run anymore, and that day was the day after I had installed the new commandline tools).
15
5
4.5k
May ’24
Distinguishing the MacOS and Mac Catalyst destinations
When using xcodebuild to build my project, I specify a destination of generic/platform=macOS Xcode informs me that my destination is ambiguous as there is a generic destination for Mac Catalyst. --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:macOS, name:Any Mac } { platform:macOS, variant:Mac Catalyst, name:Any Mac } At the end of the day, that's OK. It's selected the proper destination by happenstance. But is there a way t change my destination specifier so that it can zero in on the MacOS destination that is not the MacCatalyst variant? I've tried using "generic/platform=macOS,variant=". But that does not work.
1
0
839
Jun ’24
Issue uploading release builds using ITMS Transporter: ITMS-90529 Invalid package
I'm dealing with a problem uploading our release binaries that is completely perplexing. If I use the ITMS Transporter desktop app to upload my IPA, everything works fine. If I use the ITMS Transporter command line interface (which i'm calling from inside the desktop app's directory /Applications/Transporter.app/Contents/itms/bin/iTMSTransporter -m upload...) to upload my IPA, I get the following error ERROR ITMS-90529: Invalid package. Applications built with sdk 9.0 or later must be packaged as proper IPA files. No idea why this error is coming up. I can also use altool to upload my binaries successfully. The issue is altool is being deprecated and I need to be able to use the ITMS command line interface as part of some deployment scripts we have. Please help!
4
2
1k
Jan ’24
Debugging Big Sur kernel on inter-based macbook from Monterey on m1
HI devs, help me please, i want to debug Big Sur kernel on inter-based macbook from Monterey on m1, i have installed KDK_11.6.4_20G417.kdk in Monterey system on m1 macmini, then launch lldb, have created target and got this message : WARNING! Python version 3 is not supported for xnu lldbmacros. (lldb) target create /Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel warning: 'kernel' contains a debug script. To run this script in this debug session:   command script import "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/kernel.py" To run all discovered debug scripts in this session:   settings set target.load-script-from-symbol-file true Current executable set to '/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel' (x86_64). (lldb) settings set target.load-script-from-symbol-file true ############################## WARNING! Python version 3 is not supported for xnu lldbmacros. Please restart your debugging session with the following workaround defaults write com.apple.dt.lldb DefaultPythonVersion 2 ############################## Loading kernel debugging from /Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/kernel.py LLDB version lldb-1300.0.42.3 Swift version 5.5.2-dev settings set target.process.python-os-plugin-path "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/core/operating_system.py" settings set target.trap-handler-names hndl_allintrs hndl_alltraps trap_from_kernel hndl_double_fault hndl_machine_check _fleh_prefabt _ExceptionVectorsBase _ExceptionVectorsTable _fleh_undef _fleh_dataabt _fleh_irq _fleh_decirq _fleh_fiq_generic _fleh_dec command script import "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/xnu.py" error: module importing failed: Traceback (most recent call last):  File "<string>", line 1, in <module>  File "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/xnu.py", line 123   print "Execution interrupted by user"      ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Execution interrupted by user")? settings set target.process.optimization-warnings false How can i solve this problem? lldb linked with python 3, but kdk uses python 2, also command line tools version 12.5.1 which uses python 2 i can not install on monterey too.
4
0
2.5k
Mar ’24
Constant Failure to install package
Hello, I'm keeping on getting a failure when trying to install an App from Samsung Dex. The report says to "disconnect your phone to install" but NO phone is connected. I tried various command line and numerous troubleshooting to reset and refresh some KEXT but still issue exists. Here is the install.log below. What could be the work around this bug? How to reset and proceed with installation? Thank you p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px 'Helvetica Neue'; color: #262626; -webkit-text-stroke: #262626; background-color: #ffffff} span.s1 {font-kerning: none} 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: @(#)PROGRAM:Install  PROJECT:Install-1000 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: @(#)PROGRAM:Installer  PROJECT:Installer-1020 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Hardware: iMac18,2 @ 3.00 GHz (x 4), 32768 MB RAM 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Running OS Build: macOS 11.4 (20F71) 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: USER=KP 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: __CFBundleIdentifier=com.apple.installer 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: COMMAND_MODE=unix2003 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: LOGNAME=KP 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.LsIZhGSQv0/Listeners 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: SHELL=/bin/zsh 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: HOME=/Users/KP 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: TMPDIR=/var/folders/d_/hqzchb455m9ct55v66n3n2_w0000gn/T/ 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: XPC_SERVICE_NAME=application.com.apple.installer.1152921500312163432.1152921500312163437 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: XPC_FLAGS=0x0 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Samsung DeX  Installation Log 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Opened from: /Volumes/Samsung DeX/Install Samsung DeX.pkg 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Package Authoring Error: <background_scaling> has an unsupported MIME type: X-NSObject/NSNumber 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Package Authoring Error: <background_alignment> has an unsupported MIME type: X-NSObject/NSNumber 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Package Authoring Error: has an unsupported MIME type: X-NSObject/NSNumber 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Failed to load specified background image 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Product archive /Volumes/Samsung DeX/Install Samsung DeX.pkg trustLevel=350 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: External component packages (2) trustLevel=350 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Could not load resource readme: (null) 2021-07-08 19:33:16-04 KPs-iMac Installer[9137]: Installation checks failed. 2021-07-08 19:33:16-04 KPs-iMac Installer[9137]: Installation check failure.  . Disconnect your phone to install..
1
0
1.4k
Feb ’24