Setting the restorationIdentifier property of that scene's window or its root view controller does not appear to do anything.
Post
Replies
Boosts
Views
Activity
I read through those docs and tried the sample app, but it's all about restoring view controller state. That already works - I can open various windows, quit the app, relaunch it, and they come back as they were, via NSUserActivity.
My question is about how to make macOS understand that for one particular window type (meaning one particular UISceneConfiguration), when the window is closed using the stoplight button and reopened, it should be restored, not recreated from scratch.
This looks great! But the trailing ornament really seems to want to give itself a large corner radius - seemingly half its with, so that its top edge is always rounded. How do I get it to accept a rounded-rectangle shape like UITabBar uses?
The intent is already included in both the main app and widget target.
Also, widgetUrl does not appear to work. I tweaked my sample app code to:
Make LaunchAppIntent inherit from AppIntent and have a perform method that just returns .result()
Add .widgetURL(URL(string: "otcontrolwidget://test")!) on the Image` in the control itself
And tapping the control now does nothing. I'm using .widgetUrl on other widgets, but it doesn't appear to work with Control Center widget buttons.
UserDefaults.standard works in my sample app to deliver data from the control to the real app. My understanding is that this is because the perform method runs in the context of the app's process - this is why the control has to be a member of both the widget extension and full app targets. Am I wrong in this?
Filed as FB15026010. I downloaded the Sample app, removed the existing iPad App for Mac target, added a Catalyst target, and built and ran it. After starting playback, F8 does nothing.
MPRemoteCommandCenter *center = [MPRemoteCommandCenter sharedCommandCenter];
[center.togglePlayPauseCommand addTarget:self action:@selector(handleRemoteTogglePlayPause:)];
//...
-(MPRemoteCommandHandlerStatus)handleRemoteTogglePlayPause:(MPRemoteCommandEvent *)event
{
[self togglePlayPause];
return MPRemoteCommandHandlerStatusSuccess;
}
I'm already setting those command handlers - playCommand, pauseCommand, togglePlayPauseCommand, etc. Also, when I download those example projects and run them as Catalyst apps, neither of them respond to the play/pause F8 key. It just launches the macOS Music app.
I am on Sonoma 14.6.1, if it matters. Do I need to file a Feedback about this not working?
FB13706879
What boilerplate??
This is now possible in iOS 17 with the selectedText property! https://developer.apple.com/documentation/visionkit/imageanalysisinteraction/4176689-selectedtext
Done! FB12358266
FB12292111
Ignore this - it should have been a comment on the post above, but there's no button to delete a post.