Migrating 2.x to 3.x Pixelnetica™ Document Scanning SDK for Apple iOS
The 3.x release changes how the SDK is distributed and adds a ready-to-use UI layer. The core capabilities are the same; the main work is swapping the integration method.
What changed
- Distribution is now Swift Package Manager only. The 2.x SDK was integrated by dragging
DocScanningSDK.frameworkinto the project and adding it to Embedded Binaries. That manual step — and the CocoaPods option — are gone. 3.x is consumed as binaryxcframeworks through SwiftPM. - New ready-to-use UI. 3.x adds the
DocScanningSDK-UIproduct: complete camera, crop-editor, OCR-editor, and language-picker screens that did not exist in 2.x. - Minimum iOS raised to 16.3.
Migration steps
- Remove the old framework. Delete the embedded
DocScanningSDK.frameworkreference and its Embedded Binaries / Frameworks, Libraries, and Embedded Content entry. - Add the package. Follow Installation & SwiftPM integration. Choose
DocScanningSDK-UIif you want the new screens (it includes the core engine), orDocScanningSDKfor the engine alone. - Update imports. Import the module —
import DocScanningSDK(andimport DocScanningSDK_UIif you use the screens) — rather than the old umbrella-header#import. - Re-apply your license. License application is unchanged in spirit — call
PxLicense.initialize(withKey:)early; see Licensing. - Rebuild and resolve. Build against the current headers and fix any references the compiler flags against the current API reference.
- Adopt the ready-to-use screens (optional). If you previously built your own camera/editor UI, you can now replace it with the ready-to-use screens — or keep your custom UI on the core engine.
Tips
- Raise your deployment target to iOS 16.3 before adding the package.
- Commit
Package.resolvedso your team and CI build against the same SDK version.