Post

Replies

Boosts

Views

Activity

TabView with TabSection crashing on iPad
We have an iPad app and are using the new TabView and TabSection views in our sidebar. The TabSection is populated with data from a @FetchRequest that fetches data from CoreData. The data in CoreData is updated by a single worker that makes sure every value only exists once. This is done by using an OperationQueue with maxConcurrentOperationCount set to 1. This is crashing for our users, and we can't figure out why. We can't reproduce it, and it only seems to happen on iPadOS. We have the same code running on macOS and haven't received any reports. (We collect them all via 3rd party). The error is: NSInternalInconsistencyException Fatal: supplied item identifiers are not unique. Duplicate identifiers: {( ... )} Where ... is one to many comma separated strings. In our latest update we made sure the values are unique by passing them through a Set, unfortunately this is till crashing. Here's the fix we tried. var uniqueTags: [HashTag] { let set = Set(hashTags) let array = Array(set) return array.sorted { $0.name?.lowercased() ?? "" < $1.name?.lowercased() ?? "" } } We're out of ideas and have no idea what to do next.
4
3
281
Oct ’24
RealityView Attachments normal
I have a view attachment attached to a hand anchor. When the attachment is facing away I don't want it to render. I might be missing something obvious, but I've made a System that runs on every render loop. In the update call I'm getting a reference to the Attachment using components. And this is as long as I got. I can't figure out how to get the normal of an Entity I receive in the update function. My plan was to take the head anchor normal and compare it to the entity normal. If they are facing each other I render the viewAttachment, otherwise not. Is there a simpler way? And if not, how do I get the normal of an entity?
0
0
446
Feb ’24
Interactive Widget & INPlayMediaIntent
I'm playing around with Interactive Widgets and I am trying to make one that starts playing audio content without bringing the app to the foreground. The new Button used in interactive widgets accepts an AppIntent, but INPlayMediaIntent doesn't conform to AppIntent. Starting to play something directly from an AppIntent doesn't seem to work either. The system kills my process if I try to call the following from an AppIntent: ''' try! AVAudioSession.sharedInstance().setActive(true) '''
1
0
1.1k
Jun ’23
0xdead10cc & NSPersistentCloudKitContainer
We're receiving crash reports where our app is killed by the system because of 0xdead10cc. If I understand correctly this is happening because our app has a file lock or SQLite database lock. Our app is using NSPersistentCloudKitContainer and is indexing the data to Core Spotlight. In my naiveté I assumed that NSPersistentCloudKitContainer and Core Spotlight would release any locks when app is suspended. What is the best way to solve this? Asking for more background time doesn't feel like a solution, that will just postpone the crash.
1
1
1.1k
Oct ’22