Installing Realm via CocoaPods - ios

I am trying to install Realm (Objective C) via Cocoapods.
However I keep getting the following error:
Pods/Realm/Realm/module.modulemap:1:18: Redefinition of module 'Realm'
Has anyone faced this problem?
I've tried downloading their CocoapodsExample project but I get the same error.

This is a known issue with CocoaPods 0.38.1, being tracked at https://github.com/CocoaPods/CocoaPods/issues/3886. In the meantime, you can gem install cocoapods -v 0.38.0 and run pod _0.38.0_ install to use CocoaPods 0.38.0, which does not have this issue.
This should now be fixed in CocoaPods 0.38.2.

Related

Facing issue while trying to init the pods on project

I hope you all are doing well.
I'm facing issue while trying to init the pod in the project. Cocoapods is already installed in the system. XCode Dev intstall is also there, In XCode in command line the xcode version is also selected. Don't know what I'm missing. I have MacOS BigSur.
If I run pod --version command on terminal it gives me version of 1.8.4.
I'm attaching the screenshot if someone has faced this issue.
I have the same issue. I solved it by following these steps:
First uninstall cocoapods with the command:
brew uninstall cocoapods
Reinstall Cocoapods:
sudo gem install cocoapods

Error in installing pods with pod install

got an error in installing pods while doing pod install. I have tried cleaning, deintegrating and reinstalling pods.
i also cleaned the project many times but got no positive results.
[!] The plist file at path `path` doesn't exist.
in most of the case it happen because there is some problem in cocoapod library or cocoapod library is not installed so try below code in terminal and install cocoapod
may it will work
sudo gem uninstall cocoapods
Verify that you have moved to the correct folder where the pod file is located

XCode: 'pod init' failing with ruby json "incompatible library version" error

I created a new XCode project and ran pod init at where that project exitsts. I got the following error.
/Users/xxx/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require': incompatible library version - /Users/xxx/.rvm/gems/ruby-2.3.0/gems/json-2.0.2/lib/json/ext/parser.bundle (fatal)
I didn't make any modification to my project. Where is the error coming from? It seems like it's coming from ruby, but it's weird to have a ruby error on a XCode project. Does anyone know how to solve this?
Thanks,
Seems like an issue with your Cocoapods installation, try uninstalling and reinstalling it.
Uninstalling
gem uninstall cocoapods
gem uninstall cocoapods-core
gem uninstall cocoapods-downloader
Reinstalling
gem install cocoapods

Ignore compilation warnings when using CocoaPods in Swift

First of all:
inhibit_all_warnings!
do not work for Pods written in Swift, like Alamofire. It works only for other Pods, written in Objective-C. How do I block all the warnings?
UPDATE:
This has been fixed in CocoaPods version 1.0.0.beta.1.
There is no workaround to fix it. It's a CocoaPods known issue and they are working on it, said Alamofire : https://github.com/Alamofire/Alamofire/issues/937
When it will be fixed, you will just have to update CocoaPods by simply install again your gem:
$ [sudo] gem install cocoapods

Cocoapods use_frameworks! issue

I found out that the way to resolve an issue, in a library i'm using, is to add use_frameworks! to the podfile. When i run pod install on the terminal, i get the following error:
[!] Invalid Podfile file: undefined method `use_frameworks!' for #.
Updating CocoaPods might fix the issue.
I'm using Cocoapods so i don't understand this issue. This tag is required for projects using swift, i'm using objective-c.
Looks to me like the second part of that error message:
Updating CocoaPods might fix the issue.
Is your issue. use_frameworks! was added in CocoaPods 0.36.0 which was just released recently.
Use pod --version to see what you're currently running. Assuming it's earlier than 0.36.0 you'll need to update it with
[sudo] gem install cocoapods
Which is just the same way you originally installed it.
I had the same issue when trying to run pod install on my mac.
So incase anyone encounters this issue what worked for me was changing the current ruby version with rvm.
On console, Use rvm list to see what versions you have installed:
So the version of ruby that was running on my mac was ruby-2.1.2.
I changed it with:
rvm use ruby-2.2.2
and ran pod install again and it worked.

Resources