ZendriveDebug

@interface 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

    Objective-C

    + (void)
        uploadAllZendriveDataWithZendriveConfiguration:
            (nonnull ZendriveConfiguration *)configuration
                                              delegate:
                                                  (id<ZendriveDebugDelegateProtocol> _Nullable)
                                                      delegate;

    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

    Objective-C

    + (BOOL)isZendriveSessionIdentifier:(nonnull NSString *)identifier;

    Parameters

    identifier

    The identifier in application:handleEventsForBackgroundURLSession:completionHandler:

  • Tell the SDK that events for a NSUrlSession 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

    Objective-C

    + (void)handleEventsForBackgroundURLSession:(nonnull NSString *)identifier
                              completionHandler:
                                  (nonnull void (^)(void))completionHandler;

    Parameters

    identifier

    The identifier in application:handleEventsForBackgroundURLSession:completionHandler:

    completionHandler

    The completionhandler in application:handleEventsForBackgroundURLSession:completionHandler:

  • Set delegate to receive callback in response to +uploadAllZendriveDataWithZendriveConfiguration:delegate: request. See ZendriveDebugDelegateProtocol for further details.

    Declaration

    Objective-C

    + (void)setDelegate:(nullable id<ZendriveDebugDelegateProtocol>)delegate;

    Parameters

    delegate

    The delegate object to give callbacks on.