The repository contains the WiP of the revamped PSPDFKit module for Titanium. It represents an example of using the new Swift-based module-architecture in Titanium by showing common usages and best practices for modern Titanium module development.
⚠️ The module is currently WiP and should not be used in production, yet!
- Change the API key inside the
Cartfile
to match your PSPDFKit API key - Run
carthage update
to update the project dependencies - Run
carthage build --platform iOS
to build the project dependencies - Copy the resulting frameworks
PSPDFKit.framework
andPSPDFKitUI.framework
toplatform
- Done!
- Download your copy from here
- Unzip and copy the resulting frameworks
PSPDFKit.framework
andPSPDFKitUI.framework
toplatform
- Done!
import PSPDFKit from 'ti.pspdfkit';
// Set your license key
PSPDFKit.licenseKey = 'YOUR_LICENSE_KEY';
const win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
const btn = Ti.UI.createButton({
title: 'Open PDF Document'
});
const document = Ti.Filesystem.getFile('PSPSDKit.pdf');
btn.addEventListener('click', () => {
// Show our PDF document
PSPDFKit.present(document, {
documentLabelEnabled: true
});
});
win.add(btn);
win.open();
appc run -p ios --build-only
Hans Knöchel
MIT