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
forwardErrorsYES - 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 thecontext.idfafield of its analytics records, but only whileATTrackingManager.trackingAuthorizationStatusis.authorized(iOS 14.5+). VPKit never presents the tracking prompt: request it in the host app withATTrackingManager.requestTrackingAuthorizationbefore 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.frameworkandAppTrackingTransparency.framework; - add
NSUserTrackingUsageDescriptionto its Info.plist; set
NSPrivacyTrackingtotruein its own privacy manifest and list the analytics collector host (veepio-events-collector-859240999434.us-central1.run.app) underNSPrivacyTrackingDomains. VPKit’s bundled manifest declares no tracking because the default is off.
Declaration
Objective-C
+ (void)sendIDFA:(BOOL)idfa;Parameters
idfaYES to enable collection, NO (default) to disable it.
- link
-
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
emailuser email as unique user identifier.
completionBlock 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
emailuser email as unique user identifier.
passworduser password string
completionBlock 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
emailuser email as unique user identifier.
passworduser password string
completionBlock to run on completion of authentication request.
-
Undocumented
Declaration
Objective-C
+ (BOOL)authorized;
-
Declaration
Objective-C
+ (void)requestUserStats:(nonnull VPKUserStatsErrorBlock)completionBlock; -
gets daily stats for the last seven days for this user
Declaration
Objective-C
+ (void)getDailyStats:(nonnull VPKDailyStatsBlock)completion; -
gets competitive stats for this user
Declaration
Objective-C
+ (void)getCompetitiveStats:(nonnull VPKCompetitiveStatsBlock)completion;
-
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
previewThe 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
imageThe image data for display in the Veep Viewer.
previewA 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
imagethe image to be viewed with the VeepViewer.
viewthe 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;
-
request a veep by veepId and return a VPKPublicVeep in the completion handler
Declaration
Objective-C
+ (void)requestVeep:(nonnull NSString *)veepId completionBlock:(nonnull VPKitPublicVeepErrorCompletionBlock)completion; -
Request a veep by veepId and return a VPKVeep in the completion handler.
Declaration
Objective-C
+ (void)getVeep:(nonnull NSString *)veepId completionBlock:(nonnull VPKitVeepErrorCompletionBlock)completion; -
Request a veep by originalContentURI and return a VPKPublicVeep in the completion handler.
Declaration
Objective-C
+ (void)requestVeepWithURL:(nonnull NSURL *)imageURL completionBlock: (nonnull VPKitPublicVeepErrorCompletionBlock)completion; -
Undocumented
Declaration
Objective-C
- (void) requestVeepWithURL:(NSURL*)imageURL completionBlock:(VPKitPublicVeepErrorCompletionBlock)completion; -
Request a veep by originalContentURI and return a VPKVeep in the completion handler.
Declaration
Objective-C
+ (void)getVeepWithURL:(nonnull NSURL *)imageURL completionBlock:(nonnull VPKitVeepErrorCompletionBlock)completion; -
Request a veep identifier by originalContentURI and return the identifier as an NSString in the completion handler.
Declaration
Objective-C
+ (void)getVeepIdWithURI:(nonnull NSURL *)originalContentURI useCache:(BOOL)useCache completionBlock: (nonnull VPKVeepIdentifierErrorCompletionBlock)completion; -
Request a veep header by originalContentURI and return the header as an VPKPublicVeep in the completion handler.
Declaration
Objective-C
+ (void)getVeepHeaderWithURI:(nonnull NSURL *)originalContentURI useCache:(BOOL)useCache completionBlock: (nonnull VPKitPublicVeepErrorCompletionBlock)completion; -
Undocumented
Declaration
Objective-C
- (void) getVeepHeaderWithURI:(NSURL*)originalContentURI useCache:(BOOL)useCache completionBlock:(VPKitPublicVeepErrorCompletionBlock)completion; -
A string representation of the VPKit version.
Declaration
Objective-C
+ (nonnull NSString *)sdkVersion;Return Value
NSString description with version and build numbers.
View on GitHub
VPKit Class Reference