Realm - Building Modern Swift Apps : Script Error

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:

Cool! Let me send another option I’m working on, and if that works well we can incorporate that throughout v1.1 of the book, or ASAP cc/ @icanzilb

The workaround works. Thank you :+1:

If the fix is to hard clean derived data folder and then run bootstrap again, then it doesn’t work for me. I’m using Xcode 9.3. Still says “error: Couldn’t lookup symbols: __T010RealmSwift6ObjectC17ignoredPropertiesSaySSGyFZ
…”

Hey there !
The workaround for now is to use CocoaPods 1.4 instead of 1.5.

There is a regression in the latest version of CocoaPods and I filed an issue at their repo regarding that.

Regardless, we’ll be releasing fixed playgrounds that won’t depend on CocoaPods at all and would hopefully be much more stable, should be relatively soon.

Shai