Post

Replies

Boosts

Views

Activity

ImportFromDevicesCommands - The operation couldn’t be completed. (Cocoa error 66563.)
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 ?
3
0
1.6k
Nov ’21
Text Capture from Image
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 ?
0
0
1.1k
Jun ’21