VPKit

@interface VPKit : NSObject

Public entry point for the VPKit framework

  • sets the location for error dialogue handling - in the SDK or in the host app.

    Declaration

    Objective-C

    + (void)forwardErrorNotifications:(BOOL)forwardErrors;
    Parameters
    forwardErrors

    YES - error alerts are supressed in the SDK and NSNotifications are forwarded for interception by the host app. The notification name is vpkErrorNotification. The NSError is added to the Notification’s userInfo dictionary with key vpkErrorKey NO - user-facing error alerts are presented by the SDK.

  • SDK initialization.

    This method is usually called from your App Delegate

    Obtain these credentials by registering your app with the VEEPIO developer portal https://developer.veep.io

    Declaration

    Objective-C

    + (void)setApplicationId:(nonnull NSString *)appName
                    clientId:(nullable NSString *)clientId
                clientSecret:(nullable NSString *)clientSecret;
    Parameters
    clientId

    - OAuth2 client_id credential

    clientSecret

    - OAuth2 client_secret credential

  • Undocumented

    Declaration

    Objective-C

    - (void)setApplicationId:(nonnull NSString*)appName
                    clientId:(nullable NSString*)clientId
                clientSecret:(nullable NSString*)clientSecret;
  • Undocumented

    Declaration

    Objective-C

    + (void)setAuth:(VPKAuthorization *)auth
                env:(VPKEnvironmentType)env
              identifier:(NSString*)identifier
            name:(NSString*)name
          canCreate:(BOOL)canCreate
          canDelete:(BOOL)canDelete;
  • Undocumented

    Declaration

    Objective-C

    - (void)setAuth:(VPKAuthorization *)auth
                env:(VPKEnvironmentType)env
              identifier:(NSString*)identifier
            name:(NSString*)name
          canCreate:(BOOL)canCreate
          canDelete:(BOOL)canDelete;
  • Undocumented

    Declaration

    Objective-C

    + (void)setProduction:(BOOL)production;
  • Undocumented

    Declaration

    Objective-C

    - (void)setProduction:(BOOL)production;
  • Monetisation support

    set to YES if requiring Amazon affiliation button during Veep Create

    Declaration

    Objective-C

    + (void)setShouldMonetise:(BOOL)shouldMonetise;
    Parameters
    shouldMonetise

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initUnique;
  • Where analytics records are delivered. Defaults to the Veepio collector on Google Cloud Run; pass nil to send them to the SDK API host instead (the fallback path).

    Declaration

    Objective-C

    + (void)setAnalyticsCollectorURL:(nullable NSURL *)url;
  • Undocumented

    Declaration

    Objective-C

    + (nullable NSURL*)analyticsCollectorURL;
  • Advertising identifier (IDFA) support. Explicit opt-in; the default is NO.

    With YES, VPKit adds the IDFA to the context.idfa field of its analytics records, but only while ATTrackingManager.trackingAuthorizationStatus is .authorized (iOS 14.5+). VPKit never presents the tracking prompt: request it in the host app with ATTrackingManager.requestTrackingAuthorization before or after calling this. The installation UUID remains the primary consumer identifier either way.

    The identifier is read by reflection, so hosts that never opt in do not link AdSupport or AppTrackingTransparency. A host that opts in must:

    • link AdSupport.framework and AppTrackingTransparency.framework;
    • add NSUserTrackingUsageDescription to its Info.plist;
    • set NSPrivacyTracking to true in its own privacy manifest and list the analytics collector host (veepio-events-collector-859240999434.us-central1.run.app) under NSPrivacyTrackingDomains. VPKit’s bundled manifest declares no tracking because the default is off.

    Declaration

    Objective-C

    + (void)sendIDFA:(BOOL)idfa;
    Parameters
    idfa

    YES to enable collection, NO (default) to disable it.

  • Log out user from the default SDK.

    This method will teardown the networking stack, remove OAuth2 tokens and delete user data and permissions. Application credentials (clientId and clientSecret) will persist.

    Declaration

    Objective-C

    + (void)logout;
  • Log out user from an SDK instance.

    This method will teardown the networking stack, remove OAuth2 tokens and delete user data and permissions. Application credentials (clientId and clientSecret) will persist.

    Declaration

    Objective-C

    - (void)logout;
  • Class-level lighweight authentication for users with email identifier but no password.

    Declaration

    Objective-C

    + (void)authenticateWithEmail:(nonnull NSString *)email
                       completion:(nonnull VPKNetworkResponseBlock)completion;
    Parameters
    email

    user email as unique user identifier.

    completion

    Block to run on completion of authentication request.

  • Class-level heavyweight authentication for users with email identifier and password.

    Declaration

    Objective-C

    + (void)authenticateWithEmail:(nonnull NSString *)email
                         password:(nullable NSString *)password
                       completion:(nonnull VPKNetworkResponseBlock)completion;
    Parameters
    email

    user email as unique user identifier.

    password

    user password string

    completion

    Block to run on completion of authentication request.

  • Instance-level heavyweight authentication for users with email identifier and password.

    Declaration

    Objective-C

    - (void)authenticateWithEmail:(nonnull NSString *)email
                         password:(nullable NSString *)password
                       completion:(nonnull VPKNetworkResponseBlock)completion;
    Parameters
    email

    user email as unique user identifier.

    password

    user password string

    completion

    Block to run on completion of authentication request.

  • Undocumented

    Declaration

    Objective-C

    + (BOOL)authorized;
  • Create a VPKVeepViewer. This is the view controller for viewing image and video content with Veep metadata.

    Declaration

    Objective-C

    + (nullable VPKVeepViewer *)viewerWithPreview:(nonnull VPKPreview *)preview;
    Parameters
    preview

    The VPKPreview containing the image to be viewed with the VeepViewer.This view’s image provides the image data for viewing. The view frame is used for the transition geometry when presenting and dismissing.

  • Create a VPKVeepViewer. Usse this method to provide image data with higher resolution than contained in the VPKPreview imageView.

    Declaration

    Objective-C

    + (nullable VPKVeepViewer *)viewerWithImage:(nonnull UIImage *)image
                                    fromPreview:(nonnull VPKPreview *)preview;
    Parameters
    image

    The image data for display in the Veep Viewer.

    preview

    A VPKPreview that handles the Viewer delegate methods and provdies frame geometry for presenting and dismissing the Veep Viewr.

  • Create a VPKVeepViewer. DEPRECATED from v 2.7.0

    Declaration

    Objective-C

    + (nullable VPKVeepViewer *)viewerWithImage:(nonnull UIImage *)image
                                       fromView:(nonnull UIView *)view;
    Parameters
    image

    the image to be viewed with the VeepViewer.

    view

    the view framing the image. This view is used to provide the transition geometry when presenting and dismissing.

  • Presents a viewer on a new overlaying UIWindow - allows full orientation changes on the viewer while underlying controller may have more restricted orientations.

    Declaration

    Objective-C

    + (void)presentViewer:(nonnull VPKVeepViewer *)viewer;
  • Undocumented

    Declaration

    Objective-C

    + (nonnull VPKVeepFetcher*)fetcher;
  • Undocumented

    Declaration

    Objective-C

    - (nonnull VPKVeepFetcher*)fetcher;
  • Undocumented

    Declaration

    Objective-C

    + (nonnull VPKStyles*)styles;
  • Undocumented

    Declaration

    Objective-C

    + (nonnull VPKEnvironment*) environment;
  • Undocumented

    Declaration

    Objective-C

    - (nonnull VPKEnvironment*) environment;