Local License
The SDK provides the ability to perform a local license check, which validates the locally stored license file without communicating with the LicenseSpring server.
This function is especially useful in offline or air-gapped environments where no internet connection is available, or when you want to ensure the local license is still valid after restarting your application.
When you call the local license check, the SDK performs several validations:
- Whether the license is active and enabled
- Whether the license is expired
- If the device is authorized to use the license
- If system time manipulation is detected (clock tampering)
- If the product code matches
- If the license is floating, whether its floating usage has expired
- (Optional) It verifies the license signature
The true flag enables signature verification. You can set it to false if signature validation is not needed.
The function returns a LocalCheckResponse:
Use this response to determine whether the local license should be trusted.
If your application restarts or you want to resume from the last known license state, you can load the locally stored license file using:
This retrieves the in-memory license data previously saved by the SDK.
- Local checks do not validate or sync with the cloud.
- Use LocalCheck to determine license validity before performing actions that depend on license state.