Skip to content

Commit b046b56

Browse files
Merge pull request #41 from singular-labs/clipboard_ddl
Clipboard ddl
2 parents d777d38 + a711434 commit b046b56

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

SingularConfig.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export class SingularConfig {
88

99
// SKAN
1010
skAdNetworkEnabled;
11+
clipboardAttribution;
1112
manualSkanConversionManagement;
1213
conversionValueUpdatedHandler;
1314
waitForTrackingAuthorizationWithTimeoutInterval;
@@ -33,13 +34,19 @@ export class SingularConfig {
3334
this.globalProperties = {}
3435
this.collectOAID = false;
3536
this.enableLogging = false;
37+
this.clipboardAttribution = false;
3638
}
3739

3840
withSessionTimeoutInSec(sessionTimeout) {
3941
this.sessionTimeout = sessionTimeout;
4042
return this;
4143
}
4244

45+
withClipboardAttribution() {
46+
this.clipboardAttribution = true;
47+
return this;
48+
}
49+
4350
withCustomUserId(customUserId) {
4451
this.customUserId = customUserId;
4552
return this;

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export class SingularConfig {
1818
withSingularLink(handler: (params: SingularLinkParams) => void): SingularConfig;
1919

2020
withSkAdNetworkEnabled(enabled: boolean): SingularConfig;
21+
withClipboardAttribution(): SingularConfig;
2122
withManualSkanConversionManagement(): SingularConfig;
2223
withConversionValueUpdatedHandler(handler: (value: number) => void): SingularConfig;
2324
withWaitForTrackingAuthorizationWithTimeoutInterval(interval: number): SingularConfig;

ios/SingularBridge.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ +(void)startSessionWithUserActivity:(NSUserActivity*)userActivity{
7777
}
7878

7979
// SKAN
80+
singularConfig.clipboardAttribution = [[singularConfigDict objectForKey:@"clipboardAttribution"] boolValue];
8081
singularConfig.skAdNetworkEnabled = [[singularConfigDict objectForKey:@"skAdNetworkEnabled"] boolValue];
8182
singularConfig.manualSkanConversionManagement = [[singularConfigDict objectForKey:@"manualSkanConversionManagement"] boolValue];
8283
singularConfig.conversionValueUpdatedCallback = ^(NSInteger conversionValue) {
@@ -229,15 +230,23 @@ +(NSDictionary*)jsonToDictionary:(NSString*)json{
229230
return data;
230231
}
231232

233+
234+
235+
236+
232237
+(void)handleSingularLink:(SingularLinkParams*)params {
233238
// Raising the Singular Link handler in the react-native code
234239
[eventEmitter sendEventWithName:@"SingularLinkHandler" body:@{
235240
@"deeplink": [params getDeepLink] ? [params getDeepLink] : @"",
236241
@"passthrough": [params getPassthrough] ? [params getPassthrough] : @"",
237242
@"isDeferred": [params isDeferred] ? @YES : @NO
238243
}];
244+
239245
}
240246

247+
248+
249+
241250
+(void)handleConversionValueUpdated:(NSInteger)conversionValue {
242251
// Raising the Conversion Value handler in the react-native code
243252
[eventEmitter sendEventWithName:@"ConversionValueUpdatedHandler" body:@(conversionValue)];

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "singular-react-native",
3-
"version": "3.1.4",
3+
"version": "3.1.5",
44
"peerDependencies": {
55
"react-native": ">=0.46.4"
66
},

0 commit comments

Comments
 (0)