Posts

Post not yet marked as solved
3 Replies
I would love to see some sample code showing how you're generating a dynamic texture with DrawableQueue! That said, I can see from the image that your sending UsdUVTexture.RGBA, which has 4 components, to UnlitSurface.Color, which only takes in 3 components. You need to split the RGBA out, then pass the first three into Color, and the last into Opacity.
Post not yet marked as solved
1 Replies
You must specify the bundle ID as the container identifier when instantiating your CKContainer.
Post not yet marked as solved
2 Replies
Yes. surface geometry can be retrieved textures on geometries can be drawn/animated hand position can be retrieved its all possible
Post not yet marked as solved
2 Replies
basically, yes, you need to upload the records to the public database once, such that subsequent devices can read them. Whether you do that thru the CloudKit console, or you write code in an app to upload/save is up to you.
Post marked as solved
1 Replies
Yes. the current design of NSPersistentCloudKitContainer is to sync everything. There are other sync engines available between CoreData and CloudKit, such as CKSyncEngine in iOS 17, and open source sun engines like CloudCore, which might provide more fine-grain control over sync. And of course, you can always write your own that best suits your needs.
Post not yet marked as solved
1 Replies
unfortunately, I have written ton of functionality based on the CloudKit DiscoverUser functionality, and it all appears to be deprecated in iOS 17, with no new APIs to replace them. The sample code "Sharing CloudKit Data with Other iCloudUsers" doesn't address this at all.
Post marked as solved
2 Replies
the persistentContainer.viewContext can only get and set records in the main thread, but if I'm reading your code correctly, you're dropping into a task (background thread). better to use persistentContainer.performBackgroundTask { backgroundContext in … } and pass the background context to all your functions.
Post marked as solved
4 Replies
it sure does look like CloudKit is trying to push a record containing an unidentified field: "Cannot create or modify field 'CD_data_ckAsset' in record 'CD_ImageData' in production schema" While you may think all your image files are < 1Mb, Core Data may still be using external files in some edge cases. You could run your app in dev mode, add a very large image > 1mb, and have it sync, then see if there are schema changes to be pushed from dev to prod?
Post not yet marked as solved
2 Replies
public asset storage (along with a variety of other capped resources) varies over time based on the number of active users of your app. You can find your current usage and limits in the CloudKit Dashboard > Telemetry > Usage Here's mine from one of my apps…
Post not yet marked as solved
2 Replies
the system will ask the user for permission only once on your behalf. after that, you can check the status of the account, and if its disabled, display a UI directing the user to Settings to change the permission.
Post not yet marked as solved
2 Replies
The short answer is, yes this is very possible. Years ago I ported an open-source particle emitter system into SceneKit and Metal using a SCNNode renderDelegate. Your code snippets above don't show setting the colorAttachments or depthAttachmentPixelFormat on the MTLRenderPipelineDescriptor?
Post not yet marked as solved
1 Replies
As you have discovered, you cannot ignore the threading requirements of CoreData or SwiftUI. If you retrieve objects in a background context/thread, you cannot access them in the main thread (ie SwiftUI). How many FRCs are you instantiating? Can you do updates with one set of FRCs in background contexts, and then use another set in the viewContext? Have you tried setting the batching levels on your FRCs?
Post not yet marked as solved
2 Replies
this code is losing the managed object context: func performInBackground(operation: BackgroundOperation) { container.performBackgroundTask { context in self.backgroundQueue.async { operation.execute(context: context) } } } you don't need backgroundQueue. it should be this instead… func performInBackground(operation: BackgroundOperation) { container.performBackgroundTask { context in operation.execute(context: context) } }
Post not yet marked as solved
1 Replies
you might try embedding your SwiftUI inside UIKit with UIHostingConfiguration… semi.dev did a nice writeup: https://hemi.dev/uihostingconfiguration/