Code Monkey home page Code Monkey logo

Comments (6)

sync-by-unito avatar sync-by-unito commented on June 23, 2024

➤ PM Bot commented:

Jira ticket: RCOCOA-2309

from realm-swift.

Jaycyn avatar Jaycyn commented on June 23, 2024

We may need a bit more info to go on - I have an app, XCode 15.3, SDK 10.48, iOS, SwiftUI, in-memory realm and it previews and runs correctly.

I then created a fresh project with same config just a simple "Hello World" and a button that writes data to in memory realm, and that works correctly and previews as well.

Perhaps including the code that's crashing would narrow down the cause?

Here's a screenshot of the preview

Realm

from realm-swift.

videolist avatar videolist commented on June 23, 2024

Thank you for replying @Jaycyn .
Yes I understand it might be specific to our code structure. I will try to narrow it down some more, just wanted to check first if something like that is already on your radar. Will do some more digging.
The frustrating part is that it all works perfectly with Xcode 15.2 and earlier.

from realm-swift.

nirinchev avatar nirinchev commented on June 23, 2024

Looking at the stacktrace, it appears it might be related to the existence of a LinkingObjects property in the model.

from realm-swift.

videolist avatar videolist commented on June 23, 2024

Yes it doesn't like LinkingObjects and the List types, either one leads to a crash. But I finally found the reason!!!!
This is clearly an Xcode 15.3 bug.
The issue was that for whatever reason my unit tests target had only Realm added to its dependencies but didn't have RealmSwift (Frameworks and Libraries panel in General tab for that target's settings). To solve the issue I had to either add RealmSwift dependency or remove the existing Realm one. Apparently RealmSwift contains definitions for Swift-Only List and LinkingObjects generic protocols and Xcode wasn't able to resolve them.

Why does it need to build unit tests target for previews, and why does it even use its dependencies for symbol look up, is unknown to me. But this has fixed the issue which was plaguing me for several days.

from realm-swift.

nirinchev avatar nirinchev commented on June 23, 2024

Happy to hear you were able to sort it out. This is indeed unexpected behavior and hopefully something Apple will address with a future release.

from realm-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.