erikdoe / ocmock

Mock objects for Objective-C
http://ocmock.org
Apache License 2.0
2.16k stars 606 forks source link

Added a 'pod_target_xcconfig' declaration in the 'OCMock.podspec' file to change the 'ENABLE_BITCODE' build setting value to 'NO' #505

Closed adil-hussain-84 closed 3 years ago

adil-hussain-84 commented 3 years ago

Without this, the 'ENABLE_BITCODE' build setting for the 'OCMock' target in the 'Pods' project resolves to 'Yes'. This then causes any testing target which links to 'OCMock' to fail to build when built to run on a real (non-simulator) device. The build error in such a scenario is the following:

'/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

See issue #46 in the SwiftHamcrest GitHub repository which displayed the same error and was resolved in the same manner as the change in this pull request.