Carthage requires git 2.3.0 or later - ios

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.

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.

Command PhaseScriptExecution failed with a nonzero exit code - using CocoaPods

I'm getting the following error when building my project: Command PhaseScriptExecution failed with a nonzero exit code.
This is what I have in my [CP] Embed Pods Frameworks:
I've also done a pod deintegrate and pod install but these frameworks continue to show in red:
I'm on Xcode Version 12.4 and my mac has an Apple M1 chip. Any thoughts as to what I could do to resolve this error?
Clearing the Excluded Architectures solved the issue. I originally had arm64 and x86_64 excluded.
Did you solve your issue?
I got the one of solutions.
First of all, you have to delete the files which are red of iOS, Frameworks . They don't exist anymore, so you shouldn't include them to archive.
then clean up your builds.
(click Xcode -> product -> clean build folder)
go to archive.
(click Xcode -> product -> archive)
If you don't use M1, then you have to exclude architectures "arm64".
That's it.
Hope it works.
clear all files inside Library/Developer/Xcode/DerivedData/
List item clean & build again from xcode
if you're using nvm make sure you don't have another globally installed version of Node/npm.
If you aren't sure whether or not you have a global version, go to your bash_profile/zshrc and comment the three nvm initialization lines (export NVM_DIR="$HOME/.nvm" [...]), then open a new terminal and do node --version, if it still finds something it means that you have a global version somewhere, and you can find its path with which node.
In my case I'm using Homebrew, and I had a global version of Node that I wasn't even aware coming from the yarn formula, I discovered it after running brew uses --installed node. I went ahead and uninstalled yarn using brew uninstall --force yarn, which automatically uninstalled its node/npm dependency, then uncommented the nvm initialization lines, and then I reinstalled yarn using nvm's npm with npm i -g yarn, and now everything works.
Another way, after installing node via brew install node RUN sudo ln -s /opt/homebrew/bin/node /usr/local/bin/node
restart xcode and try to build again.

"pod init" creates error that says "You need at least git version 1.8.5 to use CocoaPods"

I was not able to install any pod in my system.
Hence, I removed cocoapods from my Mac and then reinstalled it.
The process was successful but when I run the command pod init following error shows up in the terminal:
`verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative)
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:49:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
I also checked my Git version which was 1.8.4 but I am getting any solution to update the same.
It needs to set your command line tool version, in your Xcode (Preferences).
You can download latest command line tool from Apple Download Portal, if you have paid apple developer account/id.
Here are current stable and beta Xcode Tools and supporting command line tool download links. (Ensure you're logged in using premium developer account on Apple Developer Account to access these links)
Xcode 11
Xcode 11.2 beta 2
- (Command Line Tool (Xcode 11.2 beta 2) - for macOS 10.14)
Xcode 11
- (Command Line Tool (Xcode 11) - for macOS 10.14)
Xcode 10
Xcode 10.2.1
- (Command Line Tool (Xcode 10.2.1) - for macOS 10.14)
Xcode 10.2
- (Command Line Tool (Xcode 10.2) - for macOS 10.14)
Xcode 10.1
- (Command Line Tool (Xcode 10.1) - for macOS 10.14)
- (Command Line Tool (Xcode 10.1) - for macOS 10.13)
Xcode 10
- (Command Line Tool (Xcode 10) - for macOS 10.14)
- (Command Line Tool (Xcode 10) - for macOS 10.13)
Once you've latest command line tool installed in your system, set it from Xcode Menu.
(Xcode Menu Items) Xcode ► Preferences ► Location ► Command Line Tool ► Select appropriate command line tool
Firstly remove the existing git in your system using commands:-
Use command "which git"
that will give u the path say "/usr/local/bin/git", then use command->$ sudo rm -rf /usr/local/bin/git
This will remove existing git from your system
Then reinstall git again
$ brew install git
It might issue a warning saying
Warning: git 2.13.2 is already installed, it's just not linked.
You can use `brew link git` to link this version.
Then run below mentioned command:-
$ sudo chown -R $(whoami) /usr/local/share/
$ sudo chown -R $(whoami) /usr/local/lib
$ brew link --overwrite --dry-run git
It might give you error
Error: Could not symlink share/git-core/templates/description
Target /usr/local/share/git-core/templates/description
already exists. You may want to remove it:
rm '/usr/local/share/git-core/templates/description'
To force the link and overwrite all conflicting files:
brew link --overwrite git
To list all files that would be deleted:
brew link --overwrite --dry-run git
Then finally run command
$ brew link --overwrite git
This is how I updated my git and pod init worked. Hope you find it helpful :)
I had a similar issue after installing a second Xcode.
As a result there was no command line tools specified in xcode-select -p
Fixed by manually choosing newer Xcode version
I came across this answer after installing latest version of XCode 9.3 -
I was trying to do a -
Pod Update [ or --version, or any pod command ...]
I tried to "brew install git" like in the top answer but there was all kinds of complaints about no access to Cellar, then when I added access, missing c compilers ..
The command line tools setting in Locations in Xcode Preferences showed command latest 9.3 line tools installed "correctly", but after reading the above answers I decided to install it again using -
xcode-select --install
After the download / install, pod started working again, was still having issues with brew which was a high sierra issue. fixed with -
https://github.com/Homebrew/brew/issues/3285.
Run the command
$ brew install git
Then navigate to your project folder and type pod init
These steps worked for me

iOSOpenDev command line tool build error

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.

-bash: git: command not found in Xcode 4 in lion osx

Through Xcode 4.3 ->file -> source control -> repositories -> clone repository, I've cloned a repository from codesion.com. but when I go a git init or git add, the error -bash: git: command not found shows up. Now, Xcode 4.3 comes with the git installed, so what should I do to get this working?
Any help on this would be great.
Thanks in advance.
There is another option if you're not experienced with UNIX or you just don't want to mess with the system variables from the terminal. I had the same problem, and after some reading on SO and apple developer pages I've decided to install the Command Line Tools for Xcode. That solved the problem.
As the Xcode IDE from some 4.x version is an .app package and everything is stored inside that package, they have added the possibility to separately install the command line tools so that you have the command line tools inside the usr/bin/ path.
You can install the command line tools (as well as some other tools and documentation) from the Downloads tab of the Preferences window in Xcode (I have version 4.3), or from the apple developer website.
It's a path issue. See this question for the answer:
How to move GCC in osx from xcode to /usr/bin
(P.S. The question is different, but the answer the same.)

Resources