Playground does not execute on first chapter

A bit off-topic, but using git submodules instead of cocoapods seems to be working fine with playgrounds.

Like here https://www.raywenderlich.com/155150/dependency-management-using-git-submodules.

Installing cocoapods version 1.3.1 worked for me too. This issue can be a real
pain in the ass

1 Like

@boyks I was able to get cocoapods 1.3.1 to work with the Realm book, After messing around a while. if you modify the bootstrap.sh file to be pod _1.3.1_ install you won’t need to uninstall 1.5

1 Like

None of the solutions mentioned worked for me, not even uninstalling CocoaPods 1.5.0 and installing 1.3.1. @scotteg, do you have any other option we can try? Thanks!

I tried the solution that @idiot mentioned, using git submodules. Worked like a charm. The link that @idiot mentioned was useful - in particular look at the section “Working With A 3rd Party Dependency”.

You should also refer to GitHub - ReactiveX/RxSwift: Reactive Programming in Swift where there are instructions for manually installing using git submodules. It is a simple process.

Note: The error goes away only after you build the project containing the playground.

1 Like

Hi @jcabrera, if nothing else has worked for you (including a complete nuke and repave), then maybe try using git submodules instead? I haven’t tried it because CocoaPods is working for me, but this solution seems to be working for others.

1 Like

cocoapods 1.4.0 should probably work too according to Playgrounds regression between CocoaPods 1.4.0 and CocoaPods 1.5.0 · Issue #7689 · CocoaPods/CocoaPods · GitHub

Doing the nuke and repave while being on Cocoapods 1.3.1 did the trick! Thank you very much!

2 Likes

None of the solutions works for me. I have Xcode 9.3 with Swift 4.1, newest release of Cocoapods. Here are my error in the playground. This is totally frustrating…
Playground execution failed:

error: Couldn’t lookup symbols:
__T07RxSwift14ObservableTypePAAE2ofAA0C0Cy1EQzGAHd_AA018ImmediateSchedulerD0_p9schedulertFZ
__T07RxSwift10ObservableCyxGAA0C4TypeAAWa
__T07RxSwift10ObservableCMa
_T07RxSwift14ObservableTypePAAE2ofAA0C0Cy1EQzGAHd_AA018ImmediateSchedulerD0_p9schedulertFZfA0
__T07RxSwift14ObservableTypePAAE4justAA0C0Cy1EQzGAHFZ

I get the same thing - have you found a solution?

Using pods version 1.3.1 worked great for Xcode 9.3 with Swift 4.1
You guys are good.

Yup.

Works with cocoapods v 1.3.1

sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.3.1

1 Like

This worked for me. Here are my steps:

  1. Uninstalled all version of cocoapods
  2. Installed cocoapod version 1.3.1
  3. Create the project as instructed in the video
  4. Performed nuke and repave

On Xcode 9.2, Swift 4.1 toolchain running, I cleared the error by adding this inside Podfile, then pod install again

# Workaround for Cocoapods issue #7606
post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
    end
end

From Playgrounds regression between CocoaPods 1.4.0 and CocoaPods 1.5.0 · Issue #7689 · CocoaPods/CocoaPods · GitHub

4 Likes

@vinamelody Thanks! Finally working! (nuke did not work, did not try the submodule workaround)
Being on xcode 9.3, pod 1.5.0 (sooo glad I don’t need to downgrade cocoa pods, breaking other projects), seeing swift 4.1.2 being used with the source bundled in v2.0 of the book did the trick.

As there’s already a post_install hook and pod install complained on this. I added these lines just below the existing line post_install do |installer|:

installer.pods_project.build_configurations.each do |config|
    config.build_settings.delete('CODE_SIGNING_ALLOWED')
    config.build_settings.delete('CODE_SIGNING_REQUIRED')
end
2 Likes

I downgraded to 1.3.1, didn’t work. After that …

  1. I deleted the line ‘import RxSwift’
  2. Clean
  3. Build (with error)
  4. put back ‘import RxSwift’

Works!

Thanks for that! (also works for Realm BTW) - too bad v1.5 causes that much trouble …

The script looks like this then (just to make sure - this one works):

platform :ios, ‘11.0’

target ‘RxSwiftPlayground’ do
use_frameworks!

Pods for RxSwiftPlayground

pod ‘RxSwift’, ‘~> 4.0’
end

post_install do |installer|

installer.pods_project.build_configurations.each do |config|
config.build_settings.delete(‘CODE_SIGNING_ALLOWED’)
config.build_settings.delete(‘CODE_SIGNING_REQUIRED’)
end

installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings[‘CONFIGURATION_BUILD_DIR’] = ‘$PODS_CONFIGURATION_BUILD_DIR’
end
end
end

4 Likes

This solution works for me. Thanks

it works like a charm, thanks so much

I can confirm that this works with Xcode version Version 9.3 (9E145) and Pod version 1.5.2. Thank you so much!

Couldn’t get this to work with any of the solutions, then noticed my active scheme was an actual device. Set it to a simulator and everything worked!

1 Like