PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

ComPDFKit iOS SDK 3.0.0 includes several breaking API changes. Before building an existing project with this release, review the following changes to avoid compilation failures, annotations not being added to pages, or unexpected Undo/Redo behavior.
initWithDocument: with initWithPage:document: and addAnnotation: with updateAndAddAnnotation:. In Swift, use updateAndAdd(_:). CPDFAnnotationButtonWidget.h and CPDFAnnotationButtonWidget with CPDFButtonWidgetAnnotation.h and CPDFButtonWidgetAnnotation. CPDFPage no longer conforms to NSCopying. Replace [page copy] with addPage:atIndex:, or add(_:at:) in Swift. copyToPage:. Before deletion, call copyForUndoRestore; restore with copyToPage:, then call releaseUndoRestoreDocument after success. CPDFPageDidAddAnnotationNotification with CPDFPageDidUpdateAnnotationNotification, including the corresponding Swift notification name. Before releasing an app with 3.0.0, search the project for initWithDocument:, addAnnotation, CPDFPageDidAddAnnotation, CPDFAnnotationButtonWidget, [page copy], and CPDFRenderModeMetal. Remove these old usages unless the documentation explicitly identifies an unchanged non-annotation API.