[英]Issue with Creating Card Connect SDK Xamarin binding Library for iOS
I created a Xamarin Binding Library project to map the card connect sdk for ios and was successful in it. 我创建了一个Xamarin绑定库项目,以映射用于iOS的卡连接sdk并成功完成。 But when I try to create a sample project to test the function its giving me the following error. 但是,当我尝试创建一个示例项目来测试其功能时,出现以下错误。
Could not create an native instance of the type 'CardConnect.CCCPaymentRequest': the native class hasn't been loaded. 无法创建类型为'CardConnect.CCCPaymentRequest'的本地实例:本地类尚未加载。 It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false. 通过将ObjCRuntime.Class.ThrowOnInitFailure设置为false,可以忽略此条件。
You can find the Objective C & Swift sample and documentation in the link below https://developer.cardconnect.com/mobile-sdks#iOS 您可以在https://developer.cardconnect.com/mobile-sdks#iOS下面的链接中找到Objective C和Swift示例和文档。
I've shared the binding library project and the necessary SDK framework in Github 我在Github中共享了绑定库项目和必要的SDK框架
I am posting the solution I got after multiple communications with card connect team and microsoft support team. 我将发布与卡连接团队和Microsoft支持团队进行多次通信后得到的解决方案。
The working solution is updated in Github: Card Connect SDK Binding 在Github中更新了工作解决方案: Card Connect SDK绑定
There are couple of points to be noted while anyone is going to utilize this, 任何人都要利用这一点时,有几点要注意,
Specifying the properties of the native library, you need to set the below items 指定本机库的属性,您需要设置以下各项
Force Load : selected 力负载:已选择
Linker flags: -lxml2 链接器标志:-lxml2
Smart Link : selected 智能链接:已选中
Setting the Additional mtouch flag where you use it, follow the below steps, 在使用它的位置设置其他mtouch标志,请按照以下步骤操作,
=> choose “options” at the bottom => find “iOS Build” => find a text input box called “Additional mtouch arguments”, then add the follow script “--optimize=-remove-dynamic-registrar” =>在底部选择“选项” =>找到“ iOS Build” =>找到一个名为“ Additional mtouch arguments”的文本输入框,然后添加以下脚本“ --optimize = -remove-dynamic-registrar”
Adding the merchant id in the Entitements.plist where you use the card connect library. 在使用卡连接库的Entitements.p列表中添加商户ID。
Note : You can test the sample using apple pay sandbox account for that you need an apple developer account & apple itunes/appstoreconnect account, with that you need to create the certificate mentioning the apple pay capability and create a provisioning profile with that certificate and the devices you intend to test. 注意 :您可以使用apple pay沙箱帐户测试示例,因为您需要一个apple开发人员帐户和apple itunes / appstoreconnect帐户,并需要创建提及apple pay功能的证书,并使用该证书和您要测试的设备。 Then sign your test application with the provisioning profile and load it in your iOS device either via Diawi.com or any other testing service. 然后使用配置文件对测试应用程序进行签名,然后通过Diawi.com或任何其他测试服务将其加载到iOS设备中。 You should be good to verify your solution. 您应该很好地验证您的解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.