I am using M2 Mac and using Kotlin Multiplatform and Flutter.
Since Cocopads from gem install cocoapads needs FFi and run along with arch -x86_64 , which is not possible when gradle scripts automatically running pod install by themselves,
I installed it via homebrew
But now the problem is, in order to use a pod library in gradle from a Kotlin Multiplatform project (inside Cocoapods { ... } ) , the gradle script is running pod gen, a utility from Cocoapods-Generate .
But the problem is, this Cocoapods-Generate not found in brew's cocoapods installation, because it is listed in Gem Repo only
So whats now happening now is,
If I install cocoapods via Gem , gradle building failed due to Arch mismatch problem. Whereas if I install via homebrew, cocoapods-generate not installed and pod gen command executed by gradle scripts failing.
So I can't find how to resolve this issue. Please help me.
I'm having similar issues. I think everybody's gratefully abandoning cocoapods in favour of Swift packages. There's a Kotlin SPM plugin, hopefully that makes KMM viable.
Related
I updated my machine (MacBook Pro, Intel Core) to Ventura and have not been able to run bundle install on a fresh repo since. The install seems to get hung up on gems that need to compile C code (e.g. msgpack).
I am running this within a docker container. I am on the latest version of docker.
There are no errors, the bundle command just hangs on the line Installing msgpack 1.6.0 with native extensions.
While debugging another issue running a server, I was able to run bundle install, but in an attempt to address that other issue, I deleted the .bundle directory and was attempting to reinstall the gems from scratch. This is when I ran into the above mentioned issue.
Expected that running bundle install would successfully install all of the specified gems in the Gemfile.
Edit:
Ruby version 2.7.4
Found out the issue was around nfs chunk sizing. Solution was to edit the docker/compose-files/volumes.docker-sync.yml file to add wsize=65536,rsize=65536 to the options.
So, when I run ruby -v in the terminal in Mac M1, I have the good version of Ruby which is ruby 3.2.0 that I installed with rbenv. The problem is when I run pod outdated in VsCode in my ios folder in flutter I get this
It uses my Ruby version pre-installed on my mac m1 which is the folder usr/lib/ruby and is an old version : 2.6
Also, I can't run my app with "Flutter run" I have lot of problems with everything related with pod (when I add packages like cloud_firestore). Maybe it's because of that, if someone can help me ?
I am using Appodeals ads integration on Unity LTS 2017.4.40f1 on mac os x Mojave 10.14.5.
The integration fails with an error in the Unity iOS Resolver window:
Installing CocoaPods...
gem install cocoapods --user-install
WARNING: You don't have /Users/developer/.gem/ruby/2.3.0/bin in your PATH.
gem executables will not run
ERROR: Error installing cocoapods:
zeitwerk requires Ruby version >= 2.5
Also in the unity console I get this error: "Failed to Install CocoaPods for the current user."
I have tried many things and all failed.
I have tried updating my ruby with brew but Unity does not recognize it.
When I type in terminal: ruby -v
I get: ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin18]
Unity still can't see the new Ruby
I tried to install cocoapods manually many times, it worked well but it's still not recognizable by Unity/Appodeal.
I tried to go with a terminal to the Unity project directory and install cocoapods with --user-install switch, and still nothing changed
I tried adding Ruby paths to $PATH, but nothing changes.
I tried multiple Ruby versions, including 2.3.0, 2.5.0 and 2.7.0
I restarted the system and Unity many times, and also tried reimporting the plugin
Tried multiple solutions from web, but nothing works.
My question is: how to resolve this problem so Appodeal works on my Unity 2017?
Extra question: why seemingly nothing works, why even with cocoapods installed Unity Appodeal still complains?
There is a flag that needs to be added --with-libyaml-dir=$(brew --prefix libyaml) --with-openssl-dir=$(brew --prefix openssl. Homebrew runs in the system context and so can't update ~/Library.
Steps are on this markdown: https://gist.github.com/RedenticDev/2c71869492ba2740a3725216898c522a
I had the same issue, though with different software versions. Unity 2020.3 on Big Sur (Mac OS 11).
Your other easier option might be to upgrade your Mac OS and then the version of Ruby will also be implicitly upgraded as well.
Not able install Cocoapods when I tried with this npx react-native init ProjectName command and getting below error. (MacOS Mojave 10.14.4)
⠙ Installing CocoaPods dependencies (this may take a few minutes)/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb:241:in `bin_path': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)
from /usr/local/bin/pod:22:in `<main>'
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./AwesomeProject/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
Please help to understand what's happening and how can we resolve this.
Thanks for the responses but as it turns out my macOS ruby/gems not updated.. I updated all the required things and followed same steps now it's working fine.
Background
A few years ago I installed cocoapods for a project I was working on. Since then I have not used it and now I need to update it to get Flutter working.
System
OS MacOS Mojave
Version 10.14.3
Question
I do not want to end up installing 2 different versions of cocoapods and cause myself a bunch of problems. I am trying to determine how I originally installed cocoapods so I can update it.
How can I determine how cocoapods was originally installed?
What I Tried
I can see cocoapods is installed because when I run,
pod --version the output is
1.3.1
When I run which cocoapods I get
cocoapods not found
When I run which pod I get
/usr/local/bin/pod
I checked that file and it is a cocoapods file installed by a ruby gem. This is what I see when I look at the file,
!/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
#
This file was generated by RubyGems.
#
The application 'cocoapods' is installed as part of a gem, and
this file is here to facilitate running it.
At this point I try and update it,
gem update cocoapods
I get,
Updating installed gems Nothing to update
When I run gem list I get a list of installed gems but pods nor cocoapods is in the list.
I also checked brew list and do not see it installed in there either. I can see evidence that it was installed as a gem but I do not understand why gem update cocoapods finds nothing to update.
Update
I broke down and went ahead and tried to install cocoapods as a gem since I already had the gem file in place.
gem install cocoapods
When I run gem list it shows that cocoapods was installed as version 1.6.1 as there are a bunch of new cocoapods files in my gem list.
When I run pod --version it still says 1.3.1.
I removed the pod file from /usr/local/bin and then ran pod --version again. At this point I get a command not found error.
After adding it back I can see the same output of the old version exists again. 1.3.1.
I tried removing the old pod file from /usr/local/bin and then gem install cocoapods. After doing so the pod command will not work but I can see that cocoapods is installed as a gem on my system.
Evidently there is a problem installing cocoapods on some newer MacOS systems due to the all of the permissions changes rolled out from Apple.
I saw a suggestion to install cocoapods on El Captain like this,
sudo gem install -n /usr/local/bin cocoapods
Which would explain why I have a rogue pod file inside of that directory.
Solution
I deleted the pod file out of my /usr/local/bin folder.
I installed cocoapods again using => sudo gem install -n /usr/local/bin cocoapods
Now when I run pod --version I get 1.6.1.