Sunday, 15 September 2013

Having trouble with camera IOS8 / Swift with Card.IO -



Having trouble with camera IOS8 / Swift with Card.IO -

when seek , scan card card.io. not bring photographic camera allow lone greenish lines around it. when run code , press button not show photographic camera in view controller. ideas ? sample works fine in io8 in obj-c .

@ibaction func pressscan(sender: anyobject) { var cardscanner : cardiopaymentviewcontroller = cardiopaymentviewcontroller() cardscanner.modalpresentationstyle = uimodalpresentationstyle.fullscreen self.presentviewcontroller(cardscanner, animated: true, completion: nil) } override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. cardiopaymentviewcontroller.preload() } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } func userdidprovidecreditcardinfo(cardinfo: cardiocreditcardinfo!, inpaymentviewcontroller paymentviewcontroller: cardiopaymentviewcontroller!) { } func userdidcancelpaymentviewcontroller(paymentviewcontroller: cardiopaymentviewcontroller!) { }

is there in plist file need amend allow photographic camera access ios8 ?

solution here: https://github.com/card-io/card.io-ios-sdk/issues/76#issuecomment-65856792

namely:

you not initializing cardiopaymentviewcontroller correctly. should be

var cardscanner : cardiopaymentviewcontroller = cardiopaymentviewcontroller(paymentdelegate: self)

swift card.io

No comments:

Post a Comment