Fastlane and Cocoapods cannot share a Gemfile

Bitrise Build Issue Report template

Description of the issue

I’m trying to move to using a Gemfile to manage my tooling dependencies (Cocoapods and Fastlane) and I can’t seem to have a single Gemfile that enables both on Bitrise.

I have a React Native project and so my iOS project is in the ios directory in my project root, my fastlane directory is also in my project root. My Podfile is in the ios directory.

Try <project_root>/ios/Gemfile

If I create <project_root>/ios/Gemfile then cocoapods-install finds the Gemfile and proceeds to use it, no issues there:

Searching for gem lockfile with cocoapods gem
Found gem lockfile: /Users/vagrant/git/ios/Gemfile.lock

However fastlane then fails to find the Gemfile:

Determine desired Fastlane version
Gem lockfile does not exist

Try <project_root>/Gemfile

If I move the Gemfile into the project root then cocoapods-install fails to find it:

Searching for gem lockfile with cocoapods gem
No gem lockfile with cocoapods gem found at: 
Using system installed CocoaPods version

The build fails at this point because the Podfile enforces the use of bundle exec.

Environment:

Where did the issue happen?

Bitrise Stack: Xcode 11.6.x, macOS 10.15.6

Which build Step causes the issue and which version of the step?

Either cocoapods-install or fastlane.

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : Every time
  • Does upgrading the build Step to the latest version help? : NO

Build log

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