Skip to content

Commit fc8e8b8

Browse files
Merge pull request #533 from AppsFlyerSDK/dev/update-6.13.1-ios
Dev/update 6.13.1 ios
2 parents 9c46011 + 5d7de2a commit fc8e8b8

6 files changed

Lines changed: 34 additions & 10 deletions

File tree

.github/workflows/pre-release-workflow.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ jobs:
5454
JIRA_TOKEN: ${{ secrets.CI_JIRA_TOKEN }}
5555
JIRA_FIXED_VERSION: "React Native SDK v${{env.PLUGIN_VERSION}}"
5656
run: |
57-
ios_sdk_version=$(cat react-native-appsflyer.podspec | grep '\'AppsFlyerFramework\' | grep -Eo '[0-9].[0-9]+.[0.9]+')
58-
android_sdk_version=$(cat android/build.gradle | grep 'com.appsflyer:af-android-sdk' | grep -Eo '[0-9].[0-9]+.[0.9]+')
5957
ios_sdk_version=$(cat react-native-appsflyer.podspec | grep '\'AppsFlyerFramework\' | grep -Eo '[0-9].[0-9]+.[0.9]+')
6058
android_sdk_version=$(cat android/build.gradle | grep 'com.appsflyer:af-android-sdk' | grep -Eo '[0-9].[0-9]+.[0.9]+')
6159
sed -i -e -r "s/Android AppsFlyer SDK \*\*v[0-9].[0-9]+.[0-9]+\*\*/Android AppsFlyer SDK \*\*v$android_sdk_version\*\*/g" README.md

__tests__/index.test.js

Lines changed: 23 additions & 1 deletion
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', () => {
@@ -322,4 +344,4 @@ describe('Test native event emitter', () => {
322344

323345
nativeEventEmitter.emit('onDeepLinking', nativeEventObject);
324346
});
325-
});
347+
});

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";

index.d.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,15 @@ declare module "react-native-appsflyer" {
115115
}
116116

117117
export const AppsFlyerConsent: {
118-
forGDPRUser: (hasConsentForDataUsage: boolean, hasConsentForAdsPersonalization: boolean) => void;
119-
forNonGDPRUser: () => void;
118+
forGDPRUser: (hasConsentForDataUsage: boolean, hasConsentForAdsPersonalization: boolean) => AppsFlyerConsentType;
119+
forNonGDPRUser: () => AppsFlyerConsentType;
120120
}
121121

122-
export type AppsFlyerConsentType = typeof AppsFlyerConsent;
122+
export interface AppsFlyerConsentType {
123+
isUserSubjectToGDPR: boolean;
124+
hasConsentForDataUsage?: boolean;
125+
hasConsentForAdsPersonalization?: boolean;
126+
}
123127

124128
const appsFlyer: {
125129
onInstallConversionData(callback: (data: ConversionData) => any): () => void;

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";

react-native-appsflyer.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ Pod::Spec.new do |s|
1818
# AppsFlyerFramework
1919
if defined?($RNAppsFlyerStrictMode) && ($RNAppsFlyerStrictMode == true)
2020
Pod::UI.puts "#{s.name}: Using AppsFlyerFramework/Strict mode"
21-
s.dependency 'AppsFlyerFramework/Strict', '6.13.0'
21+
s.dependency 'AppsFlyerFramework/Strict', '6.13.1'
2222
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AFSDK_NO_IDFA=1' }
2323
else
2424
if !defined?($RNAppsFlyerStrictMode)
2525
Pod::UI.puts "#{s.name}: Using default AppsFlyerFramework. You may require App Tracking Transparency. Not allowed for Kids apps."
2626
Pod::UI.puts "#{s.name}: You may set variable `$RNAppsFlyerStrictMode=true` in Podfile to use strict mode for kids apps."
2727
end
28-
s.dependency 'AppsFlyerFramework', '6.13.0'
28+
s.dependency 'AppsFlyerFramework', '6.13.1'
2929
end
3030
end

0 commit comments

Comments
 (0)