iOS app not interactive(Xcode 15 beta 5)

I am making an app that is using swift data, and all builds are fine, but when I run the app, the app is not interactive. This wasn't the case in Xcode 15 beta 4. Any help appreciated.

Thanks.

  • UPDATE: After further testing, the app is crashing but the iPhone simulator screen still shows the app for some reason.

Add a Comment

Accepted Reply

It looks fixed on beta 6

Replies

I went from an app that was working in many respects to one that basically doesn't load at all with the new betas. This Xcode b5 and iOS 17b4 ain't it.

  • That is exactly what I am experiencing. They took this long to update beta 4 and we get this.

Add a Comment

I've enabled "-com.apple.CoreData.SQLDebug 1" in my app target to see the sql logs and with Xcode 15b5 the app seems to loop (fetching infinite some sql data). Maybe that's the reason for your blocked UI too.

  • I did that and it looks like you are right.

Add a Comment

I seem to have the same issue and am investigating. Without any changes to my view, if I run the app that used to work on beta 4, the app becomes unresponsive. I've tracked it down to a couple of queries that look like this:

@Query(filter: #Predicate<MyModel> { $0.myProperty == "value" })

If I remove the filter, the view works and am no longer unresponsive.

  • Strange, it's probably the same issue with my app, but mine will not work without the filter as it will require days to change all the code to not work with the filters. I think I'm going to wait until beta 6 if a fix isn't figured out.

Add a Comment

I’ve got the same issue here, beta 5 has been a nightmare...

using a data attribute causes a crash, and any query with a predicate seems to cause a memory leak…

  • The worst part is beta 4 doesn't work on the latest developer macOS beta so we're forced to figure out what is wrong with beta 5.

Add a Comment

I tested this further, and predicates seem to cause memory leaks that jam the app. SwiftData looks simple, but it isn't, at least for now.

I face the same issue. The app freezes and consumes all memory it has while being at 99% CPU.

I think I had the same issue but when I installed Xcode 15 beta 6, the problem seems to have been resolved.

  • I'm still facing this issue with Xcode 15 beta 6 when referencing a relationship of my model inside the view e.g. Text("(model.relationshipModel.name)")

Add a Comment

I was wrong, the app still goes to 99% CPU - but it doesn't hang anymore.

I am experiencing something similar with my Mac app. Having investigated using the Instruments tool, it seems that my app is constantly fetching data, causing the main thread to be blocked and making the UI unresponsive. I wasn't encountering this in Beta 5, but I am in Beta 6.

I did run a smaller app that leverages SwiftData on the iOS Simulator, and I'm not getting 100% CPU usage. Strange

It looks fixed on beta 6

Having the same issue on Xcode 15.0 Cpu eventually hits %99.9 percent and the app crashes. But with Xcode 14.3 Command Line Tools and Swift 5.8 everything works fine.