kiwi-bdd / Kiwi

Simple BDD for iOS
BSD 3-Clause "New" or "Revised" License
4.14k stars 512 forks source link

XCTest.framework/XCTest' does not contain bitcode #707

Closed PatrickDotStar closed 1 year ago

PatrickDotStar commented 6 years ago

Using Kiwi 3.0.0

When trying to run the Unit Tests on a real device, Xcode trows an error saying You must rebuild it with bitcode enabled. Running the tests on simulator works fine. Nimble had a similar issue. They way I solved this is setting the ENABLE_BITCODE to NO using cocoapods

if ['Kiwi'].include? target.name
    target.build_configurations.each do |config|
        config.build_settings['ENABLE_BITCODE'] = 'NO'      
       end
end

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

Is Bitcode actually really required?

haifengkao commented 5 years ago

to make PatrickDotStar's answer for clear add the following to the Podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if ['Kiwi'].include? target.name
        target.build_configurations.each do |config|
            config.build_settings['ENABLE_BITCODE'] = 'NO'
        end
    end
  end
end
amirmn72 commented 4 years ago

go to your target name => build setting=> EnableBitcode
change the value to no