GYM_USE_LEGACY_BUILD_API is set to true but not documented anywhere

For OS X environments GYM_USE_LEGACY_BUILD_API is set to true but not documented anywhere. I wasted 2 working days on a problem that would have been solved if this were documented anywhere. I know that GYM_USE_LEGACY_BUILD_API is set to true from this comment on a tangentially related fastlane issue: https://github.com/fastlane/fastlane/issues/519#issuecomment-209521773

3 Likes

Agreed this needs to be documented, spent far too many hours to figure this out myself, and it took that comment on Github to realize it was intentional.

1 Like

On a related note, I cannot seem to get gym to work when overriding GYM_USE_LEGACY_BUILD_API to false. Due to some ruby incompatibility issue build archival fails. It seems to be using the system ruby. And I couldn’t find a way how to successfully override it to make it work.

Overriding the environment variable in our circle.yml worked for us. Like so:

machine:
  environment:  
    GYM_USE_LEGACY_BUILD_API: false

Does gym work for you successfully?

Setting GYM_USE_LEGACY_BUILD_API: false doesnt work for me either

It appears now that with the recent Ruby changes to the OSX containers that setting use_legacy_build_api to false now works for me and a few others.

Can someone at Circle confirm this works on a clean setup and remove the overriding default being set to false because it’s going to cause problems with newer Xcode and Swift as it wont compile at all when set to false. Plus the IPA file is usually 10 times bigger when set to false.

1 Like