File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1
- # Unversioned
1
+ # v4.2.0
2
+ - [ Added] Plist property ` FirebaseDeepLinkPasteboardRetrievalEnabled ` to enable/disable fetching dynamic links from Pasteboard.
2
3
- [ fixed] Reduce frequency of iOS14 pasteboard notifications by only reading from it when it contains URL(s). (#5905 )
3
-
4
- # v4.3.0
5
4
- [ changed] Functionally neutral updated import references for dependencies. (#5824 )
6
5
7
6
# v4.1.0
Original file line number Diff line number Diff line change @@ -297,6 +297,11 @@ - (nullable NSURL *)uniqueMatchLinkToCheck {
297
297
}
298
298
299
299
- (NSString *)retrievePasteboardContents {
300
+ if (![self isPasteboardRetrievalEnabled ]) {
301
+ // Pasteboard check for dynamic link is disabled by user.
302
+ return @" " ;
303
+ }
304
+
300
305
NSString *pasteboardContents = @" " ;
301
306
if (@available (iOS 10.0 , *)) {
302
307
if ([[UIPasteboard generalPasteboard ] hasURLs ]) {
@@ -308,6 +313,21 @@ - (NSString *)retrievePasteboardContents {
308
313
return pasteboardContents;
309
314
}
310
315
316
+ /* *
317
+ Property to enable or disable dynamic link retrieval from Pasteboard.
318
+ This property is added because of iOS 14 feature where pop up is displayed while accessing
319
+ Pasteboard. So if developers don't want their users to see the Pasteboard popup, they can set
320
+ "FirebaseDeepLinkPasteboardRetrievalEnabled" to false in their plist.
321
+ */
322
+ - (BOOL )isPasteboardRetrievalEnabled {
323
+ id retrievalEnabledValue =
324
+ [[NSBundle mainBundle ] infoDictionary ][@" FirebaseDeepLinkPasteboardRetrievalEnabled" ];
325
+ if ([retrievalEnabledValue respondsToSelector: @selector (boolValue )]) {
326
+ return [retrievalEnabledValue boolValue ];
327
+ }
328
+ return YES ;
329
+ }
330
+
311
331
- (void )clearUsedUniqueMatchLinkToCheckFromClipboard {
312
332
// See discussion in b/65304652
313
333
// We will clear clipboard after we used the unique match link from the clipboard
You can’t perform that action at this time.
0 commit comments