Skip to content

Commit 3b33970

Browse files
Merge pull request #94 from AppsFlyerSDK/dev/READMEChanges
readme changes and example changes
2 parents 4fe7c17 + 00ad5fb commit 3b33970

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ First of all, you must provide values for AppsFlyer Dev Key, Apple App ID (iTune
9393

9494
Open `AppDelegate.h` and add:
9595

96-
```
96+
```objective-c
9797
#import "SEGAppsFlyerIntegrationFactory.h"
9898
```
9999

@@ -104,7 +104,7 @@ In `AppDelegate.m` ➜ `didFinishLaunchingWithOptions`:
104104
// For ApsFlyer debug logs
105105
[AppsFlyerLib shared].isDebug = YES;
106106

107-
[[AppsFlyerLib shared] waitForATTUserAuthorizationWithTimeoutInterval:60];
107+
// [[AppsFlyerLib shared] waitForATTUserAuthorizationWithTimeoutInterval:60];
108108
/*
109109
Based on your needs you can either pass a delegate to process deferred
110110
and direct deeplinking callbacks or disregard them.
@@ -118,14 +118,13 @@ In `AppDelegate.m` ➜ `didFinishLaunchingWithOptions`:
118118
// SEGAppsFlyerIntegrationFactory* factoryWithDelegate = [SEGAppsFlyerIntegrationFactory createWithLaunchDelegate:self andManualMode:YES];
119119

120120

121-
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"WYsuyFINOKZuQyQAGn5JQoCgIdhOI146"];
121+
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"SEGMENT_KEY"];
122122
[config use:factoryNoDelegate];
123123
// [config use:factoryWithDelegate]; // use this if you want to get conversion data in the app. Read more in the integration guide
124124
config.enableAdvertisingTracking = YES; //OPTIONAL
125125
config.trackApplicationLifecycleEvents = YES; //OPTIONAL
126126
config.trackDeepLinks = YES; //OPTIONAL
127127
config.trackPushNotifications = YES; //OPTIONAL
128-
config.trackAttributionData = YES; //OPTIONAL
129128
[SEGAnalytics debug:YES]; //OPTIONAL
130129
[SEGAnalytics setupWithConfiguration:config];
131130
```
@@ -156,15 +155,16 @@ In `AppDelegate.m` ➜ `applicationDidBecomeActive`:
156155
3. Open `AppDelegate.swift` and add:
157156

158157
```swift
159-
import Analytics
158+
import Segment
160159
import AppsFlyerLib
160+
import segment_appsflyer_ios
161161
```
162162

163163
4. In `didFinishLaunchingWithOptions` add:
164164
```swift
165165
// For AppsFLyer debug logs uncomment the line below
166166
// AppsFlyerLib.shared().isDebug = true
167-
AppsFlyerLib.shared().waitForATTUserAuthorization(withTimeoutInterval: 60)
167+
// AppsFlyerLib.shared().waitForATTUserAuthorization(withTimeoutInterval: 60)
168168

169169
/*
170170
Based on your needs you can either pass a delegate to process deferred
@@ -188,7 +188,6 @@ import AppsFlyerLib
188188
config.trackApplicationLifecycleEvents = true //OPTIONAL
189189
config.trackDeepLinks = true //OPTIONAL
190190
config.trackPushNotifications = true //OPTIONAL
191-
config.trackAttributionData = true //OPTIONAL
192191

193192
Analytics.debug(false)
194193
Analytics.setup(with: config)
@@ -220,7 +219,7 @@ In identify call ```traits``` dictionary ```setCustomerUserID``` and ```currenc
220219
In order to get Conversion Data you need to:
221220

222221
1. Add `SEGAppsFlyerLibDelegate` protocol to your AppDelegate.h (or other) class
223-
```
222+
```objective-c
224223
#import <UIKit/UIKit.h>
225224
#import "SEGAppsFlyerIntegrationFactory.h"
226225

@@ -229,7 +228,7 @@ In identify call ```traits``` dictionary ```setCustomerUserID``` and ```currenc
229228
2. Pass AppDelegate (or other) class when configuring Segment Analytics with AppsFlyer. Change line `[config use:[SEGAppsFlyerIntegrationFactory instance]];` to `[config use:[SEGAppsFlyerIntegrationFactory createWithLaunchDelegate:self]];`
230229
3. In the class passed to the method above (AppDelegate.m by default) implement methods of the `SEGAppsFlyerLibDelegate` protocol. See sample code below:
231230
232-
```
231+
```objective-c
233232
#import "AppDelegate.h"
234233
235234
@interface AppDelegate ()
@@ -291,7 +290,7 @@ In identify call ```traits``` dictionary ```setCustomerUserID``` and ```currenc
291290
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)`
292291
3. Implement methods of the protocol in the class, passed as a delegate. See sample code below where AppDelegate is used for that:
293292

294-
```
293+
```swift
295294
class AppDelegate: UIResponder, UIApplicationDelegate, SEGAppsFlyerLibDelegate {
296295

297296
var window: UIWindow?
@@ -340,13 +339,13 @@ In order to use Unified Deep linking you need to:
340339

341340
1. Add `SEGAppsFlyerDeepLinkDelegate` protocol to your AppDelegate (or other) class
342341
2. Pass AppDelegate (or other) class when configuring Segment Analytics with AppsFlyer. From the sample code above, change factoryWithDelegate to :
343-
```
342+
```swift
344343
let factoryWithDelegate: SEGAppsFlyerIntegrationFactory = SEGAppsFlyerIntegrationFactory.create(withLaunch: self, andDeepLinkDelegate: self)
345344
```
346345

