GiniCaptureDocumentBuilder
public class GiniCaptureDocumentBuilder : NSObject
The GiniCaptureDocumentBuilder
provides a way to build a GiniCaptureDocument
from a Data
object and
a DocumentSource
. Additionally the DocumentImportMethod
can bet set after builder iniatilization.
This is an example of how a GiniCaptureDocument
should be built when it has been imported
with the Open with feature.
let documentBuilder = GiniCaptureDocumentBuilder(data: data, documentSource: .appName(name: sourceApplication))
documentBuilder.importMethod = .openWith
let document = documentBuilder.build()
do {
try document?.validate()
...
} catch {
...
}
-
Undocumented
Declaration
Swift
public var deviceOrientation: UIInterfaceOrientation?
-
Undocumented
Declaration
Swift
public var importMethod: DocumentImportMethod
-
Initializes a
GiniCaptureDocumentBuilder
with the document source. This method is only accesible in Swift projects.Declaration
Swift
public init(documentSource: DocumentSource)
Parameters
documentSource
document source (external, camera or appName)
-
Builds a
GiniCaptureDocument
Declaration
Swift
public func build(with data: Data, fileName: String?) -> GiniCaptureDocument?
Return Value
A
GiniCaptureDocument
ifdata
has a valid type ornil
if it hasn’t. -
Builds a
GiniCaptureDocument
from an incoming file url. The completion handler delivers the document ornil
if it couldn’t be read.Declaration
Swift
public func build(with openURL: URL, completion: @escaping (GiniCaptureDocument?) -> Void)