diff --git a/Docs/RN_AdvancedAPI.md b/Docs/RN_AdvancedAPI.md deleted file mode 100644 index dab451df..00000000 --- a/Docs/RN_AdvancedAPI.md +++ /dev/null @@ -1,124 +0,0 @@ - -# 📑 Advanced APIs - -- [Measure App Uninstalls](#uninstall) -- [User invite](#userInvite) -- [In-app purchase validation](#iae) - ---- - -### Measure App Uninstalls - -#### iOS - -#### First method - -AppsFlyer enables you to measure app uninstalls. To handle notifications it requires to modify your `AppDelegate.m`. Use [didRegisterForRemoteNotificationsWithDeviceToken](https://developer.apple.com/reference/uikit/uiapplicationdelegate) to register to the uninstall feature. - -*Example:* - -```objective-c -@import AppsFlyerLib; - -... - -- (void)application:(UIApplication ​*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *​)deviceToken { -// notify AppsFlyerLib - [[AppsFlyerLib shared] registerUninstall:deviceToken]; -} -``` - -Read more about Uninstall register: [Appsflyer SDK support site](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS) - -#### Second method - -Pass the device token to AppsFlyer - -*Example:* - -```javascript -appsFlyer.updateServerUninstallToken(deviceToken, (success) => { - //... -}); -``` - -#### Android - -Update Firebase device token so it can be sent to AppsFlyer - -*Example:* - -```javascript -appsFlyer.updateServerUninstallToken(newFirebaseToken, (success) => { - //... -}); -``` - -Read more about Android Uninstall Measurement: [Appsflyer SDK support site](https://support.appsflyer.com/hc/en-us/articles/208004986-Android-Uninstall-Tracking) - ---- - -### User invite -A complete list of supported parameters is available [here](https://support.appsflyer.com/hc/en-us/articles/115004480866-User-Invite-Tracking). Custom parameters can be passed using a userParams{} nested object, as in the example above. - -| parameter | type | description | -| ---------- |----------|------------------ | -| parameters | json | parameters for Invite link | -| success | function | success callback (generated link)| -| error | function | error callback | - - -*Example:* - -```javascript -appsFlyer.generateInviteLink( - { - channel: 'gmail', - campaign: 'myCampaign', - customerID: '1234', - userParams: { - myParam: 'newUser', - anotherParam: 'fromWeb', - amount: 1, - }, - }, - (link) => { - console.log(link); - }, - (err) => { - console.log(err); - } -); -``` ---- -### In-app purchase validation -Receipt validation is a secure mechanism whereby the payment platform (e.g. Apple or Google) validates that an in-app purchase indeed occurred as reported.
-Learn more - https://support.appsflyer.com/hc/en-us/articles/207032106-Receipt-validation-for-in-app-purchases
-âť—Importantâť— for iOS - set SandBox to ```true```
-```appsFlyer.setUseReceiptValidationSandbox(true);``` - - -| parameter | type | description | -| ---------- |----------|------------------ | -| purchaseInfo | json | In-App Purchase parameters | -| successC | function | success callback (generated link)| -| errorC | function | error callback | - - -*Example:* - -```javascript -let info = { - publicKey: 'key', - currency: 'biz', - signature: 'sig', - purchaseData: 'data', - price: '123', - productIdentifier: 'identifier', - currency: 'USD', - transactionId: '1000000614252747', - additionalParameters: {'foo': 'bar'}, - }; - -appsFlyer.validateAndLogInAppPurchase(info, res => console.log(res), err => console.log(err)); -``` \ No newline at end of file