I can install AFNetworking with the Podfile below,
platform :ios, '7.0'
pod 'AFNetworking', '~> 2.0'
but failed to install CorePlot, here is my Podfile,
source 'https://github.com/CocoaPods/Specs.git'
platform : ios, "8.0"
target "CorePlotTest" do
pod 'CorePlot', '~> 1.5.1'
end
Here is my error codes,
What should I do?
There is a syntax error in your podfile. Remove the space between the colon (:) and "ios" on the platform line.
platform :ios, "8.0"
The contents in the file are no problems, just open the Podfile in vim or Xcode, not other things like TextEdit !
We can use
open -a Xcode Podfile
to open and edit the file in Xcode.
Related
Currently I'm using Swift 3, and after I install a new Pod I received this error
Here's my Pod
I can't even clean the project, I tried Pod update but the error persists. What should I do to fix this problem?
Must Add line
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'Bolts', '~> 1.8'
pod 'Cosmos', '~> 12.0'
end
Now you can install the dependencies in your project:
$ pod install
tl;dr; how to use old (what shouldn't use use_frameworks!) and new pods together in podfile?
I had working podfile:
platform :ios, '8.0'
use_frameworks!
target 'myApp' do
pod 'Alamofire', '1.3.1'
pod 'SwiftyJSON', '~> 2.2.1'
end
Then I added OneSignal pod according to documentation link
So my pod file changed to:
platform :ios, '8.0'
use_frameworks!
target 'myApp' do
pod 'Alamofire', '1.3.1'
pod 'SwiftyJSON', '~> 2.2.1'
pod 'OneSignal'
end
I updated pods and run build - got error:
ld: framework not found OneSignal
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I checked OneSignal pod and it looks differently compared to others:
Thats probably because is old style objective-c framework.
I can add this framework manually to my project but I wonder how to make it work properly with cocoapods?
This issue relates to my problem I think https://github.com/CocoaPods/CocoaPods/issues/3338
Update
I'm currently using Xcode 6.4
What version of Xcode are you using?
If update to the latest release versions of both Alamofire and SwiftyJSON and build with Xcode 7 it should fix your build errors.
platform :ios, '8.0'
use_frameworks!
target 'myApp' do
pod 'Alamofire', '2.0.2'
pod 'SwiftyJSON', '~> 2.3.0'
pod 'OneSignal'
end
For every pod I try to install, I'm getting the 'unable to find a spec'error.
Here is my podfile:
source 'https://github.com/yannickl/QRCodeReader.swift.git'
source 'https://github.com/aschuch/QRCode.git'
platform :ios, '8.0'
pod 'QRCode', '0.2'
pod 'QRCodeReader.swift', '~> 4.3.0'
After testing a few times with various changes to the Podfile, I have run:
sudo rm -fr ~/.cocoapods/repos/master
pod setup
However that didn't solve it. I'm running El Capitan / XCode 7. Anyone else running into a similar problem?
I would replace the source with CocoaPods specs since both the dependencies are added to the master spec repo.
source 'https://github.com/CocoaPods/Specs.git'
Also you need to add use_frameworks! since one of your pod is written in swift.
Refer this: https://github.com/yannickl/QRCodeReader.swift
So your podfile will look like this
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'QRCode', '0.2'
pod 'QRCodeReader.swift', '~> 4.3.0'
My Podfile is as follows:
platform :ios, '8.0'
use_frameworks!
target 'podtest' do
pod 'SwiftyJSON', '~> 2.1'
end
And I definitely am opening up the Xcworkspace file, not the xcodeproj file. It throws a Mach-O linker error in even the simplest project I could possibly make, with the -F flag.
So i installed cocoapods and also crated a Project into which i intended to install a framework to it using CocoaPods but i get this error
I specified in the pod Insert:
platform :ios, '7.0'
pod 'FlatUIKit 1.3'
and then went back to the Command line and used "pod install"
so as i thought it would install i got this seemingly error like text on screen as shown in the Picture.
How would i do this correctly?
Try this podfile:
platform :ios, '7.0'
pod 'FlatUIKit', '~> 1.3'
Also you may want to read this:
http://guides.cocoapods.org/using/the-podfile.html