PDFKit PDFView on iOS



Has anyone successfully done anything with the PDFView from PDFKit on iOS? It would appear there is some level of support for it in NS: https://github.com/NativeScript/NativeScript/blob/master/tns-platform-declarations/ios/objc-x86_64/objc!PDFKit.d.ts

I can successfully have it load in a PDF file from the file system, but when I go to add the PDFView created in code-behind to a StackLayout it says it is not a valid view. Does anyone have a basic working example?


You can’t add a native view directly to a NativeScript view, you have to extend ViewBase to create a wrapper for the native PDFView and then add it to any NativeScript View.


Thank you. Is there a tutorial for this you could point me to?


Yes, you can refer this,