Unable to build Xcode project: "XCTest' does not contain bitcode"

Viewed 893

I have generated a basic react-native project and have configured the ios project to use Cocoa Pods.

The project builds fine and works with the iOS simulator when I run react-native run-ios, but if I open the project in Xcode and try to build and run on a physical device, I get the following:

ld: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework/XCTest' 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 '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using version Xcode version 10.2.1, react-native 0.59.8.

I'm new to Xcode and any ideas on how I could resolve this would be very very welcome!

Additional Info

I don't know much about Xcode configuration but I tried out disabling bitcode in the Podfile.

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings['ENABLE_BITCODE'] = 'NO'
  end

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

After a pod install, clean and build this resulted in another build failure with the linker complaining that it couldn't find certain files. Removing it from the podfile+clean+build resulted in the original error again.

0 Answers
Related