Software Archive
Read-only legacy content

Tip : cordova plugin purchase build for iOS

Fab_V_
New Contributor I
794 Views

For those who are experiencing build error with the latest cordova plugin purchase for IOS.
this one : https://github.com/j3k0/cordova-plugin-purchase

I found that they have upgraded some deprecated functions in InAppPurchase.m
but the build server is not upgraded and is an older version.
You have to download the plugin and add it in additions.xml with intelxdk:type="local".
Don't forget to enter your billingkey parameter (for android).

Then you open src/ios/InAppPurchase.m and replace "cdv_base64EncodedString" by "base64EncodedString"
3 replacements if i remember.

Build may be successful after that.

0 Kudos
4 Replies
PaulF_IntelCorp
Employee
794 Views

@Fab -- thanks for that info. :)

This would be a good scenario for the EA release of the XDK, which handles plugins much differently. It will pull your plugins into your project directory, into a plugins directory, where you can make the edits described. This technique will eventually be used in a future release of the XDK. More details here: https://software.intel.com/en-us/forums/topic/561050

0 Kudos
Scott_U_
Beginner
794 Views

Hi Fab, 

Feeling a bit stupid here. 

This is what I have in my additional.xml file/ 

<intelxdk:plugin intelxdk:name="Purchase" intelxdk:value="https://github.com/j3k0/cordova-plugin-purchase.git">
<intelxdk:param intelxdk:name="BILLING_KEY" intelxdk:value="XXXXX" />
</intelxdk:plugin>

When I download the plugin, do I need to install it under www (does it need a specific name) 

Do I add it through Intel UI? 

Thanks

Scott 

0 Kudos
Scott_U_
Beginner
794 Views

Hi Fab, 

I managed to work it out. 

1. I did not added in under project 

2. Only added it in with the following settings in additional.xml and value=Directory under www. And all seems to work 

<intelxdk:plugin intelxdk:name="Purchase" intelxdk:value="cordova-plugin-purchase-master" intelxdk:type="local">
<intelxdk:param intelxdk:name="BILLING_KEY" intelxdk:value="MIIBIj" />
</intelxdk:plugin>

Thanks

0 Kudos
Fab_V_
New Contributor I
794 Views

yes,

you add pluygin directly in the xml, not with intel wdk gui.

After the plugin needs to be in the www folder. In my case i add it in a "plugins" subfolder.

0 Kudos
Reply