Skip to content

Commit 3ca74d9

Browse files
authored
DEVEX-775 Added Apple Reminders as a scraper to prevent deferred linking.
1 parent 12a066b commit 3ca74d9

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

Branch-SDK/Branch-SDK/BranchActivityItemProvider.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ + (NSString *)humanReadableChannelWithActivityType:(NSString *)activityString {
195195
@"LINE", @"jp.naver.line.Share",
196196
@"Pinterest", @"pinterest.ShareExtension",
197197
@"Skype", @"com.skype.skype.sharingextension",
198+
@"Apple Reminders", @"com.apple.reminders.RemindersEditorExtension",
198199

199200
// Keys for older app versions --
200201

Branch-SDK/Branch-SDK/BranchShareLink.m

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,16 +260,17 @@ - (id) shareObjectForItem:(BranchShareActivityItem*)activityItem
260260
// Because Facebook et al immediately scrape URLs, we add an additional parameter to the
261261
// existing list, telling the backend to ignore the first click.
262262

263-
NSDictionary *scrapers = @{
264-
@"Facebook": @1,
265-
@"Twitter": @1,
266-
@"Slack": @1,
267-
@"Apple Notes": @1,
268-
@"Skype": @1,
269-
@"SMS": @1
270-
};
263+
NSSet*scrapers = [NSSet setWithArray:@[
264+
@"Facebook",
265+
@"Twitter",
266+
@"Slack",
267+
@"Apple Notes",
268+
@"Skype",
269+
@"SMS",
270+
@"Apple Reminders"
271+
]];
271272
NSString *userAgentString = nil;
272-
if (self.linkProperties.channel && scrapers[self.linkProperties.channel]) {
273+
if (self.linkProperties.channel && [scrapers containsObject:self.linkProperties.channel]) {
273274
userAgentString = [BNCDeviceInfo userAgentString];
274275
}
275276
NSString *URLString =

Branch-SDK/Branch-SDK/BranchUniversalObject.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,8 @@ - (void)showShareSheetWithLinkProperties:(BranchLinkProperties *)linkProperties
482482
// Log share completed event
483483
if (completed && !activityError) {
484484
[[BranchEvent customEventWithName:BNCShareCompletedEvent contentItem:self] logEvent];
485-
[BNCFabricAnswers sendEventWithName:@"Branch Share" andAttributes:[self getDictionaryWithCompleteLinkProperties:linkProperties]];
485+
[BNCFabricAnswers sendEventWithName:@"Branch Share" andAttributes:
486+
[self getDictionaryWithCompleteLinkProperties:linkProperties]];
486487
}
487488
if (completion)
488489
completion(activityType, completed);

0 commit comments

Comments
 (0)