Add item to reading list in iOS

Is it possible to add the element / url to the reading list in Safari from the application? I looked around, but I can find information on how to add it manually . Is there really no way to implement this from code?

+4
source share
3 answers

In iOS 6.1 or lower, there is no way for applications to add items to the reading list.

However, in iOS 7.0 , a SafariServices framework was added that allows you to add items to the reading list:

 #import <SafariServices/SafariServices.h> SSReadingList * readList = [SSReadingList defaultReadingList]; NSError * error = [NSError new]; BOOL status =[readList addReadingListItemWithURL:[NSURL URLWithString:urlToAdd] title:titleToAdd previewText:previewText error:&error]; if(status) { NSLog(@"Added URL"); } else NSLog(@"Error"); 
+4
source

It's pretty simple (but only available for iOS 7 and above) - checkout: http://hayageek.com/ios-safariservices-ssreadinglist/

+1
source

Be careful that in iOS 10 there is an error adding a reading list to the SSReadingList.

0
source

Source: https://habr.com/ru/post/1501252/


All Articles