347346
3. Implement methods of the protocol in the class, passed as a delegate. See sample code below where AppDelegate is used for that:
348347

349-
```
348+
```swift
350349
extension AppDelegate: SEGAppsFlyerDeepLinkDelegate {
351350
func didResolveDeepLink(_ result: DeepLinkResult) {
352351
print(result)
@@ -359,7 +358,7 @@ extension AppDelegate: SEGAppsFlyerDeepLinkDelegate {
359358
## <a id="install_attributed"> Install Attributed event
360359

361360
If you are working with networks that don't allow passing user level data to 3rd parties, you will need to apply code to filter out these networks before calling
362-
```
361+
```objective-c
363362
// [self.analytics track:@"Install Attributed" properties:[properties copy]];
364363
```
365364

examples/ObjcPodsSample/ObjcPodsSample/AppDelegate.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
2626
// For ApsFlyer debug logs
2727
[AppsFlyerLib shared].isDebug = YES;
2828

29-
[[AppsFlyerLib shared] waitForATTUserAuthorizationWithTimeoutInterval:60];
29+
// [[AppsFlyerLib shared] waitForATTUserAuthorizationWithTimeoutInterval:60];
3030
/*
3131
Based on your needs you can either pass a delegate to process deferred
3232
and direct deeplinking callbacks or disregard them.
@@ -35,7 +35,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3535
// SEGAppsFlyerIntegrationFactory* factoryNoDelegate = [SEGAppsFlyerIntegrationFactory instance];
3636
SEGAppsFlyerIntegrationFactory* factoryWithDelegate = [SEGAppsFlyerIntegrationFactory createWithLaunchDelegate:self];
3737

38-
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"WYsuyFINOKZuQyQAGn5JQoCgIdhOI146"];
38+
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"SEGMENT_KEY"];
3939
// [config use:factoryNoDelegate];
4040
[config use:factoryWithDelegate]; // use this if you want to get conversion data in the app. Read more in the integration guide
4141
config.enableAdvertisingTracking = YES; //OPTIONAL

examples/SwiftPodsSample/SwiftPodsSample/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1818
// For AppsFLyer debug logs uncomment the line below
1919
AppsFlyerLib.shared().isDebug = true
2020

21-
AppsFlyerLib.shared().waitForATTUserAuthorization(timeoutInterval: 60)
21+
// AppsFlyerLib.shared().waitForATTUserAuthorization(timeoutInterval: 60)
2222
/*
2323
Based on your needs you can either pass a delegate to process deferred
2424
and direct deeplinking callbacks or disregard them.

0 commit comments

Comments
 (0)