Does PhoneGap support In-App Purchase?

会有一股神秘感。 提交于 2019-12-03 01:08:02

问题


Has anyone used David Orchard's fork for in-app purchases with PhoneGap? It hasn't been updated in over a year. According to this thread Urban Airship can't help yet.


回答1:


Ah! I just needed to look a bit harder, this PhoneGap plugin should work perfectly. I'll comment here how well it works with Urban Airship.

https://github.com/phonegap/phonegap-plugins/tree/master/iOS/InAppPurchaseManager




回答2:


The phonegap plugin suggested by daniellmb works well. Please keep the following in mind

  1. CORDOVA_FRAMEWORK in InAppPurchaseManager.h, remove all the code around that. You will run into 'CDVPlugin.h' file not found in inAppPurchaseManager.h, this is how both import should look

    #import <Cordova/CDVPlugin.h>
    #import <Cordova/NSData+Base64.h>
    
  2. If you get the errror Plugin 'InAppPurchaseManager' not found, or is not a CDVPlugin. Check your plugin mapping in Cordova.plist. You have to add the following to Cordova.plist

    <key>InAppPurchaseManager</key>
    <string>InAppPurchaseManager</string>
    


来源:https://stackoverflow.com/questions/5679352/does-phonegap-support-in-app-purchase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!