Don't forget to change the minimum OS versions to match Purchasely requirements (iOS 11 / Android 21)
iOS Integration
You must have an iOS platform for your project. If it is not the case, you can simply add it with a cordova command :
1
cordova platform add ios
Copied!
Android Integration
Enable AndroidX
AndroidX is mandatory to display our paywalls, it is deactivated by default. You can enable it easily by editing your config.xml file.
1
<platformname="android">
2
<allow-intenthref="market:*"/>
3
<preferencename="AndroidXEnabled"value="true"/>
4
</platform>
Copied!
Add Android platform
You must have an Android platform for your project. If it is not the case, you can simply add it with a cordova command :
1
cordova platform add android
Copied!
Add Stores dependencies
Our Cordova SDK does not contains a store to avoid unnecessary integrations. You have to specifically declare which stores you want. To add Android dependencies to your project, you need to create a file platforms/android/app/build-extras.gradle
Then you add the stores dependencies you wish to use.