Using cocoapod plugins / bundle install on eas build

I am trying to use a plugin called cocoapods-user-defined-build-types which I have added to my project with a Gemfile, but the eas build errors each time with the following error.

Do I need to write a pre-install step in order to get the proper gem installed before pod install?

Installing pods

[!] Invalid `Podfile` file: undefined method `enable_user_defined_build_types!' for #<Pod::Podfile:0x00007fbd9da3de70>.


 #  from /Users/expo/workingdir/build/ios/Podfile:6

 #  -------------------------------------------

 #  plugin 'cocoapods-user-defined-build-types'

 >  enable_user_defined_build_types!

Error: pod exited with non-zero code: 1


Error: pod exited with non-zero code: 1 at ChildProcess.completionListener (/usr/local/eas-build-worker/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23) at Object.onceWrapper (events.js:422:26) at ChildProcess.emit (events.js:315:20) at ChildProcess.EventEmitter.emit (domain.js:486:12) at maybeClose (internal/child_process.js:1048:16) at Socket.<anonymous> (internal/child_process.js:439:11) at Socket.emit (events.js:315:20) at Socket.EventEmitter.emit (domain.js:486:12) at Pipe.<anonymous> (net.js:673:12) ... at Object.spawnAsync [as default] (/usr/local/eas-build-worker/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21) at Object.spawn [as default] (/usr/local/eas-build-worker/node_modules/@expo/turtle-spawn/dist/index.js:17:42) at Object.installPods (/usr/local/eas-build-worker/node_modules/@expo/build-tools/dist/ios/pod.js:12:33) at /usr/local/eas-build-worker/node_modules/@expo/build-tools/dist/builders/iosGeneric.js:22:21 at BuildContext.runBuildPhase (/usr/local/eas-build-worker/node_modules/@expo/build-tools/dist/context.js:37:34) at Object.iosGenericBuilder (/usr/local/eas-build-worker/node_modules/@expo/build-tools/dist/builders/iosGeneric.js:21:15) at async build (/usr/local/eas-build-worker/dist/ios/build.js:76:16) at async Object.buildIos [as default] (/usr/local/eas-build-worker/dist/ios/build.js:29:31) at async Object.build (/usr/local/eas-build-worker/dist/build.js:31:31) at async BuildService.startBuildInternal (/usr/local/eas-build-worker/dist/service.js:128:33)

  Expo CLI 4.2.1 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
      Yarn: 1.22.10 - ~/.nvm/versions/node/v14.15.4/bin/yarn
      npm: 6.14.12 - ~/.nvm/versions/node/v14.15.4/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.10.1 - /Users/avacollins/.rvm/gems/ruby-2.7.2/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
      Android SDK:
        API Levels: 29, 30
        Build Tools: 28.0.3, 29.0.2, 30.0.3
        System Images: android-30 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 4.1 AI-201.8743.12.41.7199119
      Xcode: 12.4/12D4e - /usr/bin/xcodebuild
    npmPackages:
      expo: ~41.0.0 => 41.0.0 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: ~0.63.4 => 0.63.4 
    npmGlobalPackages:
      expo-cli: 4.2.1
    Expo Workflow: bare

solved with "eas-build-pre-install": "sudo gem install cocoapods-user-defined-build-types" in package.json

2 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.