You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a Segment wrapper for AppsFlyer SDK framework.
4
+
5
+
## This is a Segment wrapper for AppsFlyer SDK that is built with iOS SDK v6.0.2.
5
6
6
7
7
8
----------
8
-
In order for us to provide optimal support, we would kindly ask you to submit any issues to [email protected]
9
+
🛠 In order for us to provide optimal support, we would kindly ask you to submit any issues to [email protected]
9
10
10
11
*When submitting an issue please specify your AppsFlyer sign-up (account) email , your app ID , production steps, logs, code snippets and any additional relevant information.*
11
12
@@ -15,7 +16,6 @@ In order for us to provide optimal support, we would kindly ask you to submit an
15
16
## Table of content
16
17
17
18
-[Installation](#installation)
18
-
19
19
-[Usage](#usage)
20
20
-[Objective-C](#usage-obj-c)
21
21
-[Swift](#usage-swift)
@@ -31,20 +31,28 @@ In order for us to provide optimal support, we would kindly ask you to submit an
31
31
32
32
### Cocoapods
33
33
34
-
To install the segment-appsflyer-ios integration, simply add this line to your [CocoaPods](http://cocoapods.org)`Podfile`:
34
+
To install the segment-appsflyer-ios integration:
35
+
36
+
1. Simply add this line to your [CocoaPods](http://cocoapods.org)`Podfile`:
35
37
38
+
**Production** version:
36
39
```ruby
37
40
pod 'segment-appsflyer-ios'
38
41
```
39
42
43
+
44
+
2. Run `pod isntall` in the project directory
45
+
40
46
### Carthage
41
47
42
48
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate AppsFlyer and Segment into your Xcode project using Carthage, specify it in your `Cartfile`:
First of all, you must provide values for AppsFlyer Dev Key, Apple App ID (iTunes) and client secret in Segment's **dashboard** for AppsFlyer integration
@@ -60,49 +68,90 @@ Open `AppDelegate.h` and add:
60
68
In `AppDelegate.m` ➜ `didFinishLaunchingWithOptions`:
[config use:[SEGAppsFlyerIntegrationFactory instance]]; // this line may need to be replaced if you would like to get conversion and deep link data in the app.
71
+
72
+
// For ApsFlyer debug logs
73
+
[AppsFlyerLib shared].isDebug = YES;
74
+
75
+
// If you want to collect IDFA, please add the code below and read https://support.appsflyer.com//hc/en-us/articles/207032066#integration-35-support-apptrackingtransparency-att
// For AppsFLyer debug logs uncomment the line below
124
+
// AppsFlyerLib.shared().isDebug = true
125
+
126
+
// If you want to collect IDFA, please add the code below and read https://support.appsflyer.com//hc/en-us/articles/207032066#integration-35-support-apptrackingtransparency-att
AppsFlyer integration responds to ```identify``` call. To read more about it, visit [Segment identify method documentation](https://segment.com/docs/libraries/ios/#identify).
108
157
In identify call ```traits``` dictionary ```setCustomerUserID``` and ```currencyCode```
@@ -118,15 +167,15 @@ In identify call ```traits``` dictionary ```setCustomerUserID``` and ```currenc
118
167
119
168
In order to get Conversion Data you need to:
120
169
121
-
1. Add `SEGAppsFlyerTrackerDelegate` protocol to your AppDelegate.h (or other) class
170
+
1. Add `SEGAppsFlyerLibDelegate` protocol to your AppDelegate.h (or other) class
2. Pass AppDelegate (or other) class when configuring Segment Analytics with AppsFlyer. Change line `[config use:[SEGAppsFlyerIntegrationFactory instance]];` to `[config use:[SEGAppsFlyerIntegrationFactory createWithLaunchDelegate:self]];`
129
-
3. In the class passed to the method above (AppDelegate.m by default) implement methods of the `SEGAppsFlyerTrackerDelegate` protocol. See sample code below:
178
+
3. In the class passed to the method above (AppDelegate.m by default) implement methods of the `SEGAppsFlyerLibDelegate` protocol. See sample code below:
130
179
131
180
```
132
181
#import "AppDelegate.h"
@@ -186,12 +235,12 @@ In identify call ```traits``` dictionary ```setCustomerUserID``` and ```currenc
186
235
187
236
In order to get Conversion Data you need to:
188
237
189
-
1. Add `SEGAppsFlyerTrackerDelegate` protocol to your AppDelegate (or other) class
190
-
2. Pass AppDelegate (or other) class when configuring Segment Analytics with AppsFlyer. Change line `config.use(SEGAppsFlyerIntegrationFactory())` to `config.use(SEGAppsFlyerIntegrationFactory.create(withLaunch: self))`
191
-
3. Implement methods of the protocol. See sample code below:
238
+
1. Add `SEGAppsFlyerLibDelegate` protocol to your AppDelegate (or other) class
239
+
2. Pass AppDelegate (or other) class when configuring Segment Analytics with AppsFlyer. If you use sample code from above, change line `config.use(factoryNoDelegate)` to `config.use(factoryWithDelegate)`
240
+
3. Implement methods of the protocol in the class, passed as a delegate. See sample code below where AppDelegate is used for that:
192
241
193
242
```
194
-
class AppDelegate: UIResponder, UIApplicationDelegate, SEGAppsFlyerTrackerDelegate {
243
+
class AppDelegate: UIResponder, UIApplicationDelegate, SEGAppsFlyerLibDelegate {
195
244
196
245
var window: UIWindow?
197
246
@@ -263,11 +312,11 @@ If you are working with networks that don't allow passing user level data to 3rd
263
312
/// To set Apple App ID and AppsFlyer Dev Key use Segment dashboard
0 commit comments