CocoaPods: Installing a pod while excluding certain components - ios

I'm trying to install the mParticle_Extended pod. However it contains an AppBoy component that is conflicting with another pod in my Podfile called Appboy-iOS-SDK.
My question is how to specify that I want to install mParticle_Extended, but without the AppBoy component so that I don't have a linker conflict between the two pods.
Thanks!

According to https://cocoapods.org/?q=mparticle, you can add pod 'mParticle-iOS-SDK/mParticle', '~> 5' in your Podfile to install mParticle only. You can also specify the kits you want to install through mParticles by something like pod 'mParticle-iOS-SDK', :subspecs => ['Appboy', 'BranchMetrics', 'Localytics'], '~> 5'.

Related

How to install LinqToObjectiveC cocoapod?

I use pod 'LinqToObjectiveC' to install this specific cocoapod but i get back [!] Unknown command: LinqToObjectiveC
Did you mean: deintegrate?
There are no specific instructions at https://cocoapods.org/pods/LinqToObjectiveC
I do not know if i can install it using the pod command or not.
Any help to install it via pod command?
You need to add the following lines to your Podfile:
pod 'LinqToObjectiveC', '~> 2.1'
more info: https://cocoapods.org/pods/LinqToObjectiveC

CocoaPods could not find compatible versions for pod "Firebase/Crashlytics"

I am developing react-native app.
I followed the firebase instruction adding my iOS app to my firebase project.
In my Podfile, I have:
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
when I run pod install I keep getting the error saying "CocoaPods could not find compatible versions for pod "Firebase/Crashlytics".
Xcode version 11.7, target iOS10.1
Why I get that error and how to get rid of it?
(I tried run pod update 'Firebase', I get:
[!] The Firebase Pod is not installed and cannot be update)
Make sure that your project's minimum deployment target (the one that referenced in your Podfile) is at least iOS 9 (see Firebase/Crashlytics release notes)
Unfortunately when cocoapods initially create the Podfile, doesn't take into account your projects minimum deployment target. Instead adds a default value in a comment.
The first time that you run pod install you will get a warning about not specified minimum deployment target. Also cocoapods documentation doesn't mention anything regarding this behavior.
So, you have to have to manually edit your Podfile and add something like this:
platform :ios, '10.1'
No issue with the deployment target but got the same error. It was working with the following versions of Firebase
pod 'Firebase/Core', '~> 3.0.0'
pod 'Firebase/Crashlytics', '~> 7.0.0'
When I added a new dependency and run pod install, It was showing the error for Firebase. So, I used the >= 0 in place of the version.
pod 'Firebase/Core', '>= 0'
pod 'FirebaseCrashlytics', '>= 0'
This will install the latest version for all Firebase dependencies.

Issue with importing framework in Swift with Cocoapods

I am new to Swift, but I learned the basics. I wanted to import a framework but I ran into issues. I will now explain what steps I followed and what failed.
I installed cocoapods by using terminal command: sudo gem install cocoapods
I then navigated to my projects root directory with terminal then used command: pod init
It created a podfile, and I edited it as I have shown below.
platform :ios, '8.0'
use_frameworks!
target 'Testy' do
end
target 'TestyTests' do
pod 'Kingfisher', '~> 1.8.1'
end
target 'TestyUITests' do
pod 'Kingfisher', '~> 1.8.1'
end
I then closed xcode and started the project by clicking 'Testy.xcworkspace' file.
At this point, I did not add any code, just built the project without issues, problems start here.
When i try to import my framework and build, it gives the follow error:
Cannot load underlying module for 'Kingfisher'
So what might be the problem here? If you need additional info, ask me and I can provide.
In your Podfile, you do not have "pod 'Kingfisher', '~> 1.8.1'" listed for the target "Testy".

CocoaPods pod install. Modules cannot be imported

I installed CocoaPods by using $ sudo gem install cocoapods.
I have a swift Xcode project with the following podfile
platform :ios, '8.2'
use_frameworks!
target 'Clover' do
pod 'Alamofire', '~> 1.2'
pod 'SwiftyJSON', '~> 2.2'
pod 'ObjectMapper', '~> 0.12'
pod 'ImageLoader', '~> 0.3.0'
pod 'SVProgressHUD'
end
target 'CloverTests' do
end
After I run pod install, which seems to run correct with no error messages, I have a Pods folder generated with Pods.xcodeproject along with several other files.
However, when attempting to compile the project, I will into errors telling me my modules are not found. The error message is No such module followed by the module name.
I then attempted to install the modules manually and confirmed that the pods are indeed not working as each module after its manual installation, works.
I have searched and attempted several solutions as follows:
Deleted and reinstall pod.
Upgraded ruby to 2.2.1
Delete the pods folder and re-run $ pods install.
Clean the project.
More a comment than an answer, but I don't have enough reputation to comment:
When you use pod install with your-project.xcodeproject, it creates a new file/folder named your-project.xcodeworkspace (…project becomes …workspace) and this is this new file that you should open.
You didn't mention whether or not you knew that, so here you go: close the .xcodeproject in Xcode and open the .xcodeworkspace instead and it should work.

Unable to install Parse package via Cocoapods. Missing library

Senario:
I'm studying parse.com inter-table relationship via code.
I've set up a cocoapod dependency and am working from the .workspace.
This is the podfile content:
platform :ios
pod 'Parse', '~> 1.7.2.1'
However I received the following compiler error:
Apparently I'm missing a Library.
What am I doing wrong?
Try rerunning pod update from the project folder via the command line, then cleaning your build.
Also, you don't need to be quite to specific with your podfile. Try this instead:
platform :ios
pod 'Parse', '~> 1.7'

Resources