Giter Club home page Giter Club logo

Comments (21)

insidegui avatar insidegui commented on July 18, 2024 11

Turns out this is listed as a known issue in the Xcode 15 beta 3 release notes:

CleanShot 2023-07-06 at 10 47 03

from reports.

ViktorEvil avatar ViktorEvil commented on July 18, 2024 4

not fixed on beta 4

from reports.

ViktorEvil avatar ViktorEvil commented on July 18, 2024 1

Same here :( How can such a major bug slip through? Or is there a way to use SwiftData without the @model macro?

You can use SwiftData but you have to comment out the new #Previews which makes is a bit inconvenient

from reports.

davesly avatar davesly commented on July 18, 2024

This seems to be an issue with SwiftData. I was having the same problem, and removing the @model macro annotation (and associated code) corrected the preview issue. Obviously not ideal, but helps narrow it down.

from reports.

ViktorEvil avatar ViktorEvil commented on July 18, 2024

can confirm, my app I had converted to SwiftData no longer builds

from reports.

ViktorEvil avatar ViktorEvil commented on July 18, 2024

Managed to get mine to build (first one took a while), but not being able to use previews is not very convenient at all.

from reports.

iJustinCabral avatar iJustinCabral commented on July 18, 2024

Can confirm this as well. Can build to simulator and phone with no issue but the preview canvas fails due the @model macro associated with SwiftData.

from reports.

davesly avatar davesly commented on July 18, 2024

Turns out this is listed as a known issue in the Xcode 15 beta 3 release notes:

CleanShot 2023-07-06 at 10 47 03

Good catch! I need to be better in the future about going line-by-line in the release notes. Thanks for pointing this one out!

from reports.

Max094Reikeb avatar Max094Reikeb commented on July 18, 2024

I have the same issue when building the app to place it on my device. Is there a workaround for this to test the app on our devices?

from reports.

hcri50 avatar hcri50 commented on July 18, 2024

having the same problem. What is strange is that I erased the Hard Drive and did a fresh install and then a fresh install of Xcode Beta 3 and right away, I am having the same problem. And again, once I remove @model the problem goes away

Undefined symbols:

Linker command failed with exit code 1 (use -v to see invocation)

from reports.

Aparikk avatar Aparikk commented on July 18, 2024

Same here :( How can such a major bug slip through? Or is there a way to use SwiftData without the @model macro?

from reports.

Aparikk avatar Aparikk commented on July 18, 2024

Same here :( How can such a major bug slip through? Or is there a way to use SwiftData without the @model macro?

You can use SwiftData but you have to comment out the new #Previews which makes is a bit inconvenient

Ah… I haven’t tried using the old Preview struct. If this still works, it’s only half as bad.

from reports.

Aparikk avatar Aparikk commented on July 18, 2024

Yup and the good old PreviewProvider also does not work :<

from reports.

Max094Reikeb avatar Max094Reikeb commented on July 18, 2024

The issue only appears with @model macro when using SwiftData. Even with old PreviewProvider, it does not work. And beta 4 does not fix the issue... (it is still written as a known issue)

from reports.

egesucu avatar egesucu commented on July 18, 2024

This has been mentioned in the Xcode 14 beta 4 release notes:

  • Previewing view code in a SwiftData app results in a linker failure for the canvas despite that code compiling successfully for device and simulator. (111657477)
    Workaround: Run your app in the simulator to test your UI instead of using Previews.

from reports.

Max094Reikeb avatar Max094Reikeb commented on July 18, 2024

This has been mentioned in the Xcode 14 beta 4 release notes:

  • Previewing view code in a SwiftData app results in a linker failure for the canvas despite that code compiling successfully for device and simulator. (111657477)
    Workaround: Run your app in the simulator to test your UI instead of using Previews.

I tried to run my app on my own iPhone, it still didn't work...

from reports.

Aparikk avatar Aparikk commented on July 18, 2024

This has been mentioned in the Xcode 14 beta 4 release notes:

  • Previewing view code in a SwiftData app results in a linker failure for the canvas despite that code compiling successfully for device and simulator. (111657477)

Workaround: Run your app in the simulator to test your UI instead of using Previews.

I tried to run my app on my own iPhone, it still didn't work...

Must be something different then. For me both simulator and own device do work.

from reports.

Max094Reikeb avatar Max094Reikeb commented on July 18, 2024

Must be something different then. For me both simulator and own device do work.

Could you show me a quick example, with a simple @model class, with a single view?

from reports.

ViktorEvil avatar ViktorEvil commented on July 18, 2024

Simulator and devices all work for me but the #Preview code must be commented out or previews disabled in the editor otherwise I get the error

from reports.

OliveCh12 avatar OliveCh12 commented on July 18, 2024

I also commented out the function to generate the preview #Preview, the error disappears. However, it's not very convenient to rebuild the project every time, especially when making small changes in the interface. Hopefully, someone will fix this issue soon.

from reports.

OliveCh12 avatar OliveCh12 commented on July 18, 2024

Look's like the problem is solved by installing Xcode 15 beta 5 ✅

from reports.

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.