Is it possible to share a PDF to the Apple Books app via an Ionic application?
I am sending a message from an iframe inside my Ionic app up to the parent window. This message contains the PDF blob and filename. In Ionic I am checking if the platform is iOS, then checking if the user has Apple Books installed via the AppAvailability plugin. If Apple Books is installed I want to save my PDF file there, otherwise I will show some alert asking the user to install Apple Books.
So, how can I share a PDF to Apple Books via an Ionic application?
if (this.platform.is('ios)) {
this.appAvailability.check('ibooks://').then(
(yes:boolean) => {
// save to Apple Books
},
(no:boolean) => // alert user
);
} else if (this.platform.is('android')) // FileSystem.writeFile