Skip to content

Commit

Permalink
Merge pull request #535 from AppsFlyerSDK/releases/6.x.x/6.13.x/6.13.…
Browse files Browse the repository at this point in the history
…1-rc3

Releases/6.x.x/6.13.x/6.13.1 rc3
  • Loading branch information
amit-kremer93 committed Mar 7, 2024
2 parents 3806778 + 3ca8191 commit 575ed93
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-to-QA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
env:
SLACK_TOKEN: ${{ secrets.CI_SLACK_TOKEN }}
run: |
ios_sdk_version=$(cat README.md | grep 'iOS AppsFlyer SDK' | grep -Eo '[0-9].[0-9]+.[0-9]')
android_sdk_version=$(cat README.md | grep 'Android AppsFlyer 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]+')
CHANGES=$(cat "${{env.JIRA_FIXED_VERSION}}-releasenotes".txt)
curl -X POST -H 'Content-type: application/json' --data '{"jira_fixed_version": "'"${{env.JIRA_FIXED_VERSION}}"'", "deploy_type": "QA", "install_tag": "QA", "git_branch": "'"${{github.ref_name}}"'", "changes_and_fixes": "'"$CHANGES"'", "android_dependencie": "'"$android_sdk_version"'", "ios_dependencie": "'"$ios_sdk_version"'"}' "$SLACK_TOKEN"
13 changes: 13 additions & 0 deletions .github/workflows/pre-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,16 @@ jobs:
git add CHANGELOG.md
git commit -m "Update CHANGELOG.md"
git push origin HEAD:${{ env.GIT_BRANCH_RELEASE }} --force
- name: Update README.md
env:
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]+')
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
sed -i -e -r "s/iOS AppsFlyer SDK \*\*v[0-9].[0-9]+.[0-9]+\*\*/iOS AppsFlyer SDK \*\*v$ios_sdk_version\*\*/g" README.md
git add README.md
git commit -m "Update README.md"
git push origin HEAD:${{ env.GIT_BRANCH_RELEASE }} --force
4 changes: 2 additions & 2 deletions .github/workflows/release-Production-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
run: |
chmod +x .github/workflows/scripts/releaseNotesGenerator.sh
.github/workflows/scripts/releaseNotesGenerator.sh $JIRA_TOKEN "$JIRA_FIXED_VERSION"
ios_sdk_version=$(cat README.md | grep 'iOS AppsFlyer SDK' | grep -Eo '[0-9].[0-9]+.[0-9]')
android_sdk_version=$(cat README.md | grep 'Android AppsFlyer 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]+')
CHANGES=$(cat "$JIRA_FIXED_VERSION-releasenotes".txt)
curl -X POST -H 'Content-type: application/json' --data '{"jira_fixed_version": "'"${{env.JIRA_FIXED_VERSION}}"'", "deploy_type": "Production", "install_tag": "latest", "git_branch": "'"$RELEASE_BRACH_NAME"'", "changes_and_fixes": "'"$CHANGES"'", "android_dependencie": "'"$android_sdk_version"'", "ios_dependencie": "'"$ios_sdk_version"'"}' "$SLACK_TOKEN"
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 6.13.1
Release date: *2024-03-07*

- React Native >> update iOS to 6.13.1

## 6.13.0
Release date: *2024-02-19*

Expand Down
8 changes: 4 additions & 4 deletions Docs/RN_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,19 +458,19 @@ appsFlyer.setHost('foo', 'bar.appsflyer.com', res => console.log(res));
`setUserEmails(options, success, error)`

Set the user emails and encrypt them.
**Note:** Android platform supports only 0 (none) and 3 (SHA256) emailsCryptType. iOS platform support all (0-3) emailsCryptType.
**Note:** Android and iOS platforms supports only 0 (none) and 3 (SHA256) emailsCryptType.
When unsupported emailsCryptType is passed, the SDK will use the default (none).

| parameter | type | description |
| ---------- |----------|------------------ |
| configuration | json | email configuration |
| success | function | success callback |
| error | function | error callback |
| error | function | error callback |


| option | type | description |
| option | type | description |
| -------------- | ---- |------------- |
| emailsCryptType | int | **iOS**: none - 0 (default), SHA1 - 1, MD5 - 2, SHA256 - 3<br>**Android**: none - 0 (default), SHA256 - 3|
| emailsCryptType | int | none - 0 (default), SHA256 - 3 |
| emails | array | comma separated list of emails |


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
### <a id="plugin-build-for"> This plugin is built for

- Android AppsFlyer SDK **v6.13.0**
- iOS AppsFlyer SDK **v6.13.0**
- iOS AppsFlyer SDK **v6.13.1**

## <a id="breaking-changes"> ❗❗ Breaking changes when updating to v6.x.x❗❗

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
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.13.0",
"version": "6.13.1",
"description": "React Native Appsflyer plugin",
"main": "index.js",
"types": "index.d.ts",
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 575ed93

Please sign in to comment.