Skip to content

Commit a1b4935

Browse files
committed
update plugin version
1 parent 0772044 commit a1b4935

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

__tests__/index.test.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import appsFlyer from '../index';
22
import { RNAppsFlyer } from '../node_modules/react-native/Libraries/BatchedBridge/NativeModules';
33
import { NativeEventEmitter } from 'react-native';
4+
const fs = require('fs');
5+
const path = require('path');
46

57
describe("Test appsFlyer API's", () => {
68
afterEach(() => {
@@ -240,6 +242,26 @@ describe("Test appsFlyer API's", () => {
240242
appsFlyer.disableIDFVCollection(true);
241243
expect(RNAppsFlyer.disableIDFVCollection).toHaveBeenCalledTimes(1);
242244
});
245+
246+
test('plugin version between platforms should match', () => {
247+
const RNJavaFile = fs.readFileSync(
248+
path.resolve(__dirname, '../android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerConstants.java'),
249+
'utf-8'
250+
);
251+
252+
const RNObjCFile = fs.readFileSync(
253+
path.resolve(__dirname, '../ios/RNAppsFlyer.h'),
254+
'utf-8'
255+
);
256+
257+
const pluginVersionJavaRegex = /final\s+static\s+String\s+PLUGIN_VERSION\s+=\s+"([\d.]+)";/;
258+
const pluginVersionObjCRegex = /static\s+NSString\s+\*const\s+kAppsFlyerPluginVersion\s+=\s+@"([\d.]+)";/;
259+
260+
const versionAndroid = RNJavaFile.match(pluginVersionJavaRegex)[1];
261+
const versionIos = RNObjCFile.match(pluginVersionObjCRegex)[1];
262+
263+
expect(versionAndroid).toEqual(versionIos);
264+
});
243265
});
244266

245267
describe('Test native event emitter', () => {
@@ -323,3 +345,7 @@ describe('Test native event emitter', () => {
323345
nativeEventEmitter.emit('onDeepLinking', nativeEventObject);
324346
});
325347
});
348+
349+
describe('Plugin version alignment between platforms Test', () => {
350+
351+
});

android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
public class RNAppsFlyerConstants {
88

9-
final static String PLUGIN_VERSION = "6.13.0";
9+
final static String PLUGIN_VERSION = "6.13.1";
1010
final static String NO_DEVKEY_FOUND = "No 'devKey' found or its empty";
1111
final static String UNKNOWN_ERROR = "AF Unknown Error";
1212
final static String SUCCESS = "Success";

ios/RNAppsFlyer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@end
2323

2424

25-
static NSString *const kAppsFlyerPluginVersion = @"6.13.0";
25+
static NSString *const kAppsFlyerPluginVersion = @"6.13.1";
2626
static NSString *const NO_DEVKEY_FOUND = @"No 'devKey' found or its empty";
2727
static NSString *const NO_APPID_FOUND = @"No 'appId' found or its empty";
2828
static NSString *const NO_EVENT_NAME_FOUND = @"No 'eventName' found or its empty";

0 commit comments

Comments
 (0)