Expire the password from the clipboard after 3 minutes on iOS 10+.
This commit is contained in:
parent
981ee171ae
commit
c8b4933c3d
@ -635,8 +635,19 @@
|
||||
return NO;
|
||||
|
||||
PearlMainQueue( ^{
|
||||
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
||||
if ([pasteboard respondsToSelector:@selector(setItems:options:)]) {
|
||||
[pasteboard setItems:@[ @{ UIPasteboardTypeAutomatic: password } ]
|
||||
options:@{
|
||||
UIPasteboardOptionLocalOnly : @NO,
|
||||
UIPasteboardOptionExpirationDate: [NSDate dateWithTimeIntervalSinceNow:3 * 60]
|
||||
}];
|
||||
[PearlOverlay showTemporaryOverlayWithTitle:strl( @"Password Copied (3 min)" ) dismissAfter:2];
|
||||
}
|
||||
else {
|
||||
pasteboard.string = password;
|
||||
[PearlOverlay showTemporaryOverlayWithTitle:strl( @"Password Copied" ) dismissAfter:2];
|
||||
[UIPasteboard generalPasteboard].string = password;
|
||||
}
|
||||
} );
|
||||
|
||||
[site use];
|
||||
|
Loading…
Reference in New Issue
Block a user