-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
perisicboro
authored and
perisicboro
committed
Jul 19, 2016
1 parent
8dc8468
commit 03114b6
Showing
393 changed files
with
2,313 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/PrintIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Resources |
33 changes: 33 additions & 0 deletions
33
PrintIO.framework/Versions/A/Headers/GTAnalyticsDelegate.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// GTAnalyticsDelegate.h | ||
// PrintIO | ||
// | ||
// Created by Boro Perisic on 3/11/16. | ||
// Copyright © 2016 Gooten. All rights reserved. | ||
// | ||
#import "GTAnalyticsEvent.h" | ||
#import "GTAnalyticsScreen.h" | ||
|
||
@protocol GTAnalyticsDelegate <NSObject> | ||
|
||
/** | ||
Fires an event | ||
*/ | ||
-(void)gtAnalyticsOnEvent:(GTAnalyticsEvent *)event; | ||
|
||
/** | ||
Tracks duration of event | ||
*/ | ||
-(void)gtAnalyticsOnTimedEvent:(GTAnalyticsEvent *)event; | ||
|
||
/** | ||
Timed event is finished | ||
*/ | ||
-(void)gtAnalyticsOnEndTimedEvent:(GTAnalyticsEvent *)event; | ||
|
||
/** | ||
Tracks on which screen user has landed | ||
*/ | ||
-(void)gtAnalyticsOnEnterScreen:(GTAnalyticsScreen *)screen; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// | ||
// GTEvent.h | ||
// PrintIO | ||
// | ||
// Created by Boro Perisic on 3/11/16. | ||
// Copyright © 2016 Gooten. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
// tracks time spent on screens | ||
extern NSString *const kGTEventEnterCheckout; // captures time spent on Checkout screen | ||
extern NSString *const kGTEventEnterCreditCard; // captures time spent on Credit Card screen | ||
extern NSString *const kGTEventEnterCustomization; // captures time spent on Product Customization | ||
extern NSString *const kGTEventEnterHomeScreen; // captures time spent on home screen | ||
extern NSString *const kGTEventEnterImageEditor; // captures time spent on Image Editor screen | ||
extern NSString *const kGTEventEnterProductDetails; // captures time spent on product details screen | ||
extern NSString *const kGTEventEnterSideMenu; // captures time spent in side menu | ||
extern NSString *const kGTEventEnterShoppingCart; // captures time spent on Shopping Cart screen | ||
|
||
// events | ||
extern NSString *const kGTEventApplyPromoCode; // tracks when user taps on Apply promo code in Shopping cart | ||
extern NSString *const kGTEventBackToHome; // tracks when backs from category to home screen | ||
extern NSString *const kGTEventCartQuantity; // tracks when user changes quantity of product | ||
extern NSString *const kGTEventChooseFromContacts; // tracks when user taps on 'Choose from contacts' button | ||
extern NSString *const kGTEventCouponCode; // tracks applied coupon code | ||
extern NSString *const kGTEventCustomizeProductImageEffects; // tracks when user taps on Image Effects | ||
extern NSString *const kGTEventCustomizeProductChangeTemplate; // tracks when user changes product template | ||
extern NSString *const kGTEventCustomizeProductShuffleImages; // tracks when user shuffles images | ||
extern NSString *const kGTEventCustomizeProductBackground; // tracks when user taps to change product's background color | ||
extern NSString *const kGTEventCustomizeProductAddMorePhotos; // tracks when user taps on 'Add more photos' (plus) button | ||
extern NSString *const kGTEventCustomizeProductAutoArrangePhotos; // tracks when user selects 'Auto Arrange' photos option | ||
extern NSString *const kGTEventCustomizeProductManualArrangePhotos; // tracks when user selects 'Manual Arrange' photos option | ||
extern NSString *const kGTEventDeleteProduct; // tracks when user deletes product (with value, productId) | ||
extern NSString *const kGTEventDeviceModel; // tracks device model | ||
extern NSString *const kGTEventDeviceVersion; // tracks device ios verion | ||
extern NSString *const kGTEventEnterPromoCode; // tracks when user taps on Promo code button in Shopping cart | ||
extern NSString *const kGTEventHomeChangeShippingCountry; // tracks if shipping country is changed under home screen | ||
extern NSString *const kGTEventHomeHeroSwipes; // tracks if user swipes through all products listed in hero | ||
extern NSString *const kGTEventHomeHeroProductSelected; // tracks selected product inside hero (value, productid) | ||
extern NSString *const kGTEventHomeCategorySelected; // tracks selected category inside Home screen (value, catId) | ||
extern NSString *const kGTEventLikeUs; // tracks when user taps on 'Like Us' on Facebook button | ||
extern NSString *const kGTEventKeepShopping; // tracks tap on Keep Shopping button in Shopping cart | ||
extern NSString *const kGTEventMakeIt; // tracks when user taps on 'Make It' button with product id | ||
extern NSString *const kGTEventOrderStatusView; // tracks when user tap on View Order Status inside Order Status screen | ||
extern NSString *const kGTEventPayWithPayPal; // tracks when user uses PayPal payment option | ||
extern NSString *const kGTEventPayWithCreditCard; // tracks when user uses Credit Card payment option | ||
extern NSString *const kGTEventPayWithApplePay; // tracks when user uses ApplePay payment option | ||
extern NSString *const kGTEventPayeeName; // tracks payee name | ||
extern NSString *const kGTEventPlaceOrder; // track when user place an order | ||
extern NSString *const kGTEventRateApp; // tracks when user taps on 'Rate App' button | ||
extern NSString *const kGTEventRemoveItem; // tracks when user taps on Remove item button in Shopping cart | ||
extern NSString *const kGTEventRecipeId; // tracks partner's recipeId | ||
extern NSString *const kGTEventRevenue; // tracks revenue | ||
extern NSString *const kGTEventSaveAddress; // tracks when user taps on Save Address button | ||
extern NSString *const kGTEventSearchProduct; // tracks search productId | ||
extern NSString *const kGTEventSideMenuSelectPhotoSource; // selected photo source under side menu (with value) | ||
extern NSString *const kGTEventSideMenuCurrencyChanged; // tracks when currency is changed (value, currency code) | ||
extern NSString *const kGTEventSideMenuCountryChanged; // tracks when county has beed changed inside side menu (value, country code) | ||
extern NSString *const kGTEventSideMenuTapOnContactUs; // tracks when user taps on 'Contact Us' under Information section | ||
extern NSString *const kGTEventSideMenuTapOnQualityGuarantee; // tracks when user taps on 'Quality Guarantee' under Information section | ||
extern NSString *const kGTEventSideMenuTapOnOrderStatus; // tracks when user taps on 'Order Status' under Information section | ||
extern NSString *const kGTEventSideMenuTapOnPastOrders; // tracks when user taps on 'Past Orders' under Information section | ||
extern NSString *const kGTEventSideMenuTapOnHowItWorks; // tracks when user taps on 'How It Works' under Information section | ||
extern NSString *const kGTEventSideMenuTapOnAboutUs; // tracks when user taps on 'About Us' under Information section | ||
extern NSString *const kGTEventSideMenuTapOnHelp; // tracks when user taps on 'Help' under Information section | ||
extern NSString *const kGTEventSideMenuTapOnExit; // tracks when user taps on Exit button under Side Menu | ||
extern NSString *const kGTEventShareApp; // tracks when user taps on 'Share' App button | ||
extern NSString *const kGTEventSKUSelected; // tracks sku of selected product which will be customized | ||
extern NSString *const kGTEventTextFeature; // tracks when user enters text on product | ||
extern NSString *const kGTEventUseShippingAddress;// tracks when user sets Shipping Address as Billing Address under Credit Card screen | ||
|
||
// MULTIPLE COUPONS SUPPORT - TODO | ||
|
||
@interface GTAnalyticsEvent : NSObject | ||
|
||
@property (nonatomic, strong) NSString *name; | ||
@property (nonatomic, strong) id value; | ||
|
||
-(instancetype)initWithName:(NSString *)name value:(id)value; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// GTAnalyticsScreen.h | ||
// PrintIO | ||
// | ||
// Created by Boro Perisic on 3/11/16. | ||
// Copyright © 2016 Gooten. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
extern NSString *const kGTScreenAboutUs; | ||
extern NSString *const kGTScreenAddAddress; | ||
extern NSString *const kGTScreenAddressValidation; | ||
extern NSString *const kGTScreenChooseCountry; | ||
extern NSString *const kGTScreenChooseCurrency; | ||
extern NSString *const kGTScreenColorPicker; | ||
extern NSString *const kGTScreenCustomizeProduct; | ||
extern NSString *const kGTScreenCustomizeProductLandscape; | ||
extern NSString *const kGTScreenCustomizeProductList; | ||
extern NSString *const kGTScreenHome; | ||
extern NSString *const kGTScreenHowItWorks; | ||
extern NSString *const kGTScreenImageEditor; | ||
extern NSString *const kGTScreenImagePreview; | ||
extern NSString *const kGTScreenOrderCompleted; | ||
extern NSString *const kGTScreenOrderHistory; | ||
extern NSString *const kGTScreenOrderStatus; | ||
extern NSString *const kGTScreenPayment; | ||
extern NSString *const kGTScreenPhotoSources; | ||
extern NSString *const kGTScreenProductDetails; | ||
extern NSString *const kGTScreenQualityGuarantee; | ||
extern NSString *const kGTScreenSelectAddress; | ||
extern NSString *const kGTScreenSelectColor; | ||
extern NSString *const kGTScreenSideMenu; | ||
extern NSString *const kGTScreenShipmentReview; | ||
extern NSString *const kGTScreenShoppingCart; | ||
|
||
@interface GTAnalyticsScreen : NSObject | ||
|
||
@property (nonatomic, strong) NSString *name; | ||
|
||
-(instancetype)initWithName:(NSString *)name; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// PIOButton.h | ||
// PrintIO | ||
// | ||
// Created by Tengai on 4/2/14. | ||
// Copyright (c) 2014 PrintIO. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
#import "PIOPublicConstants.h" | ||
|
||
@interface PIOButton : NSObject | ||
|
||
@property (nonatomic, strong) NSString *title; | ||
@property (nonatomic, assign) NSInteger type; | ||
|
||
@property (nonatomic, strong) UIColor *titleColor; | ||
@property (nonatomic, strong) UIColor *iconColor; | ||
|
||
- (id)initWithType:(PIOSideMenuButtons)sType; | ||
|
||
@end |
29 changes: 29 additions & 0 deletions
29
PrintIO.framework/Versions/A/Headers/PIODefaultPhotoSource.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// PIODefaultPhotoSource.h | ||
// PrintIO | ||
// | ||
// Created by Boro Perisic Bocas on 1/14/15. | ||
// Copyright (c) 2015 HelloPics. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "PIOPhotoSource.h" | ||
|
||
@interface PIODefaultPhotoSource : NSObject<PIOPhotoSource> | ||
|
||
/* SessionManager is a class that manages session objects. It's key-value based and each photo source will | ||
* hold an instance of the shared sessionManager instance. This property value will be assigned right after the SelectPhotos screen appears. | ||
*/ | ||
@property(nonatomic, strong) PIOSessionManager* sessionManager; | ||
|
||
// fetch image | ||
-(void)fetchConcreteImageForItem:(id<PIOPhotoSourceItem>)item thumbnail:(BOOL)thumbnail withCompletionHandler:(PIOImageDownloadCompletionHandler)imageFetchCompletionHandle; | ||
|
||
// caching | ||
-(BOOL)shouldUseCachedImageForItem:(id<PIOPhotoSourceItem>)item; | ||
-(BOOL)shouldCacheImageForItem:(id<PIOPhotoSourceItem>)item; | ||
|
||
// override | ||
|
||
-(void)requestConcreteItems:(NSMutableArray*)items forItem:(id<PIOPhotoSourceItem>)item inScope:(id<PIOPhotoSourceItem>)currentScope page:(NSUInteger)page count:(NSUInteger)count withCompletionHandler:(PIOItemsCompletionHandler)completionHandler errorHandler:(PIOPhotoSourceErrorHandler)errorHandler; | ||
@end |
21 changes: 21 additions & 0 deletions
21
PrintIO.framework/Versions/A/Headers/PIODefaultPhotoSourceItem.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// DefaultPhotoSourceItem.h | ||
// PrintIO | ||
// | ||
// Created by Boro Perisic Bocas on 1/14/15. | ||
// Copyright (c) 2015 HelloPics. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "PIOPhotoSourceItem.h" | ||
#import "PIOPhotoSourceItemImageDownloader.h" | ||
|
||
@interface PIODefaultPhotoSourceItem : NSObject<PIOPhotoSourceItem> | ||
|
||
@property(nonatomic, strong) NSDictionary* userInfo; | ||
|
||
-(void)setImageDownloader:(id<PIOImageDownloader>)imageDownloader; | ||
|
||
-(BOOL)shouldUseCachedImage; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
// | ||
// PhotoSource.h | ||
// PrintIO | ||
// | ||
// Created by Boro Perisic Bocas on 12/26/14. | ||
// Copyright (c) 2014 HelloPics. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
#import "PIOPhotoSourceItem.h" | ||
#import "PIOPhotoSourceError.h" | ||
#import "PIOSessionManager.h" | ||
|
||
typedef void(^PIOPhotoSourceErrorHandler)(PIOPhotoSourceError*); | ||
typedef void(^PIOItemsCompletionHandler)(NSArray*); | ||
typedef void(^PIOImageDownloadCompletionHandler)(UIImage*); | ||
|
||
@protocol PIOPhotoSource <NSObject> | ||
|
||
-(void)requestPhotoSourceItemsForItem:(id<PIOPhotoSourceItem>)item | ||
currentScope:(id<PIOPhotoSourceItem>)currentScope | ||
count:(NSUInteger)count | ||
page:(NSUInteger)page | ||
withCompletionHandler:(PIOItemsCompletionHandler)completionHandler | ||
errorHandler:(PIOPhotoSourceErrorHandler)errorHandler; | ||
|
||
|
||
/** | ||
Image icon path to be displayed for the photo source button. | ||
*/ | ||
-(NSString*)buttonIconPath; | ||
|
||
/** | ||
Title to be displayed for the photo source button. | ||
*/ | ||
-(NSString*)title; | ||
|
||
|
||
-(void)fetchImageForItem:(id<PIOPhotoSourceItem>)item | ||
thumbnail:(BOOL)isThumbnail | ||
withCompletionHandler:(void(^)(UIImage*))imageFetchCompletionHandler; | ||
|
||
@optional | ||
|
||
/* ******************* PAGING ******************* */ | ||
/** Whether the photo source supports paging | ||
NO is default | ||
*/ | ||
|
||
-(BOOL)supportsPagingInScope:(id<PIOPhotoSourceItem>)item; | ||
|
||
-(NSUInteger)maximumPageSize; | ||
|
||
/* ******************* CACHING ******************* */ | ||
|
||
// Default: YES | ||
-(BOOL)shouldCacheImageForItem:(id<PIOPhotoSourceItem>)item; | ||
|
||
// Default: YES | ||
-(BOOL)shouldUseCachedImageForItem:(id<PIOPhotoSourceItem>)item; | ||
|
||
/* ******************* SESSION ******************* */ | ||
|
||
-(void)setSessionManager:(PIOSessionManager*)sessionManager; | ||
|
||
/* ******************* UI ******************* */ | ||
|
||
// Collection view | ||
-(BOOL)usesCustomCellForItem:(id<PIOPhotoSourceItem>)item; | ||
-(BOOL)shouldSetupCellForItem:(id<PIOPhotoSourceItem>)item; | ||
-(void)setupCollectionView:(UICollectionView*)collectionView; | ||
|
||
-(UICollectionViewCell*)collectionView:(UICollectionView*)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath forItem:(id<PIOPhotoSourceItem>)item; | ||
|
||
-(void)setupCollectionViewCell:(UICollectionViewCell*)cell forItem:(id<PIOPhotoSourceItem>)item withImage:(UIImage*)image; | ||
|
||
-(void)cell:(UICollectionViewCell*)cell toggleSelection:(BOOL)selected withIndex:(NSUInteger)index; | ||
|
||
// Size warnings | ||
|
||
/** | ||
Returns the full size of a non-thumbnail image. Will be called only for image items. | ||
Image size will be compared to product template size and | ||
show image warnings if the image is too small. | ||
If implementation of this method is omitted, size warnings | ||
wont be displayed for this photo source. | ||
*/ | ||
-(CGSize)imageFullSizeForItem:(id<PIOPhotoSourceItem>)item; | ||
|
||
/* ******************* AUTH ******************* */ | ||
|
||
/* Implement this method if you support authentication | ||
* Clear all session data(logout). | ||
*/ | ||
|
||
-(void)invalidateSessionData; | ||
|
||
/** | ||
If your photo source doesn't require authentication, you don't have to implement this method. | ||
Returns YES if photo source is authenticated, NO otherwise. In this method, you should check whether the session is valid. | ||
If the photo source isn't authed, -authViewController message will be sent to the photo source. | ||
If the photo IS authed, -requestPhotoSourceItemsForItem:currentScope:withCompletionHandler:errorHandler: will be called with nil item | ||
*/ | ||
-(BOOL)isAuthed; | ||
|
||
/** | ||
Asynchronous authentication method in case you have to check whether the session is valid asynchronously | ||
*/ | ||
|
||
-(void)isAuthedAsync:(void(^)(BOOL))authHandler; | ||
|
||
/** | ||
If your photo source doesn't require authentication, you don't have to implement this method. | ||
Returns ViewController that will be displayed modally after the photo source button is tapped in case the photo source | ||
isn't authenticated. | ||
If the photo source requires authentication and the method isn't implemented or returns nil, the error message will be displayed saying | ||
photo source can't be displayed at that particular moment. | ||
*/ | ||
-(UIViewController*)authViewController; | ||
-(void)authViewControllerAsync:(void(^)(UIViewController*))authViewControllerHandler; | ||
|
||
/** | ||
Side menu button icon. | ||
Button displayed will give user an ability to logout from a certain photo source. | ||
*/ | ||
-(UIImage*)sideMenuButtonIcon; | ||
|
||
/** | ||
Set custom identifier to photo source. Usually used for custom photo sources, | ||
in combination with method 'setDefaultPhotoSource' | ||
*/ | ||
-(NSNumber *)customID; | ||
|
||
@end |
Oops, something went wrong.