iOSOpenDev command line tool build error - ios

Okay, so i have spent all day searching the web for why this is happening.
I have installed the iOSOpenDev XCode Templates, and I opened a new command line tool project, and its giving me this error:
target specifies product type 'com.apple.product-type.tool', but there's no such product type for the 'iphoneos' platform
Does anyone know how to fix this? thanks in advance.

This must be an installation issue. Re-install iOSOpenDev and check if there are errors in its installer log. I had the same problem and resolved it with the following two steps.
1) xcode-select must point to the correct xcode location, for example run the following line in Terminal:
$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
2) You must agree xcode license in Terminal
$ sudo xcodebuild -license
$ xcodebuild -license
After that, reinstall the tool and it should work.

Related

xcodebuild error: "requested but didn't find extension point with identifier ..."

I'm using Xcode 13.3.1.
I'm trying to build a flutter application in Android Studio. It failed with the following error. To make it dead simple I tried just running xcodebuild which produced the same error as in Android Studio:
.oh-my-zsh git:(master) xcodebuild
2022-04-21 19:45:25.858 xcodebuild[32450:312401] 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
2022-04-21 19:45:25.859 xcodebuild[32450:312401] 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
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
xcodebuild: error: The directory /Users/salahuddin/.oh-my-zsh does not contain an Xcode project.
Any idea what causes this error and how to fix it?
Please refer to the message, you can find out solution.
https://developer.apple.com/forums/thread/703233
SOLUTION (for me):
I had to first find the software update manually:
softwareupdate --list
This provided me with the following output:
Finding available software
Software Update found the following new or updated software:
Label: Command Line Tools for Xcode-13.3
Title: Command Line Tools for Xcode, Version: 13.3, Size: 718145KiB, Recommended: YES,
I then ran:
softwareupdate -i "Command Line Tools for Xcode-13.3"
(NOTE: You pass the "Label:" output as the string as yours could be different.
This command worked out for me: softwareupdate -d -a.
Reference: https://huckfinnsmoneytree.com/how-to-download-macos-updates-using-the-terminal/
I faced the same problem when updating the project with Flutter 3. After several attempts, the below solution worked for me.
I have deleted the podfile.lock file inside the ios folder and then run the below commands.
flutter pub upgrade
flutter pub get
cd ios
pod repo update > Actually, this was an error for me but ignored it
pod install
Also please make sure you are using the latest MacOS and Xcode.
I hope this will help someone else.
Looks like you need to install the Xcode command line tools, which you can do by executing the following command in Terminal:
xcode-select --install
This worked for me:
Completely turn off Bluetooth.
in ios/ folder of your project, change Podfile to
platform :ios, '12.0'
Run pod deintegrate in Terminal inside the ios/ folder of your project.
Run pod install --repo-update in your ios/ folder
https://solveforums.msomimaktaba.com/threads/solved-flutter-for-ios-run-build-but-not-archive.699314/
The error mentions that there's no iOS project to be found on the directory.
xcodebuild: error: The directory /Users/salahuddin/.oh-my-zsh does not contain an Xcode project.
You'd need to navigate to the iOS build of your Flutter project on your terminal with cd ios and run xcodebuild there.
multiple xcode.app you need to remove.(Download folder)
XCode-> Preferences-> Locations -> Command Line Tools
Check it shows multiple entries for same xcode version.
Delete xCode.app other than Application folder.
quit and restart xcode and terminal.
My issue was that I was using Xcode 13.4. I downloaded Xcode 13.3 from here and everything started working again.
I was encountering this issue on a self-hosted GitHub runner so in order for the fix above to work, I needed to:
Uninstall the Xcode 13.4
Remove the GitHub runner
Install Xcode 13.3
Re-add the GitHub runner
Try This.
Remove any command line tools:
sudo rm -rf /Library/Developer/CommandLineTools
Reinstall them:
xcode-select --install
Tell the system to use them:
sudo xcode-select -s /Library/Developer/CommandLineTools
If still not working, try that:
In Xcode > Preferences > Locations tab
Simply select the right toolset.

xcrun invalid active developer path error in macOS

I have recently updated my Mac to Catalina, but have been knitting Rmd documents just fine up to this point.
In a current document, I am getting the following error when I try to knit:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
I don't know why this particular markdown document is creating an issue when the others weren't. I have looked elsewhere on Stack, where I tried the following:
xcode-select --install
xcode-select --reset
Both of these lines of code just gave me an object not found error.
I ran these with no luck:
xcode-select --switch /Applications/Xcode.app
xcode-select --switch /Library/Developer/CommandLineTools
I then realized these commands should go in the terminal, but still have no luck.
I went to https://developer.apple.com/download/more/ and downloaded Command line tools OS Xcode 12.3dmg package.
I then tried all of the above code in the terminal, including:
sudo xcodebuild -license accept
Now, instead of giving me the error message that I started with, the knit just loads indefinitely.
At this point, I'm just throwing crap at the wall, without knowing what it is that I'm actually doing. Any guidance from this point is greatly appreciated. Thank you!
May be the issue was view() instead of View().

Carthage requires git 2.3.0 or later

I am using charts library and trying to run the demo. Before running I have to install the dependencies using Carthage. I goto project folder location and type in terminal:
carthage update
I got the below error:-
Carthage requires git 2.3.0 or later.
How to install Carthage decencies and run the above said demo.
Select Command Line Tools to the latest version of Xcode.
Xcode -> Preferences -> Locations -> Command Line Tools
Open Preferences shortcut : Command + comma ⌘ + ,
It seems like you have used another Xcode version since last time. You should set command line tool again by running the following in terminal:
sudo xcode-select -s <path to Xcode>/Contents/Developer
for example:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Not sure if this will help, but I ran into the same issue and found out that xcodebuild is using a different Xcode that I installed.
so you can probably double check which Xcode you are using:
xcode-select --print-path
Here is the original post that helped me solving this issue:
Change Carthage Swift version
It seems you have to install new version of git.
brew install git
It could say "Target /usr/local/bin/git
already exists. You may want to remove it". I didn't want to remove it and decided only to overwrite:
brew link --overwrite git
It helped me with the same issue. I hope it will help to someone else.

Change Carthage Swift version

Is it possible to change Carthage Swift version used to build the frameworks?
I'm trying to migrate my project to swift 3 (on Xcode 8 beta), and the third party libraries are the only thing that stops my project from compiling.
While using specific branches for swift 3, Carthage throws errors about the new Swift syntax.
Any help will be appreciated!
Carthage uses the command line tool xcodebuild to build the frameworks. The version of Xcode used by the command line system is determined by the value selected by the tool xcode-select
Usage: xcode-select [options]
Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example,
xcodebuild) as well as the BSD development commands (such as cc and make).
Options:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s <path>, --switch <path> set the path for the active developer directory
--install open a dialog for installation of the command line developer tools
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path
It needs to point to the Developer SDK directory, so you can use --print-path to check where it's currently pointing.
xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
Then to change it just run sudo xcode-select --switch <path-to-beta-xcode>/Contents/Developer
There is a bug report on Carthage's GitHub about XCode 8 and broken compatibility. You may want to follow that issue's thread on their repo:
https://github.com/Carthage/Carthage/issues/1440
Another related reported issue in Carthage's repo is: https://github.com/Carthage/Carthage/issues/1445

