Skip to content

Commit ea000f2

Browse files
committed
Updated objective-c example
Updated Readme to show changes in settings
1 parent 08cdb63 commit ea000f2

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Example_Objective-C/Example_Objective-C/AppDelegate.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1717
// Initialize UserReport SDK
1818
User *user = [[User alloc] init];
1919
[user setEmail:@"[email protected]"];
20-
[UserReport configureWithSakId:@"ios-playground" mediaId:@"df5be674-b6a8-4bb8-8f44-4c8229a01bc2" user:user];
21-
20+
[UserReport configureWithSakId:@"ios-playground" mediaId:@"df5be674-b6a8-4bb8-8f44-4c8229a01bc2" user:user userSettings:nil];
2221
return YES;
2322
}
2423

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,14 @@ user.emailSha256 = "SHA256_EMAIL_HASH"
5959
// Provide additional social network information
6060
user.facebookId = "FACEBOOK_ID"
6161
62+
//It is also possible to override default rules when survey will appear, though, userSettings parameter is optional
63+
let settings = Settings()
64+
settings.sessionScreensView = 5
65+
settings.inviteAfterNSecondsInApp = 20
66+
67+
UserReport.shared?.updateSettings(settings)
6268
// Configure
63-
UserReport.configure(sakId: "YOUR_SAK_ID", mediaId: "YOU_MEDIA_ID", user: user)
69+
UserReport.configure(sakId: "YOUR_SAK_ID", mediaId: "YOU_MEDIA_ID", user: user, userSetting: setting)
6470
6571
```
6672
### Screen tracking
@@ -101,7 +107,7 @@ UserReport.shared?.displayMode = .fullscreen
101107

102108
### Change settings
103109
To update the default rules for appear the survey use follow:
104-
110+
Though, it is recommended to pass `Settings` to configure method instead, use this method only when you want to change rules for already launched app
105111
```swift
106112
let settings = Settings()
107113
settings.sessionScreensView = 5

0 commit comments

Comments
 (0)