Skip to content

Commit

Permalink
6.0.31
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-kremer93 committed Oct 6, 2020
1 parent e3286d9 commit f277500
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 17 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Versions

## 6.0.31
- In-App purchase validation
- Add parameters type check to public api
- Fix crash on null callbacks
- Install Referrer v2.1

## 6.0.30

- iOS SDK 6.0.3
Expand Down
2 changes: 1 addition & 1 deletion Docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -777,4 +777,4 @@ if (Platform.OS == 'android') {
};
}
appsFlyer.validateAndLogInAppPurchase(info, res => console.log(res), err => console.log(err));
```
```
32 changes: 20 additions & 12 deletions SampleApp/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ appsFlyer.setCustomerUserId("testID");
appsFlyer.initSdk(
{
isDebug: true,
devKey: 'Us4Gm2SnJghcuoev846Qed',
appId: '789456231',
devKey: 'Us********ed',
appId: '7********1',
onInstallConversionDataListener: true,
timeToWaitForATTUserAuthorization: 60,
timeToWaitForATTUserAuthorization: 10,
},
(result) => {
console.log('initSdk: ' + result);
Expand Down Expand Up @@ -94,18 +94,26 @@ const App: () => React$Node = () => {
};


const logInAppPurchase = () => {
const info = {
publicKey: 'biz',
currency: 'buz',
signature: 'sasa',
purchaseData: 'ffff',
let info = {};
if (Platform.OS == 'android') {
info = {
publicKey: 'key',
currency: 'biz',
signature: 'sig',
purchaseData: 'data',
price: '123',
additionalParameters: {'foo': 'bar'},
};

appsFlyer.validateAndLogInAppPurchase(info, res => console.log(res), err => console.log(err.message));
};
} else if (Platform.OS == 'ios') {
info = {
productIdentifier: 'identifier',
currency: 'USD',
transactionId: '1000000614252747',
price: '0.99',
additionalParameters: {'foo': 'bar'},
};
}
appsFlyer.validateAndLogInAppPurchase(info, res => console.log(res), err => console.log(err));

const init = () => {
appsFlyer.initSdk(option, result => console.log(result), error => console.log(error));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class RNAppsFlyerConstants {

final static String NO_DEVKEY_FOUND = "No 'devKey' found or its empty";
final static String UNKNOWN_ERROR = "AF Unknown Error";
final static String SUCCESS = "Success On Plugin Side";
final static String SUCCESS = "Success";
final static String NO_EVENT_NAME_FOUND = "No 'eventName' found or its empty";
final static String EMPTY_OR_CORRUPTED_LIST = "No arguments found or list is corrupted";
final static String INVALID_URI = "Passed string is not a valid URI";
Expand Down
2 changes: 1 addition & 1 deletion ios/RNAppsFlyer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static NSString *const NO_DEVKEY_FOUND = @"No 'devKey' found or its
static NSString *const NO_APPID_FOUND = @"No 'appId' found or its empty";
static NSString *const NO_EVENT_NAME_FOUND = @"No 'eventName' found or its empty";
static NSString *const EMPTY_OR_CORRUPTED_LIST = @"No arguments found or list is corrupted";
static NSString *const SUCCESS = @"Success On Plugin Side. Wait for Conversion Data...";
static NSString *const SUCCESS = @"Success";
static NSString *const INVALID_URI = @"Invalid URI";
static NSString *const IOS_14_ONLY = @"Feature only supported on iOS 14 and above";

Expand Down
2 changes: 1 addition & 1 deletion ios/RNAppsFlyer.m
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ -(void) reportOnSuccess:(NSString *)data type:(NSString*) type {


[[AppsFlyerLib shared] validateAndLogInAppPurchase:productIdentifier price:price currency:currency transactionId:tranactionId additionalParameters:additionalParameters success:^(NSDictionary * _Nonnull response) {
successCallback(response);
successCallback(@[@"In App Purchase Validation completed successfully!"]);
} failure:^(NSError * _Nullable error, id _Nullable reponse) {
errorCallback(error);
}];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-appsflyer",
"version": "6.0.30",
"version": "6.0.31",
"description": "React Native Appsflyer plugin",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit f277500

Please sign in to comment.