Add Items to Safari Reading List
You can add items to a user's Reading List in Safari by calling the
addItem method on the
The default Reading List can be
nil if access to the Reading List is not permitted.
Additionally you can check if the Reading List supports a URL by calling
This will return either
false indicating if the given URL is supported by Safari Reading List. Use this for example to determine whether to show a button to add a URL to the Reading List.
You should implement
SFSafariViewControllerDelegate so that your class is notified when the user hits the Done button on the SafariViewController and you can dismiss it as well.
First declare your class to implement the protocol.
Implement the delegate method to be notified on dismissal.
Don't forget to set your class as the SafariViewController's delegate.
Additional delegate methods you can implement are:
Open a URL with SafariViewController
Don't forget to import the necessary framework first.
Optionally you can also tell SafariViewController to enter reading mode if possible once it's done loading.
Present the view controller.
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0