Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace persistent UIPasteBoard with Apple recommended method #1373

Open
oldalton opened this issue Dec 23, 2018 · 0 comments
Open

Replace persistent UIPasteBoard with Apple recommended method #1373

oldalton opened this issue Dec 23, 2018 · 0 comments

Comments

@oldalton
Copy link
Member

Pasteboard Security and Privacy Changes in iOS 10
Starting in iOS 10, the Find pasteboard (identified with the UIPasteboardNameFind constant) is unavailable.
Persistent named pasteboards are deprecated in iOS 10. The system sets the persistence of all pasteboards automatically, with named pasteboards marked as nonpersistent and the systemwide general pasteboard marked as persistent. If you try to set the setPersistent: property on a pasteboard, Xcode issues a deprecation warning.
Instead of persistent named pasteboards, used shared containers. For information on shared containers, read about the containerURLForSecurityApplicationGroupIdentifier: method in NSFileManager, and read about the com.apple.security.application-groups entitlement key in Adding an App to an App Group in Entitlement Key Reference.
(Nonpersistent named pasteboards remain available. You can use these to implement such features as Duplicate or Copy Style. A nonpersistent named pasteboard is available only in the process that creates it.)
Starting in iOS 10 there is a new Handoff feature which allows the general pasteboard contents to automatically transfer between devices. You can control Handoff behavior for pasteboard contents, and can set a pasteboard to expire, by using the setItems:options: method, as follows:
To exclude a pasteboard from Handoff, call the setItems:options: method with the UIPasteboardOptionLocalOnly option.
To indicate an expiration time and date for copied data, call the setItems:options: method with the UIPasteboardOptionExpirationDate option. At the time and date that you set, the system removes the pasteboard items from the pasteboard.

https://developer.apple.com/documentation/uikit/uipasteboard?language=objc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants