ryedai, to github

@rolle

Do you have a , or etc btw ?

I think it'd rock to see them themes and whatnot directly in for

( pages could also help, but maybe for expertimentation the other two ?)

tewha, to random

But why does #Preview{} need to generate an error?

ricobeck, to random
@ricobeck@mastodon.social avatar

Warning: if you use macros 15 Beta 2 is not especially for you:

> can’t reference symbols in Swift type extensions when they are defined in the same module as the Preview
> Workaround: Comment out and use the legacy PreviewProvider API.

Let’s revert those nice changes. :(

StewartLynch, to random
@StewartLynch@iosdev.space avatar

Has anyone been able to get an in memory container working with SwiftData yet? Even with the FlashCards example from WWDC videos I get “ Compiling failed: main actor-isolated let 'previewContainer' can not be referenced from a non-isolated context”. Is this a known bug?

Seb,

@StewartLynch Have you tried this workaround :
{ @MainActor in
ContentView()
}

twostraws, to random
@twostraws@mastodon.social avatar

SwiftData: How it started and how it's going – and I still have so many questions!

Running a word count now shows almost 40,000 words.

JetForMe,
@JetForMe@geekstodon.com avatar

@twostraws I find I can’t put a reference to fake swiftdata in a macro. Does this work for you? It complains about mainactor contexts

twostraws,
@twostraws@mastodon.social avatar

@JetForMe The macro isn't main actor-isolated by default, which I think ought to change. If that's the problem you're hitting, try putting MainActor.assumeIsolated { … } around your view in the preview?

JetForMe,
@JetForMe@geekstodon.com avatar

@twostraws Putting MainActor.assumeIsolated { … } around the contents of the macro worked, thanks!

JetForMe,
@JetForMe@geekstodon.com avatar

@twostraws Xcode 15b3 releas notes say that works for pre-iOS 17/macOS 14, which is great, but I'm still running into MainActor isolation issues, and MainActor.assumIsolated is iOS 17+. Are there any other workarounds (other than old-style preview)? Not that big a deal, but I find it hard to believe it's this broken. Apple’s own sample code doesn’t build, so I wonder how this got released without a note. (BTW just bought a year of HWS+, you do great work!)

JetForMe, to SwiftUI
@JetForMe@geekstodon.com avatar

Anyone know how to make preview data for a SwiftData/SwiftUI app? I tried the SwiftDataFlashCardSample code from WWDC, but it doesn’t compile in Xcode1 5b1. #SwiftData #SwiftUI #Xcode #iOS #macOS

JetForMe,
@JetForMe@geekstodon.com avatar

@StewartLynch I’m using the iOS 17 simulator, as I’m not about to install Sonoma on my dev Mac. But the problem is at compile time. The preview data is @MainActor but the is not.

StewartLynch, to random
@StewartLynch@iosdev.space avatar

This is my day for questions. With old PreviewProvider we could create static properties and use for our view’s arguments. We can’t do this with the Macro. Am I missing something here?

StewartLynch,
@StewartLynch@iosdev.space avatar

@dimsumthinking Yes, I can do that, but that was not my issue. My issue was not understanding the macro. I discovered that I could just create a property like let wine = Wine.samples[0] and then within the return WineView(wine: wine)

brandonhorst, to random
@brandonhorst@techhub.social avatar

Lazyweb: any word on if the new macros can be used on older OS targets?

sebj,

@brandonhorst macro is new OSes only

dachary, (edited ) to random

PSA: if you're having issues with the "Build an app with " session similar to:

CompileDylibError: Failed to build ContentView.swift

Compiling failed: main actor-isolated let 'previewContainer' can not be referenced from a non-isolated context

Replacing the #Preview macro with the old-style preview syntax resolves the issue. (I don't have macOS 14 so I'm running the preview on iOS and it looks weird with the frame so I removed it. Added a frame version if you want it.)

ryanlintott, to random
@ryanlintott@mastodon.social avatar

Am I missing something or is there no way to use with on an iOS 16 app to get better widget previews with a timeline?

danielpunkass, to random
@danielpunkass@mastodon.social avatar

Swift Macros seem amazing and really speak to me as a programming nerd. But if I empathize with beginning programmers even for a second, I'm horrified. Swift has spiraled inexorably into impossible to understand territory. I used to defend it as a beginner's language but it's harder and harder to do so.

clarko,
@clarko@mastodon.social avatar

@danielpunkass On the contrary I’ve found learning it to be really fun.

I see there’s a ton of advanced stuff I don’t understand yet, but I also see that I don’t have to understand it to benefit from it.

I’ll use macros like for years before I learn how or why or when to write my own. And I’ll be able to do that on my own terms.

thillsman, to random
@thillsman@mastodon.social avatar

Wild.

thillsman,
@thillsman@mastodon.social avatar

@mergesort SwiftData? (I was looking at /macros there, but all in my mostly blank New Project with SwiftData turned on.)

As for that... certainly some differences. Boutique doesn't care about property level things as long as it's Codable where SwiftData seems to want a little more structure (so it can offer queries and relationships). Grain of salt since I haven't seen a session yet, but it does feel like a less-boilerplate/Swifty Core Data where Boutique is a bit more AppStorage.

payown, to random

This episode will drop in a couple of hours, honestly, probably after I’m live on accessible media Inc today at 11:00 AM PT.
@damashe and I had a blast on Saturday recording, and here's how the episodes gonna start. Yes, I forgot to fix the playback rate! Don't judge me… .

Gertlushgaming, (edited ) to random

Death or Treat Review (Steam)
For this Death or Treat Review, where we learn that the Halloween spirit is missing! Play as Scary and help him save HallowTown. "Death or Treat" is a 2D action-rogue-lite and hack & slash, with handpainted environments and traditional animation. Explore all the worlds and defeat hordes of enemies using different weapons and skills.

https://gertlushgaming.co.uk/death-or-treat-review-steam/

ctietze, to random
@ctietze@mastodon.social avatar

"Put images into your plain text notes! – The Archive for Mac"

https://www.youtube.com/watch?v=HEIUXEhz4VE

:tv: Phew, the video is live! 🎉

Yclan, to gaming Spanish
  • All
  • Subscribed
  • Moderated
  • Favorites
  • Leos
  • ngwrru68w68
  • InstantRegret
  • thenastyranch
  • magazineikmin
  • GTA5RPClips
  • rosin
  • osvaldo12
  • tacticalgear
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • JUstTest
  • modclub
  • everett
  • provamag3
  • cubers
  • cisconetworking
  • ethstaker
  • Durango
  • mdbf
  • anitta
  • megavids
  • normalnudes
  • tester
  • lostlight
  • All magazines