Group Group Group Group Group Group Group Group Group

Realm - Building Modern Swift Apps : Script Error

#1

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
Playground files do not output in console and are missing folders
#2

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

#3

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

#4

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

#5

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

#6

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.

#7

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

#8

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

#9

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
#10

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

Chapter 5 Playground_Sources error
#11

@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
#12

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

followed by a string of stuff that references RealmSwift configuration.

Richard

#13

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

#14

This playground worked for me. Running Xcode 9.3.

1 Like
#15

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.

#16

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…

#17

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

#18

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

#19

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
#20

Yeah, that playground worked! :smile: