Post

Replies

Boosts

Views

Activity

Reply to How to use core spotlight ?
I replied to this, but my reply seems to have disappeared... Here we go (again): (And now it's appeared. Apple, issues with the forums after your changes overnight?) Aside from printing nothing (""), I think you're doing this in the wrong place. I have this in my main app's WindowGroup. It just loads the PhoneView: var body: some Scene { WindowGroup { PhoneView() .environment(modelData) // The difference is that I'm not continuing the Spotlight activity here, unlike you. } } struct PhoneView: View { var body: some View { VStack { // Blah blah blah } .onContinueUserActivity(CSSearchableItemActionType, perform: handleSpotlight) } private func handleSpotlight(userActivity: NSUserActivity) { guard let uniqueIdentifier = userActivity.userInfo?[CSSearchableItemActivityIdentifier] as? String else { return } if(!uniqueIdentifier.isEmpty) { // Handle the Spotlight activity } } }
Mar ’25
Reply to Merge 2 Apple IDs
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Mar ’25
Reply to iOS 18.4 beta 4 tipkit crash
Might be your code. Show us the code that's crashing and we'll see if we can help. If you think it's definitely a bug, then you should raise it in the normal way at https://feedbackassistant.apple.com/ You can post the FB number here if you like.
Topic: UI Frameworks SubTopic: General Tags:
Mar ’25
Reply to Genmoji not working
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Mar ’25
Reply to How to use core spotlight ?
How would you know it never gets triggered? You aren't printing anything to the console. Anyway, in my apps I have the WindowGroup set up like this: var body: some Scene { WindowGroup { PhoneView() .environment(modelData) } } And then, in the PhoneView() I have this: var body: some View { ZStack { // Whatever... } .onContinueUserActivity(CSSearchableItemActionType, perform: handleSpotlight) // blah blah blah... } private func handleSpotlight(userActivity: NSUserActivity) { guard let uniqueIdentifier = userActivity.userInfo?[CSSearchableItemActivityIdentifier] as? String else { return } // Handle the activity... }
Mar ’25
Reply to Safari extension doesn't load
Is this an iOS app with a Safari extension, or just a Safari extension? I know that, in an iOS app, you have to build the iOS app so the extension is included, and then build and run the extension. If it's just a Safari extension, then I'm afraid I don't know.
Topic: Safari & Web SubTopic: General Tags:
Mar ’25
Reply to How to use core spotlight ?
I replied to this, but my reply seems to have disappeared... Here we go (again): (And now it's appeared. Apple, issues with the forums after your changes overnight?) Aside from printing nothing (""), I think you're doing this in the wrong place. I have this in my main app's WindowGroup. It just loads the PhoneView: var body: some Scene { WindowGroup { PhoneView() .environment(modelData) // The difference is that I'm not continuing the Spotlight activity here, unlike you. } } struct PhoneView: View { var body: some View { VStack { // Blah blah blah } .onContinueUserActivity(CSSearchableItemActionType, perform: handleSpotlight) } private func handleSpotlight(userActivity: NSUserActivity) { guard let uniqueIdentifier = userActivity.userInfo?[CSSearchableItemActivityIdentifier] as? String else { return } if(!uniqueIdentifier.isEmpty) { // Handle the Spotlight activity } } }
Replies
Boosts
Views
Activity
Mar ’25
Reply to Merge 2 Apple IDs
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Replies
Boosts
Views
Activity
Mar ’25
Reply to iOS 18.4 beta 4 tipkit crash
Might be your code. Show us the code that's crashing and we'll see if we can help. If you think it's definitely a bug, then you should raise it in the normal way at https://feedbackassistant.apple.com/ You can post the FB number here if you like.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to Genmoji not working
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Replies
Boosts
Views
Activity
Mar ’25
Reply to How to use core spotlight ?
How would you know it never gets triggered? You aren't printing anything to the console. Anyway, in my apps I have the WindowGroup set up like this: var body: some Scene { WindowGroup { PhoneView() .environment(modelData) } } And then, in the PhoneView() I have this: var body: some View { ZStack { // Whatever... } .onContinueUserActivity(CSSearchableItemActionType, perform: handleSpotlight) // blah blah blah... } private func handleSpotlight(userActivity: NSUserActivity) { guard let uniqueIdentifier = userActivity.userInfo?[CSSearchableItemActivityIdentifier] as? String else { return } // Handle the activity... }
Replies
Boosts
Views
Activity
Mar ’25
Reply to Safari extension doesn't load
Is this an iOS app with a Safari extension, or just a Safari extension? I know that, in an iOS app, you have to build the iOS app so the extension is included, and then build and run the extension. If it's just a Safari extension, then I'm afraid I don't know.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’25