Viro: Building with bitcode enabled

Created on 7 Nov 2018  ·  7Comments  ·  Source: viromedia/viro

Environment

Please provide the following information about your environment:

  1. Development OS: Mac
  2. Device OS & Version: iOS 12.0
  3. Version: ViroReact version 2.11 and React Native version 0.57.2
  4. Device(s): iOS

Description

When building a release-version of our app with bitcode enabled I get this error:
❌ ld: ~/node_modules/react-viro/ios/dist/lib/libViroReact.a(VRTPortalScene.o) does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file ~/node_modules/react-viro/ios/dist/lib/libViroReact.a for architecture arm64

The wierd thing is that this command:
lipo -info ../../node_modules/react-viro/ios/dist/lib/libViroReact.a
returns
Architectures in the fat file: ../../node_modules/react-viro/ios/dist/lib/libViroReact.a are: armv7 x86_64 arm64

Is this is known issue? It works when bitcode is disabled, but we don't want that.

Most helpful comment

It's mostly because enabling bitcode would shrink our app size significantly. So not a huge problem, but a highly desired feature.

All 7 comments

Just ran into this after a hell of a time resolving the errors caused by RN/xcode 10 not properly installing third party contents from react-native/third-party, and then it turns out glog creates a broken config if you just run ./configure in the glog folder so you need to run the script in react-native/script, and THEN a reference to libfishook.a wasn't properly linked in RCTWebsocket so you need to delete it and re-add and NOW finally the last error I get is the linker error, requiring bitcode to be disabled.

React native is quite a headache sometimes... 😆

Hi @KimAM, this is a known issue as compiling with bitcode is not supported at this time. Is there a reason you need bitcode supported? The issue might be occurring due to one of our dependencies.

Hi @KimAM ,
As @VikAdvani pointed out earlier - ViroReact is built with enable_bitcode set to NO since one of our dependencies -> GVR IOS SDK is built without bitcode. That's why we have to build without bitcode.

There are plans to make viro more modular right? In the sense that I need none of the VR components if I'm making purely an AR app. I believe I saw a comment about this on a closed github issue, and am just wondering out of curiosity.

This is on our roadmap/backlog but has not been a priority. It is something we will take a look at as we add more device support but there are no near term plans for greater modularity.

It's mostly because enabling bitcode would shrink our app size significantly. So not a huge problem, but a highly desired feature.

Hi guys

there're any update on this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vuthanhtrung0504 picture vuthanhtrung0504  ·  5Comments

parideis picture parideis  ·  4Comments

starantino picture starantino  ·  6Comments

Thomas101 picture Thomas101  ·  3Comments

slycoder picture slycoder  ·  4Comments