- npm install cordova -g
- npm install plugman -g
- cordova create cordova-inapp-sample
- cd cordova-inapp-sample
- cordova platforms add ios
- cd platforms/ios
- plugman install --platform ios --project ./ --plugin https://github.com/j3k0/PhoneGap-InAppPurchase-iOS.git
Go to the Build Phases tab and add "-fno-objc-arc" to inapppurchase.m and SKProduct+LocalizedProce.m under compiled sources.
- Look at cordova_plugins.js in the platforms/ios/www root to see the JavaScript bridge and where storekit is assigned.
- Look at config.xml at the top of the tree (not in www) to see the reference to the InAppPurchase plugin
At this point, you now have the PhoneGap-InAppPurchase-iOS plugin installed and can code for it.
NOTE: running cordova build ios will overwrite so if you want to use that command, make sure you copy files from www up to the merges/ios folder.