Other Protocols

The following protocols are available globally.

  • VOCannedSoundManagerProtocol is the interface responsible for getting prerecorded sounds from the Vouchr server.

    See more

    Declaration

    Objective-C

    @protocol VOCannedSoundManagerProtocol

    Swift

    protocol VOCannedSoundManagerProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol VODialogViewProtocol
    
    - (void)showOnParentViewController:(UIViewController *)parentViewController;
    - (void)showOnTopVisibleViewController;
    - (void)setTitle:(nullable NSString *)title;
    - (void)setBodyText:(nullable NSString *)body;
    - (void)setPositiveButtonText:(NSString *)buttonText withCompletionHandler:(nullable void (^)(void))completionHandler;
    - (void)setNegativeButtonText:(NSString *)buttonText withCompletionHandler:(nullable void (^)(void))completionHandler;
    - (void)setError:(nullable NSError *)error;
    - (void)setView:(UIView *)view;
    - (void)dismiss;
    
    @end

    Swift

    protocol VODialogViewProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol VODiscoverManagerProtocol <NSObject>
    
    - (void)requestVoucherTemplateCategoriesWithSuccess:(void(^)(NSArray <VOVoucherTemplate *> *voucherTemplates))onSuccess
                                                failure:(void(^)(NSError *error))onFail;
    
    - (void)requestVoucherTemplatesForCategory:(VOVoucherTemplateCategory *)category
                                     onSuccess:(void (^)(NSArray<VOVoucherTemplate *> *voucherTemplates))onSuccess
                                       failure:(void (^)(NSError *error))onFail;
    
    @end

    Swift

    protocol VODiscoverManagerProtocol
  • The VOFullScreenImageEditViewControllerDelegate is the object responsible for supplying additional photo editing screens.

    See more

    Declaration

    Objective-C

    @protocol VOFullScreenImageEditViewControllerDelegate <NSObject>

    Swift

    protocol VOFullScreenImageEditViewControllerDelegate : NSObjectProtocol
  • VOGameViewControllerDelegate is used to notify the delegate of any changes a game view controller makes to the VOGameData.

    See more

    Declaration

    Objective-C

    @protocol VOGameViewControllerDelegate <NSObject>

    Swift

    protocol VOGameViewControllerDelegate : NSObjectProtocol
  • GameViewControllerProtocol is the interface for UIViewControllers that facilitate interactions with games. UIViewControllers must implement this protocol to appear in the game selection screen.

    See more

    Declaration

    Objective-C

    @protocol VOGameViewControllerProtocol <NSObject>

    Swift

    protocol VOGameViewControllerProtocol : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol VOGiftPackageFactory <NSObject>
    
    - (void)setState:(VOGiftPackageState)state animated:(BOOL)animated completion:(nullable void(^)(void))completion;
    
    - (UIView *)getBackView;
    
    - (UIView *)getFrontView;
    
    @optional
    
    - (CGRect)contentsRect;
    
    - (void)setWrappingData:(VOWrappingData *)wrappingData;
    
    - (void)setLockImageURL:(NSURL *)url;
    
    - (void)revealComplete;
    
    @end

    Swift

    protocol VOGiftPackageFactory : NSObjectProtocol
  • The VOLoadingViewProtocol is responsible for animating any custom loading view. It is used for fullscreen loading views.

    Note

    VOUser is responsible for adding the loading view as a subview and constraining it to the view it should appear on.
    See more

    Declaration

    Objective-C

    @protocol VOLoadingViewProtocol

    Swift

    protocol VOLoadingViewProtocol
  • VOMediaUploadManagerProtocol is the interface for uploading VOVoucherMedia. Uploading events will be triggered to a manager implementing this interface.

    See more

    Declaration

    Objective-C

    @protocol VOMediaUploadManagerProtocol

    Swift

    protocol VOMediaUploadManagerProtocol
  • VOPersonalizationOptionViewControllerDelegate is the delegate used for passing information between all of the default personalization option view controllers and the voucher creation view controller. If an extra personalization option view controller is created, it should call these delegate methods where appropriate.

    See more

    Declaration

    Objective-C

    @protocol VOPersonalizationOptionViewControllerDelegate <NSObject>

    Swift

    protocol VOPersonalizationOptionViewControllerDelegate
  • VOPersonalizationOptionViewControllerProtocol is the interface for all of the default personalization option view controllers.

    See more

    Declaration

    Objective-C

    @protocol VOPersonalizationOptionViewControllerProtocol <NSObject>

    Swift

    protocol VOPersonalizationOptionViewControllerProtocol
  • VOPreviewVoucherContentsViewControllerDelegate is the delegate used for passing information between the edit view controller and the voucher creation view controller. If a different edit view controller than the default VOPreviewVoucherContentsViewController, implement this delegate inside the overridden view controller.

    See more

    Declaration

    Objective-C

    @protocol VOPreviewVoucherContentsViewControllerDelegate <NSObject>

    Swift

    protocol VOPreviewVoucherContentsViewControllerDelegate : NSObjectProtocol
  • VOPreviewVoucherContentsViewControllerProtocol is the interface for the VOPreviewVoucherContentsViewController. If a different edit view controller is used, it needs to implement this protocol.

    See more

    Declaration

    Objective-C

    @protocol VOPreviewVoucherContentsViewControllerProtocol

    Swift

    protocol VOPreviewVoucherContentsViewControllerProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol VOProductDetailsViewControllerDelegate <NSObject>
    
    @optional
    
    - (void)onCancelProductDetails;
    - (void)onProductDetailConfirmedWithPersonalizedObject:(NSDictionary *)personalization;
    
    @end

    Swift

    protocol VOProductDetailsViewControllerDelegate : NSObjectProtocol
  • VORevealPersonalizationViewControllerProtocol is the interface for any view controllers that are presented from the VOVoucherRevealViewController when gift elements are tapped by the user in the reveal view controller.

    See more

    Declaration

    Objective-C

    @protocol VORevealPersonalizationViewControllerProtocol <NSObject>

    Swift

    protocol VORevealPersonalizationViewControllerProtocol
  • General search protocol for asynchronous string-based searches.

    See more

    Declaration

    Objective-C

    @protocol VOSearchAgent <NSObject>

    Swift

    protocol VOSearchAgent : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol VOSoundSelectionDelegate <NSObject>
    
    - (void)didSelectSoundWithSoundMedia:(VOSoundMedia *)soundMedia;
    
    - (void)didCancelSelectSound;
    
    @end

    Swift

    protocol VOSoundSelectionDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol VOUIDelegate <NSObject>
    
    @optional
    
    /**
     This delegate method is called when attempting to initialize its gift package. If it is not implemented, the default envelope will be used.
     Only implement this method if you want to use a custom gift package. This method is used to setup and configure your custom gift package.
     */
    - (id<VOGiftPackageFactory>)customGiftPackageFactory;
    
    @end

    Swift

    protocol VOUIDelegate : NSObjectProtocol
  • The voucher creation view controller is the screen responsible for presenting all personalization options and provides visual feedback for alterations to the VOVoucher.

    See more

    Declaration

    Objective-C

    @protocol VOVoucherCreationViewControllerProtocol <NSObject>

    Swift

    protocol VOVoucherCreationViewControllerProtocol : NSObjectProtocol
  • VOVoucherGameDelegate is implemented on both the create and claim side of a VOVoucher to show custom games/challenges if any are implemented.

    See more

    Declaration

    Objective-C

    @protocol VOVoucherGameDelegate <NSObject>

    Swift

    protocol VOVoucherGameDelegate
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol VOVoucherRevealFlowDelegate <NSObject>
    
    
    @optional
    
    /**
     Called when a user taps on an element that represents a `VOVoucherMedia` to allow a custom view controller to be shown in place of the default.
     If not implemented or nil is returned, the default reveal personalization view controller will be used.
     Defaults:
     VOVoucherMediaTypeNote - `VOAddNoteViewController`
     VOVoucherMediaTypeImage, VoucherMediaTypeAnimated - `VOSingleGalleryViewController`
     VOVoucherMediaTypeYoutube - `VOYouTubePlayerViewController`
     VOVoucherMediaTypeVideo - `VOFullScreenVideoPlayerViewController`
     
     @param voucherMedia - The media object that was tapped on.
     @return a view controller that shows the `VOVoucherMedia` in more detail, nil if the default view controller should be used.
     */
    - (UIViewController <VORevealPersonalizationViewControllerProtocol> *)voucherRevealPersonalizationviewControllerForVoucherMedia:(VOVoucherMedia *)voucherMedia;
    
    
    /**
     Called when a user taps on an element that represents a reveal cell that is not a media item, to allow a custom view controller to be shown in place of the default.
     If not implemented or nil is returned, the default reveal personalization view controller will be used.
    
     
     @param voucher - The voucher object.
     @return a view controller that shows the `VORevealCellProtocol` in more detail, nil if the default view controller should be used.
     */
    - (UIViewController <VORevealPersonalizationViewControllerProtocol> *)voucherRevealPersonalizationViewControllerForGiftWithVoucher:(VOVoucher *)voucher;
    
    /**
     Used to retrieve the destInfo for the current voucher
     @param voucher - The voucher object
     @return a dictionary containing the above values with names identical to the method parameter names
     */
    - (NSDictionary *)claimDestInfoForVoucher:(VOVoucher *)voucher;
    
    @end

    Swift

    protocol VOVoucherRevealFlowDelegate : NSObjectProtocol