CapacitorGoogleAuth icon indicating copy to clipboard operation
CapacitorGoogleAuth copied to clipboard

Can build the project, getting pod error

Open antonijap opened this issue 3 years ago • 8 comments

 ~/Code/lova/ [master+*] npx cap update
✔ Updating iOS plugins in 41.85ms
[info] Found 5 Capacitor plugins for ios:
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @codetrix-studio/[email protected]
✖ Updating iOS native dependencies with pod install - failed!
✖ update ios - failed!
[error] Analyzing dependencies
        [!] CocoaPods could not find compatible versions for pod "GoogleSignIn":
        In Podfile:
        CodetrixStudioCapacitorGoogleAuth (from `../../node_modules/@codetrix-studio/capacitor-google-auth`) was
        resolved to 0.0.1, which depends on
        GoogleSignIn (~> 6.0.1)
        
        None of your spec sources contain a spec satisfying the dependency: `GoogleSignIn (~> 6.0.1)`.
        
        You have either:
        * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
        * mistyped the name or version.
        * not added the source repo that hosts the Podspec to your Podfile.

When I run npx cap update I get this error and I don't know what to do. I googled but it seems nobody else had this issue.

antonijap avatar Jun 18 '22 10:06 antonijap

I have the same problem on my M1 Mac and can't solve it; this error is not occurring on my Intel Mac.

trickstar13 avatar Jul 22 '22 08:07 trickstar13

If the problem is caused by Apple Silicon (M1), it seems related to the following issue. https://github.com/firebase/firebase-ios-sdk/issues/7208

Unfortunately, the solution could be using a different dependency other than GoogleSignIn SDK... https://github.com/google/GoogleSignIn-iOS

I hope to hear from other users who succeeded to pod installing on M1 Mac, though.

trickstar13 avatar Jul 22 '22 10:07 trickstar13

Hi, I finally solved this error. I am not quite sure why this solved my problem but want to share what I did here.

  1. Uninstall rbenv
  2. Install Homebrew for ARM (Open terminal without using Rosetta)
  3. Install rbenv with Homebrew
  4. Install the different version ruby from the system with rbenv (I’ve installed 2.7.3)
  5. Set ruby to a different version (rbenv global 2.7.3)
  6. pod update
  7. pod install

trickstar13 avatar Jul 22 '22 13:07 trickstar13

@trickstar13 I am glad that you got it working in your end.

I installed the rbenv with Homebrew but still not working for me. My version is 1.2.0 even after running brew upgrade rbenv.

Could you please list the scripts you run to get it working in your end? Maybe I am missing something.

Olivr3 avatar Jul 28 '22 20:07 Olivr3

I have the same issue on an Intel Mac (MacBook Pro 2015)

mirko77 avatar Sep 06 '22 14:09 mirko77

@trickstar13 's steps worked for me . Note that I feel like some others missed that he used rbenv to install version 2.7.3 and then made that global, so roughly:

  • rbenv install 2.7.3
  • rbenv global 2.7.3

I also had to change into the directory containing my podfile and run pod install --repo-update, so:

  • cd ios/App
  • pod install --repo-update

After that everything worked.

taxilian avatar Apr 03 '23 19:04 taxilian

In case this is still relevant and helpful for someone. I had the same issue on my Intel Mac. I tried to directly run pod install --repo-update (in ios/App) and got the following error Screenshot 2023-06-03 at 06 34 06

Based on this screenshot , I did the following:

  • cd ios/App
  • pod update GoogleSignIn

Screenshot 2023-06-03 at 06 40 27

After that it worked fine and I am able to run npx cap update

aumbit-developer avatar Jun 03 '23 04:06 aumbit-developer

@aumbit-developer thanks dude, you made my day!

PhantomPainX avatar Jun 06 '23 18:06 PhantomPainX