Post not yet marked as solved
Xcode 15 Beta 8 the issue has not been resolved.
Updated iPhone en Watch to the latest developer version
Unpaired the Watch and then pair it again
Turned Wifi off on the Mac, Turned it back on
Opened the Watch app on the iPhone
Turned airplane mode on all and back on
Deleted everything in the cache (~/Library/Developer/Xcode)
Nothing works.
Post not yet marked as solved
Seeing the same issue with Xcode 15 Beta 7 even though it says watchOS connectivity has been resolved.
It says Waiting to reconnect to Apple Watch van Mark, Xcode will continue when the operation completes. (See image)
I tried:
Completly erasing the Apple Watch
Update iPhone to the latest Public Beta version
Update Apple Watch to latest Public Beta version
Repair the Apple Watch with the iPhone
Connecting the iPhone with a cable
Nothing helped.
Post not yet marked as solved
Appearantly no Apple engineer or community member knew the answer. I finally found a work-around and I am happy to share it with the people also struggling with the same issue which still exists in the latest Xcode Beta.
import SwiftUI
@main
struct YourApp: App {
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene {
WindowGroup {
MainView()
}
}
}
class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidBecomeActive(_ notification: Notification) {
if let window = NSApp.windows.first {
window.deminiaturize(nil)
}
}
func applicationDidChangeOcclusionState(_ notification: Notification) {
if let window = NSApp.windows.first, window.isMiniaturized {
NSWorkspace.shared.runningApplications.first(where: {
$0.activationPolicy == .regular
})?.activate(options: .activateAllWindows)
}
}
}
Post not yet marked as solved
Bump (+1) I like to know this as well.
When you go to Settings > Game Center. You will notice you can easily choose and create an avatar by tapping the profile picture. I like my app to do the same. I want to call a sheet in SwiftUI that will return an Avatar Image so I can use that as the profile picture.
Post not yet marked as solved
I fourth that.
I love that Apple exposed Group Activity as an API. Would only make sense to make DrawTogether available as sample code.
Post not yet marked as solved
I don't really understand your question, but I wrote an article about everything you should about @AppStorage and @SceneStorage on Medium, which might answer your question better.
Perhaps you don't realize that with defining @AppStorage you defined a source-of-truth. If you need to access it "outside" the views perhaps its better to place the @AppStorage somewhere higher in the view hierarchy and pass it with bindings.
Links: Introducing @AppStorage in SwiftUI (medium.com/swlh/introducing-appstorage-in-swiftui-470a56f5ba9e)
Introducing @SceneStorage in SwiftUI: (medium.com/@crystalminds/introducing-scenestorage-in-swiftui-5a4ec1a90ca3)
Post not yet marked as solved
I also submitted feedback. Apple we need this .listSeparatorStyle(.none).
Radar #FB8654253
Post not yet marked as solved
UISearchController works when attached to a List. It becomes buggy when you use something other like a ScrollView or VStack. I have reported this in Apple's Feedback app and I hope others will do the same.
Never the less if you like to include a UISearchController in your App.
I created a Swift Package at Github named NavigationSearchBar. - https://github.com/markvanwijnen/NavigationSearchBar
Apple Feedback
The client code is recreating the Model every time the view is rendered. The model generates the new ID for every item every time. Without consistent IDs, the system cannot maintain a consistent UI.
The client code should be using @StateObject on the model property in ContentView.
Post not yet marked as solved
The code should work.
Please note that the WebView has a different rendering system than UIKit.
So you don't get the dynamic font size advantage for free.
import SwiftUI
import WebKit
struct ContentView: View {
@State var text = "<html><body><h1>Hello World</h1></body></html>"
var body: some View {
WebView(text: $text)
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
}
}
struct WebView: UIViewRepresentable {
@Binding var text: String
func makeUIView(context: Context) -> WKWebView {
return WKWebView()
}
func updateUIView(_ uiView: WKWebView, context: Context) {
uiView.loadHTMLString(text, baseURL: nil)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
It seems like they solved the issue in iOS 14 beta 2. Not in Simulator but on the hardware device itself.
Altho the behavior is still very buggy.
1) When I press on a section header it get's a highlighted effect, which isn't there in the sidebar of the Files app.
2) When I collaps and expand the items, for instance the 'Version 2' section, the style of the first item get's styled two with bold and increased font, but when I collaps and expand again the last item get's styled and this swaps constantly.
Post not yet marked as solved
I copied your code and removed the Detail-part.
struct ContentView: View {
var body: some View {
NavigationView {
SidebarView()
Text("Main")
}
}
}
On iPad portrait mode I have a full screen for Main with a Back-button in the top left corner to let the sidebar come in as a fly-over. If I put the iPad in landscape mode. I get about 1 third sidebar and 2 third main. I can click the sidebar icon in the top left to dismiss the sidebar and get a full screen Main view. From your story this is the expected behavior is it not?
Build on xCode Version 12.0 beta (12A6159)
Simulator iPad Pro (11-inch) (2nd generation)
Post not yet marked as solved
They still have improvements to do on the forum.
Removing and Editing a post are the basics for keeping any forum clean and tidy.
They should also allow for images and video's, feels like basics.
To get a more extensive description with images and code I also posted this question on StackOverflow: How to build a collapsible sidebar as shown in the Files app? - https://stackoverflow.com/questions/62742011/how-to-build-a-collapsible-sidebar-as-shown-in-the-files-app
Post not yet marked as solved
This is a duplicate of Where to find ShapeEdit sample code? - https://developer.apple.com/forums/thread/651193