Install Cocoapods : Brew vs Regular installation - ios

Background :
We have an app that embeds Flutter as module in our iOS project. When i install cocoapods using the original option from cocoa like this :
$ sudo gem install cocoapods
and then run pod install in my iOS project, i get the Flutter module thrown out of project file, like mentioned in this issue :
XCode 13.3 Pod Install Removes Path To Flutter Module
Although, i found a workaround : i installed cocoapods using Homebrew and it works perfectly.
My question here is: What is the key difference, or what are the differences between the original website installation of cocoapods and the homebrew one?
NOTE: The same behavior is noticed for apple silicon and intel chips.

Related

XCode 13.3 Pod Install Removes Path To Flutter Module

we are using Flutter as a Module embedded in our project, and we have some problems.
When upgraded to xcode 13.3 , we run into an issue :
Running pod install in the iOS project removes the path to the flutter module like this:
When discarding these lines the project runs and all good, but when including those changes i get a crash:
dyld: Library not loaded: #rpath/App.framework/App
Referenced from: /private/var/containers/Bundle/Application/SomeRandomGeneratedNumber/MyApp.app/MyApp
Reason: image not found
The question is :
Was there a change for the flutter module configuration so the pod install removes the path to the flutter module? how is it connected to xcode13.3 and is there a solution?
Found a workaround :
Install Cocoapods using HomeBrew and not Gem.
See continuation here :
Install Cocoapods : Brew vs Regular installation

The 'Pods-Runner' target has transitive dependencies that include statically linked binaries

Here's Flutter and Xcode versions:
Flutter 1.22.5 • channel stable
Version 12.3 (12C33)
I have a Flutter application and I get the following error when trying to install the pods:
The error message was about AgoraRtcEngine, previously I was using agora 3.2.1 and the error message complained that I need 3.3.1 and then I upgraded it.
Then I try to install all the dependencies, unfortunately, I got the The 'Pods-Runner' target has transitive dependencies that include statically linked binaries error.
I tried below commands but failed with the attached error:
flutter clean
remove ios/Flutter/Flutter.framework
remove PodFile and PodFile.lock
flutter build ios
Does anyone know what is the cause and how to solve it? Thanks.
You might want to update CocoaPods, what version are you currently using
https://github.com/CocoaPods/CocoaPods/issues/7234#issuecomment-346119807
follow the instructions that are given in terminal output:
sudo gem install cocoapods
you might wanna upgrade your CocoaPods and also your flutter version
upgrading your installing CocoaPods -> "sudo gem install cocoapods"
this will take a while or throw error, incase of error try manually downloading cocoapods from web " https://cocoapods.org/app " this will download a dmg application file.
and for flutter
try "flutter upgrade"

Could not build module 'nanopb' error in Xcode 12.0.1

I upgraded my Xcode to 12. Everything was working perfectly and all of a sudden I kept getting bellow error message (Image below)
SO link have tried using to solve this issue
SO Link
What I've done so far
Cleaned Build Folder
Restarted Xcode
Updated Cocoapods
Deleted DerivedData
Cleared pod cache
Deleted pods directory and file and reinstall
None of them worked and its getting frustrating.
Pod file
All I did was to follow the instruction(see image below) and it got fixed.
Source here
I had the same problem with a project still targeting iOS 8 as the minimum iOS version. This steps solved my problem:
Update minimum target iOS version to iOS 9 on Podfile file;
Open terminal on project folder, remove all pod file dependencies and update them by running:
rm -rf /Pods
pod repo update
pod install
Update minimum project target iOS version to iOS 9;
Remove DerivedData;
Clean project;
Compile/run project again.
A simpler solution is to update cocoapods to the 1.10 version
First, update the CocoaPods installation :
[sudo] gem install cocoapods
Then, update your project : bundle update cocoapods
Finally, run pod install and everything should be OK :)
If the previous solutions did not help someone, then try changing it this way:
#include <nanopb/pb.h>
->
#include "nanopb/pb.h"
This issue CAN be the result of developing iOS on an M1 (Apple Silicon) machine. In this case, the only way to fix the problem is to download a Ruby extension called "ffi" which you can read about here (for extra information): https://rubygems.org/gems/ffi/versions/1.0.9
To do this:
In Terminal, install ffi onto your machine using this command:
sudo arch -x86_64 gem install ffi
Then in your project file, install your podfile with this command:
arch -x86_64 pod install
This should allow you to install your pods (especially if you were getting a "zsh: abort pod install" problem. Notice Terminal will warn you "a bug in the Ruby interpreter or extension libraries".
After this, if your pod was FireStore/FireBase you may have to get another GoogleService-Info.plist file in your project.

Getting error while generating iOS build using ionic that is "The sandbox is not in sync with the Podfile.lock." in MAC Mojave

Recently I am getting this "The sandbox is not in sync with the Podfile.lock" issue.
This source codes were running good in previous mac OS, means after Mojave update it build is not running... I have checked and tried to solve by cocapods related issue.
I have checked many similar questions answers but no one is working for me.
Is there any solution at this situation?
as the error say u need to install the pod or update cocoa pods in your project run:
to install cocoapods
sudo gem install cocoapods
pod repo update
and then go to platform/ios and run :
pod install
and if need it remove the ios platform and add it again to 4.5.5 and install the pod again

How cocoapods works with xcode 6 on OSX 10.9.3?

please help me on this. I've updated my xcode to xcode6 and now I'm not able to run my application on it due to cocoapods errors. I searched around the web also follow the below steps :
Open Xcode 6
Open Preferences (Menú Xcode-Preferences)
Click the Locations tab
Change the Command Line Tools version to Xcode 6.0
Uninstall from a terminal window cocoapods (all installed versions prompted)
$ sudo gem uninstall cocoapods
Uninstall xcodeproj (all installed versions prompted)
$ sudo gem uninstall xcodeproj
Install xcodeproj
$ sudo gem install xcodeproj
Install cocoapods (retry a second time if fails with a error)
$ sudo gem install cocoapods
Run pod –version to verify that it worked
But Still I'm getting error on pods. My application is running well in xcode 5.1.1 but not in xcode 6. I'm getting error on "SDWebImageDownloaderOperation.m" file and the error is semantic issue.
One more thing when I'm doing pod update in my project folder where the podfile installed, Removing SSToolkit shown and SSToolkit folder removed from project folder. But in xcode 5.1.1 SSToolkit is there.
please someone help me to rid of this issue....
thanx
Your problem is with SDWebImage, not with cocoapods. because of the presence of the getter attribute on the executing and finished properties, the newer version of XCode is not auto-synthesizing the variables.
There should be a compatible version RSN, but to work around it for the time being, you should change your podfile for the package to add the version:
pod 'SDWebImage', :head
Once it gets released you can remove the reference to :head
Note this is a real 'short time window' question - This package will probably start working again in a few days without intervention from anyone barring a pod update.
This is the problem with the SDWebImage.
Just replace _executing with self.executing.
And clean your code and build it again.
Thanks
Sarabjit Singh

Resources