I tried installing a new pod file for my project and keep getting an error in my Terminal. Everything was working fine before I went to add a new pod to my project. Attached are screenshots of my directory, pod file with TextEdit and TextWrangler, as well as the Terminal. I realized I needed Alamofire, instead of AFNetworking. So I deleted AFNetworking out of my profile to replace it with Alamofire. I still get the same error when I had AFNetworking though in the file and just added Alamofire. What do I do?
Change the target name to Thrill. So target 'Thrill' do.
Update your podfile to this instead:
platform :ios, '9.0'
use_frameworks!
target 'Thirll' do
pod 'Stripe', '~> 4.0',
pod 'Alamofire', '~> 4.0'
end
I figured it out. I think I had to update ruby. I basically reinstalled everything again and created a new pod file, even though there was already a pod file. Thanks guys!
Related
Working from an app that's pushing 8 years old now. Was written in Objective C. The podfile looks like this.
platform :ios, '6.0'
pod 'AFNetworking', '~> 1.2.0'
pod 'MBProgressHUD', '~> 0.6'
platform :ios, '7.0'
pod 'MessageBanner', '~> 1.0'
I'd like to add new pods to the project. Namely, Stripe. Stripe runs successfully on my local machine from a different Xcode project that uses this podfile syntax.
platform :ios, '9.0'
target 'Superapps' do
use_frameworks!
pod 'Alamofire', '~> 4.5'
pod 'AlamofireImage', '~> 3.3'
pod 'Stripe'
pod 'Cards'
end
Is there a way to run a terminal command that can add the new pods to the project while leaving the existing dependencies intact? Whenever pod install or pod install --no-repo-update is used after adding the new pods to the project, an eventual compiler warning no such module stripe is displayed by Xcode. Is there a way to fix this?
For the life of me, every edit that has been tried, including changes to the podfile and a slew of different terminal commands either produce an App project that can run the dependencies before the update but always the no such module stripe warning error. I've contacted Stripe, and am now in communication with Apple for their Code Level Support for the Apple developer program.
Note: Apple has expressed that their code level support only pertains to Apple frameworks...
I have added AFNetworking through cocoa-pod and it's working fine now i need to add one more library . so can i use the existing pod file or i should create new one
please help me here how to do that.
You can add your pod like this. And after you done that you should run a pod install.
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'myproject' do
pod 'AFNetworking', '~> 3.0'
pod 'GoogleAnalytics', '~> 3.14'
pod 'Mantle', '~> 2.0'
pod 'PureLayout', '~> 3.0'
end
Yes, you only need one pod file per project. I recommend that you look into the guides about using cocoapods on their website.
https://guides.cocoapods.org/using/index.html
I would recommend that you use the cocoapods OS X application as it will help you create pod files and update them.
https://cocoapods.org/app
Use Existing Pod file -> Open -> Add the library name.
If you add your library then open Terminal window, set your project path, then install, its finally installed the Library.
Terminal window -> cd path -> pod install
hope its helpful
I ran pod update and two libraries were updated. I then opened xcode and tried to build and run the application but the libraries that were updated both failed to build, one gave 65 compile errors and the other gave 27.
I have tried
Updaing cocoapods to the latest version but it made no difference
pod cache clean --all, also no difference
Confirmed ONLY_ACTIVE_ARCH is set the same in the pods and my app (both set to yet)
Reverting to the pervious versions of the libraries, still have compile errors despite them being in use for months before this without a problem
The libraries not compiling are SwiftyJSON and Kingfisher.
Here is a sample of the errors being produced, the selected error in the left pane is the top error in the right pane.
What other issues could be causing this problem?
Edit: The pod file
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Starscream', '~> 0.9.3'
pod 'Kingfisher', '~> 1.5'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git', :branch => 'master'
So I dont actually have a solution as to what was causing this but updating to Xcode 7 fixed it.
I just follow the link below to add the Google Analytics into my project.
https://developers.google.com/analytics/devguides/collection/ios/v3/
But when I used the pod update in my project
I got following result
Can anyone help me with this?
-------------edit---------
pod 'GoogleAnalytics' is good
but I think it lose something compare with pod 'Google/Analytics', '~> 1.0.0'
I'm not sure if it cause any effect
But I found the answer
just replace ios,'6.0' by ios,'7.0'
Try this, Open the Podfile replace the following line
pod 'Google/Analytics', '~> 1.0.0'
by this line
pod 'GoogleAnalytics'
Save the file and run:
pod install
References - https://cocoapods.org/pods/GoogleAnalytics
I wanted to write some unit tests using GRUnit & OCMock for an app using Realm. Even though the pods are installed and the paths should be correctly set, Xcode can't seem to find a number of files like RLMAccessor.h.
I get an "lexical or preprocessor issue"
I've tried a bunch of things like removing realm, downgrading, updating cocoapods, clearing the cache, adding the libraries and so on but nothing
seemed to work.
Anyone been able to set up Realm to work with GRUnit?
EDIT this how my pod file's set up. I'm using cocoapods but including real/headers didn't work for my test target.
target: myApp do
pod 'Realm' , '~> 0.92.2'
pod 'Localytics', '~> 3.1.1'
end
target :test do
shared_pods
pod 'Realm/Headers'
pod 'GRUnit', '~> 1.0.1'
pod 'OCMock', '~> 3.2.1'
end
Using Realm 0.92.2, Xcode 6.3.1
So I fixed it by upgrading to a newer GRUnit version then downgrading agin because GRUnit didn't work anymore and removing pod 'Realm/Headers' with pod 'Realm' and ran pod install again.