kodecocodes / rxs-materials

The projects and the materials that accompany the RxSwift: Reactive Programming with Swift Book
Apache License 2.0
163 stars 88 forks source link

No such module `RxSwift` after running bootstrap script #1

Open AdrianBinDC opened 3 years ago

AdrianBinDC commented 3 years ago

I ran the bootstrap script for Chapter 2's starter project. Upon opening it in Xcode 12.1, I get the following error:

No such module RxSwift

anuj-rajput commented 3 years ago

I was having this problem in Xcode 12.4 but running ./bootstrap.sh clear and checking Build Active Scheme inside of Playground fixed my issue. You can find it in the right sidebar

liwenDeng commented 3 years ago

I was having this problem in Xcode 12.4 but running ./bootstrap.sh clear and checking Build Active Scheme inside of Playground fixed my issue. You can find it in the right sidebar

it works for me

comeonyoh commented 3 years ago

I have a similar problem when I tried to run ./boostrap.sh. I fixed the RxSwift module issue but faced RxRelay issue.

Also activate the 'Build Active Scheme' option. please help me.

nelson-cch commented 3 years ago

I have the same issue with RxRelay as well. I've tried ./bootstrap.sh clear + check Build Active Scheme, but issue persists.

seoulboy commented 3 years ago

I followed these steps and it worked for me.

Quit Xcode -> run ./bootstrap.sh clear -> Xcode will start up automatically -> In source navigator, select RxSwiftPlayground -> On the right side in the File Inspector under Playground Settings, check Build Active Scheme -> Build by pressing the keyboard shortcut, Command + B -> After the build has finished, try running the playground code with keyboard shortcut Command + Shift + Enter (return)

Hope this helps someone out there. It's strange how this is not set up to to work out-of-the-box.

olgusirman commented 3 years ago

Unfortunately these solutions didn't worked for me with Xcode 12.5.1.

seoulboy commented 3 years ago

@olgusirman The solution I posted stopped working after the recent Xcode update to 12.5.1 as well. I'm currently re-downloading the version 12.4 to see if it works. Here's a link to it if you're interested -> https://developer.apple.com/download/all/

Update: Upgrading the mac OS to 11.5.1 & Xcode to 12.5.1 worked for me. (with Build Active Scheme enabled)

gloomikon commented 3 years ago

I also have XCode 12.5.1 and the solution above didn't help me 😢 However, I copied the files from 03-subjects/projects/starter/RxPlayground folder to other folders and it worked for me. For some reason, in the mentioned directory Rx is imported without problems.

olgusirman commented 3 years ago

@olgusirman The solution I posted stopped working after the recent Xcode update to 12.5.1 as well. I'm currently re-downloading the version 12.4 to see if it works. Here's a link to it if you're interested -> https://developer.apple.com/download/all/

Update: Upgrading the mac OS to 11.5.1 & Xcode to 12.5.1 worked for me. (with Build Active Scheme enabled)

Thanks @seoulboy , I will try to update mac os.🙋‍♂️

loinsir commented 2 years ago

From now on, It worked for me. (M1 Pro, 2020)

just run ./bootstrap.sh clean

This removes all caches about Rx Modules

gabrielcolmena commented 2 years ago

From now on, It worked for me. (M1 Pro, 2020)

just run ./bootstrap.sh clean

This removes all caches about Rx Modules

Thanks a lot, It worked

arslaman commented 1 year ago

Above suggestions with ./bootstrap.sh clean and Build Active Scheme worked for me on Xcode 14.2 on M2. I think it would be better if the author of the book updated the "Observables" chapter to include these instructions. CC @fpillet @scotteg @icanzilb

icanzilb commented 1 year ago

Thanks @arslaman, that's a good suggestion

jiexishede commented 8 months ago

RxSwift 15.1.0 RxCocoa 15.1.0 Xcode 15 show error: error: error while processing module import: Failed to load linked library swiftQuartzCore of module RxSwift - errors: