Skip to content

Commit

Permalink
6.1.10
Browse files Browse the repository at this point in the history
6.1.10
  • Loading branch information
amit-kremer93 committed Nov 19, 2020
2 parents 3dcb54c + e444131 commit 4ca80da
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Versions
## 6.1.10
- iOS SDK 6.1.1
- Android SDK 6.1.0
- Add script for switching between Strict and Regular mode

## 6.1.0
- iOS SDK 6.1.0
- Android SDK 6.1.0
Expand Down
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@

- [v6 Breaking changes](#v6-breaking-changes)
- [Adding the SDK to your project](#installation)
- [Add or Remove Strict mode for App-kids](#appKids)
- [Initializing the SDK](#init-sdk)
- [Guides](#guides)
- [API](#api)

### <a id="plugin-build-for"> This plugin is built for

- iOS AppsFlyerSDK **v6.1.0**
- iOS AppsFlyerSDK **v6.1.1**
- Android AppsFlyerSDK **v6.1.0**

## <a id="v6-breaking-changes"> ❗ v6 Breaking Changes
Expand Down Expand Up @@ -68,6 +69,40 @@ $ react-native run-android
> Starting from RN [v0.60](https://facebook.github.io/react-native/blog/2019/07/03/version-60), and react-native-appsflyer `v1.4.7` the plugin uses [autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md). <br/>
If your app does not support autolinking, check out the Installation Guide [here](./Docs/Installation.md).

## <a id="appKids"> 👨‍👩‍👧‍👦 Add or Remove Strict mode for App-kids

Starting from version **6.1.10** iOS SDK comes in two variants: **Strict** mode and **Regular** mode. Please read more [here](https://support.appsflyer.com/hc/en-us/articles/207032066#integration-strict-mode-sdk)

***Change to Strict mode***<br>
After you [installed](#installation) the AppsFlyer plugin, go to the `react-native-appsflyer` folder inside the `node_modules` folder:
```
cd node_modules/react-native-appsflyer
```
Run the script `changeMode.sh strict`
```
./changeMode.sh strict
```
Go to the `ios` folder in your `root` project
```
cd ../../ios
```
Run `pod install`

***Change to Regular mode***<br>
Go to the `react-native-appsflyer` folder inside the `node_modules` folder:
```
cd node_modules/react-native-appsflyer
```
Run the script `changeMode.sh` (WITHOUT `strict`)
```
./changeMode.sh
```
Go to the `ios` folder in your `root` project
```
cd ../../ios
```
Run `pod install`

## <a id="init-sdk"> 🚀 Initializing the SDK

Initialize the SDK to enable AppsFlyer to detect installations, sessions (app opens) and updates.
Expand Down
7 changes: 7 additions & 0 deletions changeMode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if [[ \"$1\" = \"strict\" ]]; then
cat podspec-strict-template.txt > react-native-appsflyer.podspec
echo "AppsFlyer SDK Strict mode ✅ "
else
cat podspec-regular-template.txt > react-native-appsflyer.podspec
echo "AppsFlyer SDK Regular mode ✅ "
fi
5 changes: 4 additions & 1 deletion ios/AppsFlyerLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AppsFlyerLib.h
// AppsFlyerLib
//
// AppsFlyer iOS SDK 6.1.0 (23)
// AppsFlyer iOS SDK 6.1.1 (33)
// Copyright (c) 2012-2020 AppsFlyer Ltd. All rights reserved.
//

Expand Down Expand Up @@ -235,6 +235,7 @@ NS_SWIFT_NAME(DeepLinkDelegate)
*/
@property(nonatomic, strong) NSString * appleAppID;

#ifndef AFSDK_NO_IDFA
/**
AppsFlyer SDK collect Apple's `advertisingIdentifier` if the `AdSupport.framework` included in the SDK.
You can disable this behavior by setting the following property to YES
Expand All @@ -249,6 +250,8 @@ NS_SWIFT_NAME(DeepLinkDelegate)
- (void)waitForATTUserAuthorizationWithTimeoutInterval:(NSTimeInterval)timeoutInterval
NS_SWIFT_NAME(waitForATTUserAuthorization(timeoutInterval:));

#endif

@property(nonatomic) BOOL disableSKAdNetwork;

/**
Expand Down
8 changes: 4 additions & 4 deletions ios/RNAppsFlyer.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ -(NSError *) callSdkInternal:(NSDictionary*)initSdkOptions {
if(isConversionData == YES){
[AppsFlyerLib shared].delegate = self;
}

#ifndef AFSDK_NO_IDFA
if (interval != 0 && interval != nil){
double timeoutInterval = [interval doubleValue];
[[AppsFlyerLib shared] waitForATTUserAuthorizationWithTimeoutInterval:timeoutInterval];
}

#endif
[AppsFlyerLib shared].appleAppID = appId;
[AppsFlyerLib shared].appsFlyerDevKey = devKey;
[AppsFlyerLib shared].isDebug = isDebug;
Expand Down Expand Up @@ -443,11 +443,11 @@ -(void) reportOnSuccess:(NSString *)data type:(NSString*) type {
[[AppsFlyerLib shared] setSharingFilter:partners];
successCallback(@[SUCCESS]);
}

#ifndef AFSDK_NO_IDFA
RCT_EXPORT_METHOD(disableAdvertisingIdentifier:(BOOL)shouldDisable) {
[AppsFlyerLib shared].disableAdvertisingIdentifier = shouldDisable;
}

#endif
RCT_EXPORT_METHOD(disableCollectASA: (BOOL)shouldDisable) {
[AppsFlyerLib shared].disableCollectASA = shouldDisable;
}
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.1.0",
"version": "6.1.10",
"description": "React Native Appsflyer plugin",
"main": "index.js",
"scripts": {
Expand Down
18 changes: 18 additions & 0 deletions podspec-regular-template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require 'json'
pkg = JSON.parse(File.read("package.json"))

Pod::Spec.new do |s|
s.name = pkg["name"]
s.version = pkg["version"]
s.summary = pkg["description"]
s.requires_arc = true
s.license = pkg["license"]
s.homepage = pkg["homepage"]
s.author = pkg["author"]
s.source = { :git => pkg["repository"]["url"] }
s.source_files = 'ios/**/*.{h,m}'
s.platform = :ios, "8.0"
s.static_framework = true
s.dependency 'React'
s.dependency 'AppsFlyerFramework', '6.1.1'
end
19 changes: 19 additions & 0 deletions podspec-strict-template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'json'
pkg = JSON.parse(File.read("package.json"))

Pod::Spec.new do |s|
s.name = pkg["name"]
s.version = pkg["version"]
s.summary = pkg["description"]
s.requires_arc = true
s.license = pkg["license"]
s.homepage = pkg["homepage"]
s.author = pkg["author"]
s.source = { :git => pkg["repository"]["url"] }
s.source_files = 'ios/**/*.{h,m}'
s.platform = :ios, "8.0"
s.static_framework = true
s.dependency 'React'
s.dependency 'AppsFlyerFramework/Strict', '6.1.1'
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AFSDK_NO_IDFA=1' }
end
2 changes: 1 addition & 1 deletion react-native-appsflyer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ Pod::Spec.new do |s|
s.source_files = 'ios/**/*.{h,m}'
s.platform = :ios, "8.0"
s.static_framework = true
s.dependency 'AppsFlyerFramework', ' 6.1.0'
s.dependency 'React'
s.dependency 'AppsFlyerFramework', ' 6.1.1'
end

0 comments on commit 4ca80da

Please sign in to comment.