Skip to content

Commit

Permalink
Merge pull request #533 from AppsFlyerSDK/dev/update-6.13.1-ios
Browse files Browse the repository at this point in the history
Dev/update 6.13.1 ios
  • Loading branch information
amit-kremer93 committed Mar 6, 2024
2 parents 9c46011 + 5d7de2a commit fc8e8b8
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/pre-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ jobs:
JIRA_TOKEN: ${{ secrets.CI_JIRA_TOKEN }}
JIRA_FIXED_VERSION: "React Native SDK v${{env.PLUGIN_VERSION}}"
run: |
ios_sdk_version=$(cat react-native-appsflyer.podspec | grep '\'AppsFlyerFramework\' | grep -Eo '[0-9].[0-9]+.[0.9]+')
android_sdk_version=$(cat android/build.gradle | grep 'com.appsflyer:af-android-sdk' | grep -Eo '[0-9].[0-9]+.[0.9]+')
ios_sdk_version=$(cat react-native-appsflyer.podspec | grep '\'AppsFlyerFramework\' | grep -Eo '[0-9].[0-9]+.[0.9]+')
android_sdk_version=$(cat android/build.gradle | grep 'com.appsflyer:af-android-sdk' | grep -Eo '[0-9].[0-9]+.[0.9]+')
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
Expand Down
24 changes: 23 additions & 1 deletion __tests__/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import appsFlyer from '../index';
import { RNAppsFlyer } from '../node_modules/react-native/Libraries/BatchedBridge/NativeModules';
import { NativeEventEmitter } from 'react-native';
const fs = require('fs');
const path = require('path');

describe("Test appsFlyer API's", () => {
afterEach(() => {
Expand Down Expand Up @@ -240,6 +242,26 @@ describe("Test appsFlyer API's", () => {
appsFlyer.disableIDFVCollection(true);
expect(RNAppsFlyer.disableIDFVCollection).toHaveBeenCalledTimes(1);
});

test('plugin version between platforms should match', () => {
const RNJavaFile = fs.readFileSync(
path.resolve(__dirname, '../android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerConstants.java'),
'utf-8'
);

const RNObjCFile = fs.readFileSync(
path.resolve(__dirname, '../ios/RNAppsFlyer.h'),
'utf-8'
);

const pluginVersionJavaRegex = /final\s+static\s+String\s+PLUGIN_VERSION\s+=\s+"([\d.]+)";/;
const pluginVersionObjCRegex = /static\s+NSString\s+\*const\s+kAppsFlyerPluginVersion\s+=\s+@"([\d.]+)";/;

const versionAndroid = RNJavaFile.match(pluginVersionJavaRegex)[1];
const versionIos = RNObjCFile.match(pluginVersionObjCRegex)[1];

expect(versionAndroid).toEqual(versionIos);
});
});

describe('Test native event emitter', () => {
Expand Down Expand Up @@ -322,4 +344,4 @@ describe('Test native event emitter', () => {

nativeEventEmitter.emit('onDeepLinking', nativeEventObject);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

public class RNAppsFlyerConstants {

final static String PLUGIN_VERSION = "6.13.0";
final static String PLUGIN_VERSION = "6.13.1";
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";
Expand Down
10 changes: 7 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,15 @@ declare module "react-native-appsflyer" {
}

export const AppsFlyerConsent: {
forGDPRUser: (hasConsentForDataUsage: boolean, hasConsentForAdsPersonalization: boolean) => void;
forNonGDPRUser: () => void;
forGDPRUser: (hasConsentForDataUsage: boolean, hasConsentForAdsPersonalization: boolean) => AppsFlyerConsentType;
forNonGDPRUser: () => AppsFlyerConsentType;
}

export type AppsFlyerConsentType = typeof AppsFlyerConsent;
export interface AppsFlyerConsentType {
isUserSubjectToGDPR: boolean;
hasConsentForDataUsage?: boolean;
hasConsentForAdsPersonalization?: boolean;
}

const appsFlyer: {
onInstallConversionData(callback: (data: ConversionData) => any): () => void;
Expand Down
2 changes: 1 addition & 1 deletion ios/RNAppsFlyer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@end


static NSString *const kAppsFlyerPluginVersion = @"6.13.0";
static NSString *const kAppsFlyerPluginVersion = @"6.13.1";
static NSString *const NO_DEVKEY_FOUND = @"No 'devKey' found or its empty";
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";
Expand Down
4 changes: 2 additions & 2 deletions react-native-appsflyer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Pod::Spec.new do |s|
# AppsFlyerFramework
if defined?($RNAppsFlyerStrictMode) && ($RNAppsFlyerStrictMode == true)
Pod::UI.puts "#{s.name}: Using AppsFlyerFramework/Strict mode"
s.dependency 'AppsFlyerFramework/Strict', '6.13.0'
s.dependency 'AppsFlyerFramework/Strict', '6.13.1'
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AFSDK_NO_IDFA=1' }
else
if !defined?($RNAppsFlyerStrictMode)
Pod::UI.puts "#{s.name}: Using default AppsFlyerFramework. You may require App Tracking Transparency. Not allowed for Kids apps."
Pod::UI.puts "#{s.name}: You may set variable `$RNAppsFlyerStrictMode=true` in Podfile to use strict mode for kids apps."
end
s.dependency 'AppsFlyerFramework', '6.13.0'
s.dependency 'AppsFlyerFramework', '6.13.1'
end
end

0 comments on commit fc8e8b8

Please sign in to comment.