I want to add this to my project:
github "hyperoslo/ImagePicker"
I am currently using swift 2.3, however when I build this using Carthage, it builds it in Swift 3, which obviously isn't compatible with my project.
Is there a way to use Carthage to build this dependency in Swift 2.3?
Not directly, but if you look in the build logs you will see an export:
export TOOLCHAINS=com.apple.dt.toolchain.Swift_2_3
If you execute the above in your terminal before calling carthage Swift 2.3 will be used.
Related
Does SwiftyJSON support Swift version 3.0.1?
The swift-version file states the version 3.0.
Need to know whether it supports swift 3.0.1 or not.
It doesn't work because it has to be compiled with Xcode 8.1, if you use carthage you do carthage update --platform <yourPlatform> --no-use-binaries
For more information look at this thread
[OSX 10.11.6, Xcode 7.3.1]
I have Xcode 7.3.1 installed from the App Store and I can compile Swift code inside the IDE. However, I am unable to build from the commandline. When I try to, I get an error:
error: unable to invoke subcommand: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build (No such file or directory)
I don't have a toolchain tab in my Preferences -> Components dialog, which, according to other threads I've read, is because I don't have any other toolchains installed. Since, according to Apple, Swift 2.2.1 came with Xcode 7.3.1 (but my --version reports 2.2), what command can I issue to create the /Library/Developer/Toolchain folder (or other variations that will work) that will allow me to build from the command line?
The SnapShot master trunk is up to Swift 3, which is not suitable for my needs and I don't want to (can't afford to) download another gig of data, when I already have the compiler, linker, etc. And I prefer not to have a -dev version of Swift.
Please help.
Additional info:
swift --version
Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)
which swift
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift
swift build
error: unable to invoke subcommand: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build (No such file or directory)
I don't think swift-build is available in Swift 2.2.1 (Xcode 7.3.1), as it's part of the Package Manager which is Swift 3 only:
The Package Manager will be released with Swift 3 and is currently only available with the Swift 3 development snapshots.
After migrating my project from Swift 2.2 to 3.0 I get an error message on the Kanna framework, saying that
Module file was created by an older version of the compiler. Rebuild Kanna and try again
Have I done anything wrong or does the Kanna framework not work under Swift 3.0?
To use Kanna library (CocoaPods) you need add it to your Podfile:
use_frameworks!
pod 'Kanna', git: 'https://github.com/tid-kijyun/Kanna.git', branch: 'swift3.0'
then in terminal:
rm Podfile.lock (if exist)
pod init
pod update
pod install
Take tutorial from here
There is a now a working version for Swift 3.0, using carthage. Everything is described here:
Kanna github
I got a project, which is built with Carthage and uses swift2.0. I am trying to run the project, but encountered this issue:
Module file was created by a newer version of the compiler.
After struggling for about 1 hour, I found that this error occurs when I trying to build Carthage project in newer version of Xcode. My version is 7.2 and the project was built using a newer compiler version.
How can I build this project in Xcode 7.2? I don't want revert my xcode version.
Any help would be appreciated.
After upgrading my xcode version to 7.3, the problem has fixed.
I have a swift 2.0 project in xcode 7 beta 5 and want to use ReactiveCocoa 3.0.
I have been able to setup a project for xcode 6.3 and swift 1.2 but can not figure out how to do it for xcode 7 and swift2
There is a swift2 branch but every method I've found just calls in the main branch.
Clear step by step instructions would be really great.
Edit
IMPORTANT: you need carthage 0.8.0 at least!!! And don't forget to choose Xcode 7 build tools via xcode-select
Install carthage via brew install carthage
If homebrew is not installed look at http://brew.sh
Create a file called Cartfile in the directory where your Xcode project file lives
As content of the Cartfile add the following line:
github "ReactiveCocoa/ReactiveCocoa" "swift2"
Launch Terminal.app. cd into this folder and run:
carthage update
This will build .framework files in a Carthage/Build folder
Inside the build folder you will find two frameworks:
ReactiveCocoa.framework and Result.framework (inside iOS/OSX/WatchOS folder)
Drag both of these files into the Embedded Binaries section of your Xcode Project file's General tab
Build and run!