Realm - Building Modern Swift Apps : Script Error

I have started working through Realm - Building Modern Swift Apps and got a problem with Chapter 3. Having run the bootstrap script I get the following error message:

Playground execution failed:

error: Couldn’t lookup symbols:
_T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA7
_T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA3
_T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA4
_T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA8
_T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA
__T010RealmSwift0A0CA2C13ConfigurationV13configuration_tKcfC
_T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA1
_T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA5
__T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfC
_T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA2
_T010RealmSwift0A0C13ConfigurationVAE10Foundation3URLVSg04fileE0_SSSg18inMemoryIdentifierAA04SyncC0VSg04syncC0AF4DataVSg13encryptionKeySb8readOnlys6UInt64V13schemaVersionyAA9MigrationV_AWtcSg14migrationBlockSb06deletea2IfT6NeededSbSi_SitcSg21shouldCompactOnLaunchSayAA6ObjectCmGSg11objectTypestcfcfA6
__T010RealmSwift0A0CMa

I haven’t a clue how to resolve, any ideas anyone?

1 Like

Known issue I reported a couple days ago.

I haven’t been able to get any of the playgrounds working. For example the chapter 5 playground gave me:

Playground execution failed:

error: /var/folders/mt/5c87hjvx1db1xxlhtr0h1trh0000gn/T/playground2-f3f622…swift:3:8: error: no such module ‘Playground_Sources’
import Playground_Sources

I’d like to know if someone finds a fix to this problem as well…

Here is one way around playground framework issues. This is an alternative to bootstrap.sh

I tried that at some point (chapter 3?) and it didn’t work for me.

I am pleased to find I am not the only one having a problem. Perhaps it has something to do with the Xcode or Swift version installed. I am on Xcode v9.1 and Swift v4.0.2.

Interestingly the workspace detailed in Chpt 2 works without any issues.

Anyway, waiting for the Author to suggest a way forward.

Hey

  1. The book is only supporting Xcode 9.3
  2. We weren’t able to properly reproduce the issue but are looking into it.

Thanks for reporting !
Shai

I have the same problem. :frowning_face: I have already tried a lot. Nothing works

I have upgraded my Xcode to v9.3 which resolved some of my issues with getting Chpt 2 working correctly. However, it did nothing to solve the problems with using Playgrounds as required by Chpt 3.

I am still waiting for the Authors to propose a solution. Having spent good money buying the book the least one should expect is that one can follow along with the tutorial system.

Here’s hoping.

1 Like

Can you elaborate what issues do you have when trying to run with the required 9.3 version of Xcode?

@gilroykilroy @rwest999 @kathyebel @scottschmidt

Could you please try this example to let me know if it works better for you?
It uses Carthage so please make sure you have it installed (with Homebrew: brew install carthage). It should show an error if you don’t have it installed:

[REDACTED]

For instructions:

  1. Unzip the file
  2. Run ./bootstrap.sh as usual
  3. When the workspace opens, just select the Plagryound from the Project navigator (on the left) and wait until it executes the playground. You can ignore the rest of the schemes etc.

Let me know if this results in a more stable build and run experience. I’ve tested it numerous times including a complete wipe of my DerivedData and xcuserdata and everything seems stable.

Appreciate your cooperation in resolving this issue!

Shai.

1 Like

The playground execution fails with the message:
“error: Couldn’t lookup symbols”

followed by a string of stuff that references RealmSwift configuration.

Richard

@rwest999 Could you try a hard clean before ?
Cmd+Alt+Shift+K ? And then bootstrap again

This playground worked for me. Running Xcode 9.3.

1 Like

Thanks ! I think I’ll need to add something to clear derived data to the bootstrap to see if that would resolve it for all cases.

I noticed that this playground doesn’t use RealmSwift in the Sources directory of the playground. One of the problems I had, was that the Sources directory couldn’t find the RealmSwift module, which would make the playground crash. I can try adding on my end to see if that works with this newest playground…

Sure that wouldn’t hurt ! But to be honest it shouldn’t be there :thinking::thinking:

Looks like it’s working! Thanks for the fix.:grin:

Thank you very much for approving Kathy. I’ll be sending another version that doesn’t depend on Carthage and would love it if you could confirm as well :slight_smile:

1 Like

Yeah, that playground worked! :smile: