Frameworks
React Native
Flutter
Version 10
Version 9
Version 8
Version 7
Version 6
Version 5
This guide demonstrates how to initialize PDFNet with a license key. To begin working with PDFNet, you must have first added it to your project.
#import
.The trial of Apryse Mobile SDK does not require a trial key. A commercial license key is required for use in a production environment. Please contact sales to purchase a commercial key or if you need any other license key assistance.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).
The app lifecycle in a Swift project that uses storyboards is different than other iOS projects, they require careful handling to ensure PDFNet is initialized before its classes are used.
In Swift projects that use storyboards, non-optional stored properties that are instantiated at the point of declaration are instantiated before most code has a chance to run, including application(_:willFinishLaunchingWithOptions:)
. This means that even if you initialize PDFNet with a license key in this method, which is "your app’s first chance to execute code at launch time", it will result in an error.
To initialize PDFNet beforeapplication(_:willFinishLaunchingWithOptions:)
, add a new property in AppDelegate.swift
that is initialized with the result of a call to PDFNet's initialize method (which is void
):
Alternatively, non-optional stored properties could be instantiated in the class's init
functions, in which case application(_:willFinishLaunchingWithOptions:)
will be run first.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales