Classes
The following classes are available globally.
-
@abstract Lightweight, generic shimmering view.
See moreDeclaration
Objective-C
@interface FBShimmeringView : UIView <FBShimmering>Swift
class FBShimmeringView : UIView, FBShimmering
-
An image view for displaying animated image.
@discussion It is a fully compatible
UIImageViewsubclass. If theimageorhighlightedImageproperty adopt to theYYAnimatedImageprotocol, then it can be used to play the multi-frame animation. The animation can also be controlled with the UIImageView methods-startAnimating,-stopAnimatingand-isAnimating.This view request the frame data just in time. When the device has enough free memory, this view may cache some or all future frames in an inner buffer for lower CPU cost. Buffer size is dynamically adjusted based on the current state of the device memory.
Sample Code:
See more// [email protected] YYImage *image = [YYImage imageNamed:@"ani"]; YYAnimatedImageView *imageView = [YYAnimatedImageView alloc] initWithImage:image]; [view addSubView:imageView];Declaration
Objective-C
@interface YYAnimatedImageView : UIImageViewSwift
class YYAnimatedImageView : UIImageView
-
Undocumented
Declaration
Objective-C
@interface CacheManager : NSObject <VOCacheProtocol> @endSwift
class CacheManager : NSObject, VOCacheProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface GameManager : NSObject <VOGameManagerProtocol> - (instancetype)initWithNetworkManager:(id<VONetworkManagerProtocol>)networkManager; @endSwift
class GameManager : NSObject, VOGameManagerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface GiftManager : NSObject <VOGiftManagerProtocol> // anytime a voucher is updated (saved to cache) this signal will be signaled with the voucher @property (nonatomic, readonly) RACSignal *voucherUpdatedSignal; - (instancetype)initWithNetworkManager:(id<VONetworkManagerProtocol>)networkManager cacheManager:(id<VOCacheProtocol>)cacheManger; @endSwift
class GiftManager : NSObject, VOGiftManagerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface MerchantManager : NSObject <VOMerchantManagerProtocol> - (instancetype)initWithNetworkManager:(id<VONetworkManagerProtocol>)networkManager cacheManager:(id<VOCacheProtocol>)cacheManger; @endSwift
class MerchantManager : NSObject, VOMerchantManagerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface NetworkManager : NSObject <VONetworkManagerProtocol> + (instancetype)networkManagerWithBuilder:(void (^)(NetworkManagerBuilder *))builderBlock; @endSwift
class NetworkManager : NSObject, VONetworkManagerProtocol -
Undocumented
See moreDeclaration
Objective-C
@interface NetworkManagerBuilder : NSObject @property (nonatomic) NSURLSessionConfiguration *sessionConfiguration; @property (nonatomic) NSURL *baseUrl; @property (nonatomic) NSString *sdkString; @endSwift
class NetworkManagerBuilder : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PersistManager : NSObject <VOPersistManagerProtocol> - (instancetype)initWithUserDefaults:(NSUserDefaults *)userDefaults; @endSwift
class PersistManager : NSObject, VOPersistManagerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface UserManager : NSObject <VOUserManagerProtocol> // anytime a user is updated (saved to cache) this signal will be signaled with the new user @property (nonatomic, readonly) RACSignal *userUpdatedSignal; // anytime friends is updated (saved to cache) this signal will be signaled with the list of friends @property (nonatomic, readonly) RACSignal *friendsUpdatedSignal; // anytime a user logs in this signal will be signaled with the logged in user @property (nonatomic, readonly) RACSignal *loginSignal; // anytime a user logs out this signal will be signaled @property (nonatomic, readonly) RACSignal *logoutSignal; // Default initializer // if cacheProtocol object is nil nothing will ever be cached // if networkManager is nil nothing will be ever sent to server (this is bad) // if persistManager is nil tokens will not be persisted, and the user will be logged out on each app startup - (instancetype)initWithCacheManager:(id<VOCacheProtocol>)cacheManager networkManager:(id<VONetworkManagerProtocol>)networkManager persistManager:(id<VOPersistManagerProtocol>)persistManager; // TODO: add config to initializer.. or make a builder?! @endSwift
class UserManager : NSObject, VOUserManagerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface WrappingPaperManager : NSObject <VOWrappingPaperManagerProtocol> @property (nonatomic, strong, readonly) NSArray <WrappingPaperCategory *> *wrappingPaperCategories; - (instancetype)initWithNetworkManager:(id<VONetworkManagerProtocol>)networkManager; @endSwift
class WrappingPaperManager : NSObject, VOWrappingPaperManagerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface YoutubeManager : NSObject <VOYoutubeManagerProtocol> - (instancetype)initWithNetworkManager:(id<VONetworkManagerProtocol>)networkManager accessKey:(NSString *)youtubeAccessKey; @endSwift
class YoutubeManager : NSObject, VOYoutubeManagerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface ActivityFeedVoucher : NSObject @property (nonatomic, readonly) long long voucherId; @property (nonatomic, strong, readonly) NSString *title; @property (nonatomic, readonly) User *owner; @property (nonatomic, strong, readonly) User *mostRecentCommentUser; @property (nonatomic, readonly) long long mostRecentTimeStamp; @property (nonatomic, readonly) NSString *mostRecentComment; @property (nonatomic, readonly) BOOL mostRecentCommentRead; @property (nonatomic, strong, readonly) NSString *bannerUrl; @property (nonatomic, strong, readonly) NSString *bannerColorHexString; @property (nonatomic, readonly) long long claimerId; @property (nonatomic, readonly) long long claimDateTimeStamp; // TODO: status & game stuff + (ActivityFeedVoucher *)activityFeedVoucherFromDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryRepresentation; @endSwift
class ActivityFeedVoucher : NSObject
-
Credential is used to pass credentials to the VouchrServer when logging in and authenticating users.
See moreDeclaration
Objective-C
@interface Credential : NSObjectSwift
class Credential : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface GameDifficulty : NSObject @property (strong, nonatomic, readonly) NSString *name; @property (nonatomic, readonly) GameDifficultyLevel difficultyLevel; @property (nonatomic, readonly) NSInteger minimumScore; + (GameDifficulty *)gameDifficultyFromDictionary:(NSDictionary *)dictionary; + (NSString*)stringFromDifficultyLevel:(GameDifficultyLevel)difficulty; + (GameDifficultyLevel)difficultyLevelFromString:(NSString *)difficulty; - (NSDictionary *)dictionaryRepresentation; @endSwift
class GameDifficulty : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface ImageModel : NSObject <NSCoding> @property (nonatomic, readonly, nullable) NSString *imageUrl; @property (nonatomic, nullable) NSData *imageData; @property (nonatomic, readonly) BOOL animated; @property (nonatomic, readonly) float imageWidth; @property (nonatomic, readonly) float imageHeight; @property (nonatomic, readonly, nullable) NSString *thumbnailUrl; + (nonnull ImageModel *)imageModelWithImageUrl:(nonnull NSString *)imageUrl animated:(BOOL)animated width:(float)imageWidth height:(float)imageHeight thumbnailUrl:(nullable NSString *)thumbnailUrl; + (nonnull ImageModel *)imageModelWithImageData:(nonnull NSData *)imageData animated:(BOOL)animated width:(float)imageWidth height:(float)imageHeight thumbnailUrl:(nullable NSString *)thumbnailUrl; + (nonnull ImageModel *)imageModelFromDictionary:(nonnull NSDictionary *)dictionary; - (nonnull NSDictionary *)dictionaryRepresentation; @endSwift
class ImageModel : NSObject, NSCoding
-
Undocumented
See moreDeclaration
Objective-C
@interface Merchant : NSObject <NSCoding> @property (nonatomic, readonly) long long merchantId; @property (nonatomic, readonly) NSString *merchantUri; @property (nonatomic, readonly) NSString *name; @property (nonatomic, readonly) NSString *photoUrl; @property (nonatomic, readonly) NSString *previewPhotoUrl; @property (nonatomic, readonly) NSString *backgroundColorHexString; @property (nonatomic, assign, readonly) BOOL hasOnlinePurchases; @property (nonatomic, assign, readonly) BOOL hasCashPurchases; @property (nonatomic, assign, readonly) BOOL productSearchEnabled; @property (nonatomic, readonly) NSArray<PaymentMerchantInfo *> *paymentMerchantInfos; @property (nonatomic, readonly) PaymentMerchantInfo *sourceInfo; @property (nonatomic, readonly) NSString *websiteUrl; @property (nonatomic, readonly) NSString *featuredBackgroundImageUrl; @property (nonatomic, readonly) NSString *featuredButtonImageUrl; @property (nonatomic, readonly) NSString *featuredHeading; @property (nonatomic, readonly) NSString *featuredSubheading; @property (nonatomic, readonly) NSString *action; + (Merchant *)merchantFromDictionary:(NSDictionary *)dictionary; - (instancetype)initWithDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryRepresentation; @endSwift
class Merchant : NSObject, NSCoding
-
Undocumented
See moreDeclaration
Objective-C
@interface MerchantProduct : NSObject @property (nonatomic, strong, readonly) NSString *code; @property (nonatomic, readonly) double price; @property (nonatomic, strong, readonly) NSString *label; @property (nonatomic, readonly) double fee; + (MerchantProduct *)productWithDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryRepresentation; @endSwift
class MerchantProduct : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface MutableVoucher : Voucher @property (nonatomic) long long vId; @property (nonatomic) VoucherStatus status; // Merchant properties @property (nonatomic) Merchant *merchant; @property (nonatomic) double amount; @property (nonatomic) double fee; @property (nonatomic, strong) NSString *currency; // Thank you photo @property (nonatomic) BOOL isThankYouPhotoRequired; @property (nonatomic) NSDate *thankYouDate; // dates @property (nonatomic, strong) NSDate *dateModified; @property (nonatomic, strong) NSDate *dateCreated; @property (nonatomic, strong) NSDate *dateClaimable; // Users @property (nonatomic, strong) User *creator; @property (nonatomic, strong) User *claimer; @property (nonatomic, strong) NSArray <User *> *viewers; @property (nonatomic, strong) NSArray <User *> *recipients; @property (nonatomic, strong) NSArray <NSNumber *> *unwrappedUsers; // customization options @property (nonatomic, strong) NSString *title; @property (nonatomic, strong) NSString *shareImageUrl; @property (nonatomic) VoucherPrivacyStatus privacy; @property (nonatomic, strong) NSArray <VoucherMedia *> *medias; @property (nonatomic, strong) WrappingPaper *wrappingPaper; @property (nonatomic, strong) GameData *gameData; - (instancetype)initWithDictionary:(NSDictionary *)dictionary; + (instancetype)mutableVoucherWithDictionary:(NSDictionary *)dictionary; + (instancetype)mutableVoucherWithVoucher:(Voucher *)voucher; - (void)addMedia:(VoucherMedia *)media; - (void)removeMedia:(VoucherMedia *)media; @endSwift
class MutableVoucher : Voucher
-
Undocumented
See moreDeclaration
Objective-C
@interface PaymentInfo : NSObject @property (nonatomic, readonly) PaymentInfoType type; @property (nonatomic, strong, readonly) NSString *paymentId; @property (nonatomic, strong, readonly) NSDictionary *voucherInfo; @property (nonatomic, strong, readonly) NSDictionary *userInfo; @property (nonatomic, strong, readonly) NSDictionary *merchantInfo; + (PaymentInfo *)paymentInfoFromDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryRepresentation; @endSwift
class PaymentInfo : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PaymentMerchantInfo : NSObject @property (nonatomic, readonly) PaymentMerchantInfoType type; @property (nonatomic, strong, readonly) NSString *name; @property (nonatomic, strong, readonly) NSString *photoUrl; @property (nonatomic, strong, readonly) NSString *externalId; @property (nonatomic, strong, readonly) NSArray<NSString*> *currencies; @property (nonatomic, strong, readonly) NSString *giftCardPreviewImageUrl; @property (nonatomic, strong, readonly) NSString *paymentMerchantInfoDescription; @property (nonatomic, readonly) BOOL mustPrintToRedeem; @property (nonatomic, readonly) double minValue; @property (nonatomic, readonly) double maxValue; @property (nonatomic, strong, readonly) NSArray<MerchantProduct *> *fixedProducts; // properties @property (nonatomic, strong, readonly) NSString *brandId; @property (nonatomic, strong, readonly) NSString *legalDisclaimer; @property (nonatomic, strong, readonly) NSString *termsAndConditions; @property (nonatomic, strong, readonly) NSString *cardHolderAgreementUrlString; + (PaymentMerchantInfo *)paymentMerchantInfoFromDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryRepresentation; @endSwift
class PaymentMerchantInfo : NSObject
-
User model for the VouchrSDK. Users are used to identify the logged in user and typically gifts are sent to a User(s).
See moreDeclaration
Objective-C
@interface User : NSObject <NSCoding, NSCopying>Swift
class User : NSObject, NSCoding, NSCopying
-
Undocumented
See moreDeclaration
Objective-C
@interface UserNetwork : NSObject @property (nonatomic, strong, readonly) NSString *name; @property (nonatomic, strong, readonly) NSString *externalUserName; @property (nonatomic, strong, readonly) NSString *externalUserId; @property (nonatomic, strong, readonly) NSString *accessToken; @property (nonatomic, readonly) UserNetworkStatus status; + (instancetype)userNetworkFromDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryRepresentation; @endSwift
class UserNetwork : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface Voucher : NSObject <NSCoding> @property (nonatomic, readonly) long long vId; @property (nonatomic, readonly) VoucherStatus status; // Merchant properties @property (nonatomic, readonly) double amount; @property (nonatomic, readonly) double fee; @property (nonatomic, readonly) NSString *currency; @property (nonatomic, readonly) Merchant *merchant; // payment @property (nonatomic, readonly) VoucherPayment *paymentInfo; // Thank you photo @property (nonatomic, readonly) BOOL isThankYouPhotoRequired; @property (nonatomic, readonly) NSDate *thankYouDate; // dates @property (nonatomic, readonly) NSDate *dateModified; @property (nonatomic, readonly) NSDate *dateCreated; @property (nonatomic, readonly) NSDate *dateClaimable; // Users @property (nonatomic, readonly) User *creator; @property (nonatomic, readonly) User *claimer; @property (nonatomic, readonly) NSArray <User *> *viewers; @property (nonatomic, readonly) NSArray <User *> *recipients; @property (nonatomic, readonly) NSArray <NSNumber *> *unwrappedUsers; // customization options @property (nonatomic, readonly) NSString *title; @property (nonatomic, readonly) NSString *shareImageUrl; @property (nonatomic, readonly) VoucherPrivacyStatus privacy; @property (nonatomic, readonly) NSArray <VoucherMedia *> *medias; @property (nonatomic, readonly) WrappingPaper *wrappingPaper; @property (nonatomic, readonly) GameData *gameData; - (instancetype)initWithDictionary:(NSDictionary *)dictionary; + (instancetype)voucherWithDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryRepresentation; @endSwift
class Voucher : NSObject, NSCoding
-
Undocumented
See moreDeclaration
Objective-C
@interface VoucherMedia : NSObject @property (nonatomic, readonly) VoucherMediaType mediaType; @property (nonatomic) long mediaId; @property (strong, nonatomic, readonly) NSString *title; @property (strong, nonatomic) NSString *mediaUrlString; @property (strong, nonatomic) NSString *thumbnailUrlString; @property (nonatomic, readonly) long long userId; @property (nonatomic, readonly) long displayOrder; - (instancetype)initWithDictionary:(NSDictionary *)dictionary; - (instancetype)initWithType:(VoucherMediaType)mediaType title:(NSString *)title mediaUrlString:(NSString *)mediaUrlString thumbnailUrlString:(NSString *)thumbnailUrlString; + (NSArray<VoucherMedia *>*)voucherMediasFromArray:(NSArray *)mediasJson; + (instancetype)voucherMediaWithDictionary:(NSDictionary *)dictionary; + (instancetype)voucherMediaWithType:(VoucherMediaType)mediaType title:(NSString *)title mediaUrlString:(NSString *)mediaUrlString thumbnailUrlString:(NSString *)thumbnailUrlString; - (NSDictionary *)dictionaryRepresentation; - (void)setMediaUrlString:(NSString *)mediaUrlString; - (void)setThumbnailUrlString:(NSString *)thumbnailUrlString; + (NSString *)mediaStringFromMediaType:(VoucherMediaType)mediaType; - (void)updateWithMedia:(VoucherMedia *)media; @endSwift
class VoucherMedia : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface VoucherPayment : NSObject @property (nonatomic, assign, readonly) BOOL success; @property (nonatomic, assign, readonly) PaymentInfoErrorSource errorSource; @property (nonatomic, assign, readonly) PaymentInfoErrorState errorState; @property (nonatomic, assign, readonly) NSInteger paymentErrorDetailsCode; @property (nonatomic, strong, readonly) NSString *paymentErrorDetailsMessage; @property (nonatomic, assign, readonly) PaymentInfoState paymentState; @property (nonatomic, strong, readonly) PaymentInfo *sourceInfo; @property (nonatomic, strong, readonly) PaymentInfo *destInfo; @property (nonatomic, strong, readonly) PaymentInfo *redeemInfo; @property (nonatomic, strong, readonly) NSArray *paymentSourceOptions; @property (nonatomic, strong, readonly) NSArray *paymentDestOptions; @property (nonatomic, assign, readonly) BOOL requiresIntervention; + (VoucherPayment *)voucherPaymentFromDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryRepresentation; @endSwift
class VoucherPayment : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface VouchrError : NSObject @property (nonatomic, strong, readonly) NSMutableDictionary *data; @property (nonatomic, readonly) int code; - (id)initWithDictionary:(NSDictionary *)dictionary; - (id)initWithCode:(int)code; + (VouchrError *)errorWithDictionary:(NSDictionary *)dictionary; - (NSString *)message; - (NSArray<NSDictionary *> *)errorFields; @endSwift
class VouchrError : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface WrappingPaper : NSObject @property (nonatomic, readonly) ImageModel *imageModel; @property (nonatomic) NSString *wrappingRibbonColorHex; @property (nonatomic) NSString *wrappingRibbonColorHex2; @property (nonatomic, readonly) NSString *categoryId; @property (nonatomic) NSString *title; @property (nonatomic) NSString *searchText; + (WrappingPaper *)wrappingPaperFromDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryRepresentation; @endSwift
class WrappingPaper : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface WrappingPaperCategory : NSObject @property (strong, nonatomic) NSArray <WrappingPaper *> *wrappingPapers; @property (strong, nonatomic) NSArray <ImageModel *> *imageResults; @property (strong, nonatomic, readonly) NSString *title; @property (strong, nonatomic, readonly) NSString *searchText; @property (strong, nonatomic, readonly) NSString *imageUrl; @property (strong, nonatomic, readonly) NSString *roundImageUrl; @property (nonatomic, readonly) WrappingPaperCategoryType type; @property (nonatomic, readonly) NSInteger order; @property (strong, nonatomic, readonly) NSString *categoryId; + (instancetype)wrappingPaperCategoryFromDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryRepresentation; - (id)getObjectAtIndex:(NSInteger)index; @endSwift
class WrappingPaperCategory : NSObject
-
VouchrConfig is the global config for the VouchrSDK.
Note
serverUrl and sdkString must be set or the application will throw an exception when theVouchrEngineis built.These properties can be implemented in code or by plist.
By Code: Use
configinitializer and set the properties manually before passing it to theVouchrEngine.By Plist: Add VouchrConfig.plist and use the
See moredefaultConfiginitializer or add.plist and use the configWithContentsOfFile:<path_to_plist>initializerDeclaration
Objective-C
@interface VouchrConfig : NSObjectSwift
class VouchrConfig : NSObject
-
VouchrEngineis a singleton that persists and provides access to core manager dependencies.Usage Notes
Initialize the
VouchrEngineusing thevouchrEngineWithBuilder:method. Example:VouchrEngine *vouchrEngine = [VouchrEngine vouchrEngineWithBuilder:^(VouchrEngineBuilder *builder) { builder.cacheManager = [CacheManager new]; builder.networkManager = [NetworkManager new]; builder.userManager = [[UserManager alloc] initWithCacheManager:builder.cacheManager networkManager:builder.networkManager persistManager:nil]; }];
See moreDeclaration
Objective-C
@interface VouchrEngine : NSObjectSwift
class VouchrEngine : NSObject -
See moreVouchrEngineBuilderis used only to help construct the VouchrEngine and should not be initialized directly.Declaration
Objective-C
@interface VouchrEngineBuilder : NSObjectSwift
class VouchrEngineBuilder : NSObject
-
See moreGameFactoryproduces UIViewControllers that conform toGameViewControllerProtocolfor the specified types.GameFactorycommunicates with theVoucherCreationFlowDelegateand delegates outside the SDK if necessary.Declaration
Objective-C
@interface GameFactory : NSObjectSwift
class GameFactory : NSObject
-
See moreHtmlGameViewControllerpresents a fullscreenSKWebViewto enable users to play games that supportHtmlGameData.Declaration
Objective-C
@interface HtmlGameViewController : UIViewController <GameViewControllerProtocol>Swift
class HtmlGameViewController : UIViewController, GameViewControllerProtocol
-
See moreSealedVoucherViewis a sealedEnvelopeView. It shows ribbons and a seal overtop of anEnvelopeView.Declaration
Objective-C
@interface SealedVoucherView : UIViewSwift
class SealedVoucherView : UIView
-
See moreVouchrWebImageis a convenience view that is capable of asynchronously downloading images. During download of the image, the view will shimmer, resembling a loading state. This view does not subclassUIImageViewbut can be used in place of one, as it follows a similar protocol.Declaration
Objective-C
@interface VouchrWebImageView : FBShimmeringViewSwift
class VouchrWebImageView : FBShimmeringView
-
Undocumented
See moreDeclaration
Objective-C
@interface AnimatedPersonalizationOption : PersonalizationOptionSwift
class AnimatedPersonalizationOption : PersonalizationOption -
Undocumented
See moreDeclaration
Objective-C
@interface AnimatedPersonalizationOptionBuilder : PersonalizationOptionBuilder @property (nonatomic) NSString *titleText; @property (nonatomic) NSArray <NSString *> *suggestedSearchTerms; @property (nonatomic) NSInteger maxSearchResults; @property (nonatomic) NSArray <UIColor *> *imageBackgroundColors; @property (nonatomic) BOOL allowUserCustomSearch; @property (nonatomic, strong) VouchrTheme *imageSelectorVouchrTheme; @property (nonatomic, strong) VouchrTheme *addImageVouchrTheme; @endSwift
class AnimatedPersonalizationOptionBuilder : PersonalizationOptionBuilder
-
See moreChallengePersonalizationOptionrepresents aVouchercustomization which will allow users to add a challenge. Instantiate aChallengePersonalizationOptionif a challenge can be added to theirVoucher. *Declaration
Objective-C
@interface ChallengePersonalizationOption : PersonalizationOptionSwift
class ChallengePersonalizationOption : PersonalizationOption -
Undocumented
See moreDeclaration
Objective-C
@interface ChallengePersonalizationOptionBuilder : PersonalizationOptionBuilder @property (nonatomic) NSString *titleText; @property (nonatomic) BOOL showIntroChallengeCard; @property (nonatomic) NSString *introChallengeCardTitle; @property (nonatomic) NSString *introChallengeCardDescription; @property (nonatomic) UIImage *introChallengeCardImage; @property (nonatomic) NSArray <GameData *> *gameDatas; @endSwift
class ChallengePersonalizationOptionBuilder : PersonalizationOptionBuilder
-
CreateChallengesViewControlleris the default implementation of the challenge selection screen to pick a game. It displays all available games and allows users to play to preview the game and change game difficulty. It allows allows the user to change a games difficulty if the game can change difficulty.Declaration
Objective-C
@interface CreateChallengesViewController : UIViewController <PersonalizationOptionViewControllerProtocol>Swift
class CreateChallengesViewController : UIViewController, PersonalizationOptionViewControllerProtocol
-
MoneyPersonalizationOption represents a Voucher customization which will be available to the user to add a monetary component to the MutableVoucher. Instantiate a MoneyPersonalizationOption if you would like the user to be able to add a monetary component to their Voucher. *
See moreDeclaration
Objective-C
@interface MoneyPersonalizationOption : PersonalizationOptionSwift
class MoneyPersonalizationOption : PersonalizationOption -
Undocumented
See moreDeclaration
Objective-C
@interface MoneyPersonalizationOptionBuilder : PersonalizationOptionBuilder @property (nonatomic) NSArray <Merchant *> *featuredMerchants; @property (nonatomic) NSDictionary <NSString *, NSString *> *countryAbbreviationsMap; @property (nonatomic) NSDictionary <NSString *, NSArray <Merchant *> *> *merchantsPerCountry; @endSwift
class MoneyPersonalizationOptionBuilder : PersonalizationOptionBuilder
-
Undocumented
See moreDeclaration
Objective-C
@interface AddNoteViewController : UIViewController /** Default instantiation method for `AddNoteViewController` @param personalizationOption - contains the configuration options for the note creation @param creationManager - the manager responsible for handling the flow management in the creation process. @param delegate - the object responsible for implementing CreateddTitleViewController callbacks @return an instance of CreateAddTitleViewController **/ + (instancetype)viewControllerWithPersonalizationOption:(PersonalizationOption *)personalizationOption notes:(NSArray<NoteMedia *> *)notes creationManager:(VoucherCreationManager *)creationManager delegate:(id<AddNoteViewControllerDelegate>)delegate; // TODO: RB - figure out what this does lol //- (void)setOriginatingImageView:(UIView *)imageView; @endSwift
class AddNoteViewController : UIViewController
-
NotePersonalizationOption represents a Voucher customization which will be available to the user to add notes in the VoucherCreationViewController. Instantiate a NotePersonalizationOption if you would like the user to be able to add notes to their Voucher. *
See moreDeclaration
Objective-C
@interface NotePersonalizationOption : PersonalizationOptionSwift
class NotePersonalizationOption : PersonalizationOption -
Undocumented
See moreDeclaration
Objective-C
@interface NotePersonalizationOptionBuilder : PersonalizationOptionBuilder @property (nonatomic) NSArray <NSString *> *fontNames; @property (nonatomic) NSArray <UIColor *> *fontColors; @property (nonatomic, strong) VouchrTheme *theme; @endSwift
class NotePersonalizationOptionBuilder : PersonalizationOptionBuilder
-
PersonalizationOption represents a Voucher customization which will be available to the user in the VoucherCreationViewController. A PersonalizationOption should exist for each personalization the user allowed access to.
Note
PersonalizationOption is used as a base class, instantiate an existing subclass (ex. PhotoPersonalizationOption) for use.See moreNote
Any properties that are not set will have default values set.Declaration
Objective-C
@interface PersonalizationOption : NSObjectSwift
class PersonalizationOption : NSObject -
Undocumented
See moreDeclaration
Objective-C
@interface PersonalizationOptionBuilder : NSObject @property (nonatomic) PersonalizationType type; @property (nonatomic) BOOL canAddMultiple; @property (strong, nonatomic) VouchrTheme *vouchrTheme; // carousel properties @property (nonatomic, strong) UIImage *carouselImage; @property (nonatomic, strong) NSString *carouselText; @property (nonatomic, strong) NSString *carouselOverlappingText; @property (nonatomic, strong) UIColor *carouselBackgroundColor; @endSwift
class PersonalizationOptionBuilder : NSObject
-
GoogleImageSearchAgent follows the SearchAgent protocol to get image’s from Google Custom Search. In increments of 10, it will return 100 or less images on a successful search, depending on the maxSearchResult property of the PhotoPersonalizationOption. It searches with safeSearch set to
See morehigh
. *Declaration
Objective-C
@interface GoogleImageSearchAgent : NSObject <SearchAgent>Swift
class GoogleImageSearchAgent : NSObject, SearchAgent
-
VouchrImageModelSearchViewController searches and displays images from a searchAgent source. *
See moreDeclaration
Objective-C
@interface VouchrImageMediaSearchViewController : UIViewController <PersonalizationOptionViewControllerProtocol>Swift
class VouchrImageMediaSearchViewController : UIViewController, PersonalizationOptionViewControllerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface FullScreenImageEditViewController : UIViewController + (instancetype)viewControllerWithImageMedia:(ImageMedia *)imageMedia vouchrTheme:(VouchrTheme *)vouchrTheme delegate:(id<FullScreenImageEditViewControllerDelegate>)delegate; @endSwift
class FullScreenImageEditViewController : UIViewController
-
PhotoPersonalizationOption represents a
See moreVouchercustomization that allows the user to add images to theirVoucher. Instantiate a PhotoPersonalizationOption and include it in theVoucherCreationViewControllersetup if you would like the user to be able to add photos. *Declaration
Objective-C
@interface PhotoPersonalizationOption : PersonalizationOptionSwift
class PhotoPersonalizationOption : PersonalizationOption -
Undocumented
See moreDeclaration
Objective-C
@interface PhotoPersonalizationOptionBuilder : PersonalizationOptionBuilder @property (nonatomic) BOOL allowPhotoEditing; @property (nonatomic) BOOL canUploadPhotos; @property (nonatomic) BOOL canTakePhotos; @property (nonatomic) BOOL canAddGoogleImages; @property (nonatomic, strong) VouchrTheme *takeAPhotoVouchrTheme; @property (nonatomic, strong) VouchrTheme *imageSelectorVouchrTheme; @property (nonatomic, strong) VouchrTheme *editImageVouchrTheme; @property (nonatomic, strong) NSArray <UIColor *> *imageBackgroundColors; @property (nonatomic, strong) NSArray <NSString *> *suggestedSearchTerms; @property (nonatomic) NSInteger maxSearchResults; @property (nonatomic) BOOL allowUserCustomSearch; @endSwift
class PhotoPersonalizationOptionBuilder : PersonalizationOptionBuilder
-
Undocumented
See moreDeclaration
Objective-C
@interface GiftTagViewController : UIViewController <PersonalizationOptionViewControllerProtocol> - (void)presentWithParentViewController:(UIViewController *)parentViewController; @endSwift
class GiftTagViewController : UIViewController, PersonalizationOptionViewControllerProtocol
-
RecipientPersonalizationOption represents a Voucher customization which will be available to the user to add a recipient to the MutableVoucher. Instantiate a RecipientPersonalizationOption if you would like the user to be able to add a recipient to their Voucher. *
See moreDeclaration
Objective-C
@interface RecipientPersonalizationOption : PersonalizationOptionSwift
class RecipientPersonalizationOption : PersonalizationOption -
Undocumented
See moreDeclaration
Objective-C
@interface RecipientPersonalizationOptionBuilder : PersonalizationOptionBuilder @property (nonatomic) BOOL canMakeItARace; @property (nonatomic) BOOL canChangeUnwrapDate; @property (nonatomic) BOOL canSendToEmail; @property (nonatomic) BOOL canSendToPhoneNumber; @property (nonatomic) VouchrPhoneNumberFormat phoneNumberFormat; @property (nonatomic) NSDictionary <NSString *, NSArray <User *> *> *userGroupsVouchersCanBeSentTo; @endSwift
class RecipientPersonalizationOptionBuilder : PersonalizationOptionBuilder
-
Undocumented
See moreDeclaration
Objective-C
@interface CreateAddTitleViewController : UIViewController <PersonalizationOptionViewControllerProtocol> /** Default instantiation method for CreateAddTitleViewController @param personalizationOption - contains the configuration options for the title creation @param createManager - the manager responsible for handling the flow management in the creation process. @param delegate - the object responsible for implementing CreateAddTitleViewController callbacks @return an instance of CreateAddTitleViewController **/ + (instancetype)viewControllerWithPersonalizationOption:(PersonalizationOption *)personalizationOption createManager:(VoucherCreationManager *)createManager createFlowDelegate:(id<VoucherCreationFlowDelegate>)createFlowDelegate delegate:(id<PersonalizationOptionViewControllerDelegate>)delegate; @endSwift
class CreateAddTitleViewController : UIViewController, PersonalizationOptionViewControllerProtocol
-
TitlePersonalizationOption represents a
See moreVouchercustomization which will allow users to title theirVoucher. Instantiate aTitlePersonalizationOptionand include it in theVoucherCreationViewControllersetup if you would like the user to be able to add a title to their Voucher. *Declaration
Objective-C
@interface TitlePersonalizationOption : PersonalizationOptionSwift
class TitlePersonalizationOption : PersonalizationOption -
Undocumented
See moreDeclaration
Objective-C
@interface TitlePersonalizationOptionBuilder : PersonalizationOptionBuilder @property (nonatomic) NSString *titleText; @property (nonatomic) NSInteger maxTitleLength; @property (nonatomic) NSString *placeholderText; @endSwift
class TitlePersonalizationOptionBuilder : PersonalizationOptionBuilder
-
VideoPersonalizationOption represents a Voucher customization which will be available to the user to add videos in the VoucherCreationViewController. Instantiate a VideoPersonalizationOption if you would like the user to be able to add videos to their Voucher. *
See moreDeclaration
Objective-C
@interface VideoPersonalizationOption : PersonalizationOptionSwift
class VideoPersonalizationOption : PersonalizationOption -
Undocumented
See moreDeclaration
Objective-C
@interface VideoPersonalizationOptionBuilder : PersonalizationOptionBuilder @property (nonatomic) BOOL canAddYoutubeVideos; @property (nonatomic) BOOL canTakeVideo; @property (nonatomic) BOOL canSearchYoutube; @property (nonatomic) BOOL canClipYoutube; @property (nonatomic) NSInteger maxVideoLength; @property (nonatomic) NSInteger maxVideoSize; @property (nonatomic) NSInteger videoCompressionLevel; @property (nonatomic) NSInteger maxYoutubeSearchResults; @endSwift
class VideoPersonalizationOptionBuilder : PersonalizationOptionBuilder
-
Undocumented
See moreDeclaration
Objective-C
@interface WrappingPersonalizationOption : PersonalizationOptionSwift
class WrappingPersonalizationOption : PersonalizationOption -
Undocumented
See moreDeclaration
Objective-C
@interface WrappingPersonalizationOptionBuilder : PersonalizationOptionBuilder @property (nonatomic, strong) NSArray <WrappingPaperCategory *> *wrappingCategories; @property (nonatomic, strong) NSArray <WrappingPaper *> *searchSuggestions; @property (nonatomic) NSString *titleText; @property (nonatomic) NSString *searchHintFooterLabelText; @property (nonatomic) BOOL canUploadPhotos; @property (nonatomic) BOOL canSearch; @endSwift
class WrappingPersonalizationOptionBuilder : PersonalizationOptionBuilder
-
This personalization screen allows users to browse and select WrappingPapers for their
See moreVoucher*Declaration
Objective-C
@interface WrappingViewController : UIViewController <PersonalizationOptionViewControllerProtocol>Swift
class WrappingViewController : UIViewController, PersonalizationOptionViewControllerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface VoucherCreationFlowCoordinator : NSObject /** Delegate methods called throughout the create process to allow for additional actions and screens to take place @note Default is nil. */ @property (weak, nonatomic) _Nullable id<VoucherCreationFlowDelegate> delegate; + (nonnull instancetype)voucherCreationFlowCoordinatorWithManager:(VoucherCreationManager *)manager vouchrTheme:(VouchrTheme *)vouchrTheme delegate:(id<VoucherCreationFlowDelegate>)delegate; - (void)startFlowOnViewController:(UIViewController *)viewController personalizationOptions:(NSArray <PersonalizationOption *> *)personalizationOptions; @endSwift
class VoucherCreationFlowCoordinator : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface CreationItemImageView : YYAnimatedImageViewSwift
class CreationItemImageView : YYAnimatedImageView
-
Undocumented
See moreDeclaration
Objective-C
@interface EditVoucherContentsViewController : UIViewController <EditVoucherContentsViewControllerProtocol> + (instancetype)viewControllerWithCreationItems:(NSMutableArray<CreationItemImageView *> *)creationItems giftCardLabel:(NSString *)formattedVoucherMoneyAmount vouchrTheme:(VouchrTheme *)vouchrTheme trackManager:(id<VOTrackManagerProtocol>)trackManager delegate:(id<EditVoucherContentsViewControllerDelegate>)delegate; @endSwift
class EditVoucherContentsViewController : UIViewController, EditVoucherContentsViewControllerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@interface VoucherCreationManager : NSObject /** The voucher that is being created. This will be modified throughout the create process via any personalizations. It will be become a `Voucher` at the end of the create process. @remark Default is a new, empty voucher. */ @property (strong, nonatomic, readonly) MutableVoucher *mutableVoucher; /** Used throughout the create flow to facilitate network calls. @note Default is nil. */ @property (weak, nonatomic, readonly) id<VONetworkManagerProtocol> networkManager; /** An instance of `GiftManager` used to create and activate the mutableVoucher. @note Default is nil. */ @property (weak, nonatomic, readonly) id<VOGiftManagerProtocol> giftManager; /** Analytics manager used to track events throughout the create flow. @note Default is nil. */ @property (weak, nonatomic, readonly) id<VOTrackManagerProtocol> trackManager; /** User manager used to login, get users. @note Default is nil. */ @property (weak, nonatomic, readonly) id<VOUserManagerProtocol> userManager; /** Game Manager used to retrieve games. @note Default is nil. */ @property (weak, nonatomic, readonly) id<VOGameManagerProtocol> gameManager; /** Used to fetch wrapping papers that the user can use to personalize their voucher. @note Default is nil. */ @property (weak, nonatomic, readonly) id<VOWrappingPaperManagerProtocol> wrappingPaperManager; /*! @brief Merchant manager is used to display merchants that the user can purchase gift cards from. @remark Default is nil. */ @property (weak, nonatomic, readonly) id<VOMerchantManagerProtocol> merchantManager; /** Youtube manager is used to display Youtube videos that the user can select. @note Default is nil. */ @property (weak, nonatomic, readonly) id<VOYoutubeManagerProtocol> youtubeManager; /** A Fullscreen loading view that will be displayed when user interaction needs to be blocked during load time. @note Default is a UIActivityIndicator with a semi-transparent overlay. */ @property (strong, nonatomic, readonly) UIView <VouchrLoadingViewProtocol> *fullScreenLoadingView; /** Colours shown in the background of the create screen. Colors are cycled based on wrapping paper selection. After a wrapping paper is chosen, the color closest to the wrapping paper is set as the new background color. @note Default colors are: Red: #E86963, Orange: #FFAD76, Yellow: #FFDA67, Green: #77E097, Teal: #2FCCAD, Navy Blue: #509CDE, Purple: #9372FF Pass in an empty array for no color. */ @property (strong, nonatomic, readonly) NSArray <UIColor *> *voucherCreationBackgroundColors; /** Array of colours that is shown in the background of the create screen. After a wrapping paper is chosen, the color with the closest average color in the wrapping paper will be chosen from the Array. @note Default list consists of a single color; white. */ @property (strong, nonatomic, readonly) NSArray <UIColor *> *creationItemBorderColors; /** The border width shown on the items dropped into the envelope. @note Default is 7 px. */ @property (nonatomic, readonly) CGFloat creationItemBorderWidth; /** The text shown if the create carousel is emptied (all personalizations completed by the user). @note Default text is localized 'Your SURPRiiSE looks awesome!'. */ @property (nonatomic, readonly) NSString *carouselEmptiedText; /** Specifies whether recipient information is required to be entered before sending a Voucher. @note Default is YES. */ @property (nonatomic, readonly) BOOL recipientRequired; /** Specifies whether a summary screen should be displayed when no monetary value is included in the voucher. @note The summary screen displays a breakdown of the price and payment @note Default is NO */ @property (nonatomic, readonly) BOOL alwaysShowFullSummaryScreen; /** Minimum number of customizations required before allowing the voucher to be created @note Default is 1 */ @property (nonatomic, readonly) NSInteger minimumNumberOfCustomizations; /** Specifies whether vouchers must include a monetary amount. @note Default is YES */ @property (nonatomic, readonly) BOOL allowFreeGifts; /** The `VouchrTheme` for the default summary screen if it is used. If not set, the global `VouchrConfig` `VouchrTheme` will be used. @note Default is nil. */ @property (nonatomic, readonly) VouchrTheme *defaultSummaryScreenTheme; /** Default initializer for VoucherCreationManager. @param builderBlock - block containing builder object used to configure properties in VoucherCreationManager. Set desired properties on this builder. @return instance of VoucherCreationManager */ + (instancetype)voucherCreationManagerWithBuilder:(void (^)(VoucherCreationManagerBuilder *))builderBlock; @endSwift
class VoucherCreationManager : NSObject -
Undocumented
See moreDeclaration
Objective-C
@interface VoucherCreationManagerBuilder : NSObject @property (nonatomic) MutableVoucher *mutableVoucher; @property (weak, nonatomic) id<VONetworkManagerProtocol> networkManager; @property (weak, nonatomic) id<VOGiftManagerProtocol> giftManager; @property (weak, nonatomic) id<VOTrackManagerProtocol> trackManager; @property (weak, nonatomic) id<VOUserManagerProtocol> userManager; @property (weak, nonatomic) id<VOGameManagerProtocol> gameManager; @property (weak, nonatomic) id<VOWrappingPaperManagerProtocol> wrappingPaperManager; @property (weak, nonatomic) id<VOMerchantManagerProtocol> merchantManager; @property (weak, nonatomic) id<VOYoutubeManagerProtocol> youtubeManager; @property (strong, nonatomic) UIView <VouchrLoadingViewProtocol> *fullScreenLoadingView; @property (strong, nonatomic) NSArray <UIColor *> *voucherCreationBackgroundColors; @property (strong, nonatomic) NSArray <UIColor *> *creationItemBorderColors; @property (nonatomic) CGFloat creationItemBorderWidth; @property (nonatomic) NSString *carouselEmptiedText; @property (nonatomic) BOOL recipientRequired; @property (nonatomic) BOOL alwaysShowFullSummaryScreen; @property (nonatomic) NSInteger minimumNumberOfCustomizations; @property (nonatomic) BOOL allowFreeGifts; @property (nonatomic) VouchrTheme *defaultSummaryScreenTheme; @endSwift
class VoucherCreationManagerBuilder : NSObject
-
The ‘VoucherCreationViewController’ is the screen responsible for presenting all personalization options and provides visual feedback for alterations to the
See moreVoucher. This screen contains the carousel of personalization options at the top and the envelope containing the personalizations below. *Declaration
Objective-C
@interface VoucherCreationViewController : UIViewControllerSwift
class VoucherCreationViewController : UIViewController
-
Undocumented
See moreDeclaration
Objective-C
@interface ButtonTheme : NSObject <NSCopying> @property (nonatomic) FontTheme *fontTheme; @property (nonatomic) UIColor *backgroundColor; @property (nonatomic) CGFloat borderWidth; @property (nonatomic) UIColor *borderColor; @property (nonatomic) CGFloat minWidth; @property (nonatomic) CGFloat height; @property (nonatomic) CGFloat cornerRadius; @property (nonatomic) CGSize shadowOffset; @property (nonatomic) CGFloat shadowOpacity; @property (nonatomic) CGFloat shadowRadius; @property (nonatomic) UIColor *shadowColor; + (instancetype)basePositiveButtonTheme; + (instancetype)baseNegativeButtonTheme; + (instancetype)baseNeutralButtonTheme; @endSwift
class ButtonTheme : NSObject, NSCopying
-
Undocumented
See moreDeclaration
Objective-C
@interface FontTheme : NSObject <NSCopying> @property (nonatomic) UIColor *color; @property (nonatomic) UIColor *alternateColor; @property (nonatomic) UIFont *font; // TODO: rb - add font size modifier + (instancetype)fontThemeWithFont:(UIFont *)font color:(UIColor *)color; @endSwift
class FontTheme : NSObject, NSCopying
-
VouchrTheme is used to theme all views of the application. See the VouchrStyleGuide for how the theming is mapped to each view and style recommendations.
See moreDeclaration
Objective-C
@interface VouchrTheme : NSObject <NSCopying>Swift
class VouchrTheme : NSObject, NSCopying
-
VouchrActionSheetItem represents one item inside a VouchrActionSheetViewController. *
See moreDeclaration
Objective-C
@interface VouchrActionSheetItem : NSObjectSwift
class VouchrActionSheetItem : NSObject
-
VouchrActionSheetViewController is a custom action sheet used by the SDK. It works similarly to a UIAlertController with style UIAlertControllerStyleActionSheet. Each action sheet item is an action in the controller. If there are too many actions to fit on screen, the actions will become scrollable. A cancel action is automatically added. *
See moreDeclaration
Objective-C
@interface VouchrActionSheetViewController : UIViewControllerSwift
class VouchrActionSheetViewController : UIViewController
Classes Reference