Change Carthage Swift version - ios

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

Related

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.

Getting an error trying to install a particular gem 'oily_png (1.2.0)' MAC OS X El Capitan

I'm on mac OS X El Capitan and after trying to run bundle install I get the following error:
Can anybody help me fix this?
On a Mac anytime you upgrade Xcode or the operating system, there appears to be a chance of the command line tools being removed.
xcode-select --install
in the terminal window, will install the tools, this can also be done inside the xcode application.
[~] xcode-select -h
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
if you have more than one set of tools installed (such as beta version) the -s, --switch flag is also helpful to get it pointed to one you want to use (or if the version it was pointed to was removed)

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

Manual Install of Xcode command line tools not working

I've manually installed the Xcode command line tools from the Apple website, and I went through the install process but it doesn't seem to be working. I ran this from the terminal to see if it installed:
Zach-Boyette-MacBook-Pro-2:~ zachboyette$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 5.1.0.0.1.1396320587
volume: /
location: /
install-time: 1398301024
groups: com.apple.FindSystemFiles.pkg-group com.apple.DevToolsBoth.pkg-group com.apple.DevToolsNonRelocatableShared.pkg-group
So it looks like the command line tools have installed, but when I run this:
Zach-Boyette-MacBook-Pro-2:~ zachboyette$ xcode-select --install
A popup says: The "xcode-select" command requires the command line developer tools. Would you like to install the tools now?
I clicked install and then it said: Can't install the software because it is not currently available from the Software Update server.
I've read on other answers that the solution is to do a manual install, but I just did that so I don't understand why it's not working. Also, in Xcode downloads, it's not showing the Command Line Tools.
I've tried installing it manually many times so I don't know why it's not working.
Installing Jekyll still won't work:
Zach-Boyette-MacBook-Pro-2:~ zachboyette$ sudo gem install jekyll
Password:
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
EDIT: echo $PATH returns this:
Zach-Boyette-MacBook-Pro-2:~ zachboyette$ echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/zachboyette/.rvm/bin
Command Line Tools are not included in XCode 5.1.1
You have to install it manually, BUT DON'T USE "xcode-select --install". It does not work.
Open Xcode app.
Click on Xcode > Open Developer Tools > More Developers Tools.
That will take you to Downloads for Apple Developers web site.
Use your AppStore Id to login.
Download Command Line Tools for your Mac OS X version.
I have stumbled across this issue before when I completely hosed my development environment by deleting an ancient Xcode version.
Have you tried running sudo xcode-select -r to clean up? This sorted my problem.
From the man page:
-r, --reset
Unsets any user-specified developer directory, so that the
developer directory will be found via the default search mecha-
nism. This command must be run with superuser permissions (see
sudo(8)), and will affect all users on the system.
The easiest work around is to install the XCode app from the App Store then open XCode and agree to the Terms and Conditions.
From there the Command Line Developer Tools package can be installed on using xcode-select --install or by trying to use any command line developer tool in Terminal like git.

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.

Resources