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

112 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

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
800
Jan ’24
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 -> Info tab, but this tab does not exist on mac cli project. Here is a code snippet: #import <Contacts/Contacts.h> 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
606
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
440
Dec ’23
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
537
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
783
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
426
Dec ’23
xcode crashes after trying to build my code for a second time
Hello, I have recently started coding in c++, using xcode's command line tool (university project). Ever since I started using this Apple made app on my 2022 macbook air M2, I am battling a major issue. Every time I try to either build my project for the second time or to clear the console, after I have made some input through the console, the Xcode crashes. I've been looking for the solution for weeks now, even reinstalled the whole xcode app, but nothing helped. I will be very much grateful for any suggestions... thanks. Here is one of my codes, where the issue appears: // Hlavickove soubory #include <stdlib.h> // Standardni knihovna #include <stdio.h> // Standardni input, output #include <math.h> // Matematicka knihovna #define N_MAX 100 // Samotny program int main() // Zahlavi hlavni funkce { int n, max, i, souradnice_je_0; // Definice promennych a jejich nastaveni do vychozich hodnot float a[N_MAX], ap, gp, hp; souradnice_je_0 = 1; max = 100; ap = 0; gp = 1; hp = 0; Znovu: printf("\n Zadej dimenzi vektoru n: "); scanf("%i", &n); // Zadani poctu dimenzi if(n>N_MAX) // Osetreni maxima dimenzi { printf("\n Chyba v datech: Zadaná dimenze n musí být menší než %i", max); goto Znovu; } else if(n<=0) // Osetreni kladnosti dimenzi { printf("\n Chyba v datech: Zadaná dimenze n musí být větší než 0"); goto Znovu; } else { if(n == 1) // Kontrola gramatiky:Dd { printf("\n Vektor má %i dimenzi", n); } else if(n>1 and n<5) { printf("\n Vektor má %i dimenze", n); } else { printf("\n Vektor má %i dimenzí", n); } } for(i = 0; i < n; i++) // Zadani souradnic vektoru { printf("\n Zadej hodnotu x[%i] souřadnici vektoru: ", i); scanf("%f", &a[i]); printf("x[%i] = %g",i, a[i]); if(a[i] == 0) // Kontrola zda a[i] je 0 kvuli h.p. { ap = ap + a[i]; // Arit. prumer 1. cast gp = gp * a[i]; // Geom. prumer 1. cast souradnice_je_0 = 0; // Switch kvuli deleni nulou } else { ap = ap + a[i]; // Arit. prumer 1. cast gp = gp * a[i]; // Geom. prumer 1. cast hp = hp + (1 / a[i]); // Harm. prumer 1. cast } } if(hp==0) { souradnice_je_0 = 0; // Switch kvuli deleni nulou } ap = ap /n; // Arit. prumer 2. cast printf("\n Aritmeticky prumer je: %g", ap); if(gp>=0) // Nelze odmocnit zaporne cislo { gp = pow(gp, 1./n); // Geom. prumer 2. cast } if(gp>=0) { printf("\n Geometricky prumer je: %g", gp); } else { printf("\n Geometricky prumer neni pro zadany vektor definovan"); } if(souradnice_je_0 == 0) { printf("\n Harmonicky prumer neni pro zadany vektor definovan \n"); } else { hp = n / hp; // Harm. prumer 2. cast printf("\n Harmonicky prumer je: %g \n", hp); } return 0; }
3
0
540
Nov ’23
tapi generates .tbd lacking expected UUIDs
I'm trying to use tapi to generate a .tbd for a multi-arch dynamic library. The dynamic library has LC_UUIDs for both architectures, but the generated .tbd does not have a uuids section. I have tried generating .tbd versions 2, 3, and 4. (Which version should I use if I want to support older macOS releases?) I'm using the command tools from Xcode 15.0.1 on macOS 14.1 on arm64.
5
0
529
Nov ’23
Bug Using Ninja when Generate the Xcode project.
I used the command: utils/build-script --swift-darwin-supported-archs "$(uname -m)" --xcode --clean and encountered the following error: CMake Error at cmake/modules/SwiftUtils.cmake:24 (message): Error! Variable THIN_INPUT_TARGETS is false, empty or not set. Call Stack (most recent call first): stdlib/cmake/modules/AddSwiftStdlib.cmake:3068 (precondition) stdlib/public/libexec/swift-backtrace/CMakeLists.txt:39 (add_swift_target_executable) Please let me know the solution to this error. Thank you. Have a great day as well. 👍
1
0
596
Nov ’23
ProcessException: Operation not permitted
I'm using Flutter for creating app and I need to run a file with arguments from dart code (This file is in the app's container) on MacOS. How can I do it in a sandbox? I don't want to disable sandbox because then i can't publish app in App Store. I tried this code ProcessResult result = await Process.run(path, [-pa], includeParentEnvironment: true); but I'm getting error: ProcessException: Operation not permitted. Also, I saw thing called "Embedding a command-line tool in a sandboxed app", but I don't know how to do it in my case.
4
0
785
Nov ’23
Broken SDK clang headers
I'm using MacOS Sonoma. My header files (located in /usr/local/include), which are symlinks to the SDKs found in /Library/Developer/CommandLineTools/SDKs/ emit a ton of '_Nullable'-errors like these: /usr/local/include/stdio.h:386:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] FILE *funopen(const void *, ^ /usr/local/include/stdio.h:386:6: note: insert '_Nullable' if the pointer may be null FILE *funopen(const void *, ^ _Nullable /usr/local/include/stdio.h:386:6: note: insert '_Nonnull' if the pointer should never be null FILE *funopen(const void *, ^ _Nonnull on both MacOSX14.0.sdk and MacOSX13.3.sdk. I found this problem here in the LLVM-issues too https://github.com/llvm/llvm-project/issues/54988 and it is fixed if i remove the central MacOSX.sdk symlink because then clang looks in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h for the headers and they don't contain these warnings. But I don't know how safe it is to just remove the MacOSX.sdk symlink because I would imagine that many other programs might depend on it. How can I either fix these header files or tell clang to look elsewhere without removing my MacOSX.sdk file which might mess up other things?
1
0
907
Nov ’23
MallocStackLogging: could not tag MSL-related memory as no_footprint, so those pages will be included in process footprint - (null)
Hello, When I use leaks -atExit -- I always get these two messages: MallocStackLogging: could not tag MSL-related memory as no_footprint, so those pages will be included in process footprint - (null) MallocStackLogging: recording malloc and VM allocation stacks using lite mode Does osmebody know how I can fix this problem? Thank you
1
0
1.1k
Nov ’23
Installing PyQt5 on `arm64` stopped working all of a sudden (some `sip` issue)
Hey everyone, I have an Python script that uses PyQt5. Unfortunately there is no wheel for pyqt5 to install it with pip so you have to build from source, if you are on arm64. This is how I successfully did it till today: It requires qmake, which I installed via brew (brew install qt5). After adding this to my path I can execute it (which qmake shows the correct path). Then I install pyqt5 via pip with this command: pip install pyqt5 --config-settings --confirm-license= --verbose (pyqt5 asks for license agreement, but pip install is not interactive, hence the long command). As I said, till last week I could do this successfully. When I tried this today I got the error: The dbus-python package does not seem to be installed. These bindings will be built: Qt, pylupdate, pyrcc. Generating the Qt bindings... Generating the pylupdate bindings... _in_process.py: /private/var/folders/ws/vdb_nvyj35g9ck_srpvqpccm0000gn/T/pip-install-jr3725ba/pyqt5_7d0f0bcc5a7241bd8afa726e0fa5e8d1/sip/QtCore/qprocess.sip: line 99: column 5: 'Q_PID' is undefined error: subprocess-exited-with-error It seems thta something with sip-related changed. The only thing that has changed on my system was an update from Xcode14 to Xcode15. I don't really see why this should affect pyqt5 or sip, but it's the only thing I can think of. I also tried to install sip via brew additionally, but this did not change anything. Any ideas?
5
1
2k
Nov ’23
How to include <bits/stdc++.h> file using clang++ compiler?
Hi, I am a student and I wanted to include &lt;bits/stdc++.h&gt; file in my code so that it will help me avoid including many files in my program to save time during competitive programming, but while including above file in my program, it gives error "file not found", since clang++ do not have it present by default, so I want to add it manually. Please help me fix the issue. I already added bits folder at this location : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 following which I also created stdc++.h file but still error persists!!. I also made bits folder with stdc++.h file at this location too : /Library/Developer/CommandLineTools/usr/include/c++/v1 but again couldn't fix the error!! I also made respective changes in Homebrew folder (to fix it in g++ too, but again couldn't fix it!!)
6
2
5.2k
Nov ’23
Issues with notarizing a bundle
I'm trying to notarize a plug-in for Autodesk Maya (project type: Mach-O Bundle). Over the past few years I was able to successfully notarize my plug-ins via command line scripts. I usually build the bundles outside XCode with a scripted process which then also automates the notarization procedure. This has been a solid and working workflow. Since yesterday, October 23rd 2023 the prior working 'altool' is now refused because of the new notarization process which starts November 1st, 2023!!! While trying to follow the new procedure outlined here: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow I performed the following steps: Create a ZIP archive suitable for notarization. /usr/bin/ditto -c -k --keepParent "$APP_PATH" "$ZIP_PATH" Upload for notarization. xcrun notarytool submit $ZIP_PATH --keychain-profile "Notarization" --wait The result is: $ xcodebuild[2514:78653] 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 $ xcodebuild[2514:78653] 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 Conducting pre-submission checks for myPlugin.bundle.zip and initiating connection to the Apple notary service... Submission ID received id: ***-*** Successfully uploaded file id: ***-*** path: /Users/***/myPlugin.bundle.zip Waiting for processing to complete. Current status: Invalid........ Processing complete id: ***-*** status: Invalid My current assumption is that it's necessay to archive the bundle in XCode first as mentioned in the documentation: "To prepare an app for notarization, you must export the app from Xcode." But when I try to export the bundle after archiving I am not presented with the necessary options. The Organizer only gives me the button to Distribute Content which leads to another window allowing me to select either Build Products (which only exports the archive's built products) or Archive (which only creates a copy). Unfortunately neither then contains the necessary ExportOptions.plist, which is required as by the documentation. I would very much appreciate of someone could shed some light on what's necessary to perform a successful notarization. Thank you.
4
0
666
Nov ’23
G++ not working with command line tools 15.0 and not able to downgrade its version on MacOS Sonoma.
I am not able to install after downloading command line tools 14.3.1 in macOS Sonoma 14.0. The error message is the following "Command Line Tools can't be installed on this disk (Macintosh HD). The version of macOS is too new." What should I do to install it ? And what to do after that so that 14.3.1 version is used by Mac instead of 15.0 version of command line tools ?
3
0
796
Nov ’23
Using POCO library for C++
Somebody uses POCO library(https://pocoproject.org/) under MACOS? Ive try to build my app in CLion using CMAKE but there is an error: ====================[ Clean | Debug ]=========================================== /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/michaelikus/CLionProjects/training/poco01 --target clean -- -j 8 Clean finished ====================[ Build | all | Debug ]===================================== /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/michaelikus/CLionProjects/training/poco01 --target all -- -j 8 [ 50%] Building CXX object CMakeFiles/poco01.dir/poco01.cpp.o [100%] Linking CXX executable poco01 ld: Undefined symbols: Poco::Data::SQLite::Connector::registerConnector(), referenced from: _main in poco01.cpp.o clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [poco01] Error 1 make[1]: *** [CMakeFiles/poco01.dir/all] Error 2 make: *** [all] Error 2
1
0
711
Oct ’23