Logging
Native iOS Inform SDK
The Validic frameworks include extra logging which can be enabled in debug or production app builds to help Validic Support with troubleshooting. The logs can be manually collected or remotely logged to Validic's servers.
Starting in Native iOS v2.1.4, a remote Validic Log collection has been added. All Validic SDK logs (but not host application logs) will be automatically securely uploaded to Validic to aid in support requests.
Remote Logging
Starting in Native iOS v2.1.4, all Validic SDK logs are automatically and securely uploaded to Validic to aid in support requests. Only the SDK's own internal logs are collected - no client application logs are captured or uploaded. No action is required to enable this. This setting is persisted across app launches and user sessions. Remote logging can be disabled if needed:
VLDLogging.sharedInstance().remoteLoggingEnabled = false
To manually trigger an upload of any pending logs:
VLDLogging.sharedInstance().uploadPendingLogs()
Local Logging
The Validic frameworks include extra logging which can be enabled in debug or production app builds to output logs to the Xcode console. Local logging defaults to false on each app launch and must be enabled if desired. To retrieve the logs, you can:
- Run your app in Xcode and collect the logs from the debugger output
- Implement a custom log handler
- Use Sysdiagnose to retrieve the system_logs.logarchive
To enable local logging, use VLDLogging:
VLDLogging.sharedInstance().localLoggingEnabled = true
To set a custom log handler (usually not necessary):
VLDLogging.sharedInstance().logger = { sdkTag, message in
print("Tag: \(sdkTag), Message: \(message)")
}
Updated 12 days ago
