PayFort IOS SDK在初始化时会崩溃

时间:2017-10-04 08:12:47

标签: ios iphone swift payfort

我正在尝试在IOS Mobile应用程序中实现PayFort     我在项目中添加了PayFort FrameWork和bundle。当我初始化payFort对象时,它会让我崩溃

  

由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:' - [UITextField setFloatingLabelActiveTextColor:]:无法识别的选择器发送到实例0x7f81e3413d40'

我正在使用以下代码:

     func  payforCall(){
        let payFort = PayFortController.init(enviroment: KPayFortEnviromentSandBox)
        payFort?.isShowResponsePage = true;
        payFort?.delegate=self
        let request = NSMutableDictionary.init()
        request.setValue("1000", forKey: "amount")
        request.setValue("AUTHORIZATION", forKey: "command")
        request.setValue("USD", forKey: "currency")
        request.setValue("email@domain.com", forKey: "customer_email")
        request.setValue("en", forKey: "language")
        request.setValue("112233682686", forKey: "merchant_reference")
        request.setValue("token" , forKey: "sdk_token")

        payFort?.callPayFort(withRequest: request, currentViewController: self,
                            success: { (requestDic, responeDic) in
                                print("success")
        },
                            canceled: { (requestDic, responeDic) in
                                print("canceled")
        },
                            faild: { (requestDic, responeDic, message) in
                                print("faild")

        })
    }

2 个答案:

答案 0 :(得分:3)

在目标中的其他链接器标志中设置-ObjC - >构建设置选项卡

答案 1 :(得分:0)

我遇到了同样的问题,花了几个小时进行研究,然后才意识到我用小写的“ C”字母键入了-objc check this image to see..

在项目构建设置中-> Other Linker Flags->设置为-ObjC