Update -
Looks like a system bug.
The problem found - cannot assign self.delegate between Swift Package SDK and host app. Had to add the SDK to the project and don't use the delegate.
Submitted a feedback to Apple as well: FB15191409
Post
Replies
Boosts
Views
Activity
Hello all,
I'm facing the same issue - works fine on iOS 17. Crash on iOS 18 beta 5 (iOS and Xcode). Happens on device and simulator (tested on these platforms - iPhone, iPad, watchOS)
I have the following SwiftData structure. CloudKit configuration -
Room
Session
ModelContext activity is handled on SwiftUI view (create model, insert, save)
Room has cascade array of Session.
Initial state: No sessions.
Create new session and append it to room's sessions.
Delete the session.
I check the state now - room is exist with empty sessions, as expected
Create a new one.
Crash on -
_$observationRegistrar.access(self, keyPath: \.room)
return self.getValue(forKey: \.room)
}
I print the PersistentIdentifier before the crash and everything seems to be ok -
PersistentIdentifier(id: CoreData: debug: CoreData+CloudKit: -[NSCloudKitMirroringDelegate managedObjectContextSaved:]: <NSCloudKitMirroringDelegate: 0x303ab00f0>: Observed context save: <NSPersistentStoreCoordinator: 0x302ea1ce0> - <NSManagedObjectContext: 0x303ea5110>
SwiftData.PersistentIdentifier.ID(url: x-coredata://ED065B2F-2704-46AD-88E1-4F1BE2BA7098/Session/p44), implementation: CoreData: CloudKit: CoreData+CloudKit: -[PFCloudKitExporter analyzeHistoryInStore:withManagedObjectContext:error:]: <PFCloudKitExporter: 0x302598370>: Exporting changes since (0): <NSPersistentHistoryToken - {
SwiftData.PersistentIdentifierImplementation)
SwiftData.PersistentModel.persistentModelID.getter : SwiftData.PersistentIdentifier
PersistentIdentifier(id: SwiftData.PersistentIdentifier.ID(url: x-coredata://ED065B2F-2704-46AD-88E1-4F1BE2BA7098/Room/p8), implementation: SwiftData.PersistentIdentifierImplementation)
PersistentIdentifier(id: SwiftData.PersistentIdentifier.ID(url: x-coredata://ED065B2F-2704-46AD-88E1-4F1BE2BA7098/Room/p8), implementation: SwiftData.PersistentIdentifierImplementation)
After the crash I open my app again, the session appears and everything works as expected.
Hope this helps.
Thanks a lot,
Dudi
Hey @gchiste
These are the objects.
I load both during launch.
Then I'm adding the surface to the content and in a loop, I clone the bricks through this original brick object and add each one of them as a child to the surface.
Hey @gchiste
Thank you so much! I really tried all the options, but I'm always happy to learn :-)
I have a big surface (rectangle) with small bricks attached to it. I tried to add the collision and the input target components only to the bricks and it didn't help. I only need the surface to function as a board with the bricks attached to it - I don't need any gesture to be detected on the surface. So as for now, even if the surface is configured with or without the components, the gesture is not detected by the child. Is it possible to achieve this functionality? What should be the structure of the entities and the components?
I expect that this structure will work -
Surface - no components
Bricks - collision and input target components
But it doesn't.
Hey @gchiste,
The problem is that the gesture is not recognized by the child entity. I have a surface and some child entities and when I try to capture the gesture on one of the Childs, it's detected only by the part child (the surface). If you check the tapped entity you will see that it's the parent and not the child, so you can't actually get any details from the child entity.
If you have one parent and 5 childs, you'll always get the value of the parent entity, regardless the child you actually tapped.
Found a workaround here -
https://forums.developer.apple.com/forums/thread/748286?page=1#782831022
Thank you @Kite-N-Shark
Shark indeed!!!
Hey,
Happens to me as well. All my interactive widgets stopped working on iOS 17.4. Looks like a major bug - I opened a DTS. Did you find any workaround, how to make it works?
Hello @gchiste
Indeed - as @Vlad_Baev explained - it is very easy to reproduce.
Thanks a lot.
OK - Found it!
When adding WidgetKit extensions to the main target, apply filter for these widgets and uncheck the VisionOS Platform.
Enjoy.
Thanks.
Apple approved it is a bug and eventually this approach actually resolved it.
Hi,
Xcode 15, release candidate. iOS 17. macOS 14. Still doesn't work.
List -> Categories -> Items.
Drag & Drop item to another category. Works fine on iOS. Doesn't work on macOS - the item remains stuck above the target category view and the operation is stuck and cannot be completed.