Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-kremer93 committed Jan 7, 2025
2 parents fb27417 + ab7adf9 commit 36415b0
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 87 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/build-apps-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,27 @@ on:

jobs:
Build-RN-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install react-native-appsflyer on an Android app
run: |
cd demos/appsflyer-react-native-app
yarn install
yarn add ../../ --save
- name: Build apk
run: |
cd demos/appsflyer-react-native-app/android
chmod +x ./gradlew
./gradlew assembleRelease
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: install react-native-appsflyer on an Android app
run: |
cd demos/appsflyer-react-native-app
yarn install
yarn add ../../ --save
- name: Build apk
run: |
cd demos/appsflyer-react-native-app/android
chmod +x ./gradlew
./gradlew assembleRelease
# Build-RN-ios:
# runs-on: macos-latest
# steps:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/responseToSupportIssue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,5 @@ jobs:
issue-number: ${{ github.event.issue.number }}
body: |
👋 Hi @${{ github.event.issue.user.login }} and Thank you for reaching out to us.
In order for us to provide optimal support, please submit a ticket to our support team at [email protected].
When submitting the ticket, please specify:
- ✅ your AppsFlyer sign-up (account) email
- ✅ app ID
- ✅ production steps
- ✅ logs
- ✅ code snippets
- ✅ and any additional relevant information.
You can contact AppsFlyer support through the Customer Assistant Chatbot for assistance with troubleshooting issues or product guidance.
To do so, please follow [this article](https://support.appsflyer.com/hc/en-us/articles/23583984402193-Using-the-Customer-Assistant-Chatbot).
8 changes: 4 additions & 4 deletions .github/workflows/scripts/updateReadme.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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
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 -r "s/Android AppsFlyer SDK \*\*v[0-9]+\.[0-9]+\.[0-9]+\*\*/Android AppsFlyer SDK \*\*v$android_sdk_version\*\*/g" README.md
sed -i -r "s/iOS AppsFlyer SDK \*\*v[0-9]+\.[0-9]+\.[0-9]+\*\*/iOS AppsFlyer SDK \*\*v$ios_sdk_version\*\*/g" README.md
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 6.15.1
Release date: *2024-09-15*

- React Native >> Update Plugin to v6.15.1
- React native plugin >> UDL failed deferred deep linking

## 6.14.3
Release date: *2024-04-28*

Expand Down
95 changes: 47 additions & 48 deletions Docs/RN_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,53 @@ hidden: false
## APIs

The list of available methods for this plugin is described below.
- [APIs](#apis)
- [Android and iOS APIs](#android-and-ios-apis)
- [initSDK](#initsdk)
- [startSdk](#startsdk)
- [logEvent](#logevent)
- [setCustomerUserId](#setcustomeruserid)
- [stop](#stop)
- [setAppInviteOneLinkID](#setappinviteonelinkid)
- [setAdditionalData](#setadditionaldata)
- [setResolveDeepLinkURLs](#setresolvedeeplinkurls)
- [setOneLinkCustomDomain](#setonelinkcustomdomain)
- [setCurrencyCode](#setcurrencycode)
- [logLocation](#loglocation)
- [anonymizeUser](#anonymizeuser)
- [getAppsFlyerUID](#getappsflyeruid)
- [setHost](#sethost)
- [setUserEmails](#setuseremails)
- [generateInviteLink](#generateinvitelink)
- [setSharingFilterForAllPartners](#setsharingfilterforallpartners) *Deprecated*
- [setSharingFilter](#setsharingfilter) *Deprecated*
- [setSharingFilterForPartners](#setsharingfilterforpartners)
- [validateAndLogInAppPurchase](#validateandloginapppurchase)
- [updateServerUninstallToken](#updateserveruninstalltoken)
- [sendPushNotificationData](#sendpushnotificationdata)
- [addPushNotificationDeepLinkPath](#addpushnotificationdeeplinkpath)
- [appendParametersToDeepLinkingURL](#appendparameterstodeeplinkingurl)
- [disableAdvertisingIdentifier](#disableAdvertisingIdentifier)
- [enableTCFDataCollection](#enableTCFDataCollection)
- [setConsentData](#setConsentData)
- [logAdRevenue](#logAdRevenue)
- [initSdk](#initsdk)
- [startSdk](#startsdk)
- [logEvent](#logevent)
- [setCustomerUserId](#setcustomeruserid)
- [stop](#stop)
- [setAppInviteOneLinkID](#setappinviteonelinkid)
- [setAdditionalData](#setadditionaldata)
- [setResolveDeepLinkURLs](#setresolvedeeplinkurls)
- [setOneLinkCustomDomains](#setonelinkcustomdomains)
- [setCurrencyCode](#setcurrencycode)
- [logLocation](#loglocation)
- [anonymizeUser](#anonymizeuser)
- [getAppsFlyerUID](#getappsflyeruid)
- [setHost](#sethost)
- [setUserEmails](#setuseremails)
- [generateInviteLink](#generateinvitelink)
- [setSharingFilterForAllPartners](#setsharingfilterforallpartners)
- [setSharingFilter](#setsharingfilter)
- [setSharingFilterForPartners](#setsharingfilterforpartners)
- [validateAndLogInAppPurchase](#validateandloginapppurchase)
- [updateServerUninstallToken](#updateserveruninstalltoken)
- [sendPushNotificationData](#sendpushnotificationdata)
- [addPushNotificationDeepLinkPath](#addpushnotificationdeeplinkpath)
- [appendParametersToDeepLinkingURL](#appendparameterstodeeplinkingurl)
- [disableAdvertisingIdentifier](#disableadvertisingidentifier)
- [enableTCFDataCollection](#enabletcfdatacollection)
- [setConsentData](#setconsentdata)
- [logAdRevenue](#logadrevenue)
- [Android Only APIs](#android-only-apis)
- [setCollectAndroidID](#setcollectandroidid)
- [setCollectIMEI](#setcollectimei)
- [setDisableNetworkData](#setdisablenetworkdata)
- [performOnDeepLinking](#performondeeplinking)
- [setCollectAndroidID](#setcollectandroidid)
- [setCollectIMEI](#setcollectimei)
- [setDisableNetworkData `setDisableNetworkData(disable)`](#setdisablenetworkdata-setdisablenetworkdatadisable)
- [performOnDeepLinking](#performondeeplinking)
- [iOS Only APIs](#ios-only-apis)
- [disableCollectASA](#disablecollectasa)
- [setUseReceiptValidationSandbox](#setusereceiptvalidationsandbox)
- [disableSKAD](#disableskad)
- [setCurrentDeviceLanguage](#setcurrentdevicelanguage)
- [disableIDFVCollection](#disableidfvcollection)
- [disableCollectASA](#disablecollectasa)
- [disableIDFVCollection](#disableidfvcollection)
- [setUseReceiptValidationSandbox](#setusereceiptvalidationsandbox)
- [disableSKAD](#disableskad)
- [setCurrentDeviceLanguage](#setcurrentdevicelanguage)
- [AppsFlyerConversionData](#appsflyerconversiondata)
- [onInstallConversionData](#oninstallconversiondata)
- [onInstallConversionFailure](#oninstallconversionfailure)
- [onAppOpenAttribution](#onappopenattribution)
- [onAttributionFailure](#onattributionfailure)
- [onDeepLink](#ondeeplink)
- [onInstallConversionData](#oninstallconversiondata)
- [onInstallConversionFailure](#oninstallconversionfailure)
- [onAppOpenAttribution](#onappopenattribution)
- [onAttributionFailure](#onattributionfailure)
- [onDeepLink](#ondeeplink)
---

## Android and iOS APIs
Expand Down Expand Up @@ -109,7 +110,7 @@ appsFlyer.initSdk(
```
---

#### startSdk
### startSdk
`startSdk()`

In version 6.9.1 of the react-native-appslfyer SDK we added the option of splitting between the initialization stage and start stage. All you need to do is add the property manualStart: true to the init object, and later call appsFlyer.startSdk() whenever you decide. If this property is set to false or doesn’t exist, the sdk will start after calling `appsFlyer.initSdk(...)`.
Expand Down Expand Up @@ -147,7 +148,7 @@ appsFlyer.initSdk(
```
---

#### logEvent
### logEvent
`logEvent(eventName, eventValues, success, error)`

In-App Events provide insight on what is happening in your app. It is recommended to take the time and define the events you want to measure to allow you to measure ROI (Return on Investment) and LTV (Lifetime Value).
Expand Down Expand Up @@ -798,20 +799,18 @@ let GDPRUser = AppsFlyerConsent.forGDPRUser(true, false);
appsFlyer.setConsentData(nonGDPRUser /**or**/ GDPRUser);
```

### logAdRevenue - Since 6.15.1
### logAdRevenue
`logAdRevenue(data: AFAdRevenueData): void`

Use this method to log your ad revenue.</br>
By attributing ad revenue, app owners gain the complete view of user LTV and campaign ROI.
Ad revenue is generated by displaying ads on rewarded videos, offer walls, interstitials, and banners in an app.

#### Parameters

| Param | Type |
| -------------- | ---------------------------------------------------------- |
| **`data`** | `AFAdRevenueData` |

#### Usage Example for React Native:
*Example:*

```javascript
const adRevenueData = {
Expand Down
2 changes: 1 addition & 1 deletion Docs/RN_ExpoDeepLinkIntegration.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For more info please check out the [OneLink™ Deep Linking Guide](https://suppo

1. In order to use AppsFlyer's deeplinks you need to configure intent filters/scheme/associatedDomains as described in [Expo's guide](https://docs.expo.dev/guides/linking/#universal-links-on-ios).

2. **For Android apps:** You need to add `setIntent()` inside the `onNewIntent` method like described [here](RN_DeepLinkIntegrate.md#android-deeplink-setup). This plugin is NOT adding this code out the box, so you need to implement it **manually or with [custom config plugin](https://docs.expo.dev/modules/config-plugin-and-native-module-tutorial/#4-creating-a-new-config-plugin)**
2. **For Android apps:** You need to add `setIntent()` inside the `onNewIntent` method like described [here](https://dev.appsflyer.com/hc/docs/rn_deeplinkintegrate#android-deeplink-setup). This plugin is NOT adding this code out the box, so you need to implement it **manually or with [custom config plugin](https://docs.expo.dev/modules/config-plugin-and-native-module-tutorial/#4-creating-a-new-config-plugin)**

## Full app.json example

Expand Down
4 changes: 4 additions & 0 deletions Docs/RN_UnifiedDeepLink.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ order: 9
hidden: false
---

> 📘 **UDL privacy protection**
>
> For new users, the UDL method only returns parameters relevant to deferred deep linking: `deep_link_value` and `deep_link_sub1` to `deep_link_sub10`. If you try to get any other parameters (`media_source`, `campaign`, `af_sub1-5`, etc.), they return `null`.
### UDL flow

1. The SDK is triggered by:
Expand Down
6 changes: 5 additions & 1 deletion Docs/RN_UserInvite.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ The link that is generated for the user invite will use this OneLink ID as the b
| oneLinkID | string | oneLinkID |
| callback | function | success callback |


> 📘 Note
>
> - Make sure to call `setAppInviteOneLinkID()` **before** calling `start`.
> - The OneLink template must be assigned to the app.
##### 2. `generateInviteLink(parameters, success, error)`
A complete list of supported parameters is available [here](https://support.appsflyer.com/hc/en-us/articles/115004480866-User-Invite-Tracking). Custom parameters can be passed using a userParams{} nested object, as in the example above.

Expand Down
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
### <a id="plugin-build-for"> This plugin is built for

- Android AppsFlyer SDK **v6.13.0**
- iOS AppsFlyer SDK **v6.13.1**
- Android AppsFlyer SDK **v6.15.1**
- iOS AppsFlyer SDK **v6.15.1**
- Tested with React-Native **v0.62.0** (older versions might be supported)

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

Expand Down Expand Up @@ -46,24 +47,28 @@ And removed the following ones:

If you have used 1 of the removed APIs, please check the integration guide for the updated instructions.

---
---

## 🚀 Getting Started

## 🚀 Getting Started
- [Installation](/Docs/RN_Installation.md)
- [***Expo*** Installation](/Docs/RN_ExpoInstallation.md)
- [**_Expo_** Installation](/Docs/RN_ExpoInstallation.md)
- [Integration](/Docs/RN_Integration.md)
- [Test integration](/Docs/RN_Testing.md)
- [In-app events](/Docs/RN_InAppEvents.md)
- [Uninstall measurement](/Docs/RN_UninstallMeasurement.md)
- [Send consent for DMA compliance](/Docs/RN_CMP.md)
## 🔗 Deep Linking

## 🔗 Deep Linking

- [Integration](/Docs/RN_DeepLinkIntegrate.md)
- [***Expo*** Integration](/Docs/RN_ExpoDeepLinkIntegration.md)
- [**_Expo_** Integration](/Docs/RN_ExpoDeepLinkIntegration.md)
- [Unified Deep Link (UDL)](/Docs/RN_UnifiedDeepLink.md)
- [User Invite](/Docs/RN_UserInvite.md)

## 🧪 Sample Apps

- [React-Native Sample App](/demos/appsflyer-react-native-app)
- [🆕 Expo Sample App](https://github.com/AppsFlyerSDK/appsflyer-expo-sample-app)

### [API reference](/Docs/RN_API.md)

2 changes: 1 addition & 1 deletion demos/appsflyer-react-native-app/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand Down
11 changes: 11 additions & 0 deletions demos/appsflyer-react-native-app/ios/.xcode.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This `.xcode.env` file is versioned and is used to source the environment
# used when running script phases inside Xcode.
# To customize your local environment, you can create an `.xcode.env.local`
# file that is not versioned.

# NODE_BINARY variable contains the PATH to the node executable.
#
# Customize the NODE_BINARY variable here.
# For example, to use nvm with brew, add the following line
# . "$(brew --prefix nvm)/nvm.sh" --no-use
export NODE_BINARY=$(command -v node)
4 changes: 2 additions & 2 deletions demos/appsflyer-react-native-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"@react-navigation/stack": "^6.0.7",
"react": "18.1.0",
"react-native": "0.70.6",
"react-native-appsflyer": "file:../..",
"react-native-appsflyer": "../../",
"react-native-elements": "^3.4.2",
"react-native-gesture-handler": "^1.10.3",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "3.7.2",
"react-native-screens": "^3.34.0",
"react-native-vector-icons": "8.1.0"
},
"devDependencies": {
Expand Down

0 comments on commit 36415b0

Please sign in to comment.