Just like UIApplication.openURL
.
Is there an API to launch iBooks with an ISBN?
Just like UIApplication.openURL
.
Is there an API to launch iBooks with an ISBN?
iBooks registers the itms-books:
and itms-bookss:
URL schemes, so you can launch iBooks programmatically, but the actual URL might not be an ISBN.
iBooks
NSString *stringURL = @"itms-books:";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
NSString *stringURL = @"itms-bookss:";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
For your info, folks: all it takes is to add the itunes.apple.com
URL, the same you can find in iTunes when browsing the BookStore on the Mac, but replace http
with itms-books
and b00m, you have it! Example
itms-books://itunes.apple.com/de/book/marchen/id436945766
or
itms-books://itunes.apple.com/WebObjects/MZStore.woa/wa/viewMultiRoom?fcId=510054265&s=143443
Guess the question is still looking for a perfect answer.
There is a book say Swift Programming in iBooks.
Is there a way to directly open this book, instead of first opening the iBook application then choosing required book.
NSString *stringURL = @"itms-books:";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
This piece of code opens the iBook from within the app, but what about opening a particular book.