Posts

Post not yet marked as solved
2 Replies
1.1k Views
I am trying to use import from iPhone option as shown in WWDC session. I added code  WindowGroup {             ContentView()                 .environment(\.managedObjectContext, persistenceController.container.viewContext)                      }         .commands {             ImportFromDevicesCommands()         } ContentView.swift is  List {                 ForEach(items) { item in                     NavigationLink {                         Text("Item at \(item.timestamp!, formatter: itemFormatter)")                     } label: {                         Text(item.timestamp!, formatter: itemFormatter)                     }                 }                 .onDelete(perform: deleteItems)             }             .importsItemProviders([.image,.png,.jpeg,.rawImage], onImport: { providers in                 print("checking reachability")                 return true             }) The importsItemProviders block itself is not executed and not printing anything. In addition I am getting alert The operation couldn’t be completed. (Cocoa error 66563.) Is there anything to add for making this functionality work ?
Posted Last updated
.
Post not yet marked as solved
0 Replies
947 Views
The new iOS 15 feature "Capture Text from Image" option comes only after second tap. So The Apple Team provided let textFromCamera = UIAction.captureTextFromCamera(responder: self.notes, identifier: nil) When I tried to use same with SwiftUI, responser object should confirm to UIResponder/UIKeyInpunt. How to use same with SwiftUI or Is there any alternate option in SwiftUI ?
Posted Last updated
.
Post marked as solved
1 Replies
962 Views
"VisionKit is not available when building for macOS. Consider using #if !os(macOS) to conditionally import this framework." I am facing this error when using Mac catalyst. But in VisionKit documentation it is saying available for Mac catalyst.
Posted Last updated
.