Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use cocoapod #584

Closed
hatjs880328 opened this issue Mar 29, 2016 · 19 comments
Closed

use cocoapod #584

hatjs880328 opened this issue Mar 29, 2016 · 19 comments

Comments

@hatjs880328
Copy link

Module file was created by an older version of the complier;rebuild 'RxSwift' and try again :.............../X86_64.swiftmodule

@hatjs880328
Copy link
Author

Xcode version is 7.3

@bontoJR
Copy link
Contributor

bontoJR commented Mar 29, 2016

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 RxSwift module

With all these information I think I can try to reproduce the error.

@hatjs880328
Copy link
Author

pods version is 0.39.0

podfile like 👍

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'

@hatjs880328
Copy link
Author

set Bitcode enabled
show :
cannot load module 'rxswift' as 'rxswift'

@hatjs880328
Copy link
Author

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

@bontoJR
Copy link
Contributor

bontoJR commented Mar 29, 2016

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?

@neonichu
Copy link

Haven't seen this ever so ¯_(ツ)_/¯

@hatjs880328
Copy link
Author

@neonichu
@orta

@kzaher
Copy link
Member

kzaher commented Mar 30, 2016

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.

@tomburns
Copy link
Contributor

tomburns commented Apr 4, 2016

@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?

@kzaher
Copy link
Member

kzaher commented Apr 4, 2016

Hi @tomburns ,

I guess we could, but I'm little confused. Last time I've tried to run unit tests on device:

screen shot 2016-04-04 at 23 29 19

@kzaher
Copy link
Member

kzaher commented Apr 20, 2016

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 kzaher closed this as completed Apr 20, 2016
@tomburns
Copy link
Contributor

@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.

@kzaher kzaher reopened this Apr 21, 2016
@tomburns
Copy link
Contributor

tomburns commented Apr 21, 2016

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)

@kzaher
Copy link
Member

kzaher commented Apr 21, 2016

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.

@kzaher
Copy link
Member

kzaher commented Apr 21, 2016

Is there any way of disabling bitcode in podspec?

@retsohuang
Copy link

retsohuang commented Apr 26, 2016

I think you can add this line of code in your pod spec.

s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO' }

Reference

@kzaher
Copy link
Member

kzaher commented May 15, 2016

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 :)

kzaher added a commit that referenced this issue May 15, 2016
@kzaher
Copy link
Member

kzaher commented May 15, 2016

Attempt #2 to close this issue. Feel free to reopen it if it's not working :)

@kzaher kzaher closed this as completed May 15, 2016
icanzilb added a commit to icanzilb/RxSwift that referenced this issue May 23, 2016
# By Krunoslav Zaher (23) and others
# Via Krunoslav Zaher
* 'master' of https://github.com/ReactiveX/RxSwift: (72 commits)
  Improves unit tests.
  Updates RxDataSources.
  Changes 2.5 to 2.5.0.
  Adds 2.5.0 changes to CHANGELOG.
  Makes `NSTextField` implement `RxTextInput`.
  Fixes Wikipedia automation tests.
  Improves delegate proxy messaging. ReactiveX#675
  Turns off bitcode for RxTests. ReactiveX#584
  Release 2.5
  More comprensible `ActivityIndicator`
  Improve language in comment
  Use new Swift selector syntax in comment
  Update comment to use new non-deprecated method
  Fix argument key in comment
  Typo in comment 'extensions' with an 's'
  Improves documentation for `DelegateProxy.observe`. ReactiveX#654
  Adds unit test for only setting different text values.
  Provides explanations for check.
  Fixes problems with two way binding that was caused by `rx_text` and always setting the text value even when the value was equal, and thus clearing the marked text state. ReactiveX#649
  Add missing Next link
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants