Post

Replies

Boosts

Views

Activity

metadata <munged name> did not match any imported symbol
I have an app with a shared internal framework, a main app target, and a widget target. In my shared framework, I have an AppIntent, FooIntent. In addition, I have an AppIntentPackage public struct FooIntentsPackage: AppIntentsPackage { } also in the framework. Finally, in the widget target, I reference that package: struct FooAppIntents: AppIntentsPackage { static var includedPackages: [any AppIntentsPackage.Type] { [ FooIntentsPackage.self ] } } However, when I run this, I get a bunch of these errors: metadata `_$s8Internal15FooAppIntentsV' did not match any imported symbol. I've tried turning off Strip Linked Product in both the Framework and the Widget, to no avail. Any ideas?
0
0
290
Nov ’24
Share Play via Air Drop
The demo of holding your phone near someone else's phone, and having Share Play automatically kick off looked amazing. However, I can't find any sample code showing how to do that. There wasn't a lot of code in the session itself, but maybe I'm missing something obvious?
1
0
988
Jun ’23
Force a NSPersistentCloudKitContainer sync
I have a SwiftUI app sitting on top of a CoreData + CloudKit stack. If I have the app running on multiple devices, a change on one device will not always be reflected on the others. However, restarting the app on the other device will pick up the change. For example:Device A and Device B both have the app running. Device B has it in the background.Device A changes Record 1. Device B returns to the foreground, but does not see the change to Record 1Kill the app on Device B, relaunch, and it sees the changeIt seems that the cloudkit process isn't always getting change notifications from iCloud (note that this happens on actual devices, not just the sim). If we could tell the container "Hey, I just retuned to the foreground, maybe check to see if anything has changed?", that would, I think, fix the problem. I can't tear down my CoreData stack without rebuilding the entire app (since the main thread context is pushed down into SwiftUI).Is there a way to force this update?Thanks!Ben
4
0
4.7k
Dec ’22
metadata <munged name> did not match any imported symbol
I have an app with a shared internal framework, a main app target, and a widget target. In my shared framework, I have an AppIntent, FooIntent. In addition, I have an AppIntentPackage public struct FooIntentsPackage: AppIntentsPackage { } also in the framework. Finally, in the widget target, I reference that package: struct FooAppIntents: AppIntentsPackage { static var includedPackages: [any AppIntentsPackage.Type] { [ FooIntentsPackage.self ] } } However, when I run this, I get a bunch of these errors: metadata `_$s8Internal15FooAppIntentsV' did not match any imported symbol. I've tried turning off Strip Linked Product in both the Framework and the Widget, to no avail. Any ideas?
Replies
0
Boosts
0
Views
290
Activity
Nov ’24
Can't set default values for @Model vars
If I have an @Model object and I try to add a default/initial value to it, my code no longer compiles: var createdAt: Date // compiles var createdAt: Date = Date.now // fails it gives me this error: Variable 'self._$backingData' used before being initialized this worked fine in Xcode b5, but is failing in b6
Replies
11
Boosts
6
Views
4.7k
Activity
Oct ’23
Restore window positions on visionOS
If I create several windows (using the openWindow @Environment wrapper), and the user moves them around on-screen, is there a way to automatically have the system restore them when the app is re-launched?
Replies
4
Boosts
1
Views
1.8k
Activity
Aug ’23
SwiftData conflict resolution?
If I change an object while offline, and then another device changes the same object, how is that change reconciled at sync time? Is there any mechanism to resolve conflicts in SwiftData?
Replies
0
Boosts
1
Views
687
Activity
Jul ’23
Single Instance Windows on visionOS
It appears that Window is not available on visionOS, only WindowGroup. If I want to have a window with only one instance (say, a Menu or similar), how can I ensure that each time I call openWindow, the same window appears, and a new one is not created?
Replies
2
Boosts
0
Views
1.5k
Activity
Jul ’23
ZStack on visionOS z-offset?
If I position multiple Model3D elements in a volumetric window's zstack, they are offset in space relative to each other (on the z-axis). If I want them all at the same level, is there a modifier I need to use? Thanks!
Replies
2
Boosts
0
Views
1.3k
Activity
Jul ’23
Preload/cache ResolvedModel3D on visionOS?
Is there a way to pre-load ResolvedModel3D objects, so that they can be shown without a delay (instead of via Model3D)? Right now there's a delay while models are loaded; I'd like to front-load that time so that the eventual appearance is quicker.
Replies
0
Boosts
0
Views
510
Activity
Jul ’23
Don't open spring board on visionOS at app launch
Every time I run my app in the Vision Pro simulator, the spring board (or whatever the app launcher on visionOS is called) opens. Is there a way to disable this behavior?
Replies
0
Boosts
1
Views
467
Activity
Jun ’23
Share Play via Air Drop
The demo of holding your phone near someone else's phone, and having Share Play automatically kick off looked amazing. However, I can't find any sample code showing how to do that. There wasn't a lot of code in the session itself, but maybe I'm missing something obvious?
Replies
1
Boosts
0
Views
988
Activity
Jun ’23
Force a NSPersistentCloudKitContainer sync
I have a SwiftUI app sitting on top of a CoreData + CloudKit stack. If I have the app running on multiple devices, a change on one device will not always be reflected on the others. However, restarting the app on the other device will pick up the change. For example:Device A and Device B both have the app running. Device B has it in the background.Device A changes Record 1. Device B returns to the foreground, but does not see the change to Record 1Kill the app on Device B, relaunch, and it sees the changeIt seems that the cloudkit process isn't always getting change notifications from iCloud (note that this happens on actual devices, not just the sim). If we could tell the container "Hey, I just retuned to the foreground, maybe check to see if anything has changed?", that would, I think, fix the problem. I can't tear down my CoreData stack without rebuilding the entire app (since the main thread context is pushed down into SwiftUI).Is there a way to force this update?Thanks!Ben
Replies
4
Boosts
0
Views
4.7k
Activity
Dec ’22