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

Obstacle to learning RxSwift: "No such module 'RxSwift'" in example playgrounds #58

Closed
clozach opened this issue Jul 14, 2015 · 15 comments

Comments

@clozach
Copy link

clozach commented Jul 14, 2015

In order to learn RxSwift by example, I launched Rx.xcworkspace and clicked on Introduction.playground. Line 2 immediately came up with the error: No such module 'RxSwift'. The same happens if I open the playground (or any of the playgrounds in Playgrounds/ObservablesOperators).

Am I missing a step? Is this known to be broken?

Fwiw, this is in Xcode Version 6.4 (6E35b).

@carlosypunto
Copy link
Contributor

Hi @clozach

For the playgrounds work, you need build the library before.

1.- Select RxSwift-OSX Scheme, Product -> Scheme -> RxSwift-OSX menu
2.- Select Product -> Build menu or Command+B

Then playgrounds must work.
Remember to activate Assistant editor for to see the outputs

@kzaher
Copy link
Member

kzaher commented Jul 17, 2015

We'll add instructions to playgrounds, so it will be clearer in future.

@clozach clozach closed this as completed Jul 23, 2015
@clozach
Copy link
Author

clozach commented Jul 23, 2015

Thanks!

@paddlefish
Copy link

This error will also occur if you have the Xcode -> Preferences -> Locations -> Derived Data [ Advanced... button ] -> Build Location = Legacy.

To fix it choose Build Location: Unique (which I think is the default).

@XueSeason
Copy link

good job! Thx.

@PrajeetShrestha
Copy link

Hi, I tried to integrate Playgrounds and tried to tested playground inside workspace made my cocoapods. But it shows these errors. Any idea?
image

@sergdort
Copy link
Contributor

sergdort commented Jun 8, 2017

Hi, @PrajeetShrestha did you build RxSwift-MaOS target before?

@PrajeetShrestha
Copy link

Hi Sergdort. As I mentioned. It is not this repo that I cloned. But I am integrating RxSwift in my own project through cocoapods. I created playground in there as well. I am able to import RxSwift and RxCocoa in the playground file but can't use the above method. There is no RxSwift-MacOS Target hence.

@sergdort
Copy link
Contributor

Oh, sorry my bad :)

Which target contains MyPlayground is it TestRx?
If so have you build TestRx ?

@aelam
Copy link

aelam commented Jun 30, 2018

I cleaned the 'DerivedData', and built the RxSwift-macOS scheme, and checked that the framework is there, but in playground, it still doesn't work

@quanguyen
Copy link

Hi,

Please show me how to build RxSwift-macOS to get rid of this No such module 'RxSwift' from RxSwiftPlayground.swift. I've been struggling with this for an hour but still don't know how. Below is my screenshot:

screen shot 2018-10-03 at 5 19 19 pm

The instruction at the top of the page writes:

Please build the scheme 'RxSwiftPlayground' first

I tried to build but the still is not gone.

Thanks,

@quanguyen
Copy link

Oh shoot! I just found how to fix this: selecting a simulator instead of a physical device!

screen shot 2018-10-03 at 5 41 23 pm

(I referenced from this link)

Regards,

@JAIRMG
Copy link

JAIRMG commented Jan 30, 2019

The sources folder into playground file is empty, I already deleted the derived data

@dipkasyap
Copy link

Screen Shot 2020-07-09 at 1 44 49 pm

In my case Checking "Build Active Scheme" solved the problem.

@ReactiveX ReactiveX locked as resolved and limited conversation to collaborators Jul 12, 2020
@freak4pc
Copy link
Member

The original thread is 5 years old and from Xcode 6.4. If someone has a modern issue with it, it would be advisable to open a new issue, so we can track it :) Thanks !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests