Skip to content

Commit

Permalink
Docs - Sync with readme.io
Browse files Browse the repository at this point in the history
WIP 2


WIP 3 - installation


Docs - rename files to match sync with readme.io
  • Loading branch information
liaz-af committed May 16, 2023
1 parent 9a0b07f commit 70496d3
Show file tree
Hide file tree
Showing 14 changed files with 302 additions and 204 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/readme_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Sync `docs` directory to ReadMe
on:
push:
branches:
- master
- readmesync

jobs:
sync:
Expand All @@ -19,4 +19,4 @@ jobs:
# Docs: https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#example-using-versioned-actions
uses: readmeio/rdme@7.5.0
with:
rdme: docs ./docs --key=${{ secrets.README_SYNC_API_KEY }} --version=0.1
rdme: docs ./Docs --key=${{ secrets.README_SYNC_API_KEY }} --version=0.1
240 changes: 142 additions & 98 deletions Docs/API.md → Docs/RN_API.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Docs/AdvancedAPI.md → Docs/RN_AdvancedAPI.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# 📑 Advanced APIs

- [Measure App Uninstalls](#uninstall)
Expand Down
68 changes: 35 additions & 33 deletions Docs/DeepLinkIntegrate.md → Docs/RN_DeepLinkIntegrate.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# Getting started

![alt text](https://massets.appsflyer.com/wp-content/uploads/2018/03/21101417/app-installed-Recovered.png "")
---
title: Deep linking integration
category: 5f9705393c689a065c409b23
parentDoc: 645213236f53a00d4daa9230
order: 7
hidden: true
---

## Getting started

![Deep link intro](https://massets.appsflyer.com/wp-content/uploads/2018/03/21101417/app-installed-Recovered.png)

## Deep Linking Types:
## Deep Linking Types
1. **Deferred Deep Linking** - Serving personalized content to new or former users, directly after the installation.
2. **Direct Deep Linking** - Directly serving personalized content to existing users, which already have the mobile app installed.

** Unified deep linking (UDL) ** - an API which enables you to send new and existing users to a specific in-app activity as soon as the app is opened.
**Unified deep linking (UDL)** - an API which enables you to send new and existing users to a specific in-app activity as soon as the app is opened.

For more info please check out the [OneLink™ Deep Linking Guide](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-Deep-Linking-Guide#Intro) and [developer guide](https://dev.appsflyer.com/hc/docs/getting-started-1).

---
For more info please check out the [OneLink™ Deep Linking Guide](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-Deep-Linking-Guide#Intro) and [developer guide](https://dev.appsflyer.com/hc/docs/dl_getting_started).

## Android Deeplink Setup

AppsFlyer SDK inspects activity intent object during onResume(). Because of that, for each activity that may be configured or launched with any [non-standard launch mode](https://developer.android.com/guide/topics/manifest/activity-element#lmode) please make sure to add the following code to `MainActivity.java` in `android/app/src/main/java/com...`:
```

```java
...
import android.content.Intent;
...
Expand All @@ -30,45 +36,41 @@ public class MainActivity extends ReactActivity {
}
```


#### <a id="uri-scheme"> URI Scheme
In your app’s manifest add the following intent-filter to your relevant activity:
```xml
<intent-filter>
### App Links
First, you need to generate SHA256 fingerprint, then add the following intent-filter to the relevant activity in your app’s manifest:
```xml
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="mainactivity"
android:scheme="afshopapp" />
android:host="onelink-basic-app.onelink.me"
android:scheme="https" />
</intent-filter>
```
For more on URI Scheme check out the guide [here](https://dev.appsflyer.com/hc/docs/initial-setup-for-deep-linking-and-deferred-deep-linking#deciding-on-a-uri-scheme).
For more on App Links check out the guide [here](https://dev.appsflyer.com/hc/docs/dl_android_init_setup#procedures-for-android-app-links).

#### <a id="app-links"> App Links
First, you need to generate SHA256 fingerprint, then add the following intent-filter to the relevant activity in your app’s manifest:
```xml
<intent-filter android:autoVerify="true">
### URI Scheme
In your app’s manifest add the following intent-filter to your relevant activity:
```xml
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="onelink-basic-app.onelink.me"
android:scheme="https" />
android:host="mainactivity"
android:scheme="afshopapp" />
</intent-filter>
```
For more on App Links check out the guide [here](https://dev.appsflyer.com/hc/docs/initial-setup-for-deep-linking-and-deferred-deep-linking#procedures-for-android-app-links).
For more on URI Scheme check out the guide [here](https://dev.appsflyer.com/hc/docs/dl_android_init_setup#procedures-for-uri-scheme).

## iOS Deeplink Setup
In order to record retargeting and use the onAppOpenAttribution/UDL callbacks in iOS, the developer needs to pass the User Activity / URL to our SDK, via the following methods in the **AppDelegate.m** file:

#### import
```objectivec
#import <RNAppsFlyer.h>
```
```objectivec
// Deep linking
// Open URI-scheme for iOS 9 and above
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *) options {
Expand All @@ -87,7 +89,7 @@ In order to record retargeting and use the onAppOpenAttribution/UDL callbacks in
}
```

#### Universal Links
### Universal Links
Universal Links link between an iOS mobile app and an associate website/domain, such as AppsFlyer’s OneLink domain (xxx.onelink.me). To do so, it is required to:

1. Configure OneLink sub-domain and link to mobile app (by hosting the ‘apple-app-site-association’ file - AppsFlyer takes care of this part in the onelink setup on your dashboard)
Expand All @@ -106,9 +108,9 @@ Universal Links link between an iOS mobile app and an associate website/domain,
</plist>
```

For more on Universal Links check out the guide [here](https://dev.appsflyer.com/hc/docs/initial-setup-2#getting-the-app-bundle-id-and-prefix-id).
For more on Universal Links check out the guide [here](https://dev.appsflyer.com/hc/docs/dl_ios_init_setup#procedures-for-ios-universal-links).

#### URI Scheme
### URI Scheme
A URI scheme is a URL that leads users directly to the mobile app.
When an app user enters a URI scheme in a browser address bar box, or clicks on a link based on a URI scheme, the app launches and the user is deep-linked.

Expand Down Expand Up @@ -140,4 +142,4 @@ example of a URL scheme configuration in the `info.plist`:
</plist>
```

For more on URI Scheme check out the guide [here](https://dev.appsflyer.com/hc/docs/initial-setup-2#procedures-for-uri-scheme).
For more on URI Scheme check out the guide [here](https://dev.appsflyer.com/hc/docs/dl_ios_init_setup#procedures-for-uri-scheme).
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
# Getting started
---
title: Expo Deep linking integration
category: 5f9705393c689a065c409b23
parentDoc: 645213236f53a00d4daa9230
order: 8
hidden: true
---

## Getting started

![alt text](https://massets.appsflyer.com/wp-content/uploads/2018/03/21101417/app-installed-Recovered.png "")


## Deep Linking Types:
## Deep Linking Types
1. **Deferred Deep Linking** - Serving personalized content to new or former users, directly after the installation.
2. **Direct Deep Linking** - Directly serving personalized content to existing users, which already have the mobile app installed.

** Unified deep linking (UDL) ** - an API which enables you to send new and existing users to a specific in-app activity as soon as the app is opened.
**Unified deep linking (UDL)** - an API which enables you to send new and existing users to a specific in-app activity as soon as the app is opened.

For more info please check out the [OneLink™ Deep Linking Guide](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-Deep-Linking-Guide#Intro) and [developer guide](https://dev.appsflyer.com/hc/docs/getting-started-1).
For more info please check out the [OneLink™ Deep Linking Guide](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-Deep-Linking-Guide#Intro) and [developer guide](https://dev.appsflyer.com/hc/docs/dl_getting_started).

---
### 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).
> 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).
## Full app.json example

### Full app.json example
```
```json
{
"expo": {
"name": "expoAppsFlyer",
Expand Down
10 changes: 9 additions & 1 deletion Docs/ExpoInstallasion.md → Docs/RN_ExpoInstallation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Install AppsFlyer in an Expo managed project
---
title: Expo Installation
category: 5f9705393c689a065c409b23
parentDoc: 645213236f53a00d4daa9230
order: 2
hidden: true
---

## Install AppsFlyer in an Expo managed project
1. Install `expo-dev-client`. You can read more about expo development builds [here](https://docs.expo.dev/development/introduction/):
```
expo install expo-dev-client
Expand Down
32 changes: 21 additions & 11 deletions Docs/InAppEvents.md → Docs/RN_InAppEvents.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# In-App events
---
title: In-App Events
category: 5f9705393c689a065c409b23
parentDoc: 645213236f53a00d4daa9230
order: 5
hidden: true
---

## In-App events

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 All @@ -10,12 +18,13 @@ Find more info about recording events [here](https://dev.appsflyer.com/hc/docs/i
## Send Event

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

| parameter | type | description |
| ----------- |----------|------------------------------------------ |
| eventName | string | In-App Event name
| eventName | string | In-App Event name |
| eventValues | json | The event values that are sent with the event
| success | function | success callback
| error | function | error callback
| success | function | success callback |
| error | function | error callback |


*Example:*
Expand All @@ -40,18 +49,19 @@ appsFlyer.logEvent(
```

---
### <a id="iae"> In-app purchase validation
## In-app purchase validation
Receipt validation is a secure mechanism whereby the payment platform (e.g. Apple or Google) validates that an in-app purchase indeed occurred as reported.
<br>
Learn more [here](https://support.appsflyer.com/hc/en-us/articles/207032106-Receipt-validation-for-in-app-purchases).
<br>
❗Important❗ for iOS - set SandBox to ```true```<br>

❗Important❗ for iOS - set SandBox to ```true```
```appsFlyer.setUseReceiptValidationSandbox(true);```

| parameter | type | description |
| ---------- |----------|------------------ |
| purchaseInfo | json | In-App Purchase parameters |
| successC | function | success callback (generated link)|
| errorC | function | error callback |
| purchaseInfo | json | In-App Purchase parameters |
| successC | function | success callback (generated link) |
| errorC | function | error callback |

*Example:*
```javascript
let info = {
Expand Down
47 changes: 21 additions & 26 deletions Docs/Installation.md → Docs/RN_Installation.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# Adding react-native-appsflyer to your project
---
title: Installation
category: 5f9705393c689a065c409b23
parentDoc: 645213236f53a00d4daa9230
order: 1
hidden: true
---
## Adding react-native-appsflyer to your project

- Installation using CLI
- [Installation with autolinking](#Installation-with-autolinking)
- [Installation without autolinking](#Installation-without-autolinking)
- [Installation with autolinking](#installation-with-autolinking)
- [Installation without autolinking](#installation-without-autolinking)
- Manual installation
- [iOS](#manual-installation-ios)
- [Android](#manual-installation-android)
- Add strict-mode for App-kids
- The AD_ID permission for android apps

## <a id="Installation-with-autolinking"> Installation (with [autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md))
## Installation with [autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md)

Run the following:

Expand All @@ -18,33 +25,25 @@ $ npm install react-native-appsflyer --save
$ cd ios && pod install
```

## <a id="Installation-without-autolinking"> Installation (without [autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md))


Run the following:
## Installation without [autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md)
Run the following:

```
$ npm install react-native-appsflyer --save
$ react-native link react-native-appsflyer
```


### <a id="manual-installation-ios"> iOS


### Manual installation iOS
1. Add the `appsFlyerFramework` to `podfile` and run `pod install`.


Example:

```
pod 'react-native-appsflyer',
:path => '../node_modules/react-native-appsflyer'
```

This assumes your `Podfile` is located in `ios` directory.

#### <a id="sample_podfile"> Sample pod file:
#### Sample pod file:
```
target 'AFTest' do
Expand All @@ -69,7 +68,6 @@ target 'AFTest' do
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
end
```

Expand All @@ -81,11 +79,9 @@ end
2. Unzip and copy the contents of the Zip file into your project directory
3. Run `react-native link react-native-appsflyer` from of the project root or copy RNAppsFlyer.h and RNAppsFlyer.m from `node_modules``react-native-appsflyer` to your project directory

![enter image description here](assets/ios_files.png)
![Project directory](https://files.readme.io/cf6f7a3-small-ios_files.png)



### <a id="manual-installation-android"> Android
### Manual installation Android

Run `react-native link react-native-appsflyer` OR add manually:

Expand Down Expand Up @@ -122,7 +118,6 @@ ext {
##### **MainApplication.java**
Add:


1. `import com.appsflyer.reactnative.RNAppsFlyerPackage;`

2. In the `getPackages()` method register the module:
Expand All @@ -143,9 +138,9 @@ So `getPackages()` should look like:
```

## Add 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://dev.appsflyer.com/hc/docs/install-ios-sdk#strict-mode-sdk)<br>
Starting from version **6.1.10** iOS SDK comes in two variants: **Strict** mode and **Regular** mode. Please read more [here](https://dev.appsflyer.com/hc/docs/install-ios-sdk#strict-mode-sdk)

***Change to Strict mode***<br>
***Change to Strict mode***
After you installed the AppsFlyer plugin, add `$RNAppsFlyerStrictMode=true` in the project's Podfile:
```
//MyRNApp/ios/Podfile
Expand All @@ -159,7 +154,7 @@ use_frameworks!
```
In the `ios` folder of your `root` project Run `pod install`

***Change to Regular mode***<br>
***Change to Regular mode***
Remove `$RNAppsFlyerStrictMode=true` from the project's Podfile or set it to `false`:
```
//MyRNApp/ios/Podfile
Expand All @@ -176,4 +171,4 @@ In the `ios` folder of your `root` project Run `pod install`
In v6.8.0 of the AppsFlyer SDK, we added the normal permission com.google.android.gms.permission.AD_ID to the SDK's AndroidManifest,
to allow the SDK to collect the Android Advertising ID on apps targeting API 33.
If your app is targeting children, you need to revoke this permission to comply with Google's Data policy.
You can read more about it here [here](https://dev.appsflyer.com/hc/docs/install-android-sdk#the-ad_id-permission)
You can read more about it [here](https://dev.appsflyer.com/hc/docs/install-android-sdk#the-ad_id-permission).
3 changes: 1 addition & 2 deletions Docs/Integration.md → Docs/RN_Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
title: Integration
category: 5f9705393c689a065c409b23
parentDoc: 645213236f53a00d4daa9230
order: 1
order: 3
hidden: true
---

# Basic integration of the SDK
Initialize the SDK to enable AppsFlyer to detect installations, sessions (app opens) and updates.


| Setting | Description |
| -------- | ------------- |
| devKey | Your application [devKey](https://support.appsflyer.com/hc/en-us/articles/207032066-Basic-SDK-integration-guide#retrieving-the-dev-key) provided by AppsFlyer (required) |
Expand Down
Loading

0 comments on commit 70496d3

Please sign in to comment.