Posts

Post not yet marked as solved
3 Replies
1.2k Views
The new NavigationSplitView is very handy. I want to use it for a settings screen, but I need a way to navigate in and out of it. Previously I just navigated in and out of my settings using a NavigationView. But if I change this to a NavigationStack, and then navigate forward into a NavigationSplitView from it, it almost works fine, but some weirdness happens: on iPhone there are two competing back arrows (i.e "<") and on an iPad there is weird spacing at the top of the screen. Should I be able to navigate from a NavigationStack into a NavigationSplit View? If so, are these known issues? If not, is there a recommended UI for navigating in and out of a NavigationSplitView from the rest of my iPhone/iPad app? thanks!
Posted
by breville.
Last updated
.
Post not yet marked as solved
2 Replies
765 Views
Has anybody managed to get .preferredColorScheme(.dark) working in a watch app in the watchOS 9 beta simulator? It works fine for me on iOS, but doesn't seem to have an effect on the watch. I'm on the first Xcode 14 beta.
Posted
by breville.
Last updated
.
Post not yet marked as solved
0 Replies
598 Views
I'm excited to already have a widget/complication running on watchOS using WidgetKit. It's a great framework! Next, I need to get some settings from my iOS app over to the watch to help configure the widget. Ideally, I'd like the user to be able to change settings on the iOS app, and have them reflected in the watch widget pretty soon after without having to do anything on the watch. (From early testing, updateApplicationContext is decent because it can still be sent even when the watch app isn't active, but unfortunately it doesn't seem to wake up to process this incoming data until the user manually opens the app on the watch again. But maybe I've missed something.) Anyway, what's the best way to do this configuration between phone and watch?
Posted
by breville.
Last updated
.
Post marked as Apple Recommended
668 Views
At https://developer.apple.com/documentation/clockkit/updating_your_complication there is this information: Also, there’s no guarantee about the order in which the system calls URLSession:downloadTask:didFinishDownloadingToURL: and handleBackgroundTasks:. Your app must handle all possible cases. In example code I've seen online, people usually receive a call to handleBackgroundTasks with a WKURLSessionRefreshBackgroundTask, store that value, then receive a didFinishDownloadingToURL, process the download, and then call setTaskCompletedWithSnapshot with the stored value. If didFinishDownloadingToURL occurs first, and then the handleBackgroundTasks with a WKURLSessionRefreshBackgroundTask occurs second, then we presumably need to call setTaskCompletedWithSnapshot immediately. How do we know that's the right thing to do? Are we supposed to observe timing to understand that these two seperate calls are related? Are we supposed to maintain our own state machine to know that we are about to receive a pair of calls in unknown order? What's the right way to structure our behavior here? thanks
Posted
by breville.
Last updated
.