sub_server
sub_server

Reputation: 51

React Native Expo Build Failing due to cocoapods version

I am trying to run a building Expo but keep running into an error due to outdated Cocoapods.


    [!] `RNFBApp` requires CocoaPods version `>= 1.10.2`, which is not satisfied by your current version, `1.10.1`.
    Error: Your project requires a newer version of CocoaPods, you can update it in the build profile in eas.json by either:
     - changing the current version under key "cocoapods"
     - switching to an image that supports that version under key "image"

I have tried to update my eas file with the version I want as per the instructions, but it is simply ignored it seems :/


    {
      "cli": {
        "version": ">= 0.38.1"
      },
      "build": {
        "development": {
          "distribution": "internal",
          "android": {
            "gradleCommand": ":app:assembleDebug"
          },
          "ios": {
            "buildConfiguration": "Debug",
            "cocoapods": "1.11.2"
          }
        },
        "preview": {
          "distribution": "internal"
        },
        "production": {}
      },
      "submit": {
        "production": {}
      }
    }

Anyone have any ideas how I can fix this? My build runs fine locally and loads up on the simulator no worries.

Upvotes: 1

Views: 3602

Answers (2)

Pruteanu Alexandru
Pruteanu Alexandru

Reputation: 247

I had the same problem, all you have to do is replace your code with it and everything will work fine.

{
  "cli": {
        "version": ">= 0.38.3"
   },
   "build": {
         "development": {
             "distribution": "internal",
          "android": {
              "gradleCommand": ":app:assembleDebug"
           },
           "ios": {
               "buildConfiguration": "Debug",
                "cocoapods": "1.11.2"
           }
     },
    "preview": {
         "distribution": "internal"
    },
    "production": {
      "ios": {
       "cocoapods": "1.11.2"
     }
    }
 },
  "submit": {
     "production": {}
  }
}

You need to add this code to the production inside the build

 "ios": {
     "cocoapods": "1.11.2"
   }

enter image description here

Upvotes: 0

Maciej Sobczak
Maciej Sobczak

Reputation: 81

Since I've managed to go over this issue I'll share my story:

I'm running the following command on Windows:

eas build --profile release --platform ios

And here's relevant part of my eas.json:

  {
    "build": {
      "release": {
        "android": {
          "buildType": "app-bundle",
          "gradleCommand": ":app:bundleRelease"
        },
        "ios": {
          "cocoapods": "1.11.2"
        }
      }
    }
 }

Adding cocoapods key to eas.json fixed the issue in my case.

Upvotes: 3

Related Questions