I can't compile R.swift for swift 3, any settings I was missing?
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target "MyClock" do
pod 'R.swift'
end
Thanks for using R.swift.
R.swift 3.0 and up are compatible with Swift 3. So please make sure you use the most recent version by running pod update. If you use R.swift 3.0 and still get errors please share the error here so we can help you debug!
@ZuYuanZhou
I'm not sure you have the same problem with me or not, but I forgot to update the latest version of pod. So it did not work.
By running sudo gem install cocoapods --pre, it solved my problem.
Hope this is useful to you!
Oh yeah good point, you need to use CocoaPods 1.1.0.rc.2 or newer with Xcode 8. Older versions are not yet compatible with Xcode 8.
@mac-cain13 @anhpt681995 Thanks! I got it!
I use bellow command:
sudo gem install -n /usr/local/bin cocoapods --pre
That's because when I use
sudo gem install cocoapods --pre
An error occured:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
[!] Error installing R.swift
[!] /usr/bin/curl -f -L -o /var/folders/pf/zq_c86_x2h515v9fmyvx8qlr0000gn/T/d20170222-17833-188kaw7/file.zip https://github.com/mac-cain13/R.swift/releases/download/v3.2.0/rswift-3.2.0.zip --create-dirs --netrc-optional
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 593 0 593 0 0 68 0 --:--:-- 0:00:08 --:--:-- 143
0 0 0 0 0 0 0 0 --:--:-- 0:00:46 --:--:-- 0
curl: (52) Empty reply from server
Most helpful comment
@ZuYuanZhou
I'm not sure you have the same problem with me or not, but I forgot to update the latest version of
pod. So it did not work.By running
sudo gem install cocoapods --pre, it solved my problem.Hope this is useful to you!