Update your app for watchOS 10

RSS for tag

Discuss the WWDC23 Session Update your app for watchOS 10

View Session

Posts under wwdc2023-10031 tag

4 Posts
Sort by:
Post not yet marked as solved
0 Replies
283 Views
I try to replace the default menu bar item. but this code still shows two button items. import SwiftUI @available(watchOS 10.0, *) struct TabViewPreview<Content: View>: View { let content: Content init(@ViewBuilder content: () -> Content) { self.content = content() } @State private var selection: String? = "preview" var body: some View { NavigationSplitView { List(selection: $selection) { Text("preview").tag("preview") } } detail: { TabView { content } .toolbar(content: { ToolbarItem(placement: .topBarLeading) { Button(action: {}) { Image(systemName: "shared.with.you") } } }) .tabViewStyle(.verticalPage) } } } @available(watchOS 10.0, *) #Preview { TabViewPreview { Text("A") } }
Posted
by iracecc.
Last updated
.
Post not yet marked as solved
1 Replies
504 Views
Using Xcode 15.0 beta 2 I created a new app that should work with WatchOS 10.0 but when I tried to install the app from my iPhone that has the iOS 17 Developer Beta 2 the message I got was " This app could not be installed at this time. Could not install at at this time." I would like to test my app on the Apple Watch and I'm wondering how I could fix this. All kinds of help would be appreciated!
Posted Last updated
.
Post not yet marked as solved
0 Replies
440 Views
This session provides sample code for NavigationSplitView to display a selected item in details view, and refers to the Backyard Birds sample app; NavigationSplitView { List(backyardsData.backyards, selection: $selectedBackyard) { backyard in BackyardCell(backyard: backyard) } .listStyle(.carousel) } detail: { if let selectedBackyard { BackyardView(backyard: selectedBackyard) } else { BackyardUnavailableView() } } However, the sample code does not work on watchOS 10 beta 1 or 2, and even the sample app Backyard Birds does not use this pattern in code (this links to Watch ContentView file on Apple's GitHub repo). To make sure I wasn't crazy, I've tried to navigate to details view when the data set is: a @State var with array of items a class conforming to ObservableObject and holding a @Published array of items (similar to what Backyard Birds is doing) FetchedResults from CoreData None of them do anything when a “cell” is tapped. My conclusion is that it isn't yet implemented [right]. Has anyone else got it to work?
Posted Last updated
.
Post not yet marked as solved
2 Replies
617 Views
The "Update your app for watchOS 10" session from WWDC23 mentions a sample app you can use to follow along, but there isn't a link the resources section like the presenter said there would be. Is the link to the project somewhere else?
Posted
by nickinmn.
Last updated
.