ZendriveDebug

@objc(ZDZendriveDebug)
public final class ZendriveDebug : NSObject

Utility class which helps in uploading data required for debugging Zendrive SDK related issues.

  • Upload all zendrive related data that will help in debugging.

    The method uploads all data to the zendrive servers via a background upload task. This does not require the Zendrive SDK to be setup but needs a valid application key. This is a no-op if upload is already in progress.

    Declaration

    Swift

    @objc
    public static func uploadAllZendriveData(with configuration: Configuration, delegate: ZendriveDebugDelegate?)

    Parameters

    configuration

    The configuration object which should have valid value of applicaitonKey and driverId.

    delegate

    The delegate which will receive success or failure callbacks. No callback will be deliverd if the user force terminates the app while a download is going on.

  • Check using a session identifier if the corresponding session was started for data upload.

    Typically this method should be used to check the ownership of a session idenfier obtained in application(_:handleEventsForBackgroundURLSession:completionHandler:) method of UIApplicationDelegate

    Declaration

    Swift

    @objc
    public static func isZendriveSessionIdentifier(_ identifier: String) -> Bool

    Parameters

    identifier

    The identifier in application(_:handleEventsForBackgroundURLSession:completionHandler:)

  • Tell the SDK that events for a URLSession are waiting to be processed.

    The call to application(_:handleEventsForBackgroundURLSession:completionHandler:) method of UIApplicationDelegate should be forwarded here if it is a Zendrive session identifier. This will ensure the correct handling of the relevant session creation and callbacks to the delegate.

    Declaration

    Swift

    @objc
    public static func handleEvents(forBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void)

    Parameters

    identifier

    The identifier in application(_:handleEventsForBackgroundURLSession:completionHandler:)

  • Set delegate to receive callback in response to uploadAllZendriveData(with:delegate:) request.

    See also

    ZendriveDebugDelegate for further details.

    Declaration

    Swift

    @objc
    public static func setDelegate(_ delegate: ZendriveDebugDelegate?)

    Parameters

    delegate

    The delegate object to give callbacks on.