use cocoapod
Module file was created by an older version of the complier;rebuild 'RxSwift' and try again :.............../X86_64.swiftmodule
Xcode version is 7.3
Hello @hatjs880328, can you please try to clean the build folder or even delete the derived data and try to build again?
If it doesn't work, can you give more details about this error, such as:
- Toolchain used in Xcode (you can see it under
Xcode -> Toolchains - Cocoapods' version
- More details about the Podfile
- Example of the code importing the
RxSwiftmodule
With all these information I think I can try to reproduce the error.
pods version is 0.39.0
podfile like :+1:
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks!
pod 'SnapKit', '~> 0.19.1'
pod 'Alamofire', '~> 3.1.5'
pod 'RxSwift', '~> 2.3.1'
pod 'RxCocoa', '~> 2.3.1'
pod 'RxBlocking', '~> 2.3.1'
pod 'RxTests', '~> 2.3.1'
set Bitcode enabled show : cannot load module 'rxswift' as 'rxswift'
ld: '/Applications/xcode7.3/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. for architecture arm64
It sounds like a very strange problem considering that since 7.1 I never saw it anymore, I can't reproduce the problem, maybe @orta or @neonichu might have an idea how to solve this?
Haven't seen this ever so ¯_(ツ)_/¯
@neonichu @orta
Hi @hatjs880328,
according to
ld: '/Applications/xcode7.3/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. for architecture arm64
and Podfile, I would say that you are trying to include RxTests in non test target, and that's causing an issue.
I would suggest using new Cocoapods target syntax for defining dependencies so you can limit that RxTests are applied only to unit tests target.
@kzaher As far as I can tell, this is an actual issue anytime you're building for device with RxTests in the project, as XCTest does not include bitcode. Can we just change the build flag in the Rx project to disable bitcode for the test utility components?
Hi @tomburns ,
I guess we could, but I'm little confused. Last time I've tried to run unit tests on device:
Anyway, I think we can close this one, unsure what to more here. I think this was caused by using RxTests in app binary.
We can open new issues if this pops up in future.
@kzaher FWIW this is still an issue; I've worked around it by adding a post-install hook to my pod file, but it would be much simpler to simply disable bitcode for the RxTests target and I don't see what the harm would be. You're correct that you can't run framework logic tests on device, however you can run unit tests injected into an application bundle on device, which is where I ran into this issue.
RxBlocking's bitcode should be disabled as well if you decide to change them; as I understand it both are purely meant for use in test bundles, so this should be an acceptable change (until XCTest supports bitcode)
Hi @tomburns ,
I'm little confused, if you install using CocoaPods, it shouldn't make any difference if I turn bitcode on or off in project, right?
We are open to PRs. I'm not sure what action are you suggesting we should take. Bitcode is disabled for RxTests.
Is there any way of disabling bitcode in podspec?
I think you can add this line of code in your pod spec.
s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO' }
Thnx @retsohuang ,
I'll include this in RxTests for 2.5 because XCTest doesn't have bitcode turned on, and we can see how that will go :)
Attempt #2 to close this issue. Feel free to reopen it if it's not working :)