Appium doctor shows error

When I run Appium doctor it shows:
Running iOS Checks
✖ Unknown SW Version Command: Error: Command failed: /bin/sh -c sw_vers -productVersion
/bin/sh: sw_vers: command not found
Appium-Doctor detected problems. Please fix and rerun Appium-Doctor.
Can anyone help let me know what is the wrong here?
running this solved my problem:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
You need to install the command line tools as marked in your message:
✖ Xcode Command Line Tools are NOT installed
From osxDaily:
Launch the Terminal, found in /Applications/Utilities/
Type the following command string:
xcode-select --install
A software update popup window will appear that asks: “The xcode-select command requires the command line developer tools. Would you like to install the tools now?” choose to confirm this by clicking “Install”, then agree to the Terms of Service when requested (feel free to read them thoroughly, we’ll be here)
Wait for the Command Line Tools package download to complete, it’ll be about 130MB and installs fairly quickly depending on your connection speed
The installer goes away on its own when complete, and you can then confirm everything is working by trying to use one of the commands that were just installed, like gcc, git, svn, rebase, make, ld, otool, nm, whatever you want from the list below. Assuming the installation went uninterrupted, the command will execute as expected. This also means you can compile and install things from source code directly without having to use a package manager. Enjoy your new unix command line toolkit!
Have you tried upgrading to the latest Appium version? Are you installing Appium through terminal? My appium-doctor issues were fixed after I installed Appium through terminal and updated the path variables in .bash profile. Appium desktop application is different than one installed through command line.
There are only two possible area which causing that error:
You need to keep all path veriable updated and correct in .bash_profile
You must install
XCode
NodeJS
properly. You must have all permission to access those.
Install all latest version of following things
JDK (Java Development Kit),
Xcode ,
Command Line tools ,
APPIUM For MAC OS
In my case, xcode command line tool isn't set. Simply go to Xcode>Preferences>Locations>Select desired Xcode version in Command Line Tools. OR from terminal follow Chhagan's answer xcode-select -s your path

Resources