I need to create a pdf with details collected from user like name, address, interests etc... and save it to custom location specified by user.
please provide some resources or any example code to proceed.
Post
Replies
Boosts
Views
Activity
"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.
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 ?
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 ?