Podfile
and above the target add this line:Podfile
and above the target add this line:use_frameworks!
in your Podfile
if you have not done so already (see here for a sample Podfile
). Then in a terminal in the directory of your iOS project, rundyld: Library not loaded: @rpath/DyScan.framework/DyScan
CocoaPods probably has not configured the dependency properly. In Pods/Target Support Files/Pods-{Project}/Pods-{Project}-frameworks.sh
add the line install_framework "${PODS_ROOT}/DyScan/Swift5_1/DyScan.framework"
in both the debug and release configurations (you should see many other similar lines). In "Embed Pods Frameworks" in your project's build phases, add
${PODS_ROOT}/DyScan/Swift5_1/DyScan.framework
as an input path.AppDelegate
add the following line to configure DyScan
.AuthError
CameraError
NoPermissions
UserCancelled
import Dyscan
in the file that contains the view controller that will instantiate DyScan.
In your app, create an extension for your view controller that conforms to DyScanViewControllerDelegate
. This will require you to implement two functions, onFailure
, and onSuccess
. onFailure
is called whenever a scan event is unsuccessful (for any reason, including the user choosing to cancel). DyScanCreditCardInfo
has the following fields:cardNumber:String
nullableExpiryMonth:NSNumber?
nullableExpiryMonth.uintValue
.nullableExpiryYear:NSNumber?
nullableExpiryYear.uintValue
.nullableIsFraud:NSNumber?
cardNumberX:NSNumber?
cardNumberX.doubleValue
.cardNumberY:NSNumber?
cardNumberY.doubleValue
.expiryX:NSNumber?
expiryX.doubleValue
.expiryY:NSNumber?
expiryY.doubleValue
.expiryMonth:UInt
nullableExpiryMonth
if writing in Swift.expiryYear:UInt
nullableExpiryYear
if writing in Swift.isFraud:Bool
DyScanViewController
, and set the paymentDelegate
attribute of it to your view controller (using self
). Then, present the view controller.import Dyscan
in the file that contains the view controller that will instantiate DyScan.
In your app, create an extension for your view controller that conforms to DyScanDefaultViewControllerDelegate
. This will require you to implement three functions, onFailure
, onSuccess
, and userChoseManual
. onFailure
is called whenever a scan event is unsuccessful (for any reason, even if the user chose to cancel). DyScanCreditCardInfo
has the following fields:cardNumber:String
nullableExpiryMonth:NSNumber?
nullableExpiryMonth.uintValue
.nullableExpiryYear:NSNumber?
nullableExpiryYear.uintValue
.nullableIsFraud:NSNumber?
cardNumberX:NSNumber?
cardNumberX.doubleValue
.cardNumberY:NSNumber?
cardNumberY.doubleValue
.expiryX:NSNumber?
expiryX.doubleValue
.expiryY:NSNumber?
expiryY.doubleValue
.expiryMonth:UInt
nullableExpiryMonth
if writing in Swift.expiryYear:UInt
nullableExpiryYear
if writing in Swift.isFraud:Bool
DyScanDefaultViewController
, and set the paymentDelegate
attribute of it to your view controller (using self
). Then, present the view controller.viewController.allowManualEntry=false
.import Dyscan
in the file that contains the view controller that will instantiate DyScan.
In your app, create an extension for your view that conforms to DyScanViewDelegate
. This will require you to implement two functions, onFailure
, and onSuccess
. DyScanCreditCardInfo
has the following fields:cardNumber:String
nullableExpiryMonth:NSNumber?
nullableExpiryMonth.uintValue
.nullableExpiryYear:NSNumber?
nullableExpiryYear.uintValue
.nullableIsFraud:NSNumber?
cardNumberX:NSNumber?
cardNumberX.doubleValue
.cardNumberY:NSNumber?
cardNumberY.doubleValue
.expiryX:NSNumber?
expiryX.doubleValue
.expiryY:NSNumber?
expiryY.doubleValue
.expiryMonth:UInt
nullableExpiryMonth
if writing in Swift.expiryYear:UInt
nullableExpiryYear
if writing in Swift.isFraud:Bool
DyScanView
, and set the delegate
attribute of it to your view controller (using self
). You will need to call the prepare()
function to fully initialize the view before adding it as a subview. For example, DyScanView
could be added like this:DyScanView.rotate
function.language:String
showNumberOnCompletion:Bool
numberOnCompletionAlwaysHorizontal:Bool
showDynetiLogo:Bool
showNumberOverlay:Bool
numberOverlayColor:UIColor
numberOverlayOpacity:CGFloat
defaultCardNumberText:String
defaultExpirationDate:String
showCorners:Bool
cornerThickness:int
cornerInactiveColor:UIColor
cornerActiveColor:UIColor
cornerCompletedColor:UIColor
bgColor:UIColor
bgOpacity:CGFloat
showHelperText:Bool
helperTextString:String?
\n
for line breaks.helperTextColor:UIColor
helperTextFont:UIFont
helperTextPosition:Enum
DyScanHelperTextPosition
showRotateButton:Bool