How do I launch iBooks e-reader programmatically on iPad?

后端 未结 4 1527
萌比男神i
萌比男神i 2020-11-28 09:29

Just like UIApplication.openURL.

Is there an API to launch iBooks with an ISBN?

相关标签:
4条回答
  • 2020-11-28 09:58

    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.

    0 讨论(0)
  • 2020-11-28 10:05

    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.

    0 讨论(0)
  • 2020-11-28 10:11

    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];
    
    0 讨论(0)
  • 2020-11-28 10:15

    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
    
    0 讨论(0)
提交回复
热议问题