Commit 49cae34f by Rune Madsen

Merge pull request #26 from Shopify/develop

1.2.1 Release
parents e6b482d0 04b442c2
Ibuild/*
*/Output/*
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
......@@ -9,14 +16,16 @@ Ibuild/*
*.perspectivev3
!default.perspectivev3
xcuserdata
## Other
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
Pods/
.DS_Store
*.xcscmblueprint
.ruby-version
*Sample*/Buy.framework
*-INTERNAL.*
## Obj-C/Swift specific
*.hmap
*.ipa
......@@ -10,12 +10,13 @@
902C9B8C1BB06BF300FC456E /* GetShopOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 902C9B8B1BB06BF300FC456E /* GetShopOperation.m */; settings = {ASSET_TAGS = (); }; };
902C9B8F1BB0729F00FC456E /* ShippingRateTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 902C9B8E1BB0729F00FC456E /* ShippingRateTableViewCell.m */; settings = {ASSET_TAGS = (); }; };
902C9B921BB08FF500FC456E /* SummaryItemsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 902C9B911BB08FF500FC456E /* SummaryItemsTableViewCell.m */; settings = {ASSET_TAGS = (); }; };
9066573C1BA8BC6E004F6FED /* Buy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9066573A1BA8B4AC004F6FED /* Buy.framework */; };
9079F5F41BB1AAA100CB1B35 /* CollectionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9079F5F31BB1AAA100CB1B35 /* CollectionListViewController.m */; settings = {ASSET_TAGS = (); }; };
90A6F42D1BA8BCAC003E7C4F /* PassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90A6F42C1BA8BCAC003E7C4F /* PassKit.framework */; };
90B2623E1BB0A47B006D888F /* ProductViewControllerThemeStyleTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90B2623D1BB0A47B006D888F /* ProductViewControllerThemeStyleTableViewCell.m */; settings = {ASSET_TAGS = (); }; };
90B262411BB0A726006D888F /* ProductViewControllerToggleTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90B262401BB0A726006D888F /* ProductViewControllerToggleTableViewCell.m */; settings = {ASSET_TAGS = (); }; };
90B262441BB18B10006D888F /* ProductViewControllerThemeTintColorTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90B262431BB18B10006D888F /* ProductViewControllerThemeTintColorTableViewCell.m */; settings = {ASSET_TAGS = (); }; };
BE3437A21BC5C19D00C71330 /* Buy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE34379F1BC5C18400C71330 /* Buy.framework */; };
BE3437A31BC5C19D00C71330 /* Buy.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BE34379F1BC5C18400C71330 /* Buy.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
BE8B82511B8CF49D00E3F871 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BE8B82501B8CF49D00E3F871 /* main.m */; };
BE8B82541B8CF49D00E3F871 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BE8B82531B8CF49D00E3F871 /* AppDelegate.m */; };
BE8B82571B8CF49D00E3F871 /* ProductListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE8B82561B8CF49D00E3F871 /* ProductListViewController.m */; };
......@@ -29,6 +30,65 @@
BE948D4D1B95087A009AB20B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BE948D4C1B95087A009AB20B /* Images.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
BE3437981BC5C18400C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE34378F1BC5C18400C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 90F7BA681B0D1DAF0067864D;
remoteInfo = Playground;
};
BE34379A1BC5C18400C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE34378F1BC5C18400C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 90F592EC1B0D5EFE0026B382;
remoteInfo = "Mobile Buy SDK Tests";
};
BE34379C1BC5C18400C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE34378F1BC5C18400C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BE9A64281B503C2F0033E558;
remoteInfo = Buy;
};
BE34379E1BC5C18400C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE34378F1BC5C18400C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 901931701BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
BE3437A01BC5C18F00C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE34378F1BC5C18400C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 901930E11BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
BE3437A41BC5C19D00C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE34378F1BC5C18400C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 901930E11BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
BE3437A61BC5C19D00C71330 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
BE3437A31BC5C19D00C71330 /* Buy.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
902C9B8A1BB06BF300FC456E /* GetShopOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GetShopOperation.h; sourceTree = "<group>"; };
902C9B8B1BB06BF300FC456E /* GetShopOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GetShopOperation.m; sourceTree = "<group>"; };
......@@ -36,7 +96,6 @@
902C9B8E1BB0729F00FC456E /* ShippingRateTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShippingRateTableViewCell.m; sourceTree = "<group>"; };
902C9B901BB08FF500FC456E /* SummaryItemsTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SummaryItemsTableViewCell.h; sourceTree = "<group>"; };
902C9B911BB08FF500FC456E /* SummaryItemsTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SummaryItemsTableViewCell.m; sourceTree = "<group>"; };
9066573A1BA8B4AC004F6FED /* Buy.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Buy.framework; path = ../Buy.framework; sourceTree = "<group>"; };
9079F5F21BB1AAA100CB1B35 /* CollectionListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionListViewController.h; sourceTree = "<group>"; };
9079F5F31BB1AAA100CB1B35 /* CollectionListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CollectionListViewController.m; sourceTree = "<group>"; };
90A6F42C1BA8BCAC003E7C4F /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; };
......@@ -46,6 +105,7 @@
90B262401BB0A726006D888F /* ProductViewControllerToggleTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductViewControllerToggleTableViewCell.m; sourceTree = "<group>"; };
90B262421BB18B10006D888F /* ProductViewControllerThemeTintColorTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductViewControllerThemeTintColorTableViewCell.h; sourceTree = "<group>"; };
90B262431BB18B10006D888F /* ProductViewControllerThemeTintColorTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductViewControllerThemeTintColorTableViewCell.m; sourceTree = "<group>"; };
BE34378F1BC5C18400C71330 /* Mobile Buy SDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "Mobile Buy SDK.xcodeproj"; path = "../../Mobile Buy SDK/Mobile Buy SDK.xcodeproj"; sourceTree = "<group>"; };
BE5E28451B94F5C300D2ECB5 /* Mobile Buy SDK Advanced Sample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Mobile Buy SDK Advanced Sample.entitlements"; sourceTree = "<group>"; };
BE8B824B1B8CF49D00E3F871 /* Mobile Buy SDK Advanced Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mobile Buy SDK Advanced Sample.app"; sourceTree = BUILT_PRODUCTS_DIR; };
BE8B824F1B8CF49D00E3F871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
......@@ -75,7 +135,7 @@
buildActionMask = 2147483647;
files = (
90A6F42D1BA8BCAC003E7C4F /* PassKit.framework in Frameworks */,
9066573C1BA8BC6E004F6FED /* Buy.framework in Frameworks */,
BE3437A21BC5C19D00C71330 /* Buy.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -99,11 +159,22 @@
name = "Table View Cells";
sourceTree = "<group>";
};
BE3437901BC5C18400C71330 /* Products */ = {
isa = PBXGroup;
children = (
BE3437991BC5C18400C71330 /* Playground.app */,
BE34379B1BC5C18400C71330 /* Mobile Buy SDK Tests.xctest */,
BE34379D1BC5C18400C71330 /* Buy.framework */,
BE34379F1BC5C18400C71330 /* Buy.framework */,
);
name = Products;
sourceTree = "<group>";
};
BE8B82421B8CF49D00E3F871 = {
isa = PBXGroup;
children = (
BE34378F1BC5C18400C71330 /* Mobile Buy SDK.xcodeproj */,
90A6F42C1BA8BCAC003E7C4F /* PassKit.framework */,
9066573A1BA8B4AC004F6FED /* Buy.framework */,
BE8B824D1B8CF49D00E3F871 /* Mobile Buy SDK Advanced Sample */,
BE8B824C1B8CF49D00E3F871 /* Products */,
);
......@@ -183,10 +254,13 @@
BE8B82471B8CF49D00E3F871 /* Sources */,
BE8B82481B8CF49D00E3F871 /* Frameworks */,
BE8B82491B8CF49D00E3F871 /* Resources */,
BE3437A61BC5C19D00C71330 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
BE3437A11BC5C18F00C71330 /* PBXTargetDependency */,
BE3437A51BC5C19D00C71330 /* PBXTargetDependency */,
);
name = "Mobile Buy SDK Advanced Sample";
productName = "Mobile Buy SDK Advanced Sample";
......@@ -204,7 +278,6 @@
TargetAttributes = {
BE8B824A1B8CF49D00E3F871 = {
CreatedOnToolsVersion = 6.4;
DevelopmentTeam = A7XGC83MZE;
SystemCapabilities = {
com.apple.OMC = {
enabled = 1;
......@@ -224,6 +297,12 @@
mainGroup = BE8B82421B8CF49D00E3F871;
productRefGroup = BE8B824C1B8CF49D00E3F871 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = BE3437901BC5C18400C71330 /* Products */;
ProjectRef = BE34378F1BC5C18400C71330 /* Mobile Buy SDK.xcodeproj */;
},
);
projectRoot = "";
targets = (
BE8B824A1B8CF49D00E3F871 /* Mobile Buy SDK Advanced Sample */,
......@@ -231,6 +310,37 @@
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
BE3437991BC5C18400C71330 /* Playground.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = Playground.app;
remoteRef = BE3437981BC5C18400C71330 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
BE34379B1BC5C18400C71330 /* Mobile Buy SDK Tests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Mobile Buy SDK Tests.xctest";
remoteRef = BE34379A1BC5C18400C71330 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
BE34379D1BC5C18400C71330 /* Buy.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Buy.framework;
remoteRef = BE34379C1BC5C18400C71330 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
BE34379F1BC5C18400C71330 /* Buy.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Buy.framework;
remoteRef = BE34379E1BC5C18400C71330 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
BE8B82491B8CF49D00E3F871 /* Resources */ = {
isa = PBXResourcesBuildPhase;
......@@ -269,6 +379,19 @@
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
BE3437A11BC5C18F00C71330 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Buy Dynamic";
targetProxy = BE3437A01BC5C18F00C71330 /* PBXContainerItemProxy */;
};
BE3437A51BC5C19D00C71330 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Buy Dynamic";
targetProxy = BE3437A41BC5C19D00C71330 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
BE8B825B1B8CF49D00E3F871 /* Main.storyboard */ = {
isa = PBXVariantGroup;
......@@ -384,7 +507,7 @@
);
INFOPLIST_FILE = "Mobile Buy SDK Advanced Sample/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-all_load";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.shopify.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
......@@ -406,7 +529,7 @@
);
INFOPLIST_FILE = "Mobile Buy SDK Advanced Sample/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-all_load";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.shopify.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
......
......@@ -38,6 +38,7 @@ NSString * const MerchantId = @"";
@property (nonatomic, strong) BUYCheckout *checkout;
@property (nonatomic, strong) BUYClient *client;
@property (nonatomic, strong) BUYShop *shop;
@property (nonatomic, strong) NSArray *summaryItems;
@property (nonatomic, strong) BUYApplePayHelpers *applePayHelper;
......@@ -100,6 +101,11 @@ NSString * const MerchantId = @"";
self.tableView.tableFooterView = footerView;
[self.tableView registerClass:[SummaryItemsTableViewCell class] forCellReuseIdentifier:@"SummaryCell"];
// Prefetch the shop object for Apple Pay
[self.client getShop:^(BUYShop *shop, NSError *error) {
_shop = shop;
}];
}
- (void)setCheckout:(BUYCheckout *)checkout
......@@ -240,7 +246,7 @@ NSString * const MerchantId = @"";
PKPaymentAuthorizationViewController *paymentController = [[PKPaymentAuthorizationViewController alloc] initWithPaymentRequest:request];
self.applePayHelper = [[BUYApplePayHelpers alloc] initWithClient:self.client checkout:self.checkout];
self.applePayHelper = [[BUYApplePayHelpers alloc] initWithClient:self.client checkout:self.checkout shop:self.shop];
paymentController.delegate = self;
/**
......@@ -272,10 +278,10 @@ NSString * const MerchantId = @"";
[paymentRequest setRequiredShippingAddressFields:self.checkout.requiresShipping ? PKAddressFieldAll : PKAddressFieldEmail|PKAddressFieldPhone];
[paymentRequest setSupportedNetworks:@[PKPaymentNetworkVisa, PKPaymentNetworkMasterCard]];
[paymentRequest setMerchantCapabilities:PKMerchantCapability3DS];
[paymentRequest setCountryCode:@"US"];
[paymentRequest setCurrencyCode:@"USD"];
[paymentRequest setCountryCode:self.shop.country ?: @"US"];
[paymentRequest setCurrencyCode:self.shop.currency ?: @"USD"];
[paymentRequest setPaymentSummaryItems: [self.checkout buy_summaryItems]];
[paymentRequest setPaymentSummaryItems:[self.checkout buy_summaryItemsWithShopName:self.shop.name]];
return paymentRequest;
}
......@@ -288,6 +294,17 @@ NSString * const MerchantId = @"";
{
// Add additional methods if needed and forward the callback to BUYApplePayHelpers
[self.applePayHelper paymentAuthorizationViewController:controller didAuthorizePayment:payment completion:completion];
// Get the completed checkout
[self.client getCheckout:self.applePayHelper.checkout completion:^(BUYCheckout *checkout, NSError *error) {
if (error) {
NSLog(@"Unable to get completed checkout");
NSLog(@"%@", error);
}
if (checkout) {
NSLog(@"%@", checkout);
}
}];
}
- (void)paymentAuthorizationViewControllerDidFinish:(PKPaymentAuthorizationViewController *)controller
......
......@@ -24,7 +24,7 @@
// THE SOFTWARE.
//
#import <Foundation/Foundation.h>
@import Foundation;
@import Buy;
@class GetShopOperation;
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2</string>
<string>1.2.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
......@@ -43,6 +43,8 @@
<array>
<string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIStatusBarTintParameters</key>
<dict>
<key>UINavigationBar</key>
......
......@@ -47,6 +47,7 @@
@property (nonatomic, strong) NSArray *themeTintColors;
@property (nonatomic, assign) NSInteger themeTintColorSelectedIndex;
@property (nonatomic, assign) BOOL showsProductImageBackground;
@property (nonatomic, assign) BOOL presentViewController;
@end
......@@ -66,17 +67,23 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Products";
if (self.collection) {
self.title = self.collection.title;
} else {
self.title = @"All Products";
}
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
[self.tableView registerClass:[ProductViewControllerToggleTableViewCell class] forCellReuseIdentifier:@"ProductViewControllerToggleCell"];
[self.tableView registerClass:[ProductViewControllerThemeStyleTableViewCell class] forCellReuseIdentifier:@"ThemeStyleCell"];
[self.tableView registerClass:[ProductViewControllerThemeTintColorTableViewCell class] forCellReuseIdentifier:@"ThemeTintColorCell"];
[self.tableView registerClass:[ProductViewControllerToggleTableViewCell class] forCellReuseIdentifier:@"ThemeShowsBackgroundToggleCell"];
[self.tableView registerClass:[ProductViewControllerToggleTableViewCell class] forCellReuseIdentifier:@"ProductViewControllerPresentViewControllerToggleCell"];
self.themeTintColors = @[[UIColor colorWithRed:0.48f green:0.71f blue:0.36f alpha:1.0f], [UIColor colorWithRed:0.88 green:0.06 blue:0.05 alpha:1], [UIColor colorWithRed:0.02 green:0.54 blue:1 alpha:1]];
self.themeTintColorSelectedIndex = 0;
self.showsProductImageBackground = YES;
self.presentViewController = YES;
if (self.collection) {
// If we're presenting with a collection, add the ability to sort
......@@ -175,7 +182,7 @@
switch (section) {
case 0:
if (self.demoProductViewController) {
return 4;
return 5;
} else {
return 1;
}
......@@ -225,6 +232,15 @@
cell = toggleCell;
}
break;
case 4: {
ProductViewControllerToggleTableViewCell *toggleCell = (ProductViewControllerToggleTableViewCell*)[tableView dequeueReusableCellWithIdentifier:@"ProductViewControllerPresentViewControllerToggleCell" forIndexPath:indexPath];
toggleCell.textLabel.text = @"Modal Presentation";
[toggleCell.toggleSwitch setOn:self.presentViewController];
[toggleCell.toggleSwitch addTarget:self action:@selector(togglePresentViewController:) forControlEvents:UIControlEventValueChanged];
cell = toggleCell;
}
break;
default:
break;
}
......@@ -295,7 +311,11 @@
BUYProductViewController *productViewController = [self productViewController];
[productViewController loadWithProduct:product completion:^(BOOL success, NSError *error) {
if (error == nil) {
if (self.presentViewController) {
[productViewController presentPortraitInViewController:self];
} else {
[self.navigationController pushViewController:productViewController animated:YES];
}
}
}];
}
......@@ -339,6 +359,11 @@
self.showsProductImageBackground = toggleSwitch.on;
}
- (void)togglePresentViewController:(UISwitch*)toggleSwitch
{
self.presentViewController = toggleSwitch.on;
}
- (BUYAddress *)address
{
BUYAddress *address = [[BUYAddress alloc] init];
......@@ -376,7 +401,11 @@
-(void)previewingContext:(id<UIViewControllerPreviewing>)previewingContext commitViewController:(UIViewController *)viewControllerToCommit
{
if (self.presentViewController) {
[self presentViewController:viewControllerToCommit animated:YES completion:NULL];
} else {
[self.navigationController pushViewController:viewControllerToCommit animated:YES];
}
}
@end
# Mobile Buy SDK Advanced Sample App
The Advanced Sample App demonstrates how to perform several tasks related to creating a checkout.
- Fetch collections
- Fetch products
- Optionally present using the `BUYProductViewController`
- Create a checkout
- Apply shipping rate
- Apply gift cards and discounts
- Complete checkout via web view, native checkout implementation, and Apple Pay
### Getting started
First, add your shop domain, API key and Channel ID to the `CollectionListViewController.m` macros.
```objc
#define SHOP_DOMAIN @"<shop_domain>"
#define API_KEY @"<api_key>"
#define CHANNEL_ID @"<channel_id>"
```
### Overview
The Advanced Sample App demonstrates several tasks that can be performed using the Mobile Buy SDK. Each task is broken up into seperate view controllers. Polling endpoints are represented as NSOperations which can easily be utilized in your own apps.
### Classes
#### View Controllers
###### `CollectionListViewController`
* Initializes the `BUYClient`
* Fetches collections and displays them in a list
* Optionally allows for fetch of the first product page
###### `ProductListViewController`
* Fetches the products and displays them in a list
* Can present a product using the `BUYProductViewController` and demo the theme settings on the controller, or
* Creates a checkout with the selected product and pushes to the `ShippingRatesTableViewController`
###### `ShippingRatesTableViewController`
* Fetches the shipping rates for the checkout using `GetShippingRatesOperation`
* Updates the checkout with the selected shipping rate and pushes to the `PreCheckoutViewController`
###### `PreCheckoutViewController`
* Displays a summary of the checkout
* Allows for discounts and gift cards to be added to the checkout
###### `CheckoutViewController`
* Displays a summary of the checkout
* Checkout using a credit card
* Web checkout using Safari
* Checkout using Apple Pay
#### `NSOperation`s
###### `GetShopOperation`
* `NSOperation` based class to fetch the shop object
###### `GetShippingRatesOperation`
* `NSOperation` based class to poll for shipping rates
###### `GetCompletionStatusOperation`
* `NSOperation` based class to poll for the checkout completion status
### Apple Pay
Apple Pay is implemented in the CheckoutViewController. It utilizes the `BUYApplePayHelpers` class which acts as the delegate for the `PKPaymentAuthorizationViewController`. Setting the `MerchantId` is required to use Apple Pay. For more information about supporting Apple Pay in your app, please consult [https://docs.shopify.com/mobile-buy-sdk/ios/enable-apple-pay](https://docs.shopify.com/mobile-buy-sdk/ios/enable-apple-pay).
......@@ -7,15 +7,76 @@
objects = {
/* Begin PBXBuildFile section */
BE3437BB1BC5C22C00C71330 /* Buy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE3437B81BC5C20700C71330 /* Buy.framework */; };
BE3437BC1BC5C22C00C71330 /* Buy.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BE3437B81BC5C20700C71330 /* Buy.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
BE9A637A1B5007AA0033E558 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9A63791B5007AA0033E558 /* AppDelegate.swift */; };
BE9A637C1B5007AA0033E558 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9A637B1B5007AA0033E558 /* ViewController.swift */; };
BE9A637F1B5007AA0033E558 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BE9A637D1B5007AA0033E558 /* Main.storyboard */; };
BE9A63811B5007AA0033E558 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BE9A63801B5007AA0033E558 /* Images.xcassets */; };
BE9A63841B5007AA0033E558 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BE9A63821B5007AA0033E558 /* LaunchScreen.xib */; };
BE9A639A1B5008E10033E558 /* Buy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE9A63991B5008E10033E558 /* Buy.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
BE3437B11BC5C20700C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 90F7BA681B0D1DAF0067864D;
remoteInfo = Playground;
};
BE3437B31BC5C20700C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 90F592EC1B0D5EFE0026B382;
remoteInfo = "Mobile Buy SDK Tests";
};
BE3437B51BC5C20700C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BE9A64281B503C2F0033E558;
remoteInfo = Buy;
};
BE3437B71BC5C20700C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 901931701BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
BE3437B91BC5C21300C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 901930E11BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
BE3437BD1BC5C22C00C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 901930E11BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
BE3437BF1BC5C22C00C71330 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
BE3437BC1BC5C22C00C71330 /* Buy.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "Mobile Buy SDK.xcodeproj"; path = "../../Mobile Buy SDK/Mobile Buy SDK.xcodeproj"; sourceTree = "<group>"; };
BE9A63741B5007AA0033E558 /* Mobile Buy SDK Swift Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mobile Buy SDK Swift Sample.app"; sourceTree = BUILT_PRODUCTS_DIR; };
BE9A63781B5007AA0033E558 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BE9A63791B5007AA0033E558 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
......@@ -23,7 +84,6 @@
BE9A637E1B5007AA0033E558 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
BE9A63801B5007AA0033E558 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
BE9A63831B5007AA0033E558 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
BE9A63991B5008E10033E558 /* Buy.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Buy.framework; path = ../Buy.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -31,17 +91,28 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BE9A639A1B5008E10033E558 /* Buy.framework in Frameworks */,
BE3437BB1BC5C22C00C71330 /* Buy.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
BE3437A91BC5C20700C71330 /* Products */ = {
isa = PBXGroup;
children = (
BE3437B21BC5C20700C71330 /* Playground.app */,
BE3437B41BC5C20700C71330 /* Mobile Buy SDK Tests.xctest */,
BE3437B61BC5C20700C71330 /* Buy.framework */,
BE3437B81BC5C20700C71330 /* Buy.framework */,
);
name = Products;
sourceTree = "<group>";
};
BE9A636B1B5007AA0033E558 = {
isa = PBXGroup;
children = (
BE9A63991B5008E10033E558 /* Buy.framework */,
BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */,
BE9A63761B5007AA0033E558 /* Mobile Buy SDK Swift Sample */,
BE9A63751B5007AA0033E558 /* Products */,
);
......@@ -86,10 +157,13 @@
BE9A63701B5007AA0033E558 /* Sources */,
BE9A63711B5007AA0033E558 /* Frameworks */,
BE9A63721B5007AA0033E558 /* Resources */,
BE3437BF1BC5C22C00C71330 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
BE3437BA1BC5C21300C71330 /* PBXTargetDependency */,
BE3437BE1BC5C22C00C71330 /* PBXTargetDependency */,
);
name = "Mobile Buy SDK Swift Sample";
productName = "Mobile Buy SDK Swift Sample";
......@@ -122,6 +196,12 @@
mainGroup = BE9A636B1B5007AA0033E558;
productRefGroup = BE9A63751B5007AA0033E558 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = BE3437A91BC5C20700C71330 /* Products */;
ProjectRef = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
},
);
projectRoot = "";
targets = (
BE9A63731B5007AA0033E558 /* Mobile Buy SDK Swift Sample */,
......@@ -129,6 +209,37 @@
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
BE3437B21BC5C20700C71330 /* Playground.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = Playground.app;
remoteRef = BE3437B11BC5C20700C71330 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
BE3437B41BC5C20700C71330 /* Mobile Buy SDK Tests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Mobile Buy SDK Tests.xctest";
remoteRef = BE3437B31BC5C20700C71330 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
BE3437B61BC5C20700C71330 /* Buy.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Buy.framework;
remoteRef = BE3437B51BC5C20700C71330 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
BE3437B81BC5C20700C71330 /* Buy.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Buy.framework;
remoteRef = BE3437B71BC5C20700C71330 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
BE9A63721B5007AA0033E558 /* Resources */ = {
isa = PBXResourcesBuildPhase;
......@@ -154,6 +265,19 @@
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
BE3437BA1BC5C21300C71330 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Buy Dynamic";
targetProxy = BE3437B91BC5C21300C71330 /* PBXContainerItemProxy */;
};
BE3437BE1BC5C22C00C71330 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Buy Dynamic";
targetProxy = BE3437BD1BC5C22C00C71330 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
BE9A637D1B5007AA0033E558 /* Main.storyboard */ = {
isa = PBXVariantGroup;
......@@ -267,10 +391,10 @@
);
INFOPLIST_FILE = "Mobile Buy SDK Swift Sample/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-all_load";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.shopify.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "../Buy.framework/Headers/Buy-Bridging-Header.h";
SWIFT_OBJC_BRIDGING_HEADER = "${PROJECT_DIR}/Mobile Buy SDK Swift Sample/Buy-Bridging-Header.h";
};
name = Debug;
};
......@@ -285,10 +409,10 @@
);
INFOPLIST_FILE = "Mobile Buy SDK Swift Sample/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-all_load";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.shopify.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "../Buy.framework/Headers/Buy-Bridging-Header.h";
SWIFT_OBJC_BRIDGING_HEADER = "${PROJECT_DIR}/Mobile Buy SDK Swift Sample/Buy-Bridging-Header.h";
};
name = Release;
};
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2</string>
<string>1.2.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -25,6 +25,7 @@
//
import UIKit
import Buy
class ViewController: UIViewController {
......
# Mobile Buy SDK Sample Swift App
The Swift sample app demonstrates how to use the SDK within a Swift app. The app includes an Objective-C bridging header.
### Getting started
First, add your shop domain, API key and Channel ID to the `ViewController.swift`.
```swift
let shopDomain = ""
let apiKey = ""
let channelId = ""
let productId = ""
```
### Overview
The sample app also demonstrates how to use the `BUYClient` to obtain a product by calling `getProductById()`.
```swift
client.getProductById(productId) { (product, error) -> Void in
}
```
......@@ -7,12 +7,13 @@
objects = {
/* Begin PBXBuildFile section */
901931981BC5C63400D1134E /* Buy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 901931951BC5C62800D1134E /* Buy.framework */; };
901931991BC5C63500D1134E /* Buy.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 901931951BC5C62800D1134E /* Buy.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
90858EC91B540D1B009D19D7 /* PassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90858EC81B540D1B009D19D7 /* PassKit.framework */; };
BE1C4E011AE9922100E21624 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEDC7A321AE03BA800C4B4FE /* ViewController.m */; };
BE7764D61AE5724200C74937 /* CheckoutSelectionController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE7764D51AE5724200C74937 /* CheckoutSelectionController.m */; };
BE7764DB1AE5728E00C74937 /* PAYButton.m in Sources */ = {isa = PBXBuildFile; fileRef = BE7764D81AE5728E00C74937 /* PAYButton.m */; };
BE7764DC1AE5728E00C74937 /* CheckoutSelectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = BE7764DA1AE5728E00C74937 /* CheckoutSelectionView.m */; };
BE9496701B4B0DD200B38949 /* Buy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F7BA5C1B0D1BE50067864D /* Buy.framework */; };
BE9652F41AE563CE00084408 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE9652F31AE563CE00084408 /* WebKit.framework */; };
BEDC7A2D1AE03BA800C4B4FE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BEDC7A2C1AE03BA800C4B4FE /* main.m */; };
BEDC7A301AE03BA800C4B4FE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BEDC7A2F1AE03BA800C4B4FE /* AppDelegate.m */; };
......@@ -21,9 +22,68 @@
BEDC7A3B1AE03BA900C4B4FE /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BEDC7A391AE03BA800C4B4FE /* LaunchScreen.xib */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
9019318E1BC5C62800D1134E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 901931851BC5C62700D1134E /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 90F7BA681B0D1DAF0067864D;
remoteInfo = Playground;
};
901931901BC5C62800D1134E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 901931851BC5C62700D1134E /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 90F592EC1B0D5EFE0026B382;
remoteInfo = "Mobile Buy SDK Tests";
};
901931921BC5C62800D1134E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 901931851BC5C62700D1134E /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BE9A64281B503C2F0033E558;
remoteInfo = Buy;
};
901931941BC5C62800D1134E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 901931851BC5C62700D1134E /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 901931701BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
901931961BC5C62E00D1134E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 901931851BC5C62700D1134E /* Mobile Buy SDK.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 901930E11BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
9019319A1BC5C63500D1134E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 901931851BC5C62700D1134E /* Mobile Buy SDK.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 901930E11BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
9019319C1BC5C63500D1134E /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
901931991BC5C63500D1134E /* Buy.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
901931851BC5C62700D1134E /* Mobile Buy SDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "Mobile Buy SDK.xcodeproj"; path = "../../Mobile Buy SDK/Mobile Buy SDK.xcodeproj"; sourceTree = "<group>"; };
90858EC81B540D1B009D19D7 /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; };
90F7BA5C1B0D1BE50067864D /* Buy.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Buy.framework; path = ../Buy.framework; sourceTree = "<group>"; };
BE7764D41AE5724200C74937 /* CheckoutSelectionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckoutSelectionController.h; sourceTree = "<group>"; };
BE7764D51AE5724200C74937 /* CheckoutSelectionController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CheckoutSelectionController.m; sourceTree = "<group>"; };
BE7764D71AE5728E00C74937 /* PAYButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PAYButton.h; sourceTree = "<group>"; };
......@@ -51,7 +111,7 @@
files = (
90858EC91B540D1B009D19D7 /* PassKit.framework in Frameworks */,
BE9652F41AE563CE00084408 /* WebKit.framework in Frameworks */,
BE9496701B4B0DD200B38949 /* Buy.framework in Frameworks */,
901931981BC5C63400D1134E /* Buy.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -68,6 +128,17 @@
path = "Shopify Checkout";
sourceTree = "<group>";
};
901931861BC5C62700D1134E /* Products */ = {
isa = PBXGroup;
children = (
9019318F1BC5C62800D1134E /* Playground.app */,
901931911BC5C62800D1134E /* Mobile Buy SDK Tests.xctest */,
901931931BC5C62800D1134E /* Buy.framework */,
901931951BC5C62800D1134E /* Buy.framework */,
);
name = Products;
sourceTree = "<group>";
};
BE7764DD1AE5729200C74937 /* Payment Selection */ = {
isa = PBXGroup;
children = (
......@@ -84,7 +155,7 @@
BEDC7A1E1AE03BA800C4B4FE = {
isa = PBXGroup;
children = (
90F7BA5C1B0D1BE50067864D /* Buy.framework */,
901931851BC5C62700D1134E /* Mobile Buy SDK.xcodeproj */,
90171E981AF0294500BB73DB /* Frameworks */,
BEDC7A291AE03BA800C4B4FE /* Mobile Buy SDK Web Sample */,
BEDC7A281AE03BA800C4B4FE /* Products */,
......@@ -136,10 +207,13 @@
BEDC7A241AE03BA800C4B4FE /* Frameworks */,
BEDC7A251AE03BA800C4B4FE /* Resources */,
BE9572AD1AE5BEF20024968A /* ShellScript */,
9019319C1BC5C63500D1134E /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
901931971BC5C62E00D1134E /* PBXTargetDependency */,
9019319B1BC5C63500D1134E /* PBXTargetDependency */,
);
name = "Mobile Buy SDK Web Sample";
productName = "Shopify Checkout";
......@@ -157,7 +231,6 @@
TargetAttributes = {
BEDC7A261AE03BA800C4B4FE = {
CreatedOnToolsVersion = 6.2;
DevelopmentTeam = A7XGC83MZE;
SystemCapabilities = {
com.apple.OMC = {
enabled = 1;
......@@ -180,6 +253,12 @@
mainGroup = BEDC7A1E1AE03BA800C4B4FE;
productRefGroup = BEDC7A281AE03BA800C4B4FE /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 901931861BC5C62700D1134E /* Products */;
ProjectRef = 901931851BC5C62700D1134E /* Mobile Buy SDK.xcodeproj */;
},
);
projectRoot = "";
targets = (
BEDC7A261AE03BA800C4B4FE /* Mobile Buy SDK Web Sample */,
......@@ -187,6 +266,37 @@
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
9019318F1BC5C62800D1134E /* Playground.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = Playground.app;
remoteRef = 9019318E1BC5C62800D1134E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
901931911BC5C62800D1134E /* Mobile Buy SDK Tests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Mobile Buy SDK Tests.xctest";
remoteRef = 901931901BC5C62800D1134E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
901931931BC5C62800D1134E /* Buy.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Buy.framework;
remoteRef = 901931921BC5C62800D1134E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
901931951BC5C62800D1134E /* Buy.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Buy.framework;
remoteRef = 901931941BC5C62800D1134E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
BEDC7A251AE03BA800C4B4FE /* Resources */ = {
isa = PBXResourcesBuildPhase;
......@@ -232,6 +342,19 @@
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
901931971BC5C62E00D1134E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Buy Dynamic";
targetProxy = 901931961BC5C62E00D1134E /* PBXContainerItemProxy */;
};
9019319B1BC5C63500D1134E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Buy Dynamic";
targetProxy = 9019319A1BC5C63500D1134E /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
BEDC7A341AE03BA800C4B4FE /* Main.storyboard */ = {
isa = PBXVariantGroup;
......@@ -355,7 +478,7 @@
"$(inherited)",
"$(PROJECT_DIR)/**",
);
OTHER_LDFLAGS = "-all_load";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.shopify.mobilebuysdkwebsample;
PRODUCT_NAME = "Mobile Buy SDK Web Sample";
PROVISIONING_PROFILE = "";
......@@ -388,7 +511,7 @@
"$(inherited)",
"$(PROJECT_DIR)/**",
);
OTHER_LDFLAGS = "-all_load";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.shopify.mobilebuysdkwebsample;
PRODUCT_NAME = "Mobile Buy SDK Web Sample";
PROVISIONING_PROFILE = "";
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2</string>
<string>1.2.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
# Mobile Buy SDK Sample Web App
The web sample app demonstrates how you can load your shop's website in a webview, and support Apple Pay.
### Getting started
First, add your shop domain, API key and Channel ID to the `AppDelegate.h` macros.
```objc
#define SHOP_DOMAIN @"<shop_domain>"
#define API_KEY @"<api_key>"
#define CHANNEL_ID @"<channel_id>"
```
To support Apple Pay, add your Merchant ID as well.
```objc
#define MERCHANT_ID @"<merchant_id>"
```
### Overview
The sample app instantiates a view controller which is a subclass of `BUYStoreViewController`. This displays a webview with your shop, but intercepts the checkout to support Apple Pay.
The sample app also demonstrates how to use the `BUYClient` to obtain shop details by calling `getShop:`
```objc
[self.provider getShop:^(BUYShop *shop, NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil && shop) {
self.title = shop.name;
}
else {
NSLog(@"Error fetching shop: %@", error.localizedDescription);
}
});
}];
```
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Mobile Buy SDK/Mobile Buy SDK.xcodeproj">
</FileRef>
<FileRef
location = "group:Mobile Buy SDK Sample Apps/Sample App Web/Mobile Buy SDK Web Sample.xcodeproj">
</FileRef>
<FileRef
location = "group:Mobile Buy SDK Sample Apps/Sample App Swift/Mobile Buy SDK Swift Sample.xcodeproj">
</FileRef>
<FileRef
location = "group:Mobile Buy SDK Sample Apps/Sample App Advanced/Mobile Buy SDK Advanced Sample.xcodeproj">
</FileRef>
</Workspace>
{
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "B8AB7D59AD74F224C9D65CE20D7D3C30D5100598",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
},
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
"27386CDE6C45B5519FB1AD62B45ACA8C18A2EFF0" : 0,
"B8AB7D59AD74F224C9D65CE20D7D3C30D5100598" : 0
},
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "F65CB188-9FFA-4AD7-8982-12C88FB79C9D",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"27386CDE6C45B5519FB1AD62B45ACA8C18A2EFF0" : "mobile-buy-sdk-private\/Submodules",
"B8AB7D59AD74F224C9D65CE20D7D3C30D5100598" : "mobile-buy-sdk-private"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "Mobile Buy SDK",
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Mobile Buy SDK.xcworkspace",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:Shopify\/BUYPaymentButton.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "27386CDE6C45B5519FB1AD62B45ACA8C18A2EFF0"
},
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:Shopify\/mobile-buy-sdk-private.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "B8AB7D59AD74F224C9D65CE20D7D3C30D5100598"
}
]
}
\ No newline at end of file
......@@ -245,4 +245,37 @@
}];
}
- (void)testValidTags
{
[OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest * _Nonnull request) {
return [self shouldUseMocks];
} withStubResponse:^OHHTTPStubsResponse * _Nonnull(NSURLRequest * _Nonnull request) {
return [OHHTTPStubsResponse responseWithKey:@"testGetValidTag_0"];
}];
XCTestExpectation *expectation = [self expectationWithDescription:NSStringFromSelector(_cmd)];
[self.client getProductsPage:1 completion:^(NSArray *products, NSUInteger page, BOOL reachedEnd, NSError *error) {
XCTAssertNil(error);
XCTAssertNotNil(products);
if (products.count > 0) {
BUYProduct *product = products[0];
if (product.tags) {
XCTAssertTrue([product.tags isKindOfClass:[NSSet class]]);
for (NSString *tag in [product.tags allObjects]) {
XCTAssert([tag isKindOfClass:[NSString class]]);
}
}
}
[expectation fulfill];
}];
[self waitForExpectationsWithTimeout:10 handler:^(NSError *error) {
XCTAssertNil(error);
}];
}
@end
......@@ -248,7 +248,7 @@
[OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest * _Nonnull request) {
return [self shouldUseMocks];
} withStubResponse:^OHHTTPStubsResponse * _Nonnull(NSURLRequest * _Nonnull request) {
return [OHHTTPStubsResponse responseWithKey:@"testCheckoutFlowUsingCreditCard_17"];
return [OHHTTPStubsResponse responseWithKey:@"testCheckoutFlowUsingCreditCard_14"];
}];
__block BUYStatus checkoutStatus = BUYStatusUnknown;
......@@ -285,7 +285,7 @@
[OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest * _Nonnull request) {
return [self shouldUseMocks];
} withStubResponse:^OHHTTPStubsResponse * _Nonnull(NSURLRequest * _Nonnull request) {
return [OHHTTPStubsResponse responseWithKey:@"testCheckoutFlowUsingCreditCard_18"];
return [OHHTTPStubsResponse responseWithKey:@"testCheckoutFlowUsingCreditCard_15"];
}];
XCTestExpectation *expectation = [self expectationWithDescription:NSStringFromSelector(_cmd)];
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7,15 +7,15 @@
objects = {
/* Begin PBXAggregateTarget section */
904FB61A1AE03DC500EA1758 /* Universal Framework */ = {
904FB61A1AE03DC500EA1758 /* Static Universal Framework */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 904FB61B1AE03DC500EA1758 /* Build configuration list for PBXAggregateTarget "Universal Framework" */;
buildConfigurationList = 904FB61B1AE03DC500EA1758 /* Build configuration list for PBXAggregateTarget "Static Universal Framework" */;
buildPhases = (
904FB61F1AE03DCF00EA1758 /* ShellScript */,
);
dependencies = (
);
name = "Universal Framework";
name = "Static Universal Framework";
productName = "Mobile Buy SDK-Universal";
};
90E80E401AFAB0B9003A9909 /* Documentation */ = {
......@@ -42,6 +42,142 @@
900396F71B69563400226B73 /* BUYCollection+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 900396F51B69563400226B73 /* BUYCollection+Additions.m */; };
900E7C841B5DA553006F3C81 /* BUYImageKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 900E7C811B5DA32F006F3C81 /* BUYImageKit.h */; };
900E7C851B5DA559006F3C81 /* BUYImageKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 900E7C821B5DA32F006F3C81 /* BUYImageKit.m */; };
901930E31BC5B9BC00D1134E /* BUYApplePayHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = BE33B4EE1B15FF4D0067982B /* BUYApplePayHelpers.m */; };
901930E41BC5B9BC00D1134E /* BUYOptionSelectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE9496AF1B4D96D800B38949 /* BUYOptionSelectionViewController.m */; };
901930E51BC5B9BC00D1134E /* BUYVariantOptionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516CA21B4D771400E35E45 /* BUYVariantOptionView.m */; };
901930E61BC5B9BC00D1134E /* BUYPresentationControllerForVariantSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = BEB74A201B554BF20005A300 /* BUYPresentationControllerForVariantSelection.m */; };
901930E71BC5B9BC00D1134E /* NSDecimalNumber+BUYAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2AF52A9C1A7011DC0087DB2C /* NSDecimalNumber+BUYAdditions.m */; };
901930E81BC5B9BC00D1134E /* BUYImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 2AF52A7A1A700B0A0087DB2C /* BUYImage.m */; };
901930E91BC5B9BC00D1134E /* BUYProductVariant.m in Sources */ = {isa = PBXBuildFile; fileRef = 2AF52A821A700B0A0087DB2C /* BUYProductVariant.m */; };
901930EA1BC5B9BC00D1134E /* BUYProductViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 905ECCC11B4C39710094F336 /* BUYProductViewController.m */; };
901930EB1BC5B9BC00D1134E /* NSDateFormatter+BUYAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 90A446241B5EC03F009602AA /* NSDateFormatter+BUYAdditions.m */; };
901930EC1BC5B9BC00D1134E /* BUYError.m in Sources */ = {isa = PBXBuildFile; fileRef = BE47340E1B66C4EF00AA721A /* BUYError.m */; };
901930ED1BC5B9BC00D1134E /* BUYProductViewHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516C861B4C6F7000E35E45 /* BUYProductViewHeader.m */; };
901930EE1BC5B9BC00D1134E /* BUYNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516CC21B4F1ED700E35E45 /* BUYNavigationController.m */; };
901930EF1BC5B9BC00D1134E /* BUYVariantSelectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE9496B11B4D96D800B38949 /* BUYVariantSelectionViewController.m */; };
901930F01BC5B9BC00D1134E /* BUYCheckout+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = BE6C5E711B1CF776003AD9D0 /* BUYCheckout+Additions.m */; };
901930F11BC5B9BC00D1134E /* NSString+Trim.m in Sources */ = {isa = PBXBuildFile; fileRef = F76CFF1C19CB7BE30079C703 /* NSString+Trim.m */; };
901930F21BC5B9BC00D1134E /* BUYOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = 90E83BC31B9F550E00C95A1B /* BUYOrder.m */; };
901930F31BC5B9BC00D1134E /* BUYAddress+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = BE33B4FA1B177EC80067982B /* BUYAddress+Additions.m */; };
901930F41BC5B9BC00D1134E /* BUYProductViewHeaderBackgroundImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 90FC31A71B50371600AFAB51 /* BUYProductViewHeaderBackgroundImageView.m */; };
901930F51BC5B9BC00D1134E /* BUYProductViewHeaderOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = 907874981B7276BA0023775B /* BUYProductViewHeaderOverlay.m */; };
901930F61BC5B9BC00D1134E /* BUYProductVariantCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516C9A1B4D76D900E35E45 /* BUYProductVariantCell.m */; };
901930F71BC5B9BC00D1134E /* BUYTheme.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516CB71B4F0DD500E35E45 /* BUYTheme.m */; };
901930F81BC5B9BC00D1134E /* BUYProductVariant+Options.m in Sources */ = {isa = PBXBuildFile; fileRef = BE1007941B6038150031CEE7 /* BUYProductVariant+Options.m */; };
901930F91BC5B9BC00D1134E /* BUYProductViewErrorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 903BCC7B1B7D1C2D00C21FEB /* BUYProductViewErrorView.m */; };
901930FA1BC5B9BC00D1134E /* BUYLineItem.m in Sources */ = {isa = PBXBuildFile; fileRef = F7FDA16D19C939FF00AF4E93 /* BUYLineItem.m */; };
901930FB1BC5B9BC00D1134E /* BUYCheckoutButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 900396AF1B67BD0A00226B73 /* BUYCheckoutButton.m */; };
901930FC1BC5B9BC00D1134E /* BUYCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9089CC5D1BB48D06009726D6 /* BUYCollection.m */; settings = {ASSET_TAGS = (); }; };
901930FD1BC5B9BC00D1134E /* BUYTaxLine.m in Sources */ = {isa = PBXBuildFile; fileRef = 90AFAA5D1B011EA600F21C23 /* BUYTaxLine.m */; };
901930FE1BC5B9BC00D1134E /* BUYCollection+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 900396F51B69563400226B73 /* BUYCollection+Additions.m */; };
901930FF1BC5B9BC00D1134E /* BUYVariantOptionBreadCrumbsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 90DE926F1B9897B6002EF4DA /* BUYVariantOptionBreadCrumbsView.m */; };
901931001BC5B9BC00D1134E /* NSURL+BUYAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = BE5DC39F1B71B13700B2BC1E /* NSURL+BUYAdditions.m */; };
901931011BC5B9BC00D1134E /* BUYTheme+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 906EAE421B836DE000976165 /* BUYTheme+Additions.m */; };
901931021BC5B9BC00D1134E /* BUYStoreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE1C4DF41AE98FBB00E21624 /* BUYStoreViewController.m */; };
901931031BC5B9BC00D1134E /* BUYOptionValue.m in Sources */ = {isa = PBXBuildFile; fileRef = BEEA83E61B0B76C7000C6483 /* BUYOptionValue.m */; };
901931041BC5B9BC00D1134E /* BUYApplePayAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = F70CE40E1A8BF1D90055BEB8 /* BUYApplePayAdditions.m */; };
901931051BC5B9BC00D1134E /* BUYOptionSelectionNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEB74A261B554BFB0005A300 /* BUYOptionSelectionNavigationController.m */; };
901931061BC5B9BC00D1134E /* BUYDiscount.m in Sources */ = {isa = PBXBuildFile; fileRef = 90AFAA691B0139DE00F21C23 /* BUYDiscount.m */; };
901931071BC5B9BC00D1134E /* NSDate+BUYAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 90A446201B5E8614009602AA /* NSDate+BUYAdditions.m */; };
901931081BC5B9BC00D1134E /* BUYRuntime.m in Sources */ = {isa = PBXBuildFile; fileRef = 2AF52A741A700AC80087DB2C /* BUYRuntime.m */; };
901931091BC5B9BC00D1134E /* BUYCart.m in Sources */ = {isa = PBXBuildFile; fileRef = F773744819C77A210039681C /* BUYCart.m */; };
9019310A1BC5B9BC00D1134E /* BUYPaymentButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 905AA9701B3B32A500CAE037 /* BUYPaymentButton.m */; };
9019310B1BC5B9BC00D1134E /* BUYProduct+Options.m in Sources */ = {isa = PBXBuildFile; fileRef = BE9496B71B4D96F100B38949 /* BUYProduct+Options.m */; };
9019310C1BC5B9BC00D1134E /* BUYGiftCard.m in Sources */ = {isa = PBXBuildFile; fileRef = 42488B331AB8761A005F21A9 /* BUYGiftCard.m */; };
9019310D1BC5B9BC00D1134E /* BUYOptionValueCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BE10079A1B6165EC0031CEE7 /* BUYOptionValueCell.m */; };
9019310E1BC5B9BC00D1134E /* BUYProduct.m in Sources */ = {isa = PBXBuildFile; fileRef = 2AF52A7D1A700B0A0087DB2C /* BUYProduct.m */; };
9019310F1BC5B9BC00D1134E /* BUYImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516CAF1B4EC9FE00E35E45 /* BUYImageView.m */; };
901931101BC5B9BC00D1134E /* BUYProductHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516C981B4D76D900E35E45 /* BUYProductHeaderCell.m */; };
901931111BC5B9BC00D1134E /* BUYCartLineItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 9003969A1B601DF400226B73 /* BUYCartLineItem.m */; };
901931121BC5B9BC00D1134E /* BUYMaskedCreditCard.m in Sources */ = {isa = PBXBuildFile; fileRef = BE5DC3621B71022D00B2BC1E /* BUYMaskedCreditCard.m */; };
901931131BC5B9BC00D1134E /* BUYCheckout.m in Sources */ = {isa = PBXBuildFile; fileRef = F773749519C77C260039681C /* BUYCheckout.m */; };
901931141BC5B9BC00D1134E /* BUYProductViewFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516C7A1B4C589A00E35E45 /* BUYProductViewFooter.m */; };
901931151BC5B9BC00D1134E /* BUYPresentationControllerWithNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516CBE1B4F110A00E35E45 /* BUYPresentationControllerWithNavigationController.m */; };
901931161BC5B9BC00D1134E /* BUYShippingRate.m in Sources */ = {isa = PBXBuildFile; fileRef = 90AFAA651B01398A00F21C23 /* BUYShippingRate.m */; };
901931171BC5B9BC00D1134E /* BUYClient+Test.m in Sources */ = {isa = PBXBuildFile; fileRef = BE2E1D391B5E8663009610DA /* BUYClient+Test.m */; };
901931181BC5B9BC00D1134E /* BUYGradientView.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516CB31B4EE5E700E35E45 /* BUYGradientView.m */; };
901931191BC5B9BC00D1134E /* BUYViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE1C4DF61AE98FBB00E21624 /* BUYViewController.m */; };
9019311A1BC5B9BC00D1134E /* BUYImageKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 900E7C821B5DA32F006F3C81 /* BUYImageKit.m */; };
9019311B1BC5B9BC00D1134E /* BUYAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = 90AFAA611B01390F00F21C23 /* BUYAddress.m */; };
9019311C1BC5B9BC00D1134E /* BUYOption.m in Sources */ = {isa = PBXBuildFile; fileRef = 2AF52A801A700B0A0087DB2C /* BUYOption.m */; };
9019311D1BC5B9BC00D1134E /* BUYClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F7FDA17119C93F6F00AF4E93 /* BUYClient.m */; };
9019311E1BC5B9BC00D1134E /* UIFont+BUYAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 909944481B71B76800C40A33 /* UIFont+BUYAdditions.m */; };
9019311F1BC5B9BC00D1134E /* BUYProductView.m in Sources */ = {isa = PBXBuildFile; fileRef = 900396AB1B627CB900226B73 /* BUYProductView.m */; };
901931201BC5B9BC00D1134E /* BUYCreditCard.m in Sources */ = {isa = PBXBuildFile; fileRef = F77374AB19C796BD0039681C /* BUYCreditCard.m */; };
901931211BC5B9BC00D1134E /* BUYProductImageCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 904606AE1B6BC8D700754173 /* BUYProductImageCollectionViewCell.m */; };
901931221BC5B9BC00D1134E /* BUYShop.m in Sources */ = {isa = PBXBuildFile; fileRef = 2AF52A841A700B0A0087DB2C /* BUYShop.m */; };
901931231BC5B9BC00D1134E /* BUYObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2AF52A941A7010B20087DB2C /* BUYObject.mm */; };
901931241BC5B9BC00D1134E /* BUYProductDescriptionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516C961B4D76D900E35E45 /* BUYProductDescriptionCell.m */; };
901931271BC5B9BC00D1134E /* BUYAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 90AFAA601B01390F00F21C23 /* BUYAddress.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931281BC5B9BC00D1134E /* BUYApplePayHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = BE33B4ED1B15FF4D0067982B /* BUYApplePayHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931291BC5B9BC00D1134E /* BUYStoreViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BE1C4DF31AE98FBB00E21624 /* BUYStoreViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019312A1BC5B9BC00D1134E /* BUYCreditCard.h in Headers */ = {isa = PBXBuildFile; fileRef = F77374AA19C796BD0039681C /* BUYCreditCard.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019312B1BC5B9BC00D1134E /* BUYOption.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF52A7F1A700B0A0087DB2C /* BUYOption.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019312C1BC5B9BC00D1134E /* BUYProductVariantCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516C991B4D76D900E35E45 /* BUYProductVariantCell.h */; };
9019312D1BC5B9BC00D1134E /* BUYTheme.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516CB61B4F0DD500E35E45 /* BUYTheme.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019312E1BC5B9BC00D1134E /* BUYProductDescriptionCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516C951B4D76D900E35E45 /* BUYProductDescriptionCell.h */; };
9019312F1BC5B9BC00D1134E /* BUYLineItem.h in Headers */ = {isa = PBXBuildFile; fileRef = F7FDA16C19C939FF00AF4E93 /* BUYLineItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931301BC5B9BC00D1134E /* BUYCheckout+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = BE6C5E701B1CF776003AD9D0 /* BUYCheckout+Additions.h */; };
901931311BC5B9BC00D1134E /* BUYProductViewHeaderOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 907874971B7276BA0023775B /* BUYProductViewHeaderOverlay.h */; };
901931321BC5B9BC00D1134E /* NSString+Trim.h in Headers */ = {isa = PBXBuildFile; fileRef = F76CFF1B19CB7BE30079C703 /* NSString+Trim.h */; };
901931331BC5B9BC00D1134E /* BUYAddress+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = BE33B4F91B177EC80067982B /* BUYAddress+Additions.h */; };
901931341BC5B9BC00D1134E /* BUYViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BE1C4DF51AE98FBB00E21624 /* BUYViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931351BC5B9BC00D1134E /* BUYDiscount.h in Headers */ = {isa = PBXBuildFile; fileRef = 90AFAA681B0139DE00F21C23 /* BUYDiscount.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931361BC5B9BC00D1134E /* BUYProductView.h in Headers */ = {isa = PBXBuildFile; fileRef = 900396AA1B627CB900226B73 /* BUYProductView.h */; };
901931371BC5B9BC00D1134E /* BUYTaxLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 90AFAA5C1B011EA600F21C23 /* BUYTaxLine.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931381BC5B9BC00D1134E /* BUYVariantSelectionViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BE9496B01B4D96D800B38949 /* BUYVariantSelectionViewController.h */; };
901931391BC5B9BC00D1134E /* BUYOptionValueCell.h in Headers */ = {isa = PBXBuildFile; fileRef = BE1007991B6165EC0031CEE7 /* BUYOptionValueCell.h */; };
9019313A1BC5B9BC00D1134E /* BUYImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF52A791A700B0A0087DB2C /* BUYImage.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019313B1BC5B9BC00D1134E /* BUYOptionValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BEEA83E51B0B76C7000C6483 /* BUYOptionValue.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019313C1BC5B9BC00D1134E /* BUYShop.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF52A831A700B0A0087DB2C /* BUYShop.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019313D1BC5B9BC00D1134E /* BUYShippingRate.h in Headers */ = {isa = PBXBuildFile; fileRef = 90AFAA641B01398A00F21C23 /* BUYShippingRate.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019313E1BC5B9BC00D1134E /* BUYApplePayAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = F70CE40D1A8BF1D90055BEB8 /* BUYApplePayAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019313F1BC5B9BC00D1134E /* BUYProduct+Options.h in Headers */ = {isa = PBXBuildFile; fileRef = BE9496B61B4D96F100B38949 /* BUYProduct+Options.h */; };
901931401BC5B9BC00D1134E /* BUYTheme+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = 906EAE411B836DE000976165 /* BUYTheme+Additions.h */; };
901931411BC5B9BC00D1134E /* BUYVariantOptionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516CA11B4D771400E35E45 /* BUYVariantOptionView.h */; };
901931421BC5B9BC00D1134E /* BUYMaskedCreditCard.h in Headers */ = {isa = PBXBuildFile; fileRef = BE5DC3611B71022D00B2BC1E /* BUYMaskedCreditCard.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931431BC5B9BC00D1134E /* BUYProductViewHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516C851B4C6F7000E35E45 /* BUYProductViewHeader.h */; };
901931441BC5B9BC00D1134E /* BUYProductViewHeaderBackgroundImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 90FC31A61B50371600AFAB51 /* BUYProductViewHeaderBackgroundImageView.h */; };
901931451BC5B9BC00D1134E /* UIFont+BUYAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 909944471B71B76800C40A33 /* UIFont+BUYAdditions.h */; };
901931461BC5B9BC00D1134E /* BUYCheckoutButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 900396AE1B67BD0A00226B73 /* BUYCheckoutButton.h */; };
901931471BC5B9BC00D1134E /* BUYPaymentButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 905AA96F1B3B32A500CAE037 /* BUYPaymentButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931481BC5B9BC00D1134E /* BUYImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516CAE1B4EC9FE00E35E45 /* BUYImageView.h */; };
901931491BC5B9BC00D1134E /* BUYGiftCard.h in Headers */ = {isa = PBXBuildFile; fileRef = 42488B321AB8761A005F21A9 /* BUYGiftCard.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019314A1BC5B9BC00D1134E /* BUYClient+Test.h in Headers */ = {isa = PBXBuildFile; fileRef = BE2E1D381B5E8663009610DA /* BUYClient+Test.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019314B1BC5B9BC00D1134E /* BUYNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516CC11B4F1ED700E35E45 /* BUYNavigationController.h */; };
9019314C1BC5B9BC00D1134E /* NSURL+BUYAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = BE5DC39E1B71B13700B2BC1E /* NSURL+BUYAdditions.h */; };
9019314D1BC5B9BC00D1134E /* BUYVariantOptionBreadCrumbsView.h in Headers */ = {isa = PBXBuildFile; fileRef = 90DE926E1B9897B6002EF4DA /* BUYVariantOptionBreadCrumbsView.h */; };
9019314E1BC5B9BC00D1134E /* BUYProductViewFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516C791B4C589A00E35E45 /* BUYProductViewFooter.h */; };
9019314F1BC5B9BC00D1134E /* BUYOptionSelectionViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BE9496AE1B4D96D800B38949 /* BUYOptionSelectionViewController.h */; };
901931501BC5B9BC00D1134E /* BUYOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = 90E83BC21B9F550E00C95A1B /* BUYOrder.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931511BC5B9BC00D1134E /* Buy.h in Headers */ = {isa = PBXBuildFile; fileRef = 904FB6011AE03D4500EA1758 /* Buy.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931521BC5B9BC00D1134E /* NSDate+BUYAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 90A4461F1B5E8614009602AA /* NSDate+BUYAdditions.h */; };
901931531BC5B9BC00D1134E /* BUYOptionSelectionNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = BEB74A251B554BFB0005A300 /* BUYOptionSelectionNavigationController.h */; };
901931541BC5B9BC00D1134E /* BUYPresentationControllerWithNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516CBD1B4F110A00E35E45 /* BUYPresentationControllerWithNavigationController.h */; };
901931551BC5B9BC00D1134E /* BUYPresentationControllerForVariantSelection.h in Headers */ = {isa = PBXBuildFile; fileRef = BEB74A1F1B554BF20005A300 /* BUYPresentationControllerForVariantSelection.h */; };
901931561BC5B9BC00D1134E /* BUYProductVariant+Options.h in Headers */ = {isa = PBXBuildFile; fileRef = BE1007931B6038150031CEE7 /* BUYProductVariant+Options.h */; };
901931571BC5B9BC00D1134E /* BUYObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF52A931A7010B20087DB2C /* BUYObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931581BC5B9BC00D1134E /* BUYRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF52A731A700AC80087DB2C /* BUYRuntime.h */; };
901931591BC5B9BC00D1134E /* BUYCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BEB74A8E1B55A3D00005A300 /* BUYCollection.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019315A1BC5B9BC00D1134E /* BUYProductImageCollectionViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 904606AD1B6BC8D700754173 /* BUYProductImageCollectionViewCell.h */; };
9019315B1BC5B9BC00D1134E /* BUYImageKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 900E7C811B5DA32F006F3C81 /* BUYImageKit.h */; };
9019315C1BC5B9BC00D1134E /* BUYCollection+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = 900396F41B69563400226B73 /* BUYCollection+Additions.h */; };
9019315D1BC5B9BC00D1134E /* NSDateFormatter+BUYAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 90A446231B5EC03F009602AA /* NSDateFormatter+BUYAdditions.h */; };
9019315E1BC5B9BC00D1134E /* BUYError.h in Headers */ = {isa = PBXBuildFile; fileRef = BE47340D1B66C4EF00AA721A /* BUYError.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019315F1BC5B9BC00D1134E /* BUYProductHeaderCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516C971B4D76D900E35E45 /* BUYProductHeaderCell.h */; };
901931601BC5B9BC00D1134E /* BUYProductViewErrorView.h in Headers */ = {isa = PBXBuildFile; fileRef = 903BCC7A1B7D1C2D00C21FEB /* BUYProductViewErrorView.h */; };
901931611BC5B9BC00D1134E /* BUYClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F7FDA17019C93F6F00AF4E93 /* BUYClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931631BC5B9BC00D1134E /* BUYGradientView.h in Headers */ = {isa = PBXBuildFile; fileRef = 90516CB21B4EE5E700E35E45 /* BUYGradientView.h */; };
901931641BC5B9BC00D1134E /* BUYCartLineItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 900396991B601DF400226B73 /* BUYCartLineItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931651BC5B9BC00D1134E /* NSDecimalNumber+BUYAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF52A9B1A7011DC0087DB2C /* NSDecimalNumber+BUYAdditions.h */; };
901931661BC5B9BC00D1134E /* BUYCheckout.h in Headers */ = {isa = PBXBuildFile; fileRef = F773749419C77C260039681C /* BUYCheckout.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931671BC5B9BC00D1134E /* BUYCart.h in Headers */ = {isa = PBXBuildFile; fileRef = F773744719C77A210039681C /* BUYCart.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931681BC5B9BC00D1134E /* BUYProductViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 905ECCC01B4C39710094F336 /* BUYProductViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
901931691BC5B9BC00D1134E /* BUYProduct.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF52A7C1A700B0A0087DB2C /* BUYProduct.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019316A1BC5B9BC00D1134E /* BUYSerializable.h in Headers */ = {isa = PBXBuildFile; fileRef = F76CFF1E19CB7C500079C703 /* BUYSerializable.h */; settings = {ATTRIBUTES = (Public, ); }; };
9019316B1BC5B9BC00D1134E /* BUYProductVariant.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AF52A811A700B0A0087DB2C /* BUYProductVariant.h */; settings = {ATTRIBUTES = (Public, ); }; };
9035F5FA1BC81D050009DD3B /* Buy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 901931701BC5B9BC00D1134E /* Buy.framework */; };
9035F5FB1BC81D050009DD3B /* Buy.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 901931701BC5B9BC00D1134E /* Buy.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
903BCC7C1B7D1C2D00C21FEB /* BUYProductViewErrorView.h in Headers */ = {isa = PBXBuildFile; fileRef = 903BCC7A1B7D1C2D00C21FEB /* BUYProductViewErrorView.h */; };
903BCC7D1B7D1C2D00C21FEB /* BUYProductViewErrorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 903BCC7B1B7D1C2D00C21FEB /* BUYProductViewErrorView.m */; };
904606AF1B6BC8D700754173 /* BUYProductImageCollectionViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 904606AD1B6BC8D700754173 /* BUYProductImageCollectionViewCell.h */; };
......@@ -61,6 +197,8 @@
90A446261B5EC03F009602AA /* NSDateFormatter+BUYAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 90A446241B5EC03F009602AA /* NSDateFormatter+BUYAdditions.m */; };
90BBCD731B87B6BA00FCCE51 /* BUYPKContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BBCD701B87B6AB00FCCE51 /* BUYPKContact.m */; };
90C27AAF1BB2E8F3008AF7A4 /* libOHHTTPStubs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE98DB501BB1ED5500C29564 /* libOHHTTPStubs.a */; };
90DAEC361BC6E511007555A5 /* Buy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE9A64281B503C2F0033E558 /* Buy.framework */; };
90DAEC381BC6E736007555A5 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 901931761BC5BC9100D1134E /* libc++.tbd */; };
90DE92701B9897B6002EF4DA /* BUYVariantOptionBreadCrumbsView.h in Headers */ = {isa = PBXBuildFile; fileRef = 90DE926E1B9897B6002EF4DA /* BUYVariantOptionBreadCrumbsView.h */; };
90DE92711B9897B6002EF4DA /* BUYVariantOptionBreadCrumbsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 90DE926F1B9897B6002EF4DA /* BUYVariantOptionBreadCrumbsView.m */; };
90E83BC41B9F550E00C95A1B /* BUYOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = 90E83BC21B9F550E00C95A1B /* BUYOrder.h */; settings = {ATTRIBUTES = (Public, ); }; };
......@@ -92,10 +230,8 @@
BE5DC3A01B71B13700B2BC1E /* NSURL+BUYAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = BE5DC39E1B71B13700B2BC1E /* NSURL+BUYAdditions.h */; };
BE5DC3A11B71B13700B2BC1E /* NSURL+BUYAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = BE5DC39F1B71B13700B2BC1E /* NSURL+BUYAdditions.m */; };
BE6C07061BB1E46900BD9F7B /* mocked_responses.json in Resources */ = {isa = PBXBuildFile; fileRef = BE6C07051BB1E46900BD9F7B /* mocked_responses.json */; };
BE94966A1B45CD0500B38949 /* libstdc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F7AB6AB819CFCE6A00115224 /* libstdc++.dylib */; };
BE98DB4F1BB1ED3E00C29564 /* OHHTTPStubs in Resources */ = {isa = PBXBuildFile; fileRef = BE98DB4E1BB1ED3E00C29564 /* OHHTTPStubs */; settings = {ASSET_TAGS = (); }; };
BE98DB5C1BB1F4D000C29564 /* OHHTTPStubsResponse+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = BE98DB5B1BB1F4D000C29564 /* OHHTTPStubsResponse+Helpers.m */; settings = {ASSET_TAGS = (); }; };
BE9A643F1B503C2F0033E558 /* Buy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE9A64281B503C2F0033E558 /* Buy.framework */; };
BE9A64471B503C8B0033E558 /* BUYClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F7FDA17019C93F6F00AF4E93 /* BUYClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
BE9A64481B503C900033E558 /* BUYClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F7FDA17119C93F6F00AF4E93 /* BUYClient.m */; };
BE9A64491B503C940033E558 /* BUYCart.h in Headers */ = {isa = PBXBuildFile; fileRef = F773744719C77A210039681C /* BUYCart.h */; settings = {ATTRIBUTES = (Public, ); }; };
......@@ -188,8 +324,6 @@
BEB74A7C1B5564840005A300 /* BUYVariantOptionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 90516CA21B4D771400E35E45 /* BUYVariantOptionView.m */; };
BEB74A7D1B5564870005A300 /* BUYVariantSelectionViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BE9496B01B4D96D800B38949 /* BUYVariantSelectionViewController.h */; };
BEB74A7E1B5564890005A300 /* BUYVariantSelectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE9496B11B4D96D800B38949 /* BUYVariantSelectionViewController.m */; };
BEB74A841B557BBE0005A300 /* Buy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE9A64281B503C2F0033E558 /* Buy.framework */; };
BEB74A851B5580B20005A300 /* Buy-Bridging-Header.h in Headers */ = {isa = PBXBuildFile; fileRef = BE9A639D1B500B360033E558 /* Buy-Bridging-Header.h */; settings = {ATTRIBUTES = (Public, ); }; };
BEB74A901B55A3D00005A300 /* BUYCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BEB74A8E1B55A3D00005A300 /* BUYCollection.h */; settings = {ATTRIBUTES = (Public, ); }; };
BEB9AE781BA8627B00575F8A /* test_shop_data.json in Resources */ = {isa = PBXBuildFile; fileRef = BEB9AE721BA73E6C00575F8A /* test_shop_data.json */; };
BEB9AE7B1BA866D000575F8A /* BUYClientTestBase.h in Sources */ = {isa = PBXBuildFile; fileRef = BEB9AE7A1BA866D000575F8A /* BUYClientTestBase.h */; };
......@@ -197,14 +331,14 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
BE9A643D1B503C2F0033E558 /* PBXContainerItemProxy */ = {
9035F5FE1BC81D280009DD3B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F773741519C770CB0039681C /* Project object */;
proxyType = 1;
remoteGlobalIDString = BE9A64271B503C2F0033E558;
remoteInfo = Buy;
remoteInfo = "Buy Static";
};
BEB74A821B557BBA0005A300 /* PBXContainerItemProxy */ = {
90DAEC341BC6E50B007555A5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F773741519C770CB0039681C /* Project object */;
proxyType = 1;
......@@ -220,6 +354,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
9035F5FB1BC81D050009DD3B /* Buy.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -256,12 +391,14 @@
900396F51B69563400226B73 /* BUYCollection+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BUYCollection+Additions.m"; sourceTree = "<group>"; };
900E7C811B5DA32F006F3C81 /* BUYImageKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BUYImageKit.h; sourceTree = "<group>"; };
900E7C821B5DA32F006F3C81 /* BUYImageKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYImageKit.m; sourceTree = "<group>"; };
901931701BC5B9BC00D1134E /* Buy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Buy.framework; sourceTree = BUILT_PRODUCTS_DIR; };
901931761BC5BC9100D1134E /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
903BCC7A1B7D1C2D00C21FEB /* BUYProductViewErrorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = BUYProductViewErrorView.h; path = "Product View/BUYProductViewErrorView.h"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
903BCC7B1B7D1C2D00C21FEB /* BUYProductViewErrorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BUYProductViewErrorView.m; path = "Product View/BUYProductViewErrorView.m"; sourceTree = "<group>"; };
904606AD1B6BC8D700754173 /* BUYProductImageCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = BUYProductImageCollectionViewCell.h; path = "Product View/BUYProductImageCollectionViewCell.h"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
904606AE1B6BC8D700754173 /* BUYProductImageCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BUYProductImageCollectionViewCell.m; path = "Product View/BUYProductImageCollectionViewCell.m"; sourceTree = "<group>"; };
904FB6001AE03D4500EA1758 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = "Mobile Buy SDK/Info.plist"; sourceTree = "<group>"; };
904FB6011AE03D4500EA1758 /* Buy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Buy.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
904FB6011AE03D4500EA1758 /* Buy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = Buy.h; path = "Mobile Buy SDK/Static Framework/Buy.h"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
90516C791B4C589A00E35E45 /* BUYProductViewFooter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = BUYProductViewFooter.h; path = "Product View/BUYProductViewFooter.h"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
90516C7A1B4C589A00E35E45 /* BUYProductViewFooter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BUYProductViewFooter.m; path = "Product View/BUYProductViewFooter.m"; sourceTree = "<group>"; };
90516C851B4C6F7000E35E45 /* BUYProductViewHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = BUYProductViewHeader.h; path = "Product View/BUYProductViewHeader.h"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
......@@ -316,6 +453,7 @@
90BBCD701B87B6AB00FCCE51 /* BUYPKContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYPKContact.m; sourceTree = "<group>"; };
90BC07F51AE043FD005D1195 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
90BC07F71AE0440F005D1195 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
90DA8DF11BC6A82D0027BCB7 /* Buy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Buy.h; sourceTree = "<group>"; };
90DE926E1B9897B6002EF4DA /* BUYVariantOptionBreadCrumbsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BUYVariantOptionBreadCrumbsView.h; sourceTree = "<group>"; };
90DE926F1B9897B6002EF4DA /* BUYVariantOptionBreadCrumbsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYVariantOptionBreadCrumbsView.m; sourceTree = "<group>"; };
90E80E461AFBBB68003A9909 /* AppledocSettings.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppledocSettings.plist; path = docs/AppledocSettings.plist; sourceTree = "<group>"; };
......@@ -380,14 +518,13 @@
BE98DB501BB1ED5500C29564 /* libOHHTTPStubs.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libOHHTTPStubs.a; path = "Mobile Buy SDK Tests/OHHTTPStubs/libOHHTTPStubs.a"; sourceTree = "<group>"; };
BE98DB5A1BB1F4D000C29564 /* OHHTTPStubsResponse+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubsResponse+Helpers.h"; sourceTree = "<group>"; };
BE98DB5B1BB1F4D000C29564 /* OHHTTPStubsResponse+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubsResponse+Helpers.m"; sourceTree = "<group>"; };
BE9A639D1B500B360033E558 /* Buy-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "Buy-Bridging-Header.h"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
BE9A64281B503C2F0033E558 /* Buy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Buy.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BEB74A1B1B5490140005A300 /* BUYCheckout_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BUYCheckout_Private.h; sourceTree = "<group>"; };
BEB74A1F1B554BF20005A300 /* BUYPresentationControllerForVariantSelection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BUYPresentationControllerForVariantSelection.h; path = "Mobile Buy SDK/Product View/Variant Selection/BUYPresentationControllerForVariantSelection.h"; sourceTree = SOURCE_ROOT; };
BEB74A201B554BF20005A300 /* BUYPresentationControllerForVariantSelection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BUYPresentationControllerForVariantSelection.m; path = "Mobile Buy SDK/Product View/Variant Selection/BUYPresentationControllerForVariantSelection.m"; sourceTree = SOURCE_ROOT; };
BEB74A251B554BFB0005A300 /* BUYOptionSelectionNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BUYOptionSelectionNavigationController.h; path = "Mobile Buy SDK/Product View/Variant Selection/BUYOptionSelectionNavigationController.h"; sourceTree = SOURCE_ROOT; };
BEB74A261B554BFB0005A300 /* BUYOptionSelectionNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BUYOptionSelectionNavigationController.m; path = "Mobile Buy SDK/Product View/Variant Selection/BUYOptionSelectionNavigationController.m"; sourceTree = SOURCE_ROOT; };
BEB74A7F1B557A1C0005A300 /* Buy.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; lineEnding = 0; path = Buy.modulemap; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = "xcode.lang.module-map"; };
BEB74A7F1B557A1C0005A300 /* Buy.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; lineEnding = 0; name = Buy.modulemap; path = "Mobile Buy SDK/Static Framework/Buy.modulemap"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = "xcode.lang.module-map"; };
BEB74A861B5589C80005A300 /* BUYCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BUYCollection.h; sourceTree = "<group>"; };
BEB74A871B5589C80005A300 /* BUYCollection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYCollection.m; sourceTree = "<group>"; };
BEB74A8E1B55A3D00005A300 /* BUYCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BUYCollection.h; sourceTree = "<group>"; };
......@@ -412,16 +549,23 @@
F7FDA16C19C939FF00AF4E93 /* BUYLineItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BUYLineItem.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
F7FDA16D19C939FF00AF4E93 /* BUYLineItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BUYLineItem.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
F7FDA17019C93F6F00AF4E93 /* BUYClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BUYClient.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
F7FDA17119C93F6F00AF4E93 /* BUYClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BUYClient.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
F7FDA17119C93F6F00AF4E93 /* BUYClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BUYClient.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
901931251BC5B9BC00D1134E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
90F592E91B0D5EFE0026B382 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BEB74A841B557BBE0005A300 /* Buy.framework in Frameworks */,
BE94966A1B45CD0500B38949 /* libstdc++.dylib in Frameworks */,
90DAEC381BC6E736007555A5 /* libc++.tbd in Frameworks */,
90DAEC361BC6E511007555A5 /* Buy.framework in Frameworks */,
90C27AAF1BB2E8F3008AF7A4 /* libOHHTTPStubs.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -430,7 +574,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BE9A643F1B503C2F0033E558 /* Buy.framework in Frameworks */,
9035F5FA1BC81D050009DD3B /* Buy.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -447,6 +591,7 @@
547B8D0CCDB9458C800F1E3C /* Frameworks */ = {
isa = PBXGroup;
children = (
901931761BC5BC9100D1134E /* libc++.tbd */,
BE98DB501BB1ED5500C29564 /* libOHHTTPStubs.a */,
BE98DB4E1BB1ED3E00C29564 /* OHHTTPStubs */,
BE6C07031BB1DE1D00BD9F7B /* OHHTTPStubs.framework */,
......@@ -651,6 +796,7 @@
90F7BA681B0D1DAF0067864D /* Playground.app */,
90F592EC1B0D5EFE0026B382 /* Mobile Buy SDK Tests.xctest */,
BE9A64281B503C2F0033E558 /* Buy.framework */,
901931701BC5B9BC00D1134E /* Buy.framework */,
);
name = Products;
sourceTree = "<group>";
......@@ -658,9 +804,6 @@
F773743A19C777200039681C /* Mobile Buy SDK */ = {
isa = PBXGroup;
children = (
BE9A639D1B500B360033E558 /* Buy-Bridging-Header.h */,
904FB6011AE03D4500EA1758 /* Buy.h */,
BEB74A7F1B557A1C0005A300 /* Buy.modulemap */,
F773749F19C77E4E0039681C /* Classes */,
F773749E19C77E460039681C /* Supporting Files */,
);
......@@ -760,6 +903,8 @@
F773749E19C77E460039681C /* Supporting Files */ = {
isa = PBXGroup;
children = (
BEB74A7F1B557A1C0005A300 /* Buy.modulemap */,
904FB6011AE03D4500EA1758 /* Buy.h */,
F773743619C771D10039681C /* LICENSE */,
90B043AF1B0D380D006CA6FC /* README.md */,
904FB6001AE03D4500EA1758 /* Info.plist */,
......@@ -771,6 +916,7 @@
F773749F19C77E4E0039681C /* Classes */ = {
isa = PBXGroup;
children = (
90DA8DF11BC6A82D0027BCB7 /* Buy.h */,
F7FDA16F19C93F6100AF4E93 /* Data */,
F773744419C779C20039681C /* Models */,
90FC31AB1B50589800AFAB51 /* Product View */,
......@@ -794,6 +940,81 @@
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
901931261BC5B9BC00D1134E /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
901931271BC5B9BC00D1134E /* BUYAddress.h in Headers */,
901931281BC5B9BC00D1134E /* BUYApplePayHelpers.h in Headers */,
901931291BC5B9BC00D1134E /* BUYStoreViewController.h in Headers */,
9019312A1BC5B9BC00D1134E /* BUYCreditCard.h in Headers */,
9019312B1BC5B9BC00D1134E /* BUYOption.h in Headers */,
9019312C1BC5B9BC00D1134E /* BUYProductVariantCell.h in Headers */,
9019312D1BC5B9BC00D1134E /* BUYTheme.h in Headers */,
9019312E1BC5B9BC00D1134E /* BUYProductDescriptionCell.h in Headers */,
9019312F1BC5B9BC00D1134E /* BUYLineItem.h in Headers */,
901931301BC5B9BC00D1134E /* BUYCheckout+Additions.h in Headers */,
901931311BC5B9BC00D1134E /* BUYProductViewHeaderOverlay.h in Headers */,
901931321BC5B9BC00D1134E /* NSString+Trim.h in Headers */,
901931331BC5B9BC00D1134E /* BUYAddress+Additions.h in Headers */,
901931341BC5B9BC00D1134E /* BUYViewController.h in Headers */,
901931351BC5B9BC00D1134E /* BUYDiscount.h in Headers */,
901931361BC5B9BC00D1134E /* BUYProductView.h in Headers */,
901931371BC5B9BC00D1134E /* BUYTaxLine.h in Headers */,
901931381BC5B9BC00D1134E /* BUYVariantSelectionViewController.h in Headers */,
901931391BC5B9BC00D1134E /* BUYOptionValueCell.h in Headers */,
9019313A1BC5B9BC00D1134E /* BUYImage.h in Headers */,
9019313B1BC5B9BC00D1134E /* BUYOptionValue.h in Headers */,
9019313C1BC5B9BC00D1134E /* BUYShop.h in Headers */,
9019313D1BC5B9BC00D1134E /* BUYShippingRate.h in Headers */,
9019313E1BC5B9BC00D1134E /* BUYApplePayAdditions.h in Headers */,
9019313F1BC5B9BC00D1134E /* BUYProduct+Options.h in Headers */,
901931401BC5B9BC00D1134E /* BUYTheme+Additions.h in Headers */,
901931411BC5B9BC00D1134E /* BUYVariantOptionView.h in Headers */,
901931421BC5B9BC00D1134E /* BUYMaskedCreditCard.h in Headers */,
901931431BC5B9BC00D1134E /* BUYProductViewHeader.h in Headers */,
901931441BC5B9BC00D1134E /* BUYProductViewHeaderBackgroundImageView.h in Headers */,
901931451BC5B9BC00D1134E /* UIFont+BUYAdditions.h in Headers */,
901931461BC5B9BC00D1134E /* BUYCheckoutButton.h in Headers */,
901931471BC5B9BC00D1134E /* BUYPaymentButton.h in Headers */,
901931481BC5B9BC00D1134E /* BUYImageView.h in Headers */,
901931491BC5B9BC00D1134E /* BUYGiftCard.h in Headers */,
9019314A1BC5B9BC00D1134E /* BUYClient+Test.h in Headers */,
9019314B1BC5B9BC00D1134E /* BUYNavigationController.h in Headers */,
9019314C1BC5B9BC00D1134E /* NSURL+BUYAdditions.h in Headers */,
9019314D1BC5B9BC00D1134E /* BUYVariantOptionBreadCrumbsView.h in Headers */,
9019314E1BC5B9BC00D1134E /* BUYProductViewFooter.h in Headers */,
9019314F1BC5B9BC00D1134E /* BUYOptionSelectionViewController.h in Headers */,
901931501BC5B9BC00D1134E /* BUYOrder.h in Headers */,
901931511BC5B9BC00D1134E /* Buy.h in Headers */,
901931521BC5B9BC00D1134E /* NSDate+BUYAdditions.h in Headers */,
901931531BC5B9BC00D1134E /* BUYOptionSelectionNavigationController.h in Headers */,
901931541BC5B9BC00D1134E /* BUYPresentationControllerWithNavigationController.h in Headers */,
901931551BC5B9BC00D1134E /* BUYPresentationControllerForVariantSelection.h in Headers */,
901931561BC5B9BC00D1134E /* BUYProductVariant+Options.h in Headers */,
901931571BC5B9BC00D1134E /* BUYObject.h in Headers */,
901931581BC5B9BC00D1134E /* BUYRuntime.h in Headers */,
901931591BC5B9BC00D1134E /* BUYCollection.h in Headers */,
9019315A1BC5B9BC00D1134E /* BUYProductImageCollectionViewCell.h in Headers */,
9019315B1BC5B9BC00D1134E /* BUYImageKit.h in Headers */,
9019315C1BC5B9BC00D1134E /* BUYCollection+Additions.h in Headers */,
9019315D1BC5B9BC00D1134E /* NSDateFormatter+BUYAdditions.h in Headers */,
9019315E1BC5B9BC00D1134E /* BUYError.h in Headers */,
9019315F1BC5B9BC00D1134E /* BUYProductHeaderCell.h in Headers */,
901931601BC5B9BC00D1134E /* BUYProductViewErrorView.h in Headers */,
901931611BC5B9BC00D1134E /* BUYClient.h in Headers */,
901931631BC5B9BC00D1134E /* BUYGradientView.h in Headers */,
901931641BC5B9BC00D1134E /* BUYCartLineItem.h in Headers */,
901931651BC5B9BC00D1134E /* NSDecimalNumber+BUYAdditions.h in Headers */,
901931661BC5B9BC00D1134E /* BUYCheckout.h in Headers */,
901931671BC5B9BC00D1134E /* BUYCart.h in Headers */,
901931681BC5B9BC00D1134E /* BUYProductViewController.h in Headers */,
901931691BC5B9BC00D1134E /* BUYProduct.h in Headers */,
9019316A1BC5B9BC00D1134E /* BUYSerializable.h in Headers */,
9019316B1BC5B9BC00D1134E /* BUYProductVariant.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
BE9A64251B503C2F0033E558 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
......@@ -857,7 +1078,6 @@
BEB74A6D1B5564200005A300 /* BUYProductHeaderCell.h in Headers */,
903BCC7C1B7D1C2D00C21FEB /* BUYProductViewErrorView.h in Headers */,
BE9A64471B503C8B0033E558 /* BUYClient.h in Headers */,
BEB74A851B5580B20005A300 /* Buy-Bridging-Header.h in Headers */,
BEB74A651B5563FF0005A300 /* BUYGradientView.h in Headers */,
9003969B1B601DF400226B73 /* BUYCartLineItem.h in Headers */,
BE9A64701B503D230033E558 /* NSDecimalNumber+BUYAdditions.h in Headers */,
......@@ -873,6 +1093,24 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
901930E11BC5B9BC00D1134E /* Buy */ = {
isa = PBXNativeTarget;
buildConfigurationList = 9019316D1BC5B9BC00D1134E /* Build configuration list for PBXNativeTarget "Buy" */;
buildPhases = (
901930E21BC5B9BC00D1134E /* Sources */,
901931251BC5B9BC00D1134E /* Frameworks */,
901931261BC5B9BC00D1134E /* Headers */,
9019316C1BC5B9BC00D1134E /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Buy;
productName = Buy;
productReference = 901931701BC5B9BC00D1134E /* Buy.framework */;
productType = "com.apple.product-type.framework";
};
90F592EB1B0D5EFE0026B382 /* Mobile Buy SDK Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 90F592F51B0D5EFE0026B382 /* Build configuration list for PBXNativeTarget "Mobile Buy SDK Tests" */;
......@@ -884,7 +1122,7 @@
buildRules = (
);
dependencies = (
BEB74A831B557BBA0005A300 /* PBXTargetDependency */,
90DAEC351BC6E50B007555A5 /* PBXTargetDependency */,
);
name = "Mobile Buy SDK Tests";
productName = "Mobile Buy SDK Tests";
......@@ -903,16 +1141,16 @@
buildRules = (
);
dependencies = (
BE9A643E1B503C2F0033E558 /* PBXTargetDependency */,
9035F5FF1BC81D280009DD3B /* PBXTargetDependency */,
);
name = Playground;
productName = Playground;
productReference = 90F7BA681B0D1DAF0067864D /* Playground.app */;
productType = "com.apple.product-type.application";
};
BE9A64271B503C2F0033E558 /* Buy */ = {
BE9A64271B503C2F0033E558 /* Buy Static */ = {
isa = PBXNativeTarget;
buildConfigurationList = BE9A64411B503C2F0033E558 /* Build configuration list for PBXNativeTarget "Buy" */;
buildConfigurationList = BE9A64411B503C2F0033E558 /* Build configuration list for PBXNativeTarget "Buy Static" */;
buildPhases = (
BE9A64231B503C2F0033E558 /* Sources */,
BE9A64241B503C2F0033E558 /* Frameworks */,
......@@ -923,7 +1161,7 @@
);
dependencies = (
);
name = Buy;
name = "Buy Static";
productName = Buy;
productReference = BE9A64281B503C2F0033E558 /* Buy.framework */;
productType = "com.apple.product-type.framework";
......@@ -949,7 +1187,6 @@
};
90F7BA671B0D1DAF0067864D = {
CreatedOnToolsVersion = 6.3.2;
DevelopmentTeam = A7XGC83MZE;
SystemCapabilities = {
com.apple.OMC = {
enabled = 1;
......@@ -974,16 +1211,24 @@
projectDirPath = "";
projectRoot = "";
targets = (
904FB61A1AE03DC500EA1758 /* Universal Framework */,
904FB61A1AE03DC500EA1758 /* Static Universal Framework */,
90E80E401AFAB0B9003A9909 /* Documentation */,
90F7BA671B0D1DAF0067864D /* Playground */,
90F592EB1B0D5EFE0026B382 /* Mobile Buy SDK Tests */,
BE9A64271B503C2F0033E558 /* Buy */,
BE9A64271B503C2F0033E558 /* Buy Static */,
901930E11BC5B9BC00D1134E /* Buy */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
9019316C1BC5B9BC00D1134E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
90F7BA661B0D1DAF0067864D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
......@@ -1043,6 +1288,79 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
901930E21BC5B9BC00D1134E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
901930E31BC5B9BC00D1134E /* BUYApplePayHelpers.m in Sources */,
901930E41BC5B9BC00D1134E /* BUYOptionSelectionViewController.m in Sources */,
901930E51BC5B9BC00D1134E /* BUYVariantOptionView.m in Sources */,
901930E61BC5B9BC00D1134E /* BUYPresentationControllerForVariantSelection.m in Sources */,
901930E71BC5B9BC00D1134E /* NSDecimalNumber+BUYAdditions.m in Sources */,
901930E81BC5B9BC00D1134E /* BUYImage.m in Sources */,
901930E91BC5B9BC00D1134E /* BUYProductVariant.m in Sources */,
901930EA1BC5B9BC00D1134E /* BUYProductViewController.m in Sources */,
901930EB1BC5B9BC00D1134E /* NSDateFormatter+BUYAdditions.m in Sources */,
901930EC1BC5B9BC00D1134E /* BUYError.m in Sources */,
901930ED1BC5B9BC00D1134E /* BUYProductViewHeader.m in Sources */,
901930EE1BC5B9BC00D1134E /* BUYNavigationController.m in Sources */,
901930EF1BC5B9BC00D1134E /* BUYVariantSelectionViewController.m in Sources */,
901930F01BC5B9BC00D1134E /* BUYCheckout+Additions.m in Sources */,
901930F11BC5B9BC00D1134E /* NSString+Trim.m in Sources */,
901930F21BC5B9BC00D1134E /* BUYOrder.m in Sources */,
901930F31BC5B9BC00D1134E /* BUYAddress+Additions.m in Sources */,
901930F41BC5B9BC00D1134E /* BUYProductViewHeaderBackgroundImageView.m in Sources */,
901930F51BC5B9BC00D1134E /* BUYProductViewHeaderOverlay.m in Sources */,
901930F61BC5B9BC00D1134E /* BUYProductVariantCell.m in Sources */,
901930F71BC5B9BC00D1134E /* BUYTheme.m in Sources */,
901930F81BC5B9BC00D1134E /* BUYProductVariant+Options.m in Sources */,
901930F91BC5B9BC00D1134E /* BUYProductViewErrorView.m in Sources */,
901930FA1BC5B9BC00D1134E /* BUYLineItem.m in Sources */,
901930FB1BC5B9BC00D1134E /* BUYCheckoutButton.m in Sources */,
901930FC1BC5B9BC00D1134E /* BUYCollection.m in Sources */,
901930FD1BC5B9BC00D1134E /* BUYTaxLine.m in Sources */,
901930FE1BC5B9BC00D1134E /* BUYCollection+Additions.m in Sources */,
901930FF1BC5B9BC00D1134E /* BUYVariantOptionBreadCrumbsView.m in Sources */,
901931001BC5B9BC00D1134E /* NSURL+BUYAdditions.m in Sources */,
901931011BC5B9BC00D1134E /* BUYTheme+Additions.m in Sources */,
901931021BC5B9BC00D1134E /* BUYStoreViewController.m in Sources */,
901931031BC5B9BC00D1134E /* BUYOptionValue.m in Sources */,
901931041BC5B9BC00D1134E /* BUYApplePayAdditions.m in Sources */,
901931051BC5B9BC00D1134E /* BUYOptionSelectionNavigationController.m in Sources */,
901931061BC5B9BC00D1134E /* BUYDiscount.m in Sources */,
901931071BC5B9BC00D1134E /* NSDate+BUYAdditions.m in Sources */,
901931081BC5B9BC00D1134E /* BUYRuntime.m in Sources */,
901931091BC5B9BC00D1134E /* BUYCart.m in Sources */,
9019310A1BC5B9BC00D1134E /* BUYPaymentButton.m in Sources */,
9019310B1BC5B9BC00D1134E /* BUYProduct+Options.m in Sources */,
9019310C1BC5B9BC00D1134E /* BUYGiftCard.m in Sources */,
9019310D1BC5B9BC00D1134E /* BUYOptionValueCell.m in Sources */,
9019310E1BC5B9BC00D1134E /* BUYProduct.m in Sources */,
9019310F1BC5B9BC00D1134E /* BUYImageView.m in Sources */,
901931101BC5B9BC00D1134E /* BUYProductHeaderCell.m in Sources */,
901931111BC5B9BC00D1134E /* BUYCartLineItem.m in Sources */,
901931121BC5B9BC00D1134E /* BUYMaskedCreditCard.m in Sources */,
901931131BC5B9BC00D1134E /* BUYCheckout.m in Sources */,
901931141BC5B9BC00D1134E /* BUYProductViewFooter.m in Sources */,
901931151BC5B9BC00D1134E /* BUYPresentationControllerWithNavigationController.m in Sources */,
901931161BC5B9BC00D1134E /* BUYShippingRate.m in Sources */,
901931171BC5B9BC00D1134E /* BUYClient+Test.m in Sources */,
901931181BC5B9BC00D1134E /* BUYGradientView.m in Sources */,
901931191BC5B9BC00D1134E /* BUYViewController.m in Sources */,
9019311A1BC5B9BC00D1134E /* BUYImageKit.m in Sources */,
9019311B1BC5B9BC00D1134E /* BUYAddress.m in Sources */,
9019311C1BC5B9BC00D1134E /* BUYOption.m in Sources */,
9019311D1BC5B9BC00D1134E /* BUYClient.m in Sources */,
9019311E1BC5B9BC00D1134E /* UIFont+BUYAdditions.m in Sources */,
9019311F1BC5B9BC00D1134E /* BUYProductView.m in Sources */,
901931201BC5B9BC00D1134E /* BUYCreditCard.m in Sources */,
901931211BC5B9BC00D1134E /* BUYProductImageCollectionViewCell.m in Sources */,
901931221BC5B9BC00D1134E /* BUYShop.m in Sources */,
901931231BC5B9BC00D1134E /* BUYObject.mm in Sources */,
901931241BC5B9BC00D1134E /* BUYProductDescriptionCell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
90F592E81B0D5EFE0026B382 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
......@@ -1150,15 +1468,15 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
BE9A643E1B503C2F0033E558 /* PBXTargetDependency */ = {
9035F5FF1BC81D280009DD3B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = BE9A64271B503C2F0033E558 /* Buy */;
targetProxy = BE9A643D1B503C2F0033E558 /* PBXContainerItemProxy */;
target = BE9A64271B503C2F0033E558 /* Buy Static */;
targetProxy = 9035F5FE1BC81D280009DD3B /* PBXContainerItemProxy */;
};
BEB74A831B557BBA0005A300 /* PBXTargetDependency */ = {
90DAEC351BC6E50B007555A5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = BE9A64271B503C2F0033E558 /* Buy */;
targetProxy = BEB74A821B557BBA0005A300 /* PBXContainerItemProxy */;
target = BE9A64271B503C2F0033E558 /* Buy Static */;
targetProxy = 90DAEC341BC6E50B007555A5 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
......@@ -1182,6 +1500,65 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
9019316E1BC5B9BC00D1134E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "$(SRCROOT)/Mobile Buy SDK/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = mh_dylib;
MODULEMAP_FILE = "";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
9019316F1BC5B9BC00D1134E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "$(SRCROOT)/Mobile Buy SDK/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = mh_dylib;
MODULEMAP_FILE = "";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
904FB61C1AE03DC500EA1758 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
......@@ -1324,6 +1701,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
......@@ -1341,8 +1719,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "${PROJECT_DIR}/Mobile Buy SDK/Buy.modulemap";
PRODUCT_NAME = "$(TARGET_NAME)";
MODULEMAP_FILE = "${PROJECT_DIR}/Mobile Buy SDK/Static Framework/Buy.modulemap";
PRODUCT_NAME = Buy;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
......@@ -1354,6 +1732,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
......@@ -1368,8 +1747,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "${PROJECT_DIR}/Mobile Buy SDK/Buy.modulemap";
PRODUCT_NAME = "$(TARGET_NAME)";
MODULEMAP_FILE = "${PROJECT_DIR}/Mobile Buy SDK/Static Framework/Buy.modulemap";
PRODUCT_NAME = Buy;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
......@@ -1462,7 +1841,16 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
904FB61B1AE03DC500EA1758 /* Build configuration list for PBXAggregateTarget "Universal Framework" */ = {
9019316D1BC5B9BC00D1134E /* Build configuration list for PBXNativeTarget "Buy" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9019316E1BC5B9BC00D1134E /* Debug */,
9019316F1BC5B9BC00D1134E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
904FB61B1AE03DC500EA1758 /* Build configuration list for PBXAggregateTarget "Static Universal Framework" */ = {
isa = XCConfigurationList;
buildConfigurations = (
904FB61C1AE03DC500EA1758 /* Debug */,
......@@ -1498,7 +1886,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
BE9A64411B503C2F0033E558 /* Build configuration list for PBXNativeTarget "Buy" */ = {
BE9A64411B503C2F0033E558 /* Build configuration list for PBXNativeTarget "Buy Static" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BE9A64421B503C2F0033E558 /* Debug */,
......
......@@ -14,7 +14,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE9A64271B503C2F0033E558"
BlueprintIdentifier = "901930E11BC5B9BC00D1134E"
BuildableName = "Buy.framework"
BlueprintName = "Buy"
ReferencedContainer = "container:Mobile Buy SDK.xcodeproj">
......@@ -45,7 +45,7 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE9A64271B503C2F0033E558"
BlueprintIdentifier = "901930E11BC5B9BC00D1134E"
BuildableName = "Buy.framework"
BlueprintName = "Buy"
ReferencedContainer = "container:Mobile Buy SDK.xcodeproj">
......@@ -63,7 +63,7 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE9A64271B503C2F0033E558"
BlueprintIdentifier = "901930E11BC5B9BC00D1134E"
BuildableName = "Buy.framework"
BlueprintName = "Buy"
ReferencedContainer = "container:Mobile Buy SDK.xcodeproj">
......@@ -71,7 +71,7 @@
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Release">
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
......
......@@ -15,8 +15,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "904FB61A1AE03DC500EA1758"
BuildableName = "Universal Framework"
BlueprintName = "Universal Framework"
BuildableName = "Static Universal Framework"
BlueprintName = "Static Universal Framework"
ReferencedContainer = "container:Mobile Buy SDK.xcodeproj">
</BuildableReference>
</BuildActionEntry>
......@@ -46,8 +46,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "904FB61A1AE03DC500EA1758"
BuildableName = "Universal Framework"
BlueprintName = "Universal Framework"
BuildableName = "Static Universal Framework"
BlueprintName = "Static Universal Framework"
ReferencedContainer = "container:Mobile Buy SDK.xcodeproj">
</BuildableReference>
</MacroExpansion>
......@@ -64,8 +64,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "904FB61A1AE03DC500EA1758"
BuildableName = "Universal Framework"
BlueprintName = "Universal Framework"
BuildableName = "Static Universal Framework"
BlueprintName = "Static Universal Framework"
ReferencedContainer = "container:Mobile Buy SDK.xcodeproj">
</BuildableReference>
</MacroExpansion>
......
......@@ -24,33 +24,36 @@
// THE SOFTWARE.
//
#import <Buy/BUYAddress.h>
#import <Buy/BUYCart.h>
#import <Buy/BUYCheckout.h>
#import <Buy/BUYCreditCard.h>
#import <Buy/BUYDiscount.h>
#import <Buy/BUYGiftCard.h>
#import <Buy/BUYLineItem.h>
#import <Buy/BUYClient.h>
#import <Buy/BUYClient+Test.h>
#import <Buy/BUYImage.h>
#import <Buy/BUYOption.h>
#import <Buy/BUYOptionValue.h>
#import <Buy/BUYOrder.h>
#import <Buy/BUYProduct.h>
#import <Buy/BUYProductVariant.h>
#import <Buy/BUYShippingRate.h>
#import <Buy/BUYShop.h>
#import <Buy/BUYStoreViewController.h>
#import <Buy/BUYTaxLine.h>
#import <Buy/BUYViewController.h>
#import <Buy/BUYApplePayAdditions.h>
#import <Buy/BUYApplePayHelpers.h>
#import <Buy/BUYPaymentButton.h>
#import <Buy/BUYProductViewController.h>
#import <Buy/BUYTheme.h>
#import <Buy/BUYCartLineItem.h>
#import <Buy/BUYCollection.h>
#import <Buy/BUYMaskedCreditCard.h>
#import <Buy/BuyError.h>
#import <Buy/Buy-Bridging-Header.h>
/**
* Umbrella header used for Cocoapods
*/
#import "BUYApplePayAdditions.h"
#import "BUYApplePayHelpers.h"
#import "BUYAddress.h"
#import "BUYCart.h"
#import "BUYCartLineItem.h"
#import "BUYCheckout.h"
#import "BUYClient+Test.h"
#import "BUYClient.h"
#import "BUYCollection.h"
#import "BUYCreditCard.h"
#import "BUYDiscount.h"
#import "BUYError.h"
#import "BUYGiftCard.h"
#import "BUYImage.h"
#import "BUYLineItem.h"
#import "BUYMaskedCreditCard.h"
#import "BUYOption.h"
#import "BUYOptionValue.h"
#import "BUYOrder.h"
#import "BUYPaymentButton.h"
#import "BUYProduct.h"
#import "BUYProductVariant.h"
#import "BUYProductViewController.h"
#import "BUYShippingRate.h"
#import "BUYShop.h"
#import "BUYStoreViewController.h"
#import "BUYTaxLine.h"
#import "BUYTheme.h"
#import "BUYViewController.h"
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.2</string>
<string>1.2.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -42,7 +42,7 @@
* Note: These are different from BUYLineItem objects in that
* the line item objects do include the BUYProductVariant.
*/
@property (nonatomic, strong, readonly) NSArray *lineItems;
@property (nonatomic, strong, readonly, nonnull) NSArray<BUYCartLineItem *> *lineItems;
/**
* Returns true if the cart is acceptable to send to Shopify.
......@@ -62,7 +62,7 @@
*
* @param variant The BUYProductVariant to add to the BUYCart or increase by one quantity
*/
- (void)addVariant:(BUYProductVariant *)variant;
- (void)addVariant:(nonnull BUYProductVariant *)variant;
/**
* Removes the BUYCartLineItem from the BUYCart associated with the given BUYProductVariant object.
......@@ -70,7 +70,7 @@
*
* @param variant The BUYProductVariant to remove from the BUYCart or decrease by one quantity
*/
- (void)removeVariant:(BUYProductVariant *)variant;
- (void)removeVariant:(nonnull BUYProductVariant *)variant;
/**
* Adds a BUYCartLineItem with a set quantity to the BUYCart with the given BUYProductVariant object on it.
......@@ -80,6 +80,6 @@
* @param variant The BUYProductVariant to add to the BUYCart with a quantity
* @param quantity The quantity for the BUYCartLineItem associated with the BUYProductVariant
*/
- (void)setVariant:(BUYProductVariant *)variant withTotalQuantity:(NSInteger)quantity;
- (void)setVariant:(nonnull BUYProductVariant *)variant withTotalQuantity:(NSInteger)quantity;
@end
......@@ -30,7 +30,7 @@
@interface BUYCart ()
@property (nonatomic, strong) NSMutableSet *lineItemsSet;
@property (nonatomic, strong, nonnull) NSMutableSet<BUYCartLineItem *> *lineItemsSet;
@end
......@@ -45,7 +45,7 @@
return self;
}
- (NSArray *)lineItems
- (nonnull NSArray<BUYCartLineItem *> *)lineItems
{
return [self.lineItemsSet allObjects];
}
......@@ -62,7 +62,7 @@
#pragma mark - Simple Cart Editing
- (void)addVariant:(BUYProductVariant *)variant
- (void)addVariant:(nonnull BUYProductVariant *)variant
{
BUYCartLineItem *lineItem = [[BUYCartLineItem alloc] initWithVariant:variant];
BUYCartLineItem *existingLineItem = [self.lineItemsSet member:lineItem];
......@@ -73,7 +73,7 @@
}
}
- (void)removeVariant:(BUYProductVariant *)variant
- (void)removeVariant:(nonnull BUYProductVariant *)variant
{
BUYCartLineItem *lineItem = [[BUYCartLineItem alloc] initWithVariant:variant];
BUYCartLineItem *existingLineItem = [self.lineItemsSet member:lineItem];
......@@ -85,7 +85,7 @@
}
}
- (void)setVariant:(BUYProductVariant *)variant withTotalQuantity:(NSInteger)quantity
- (void)setVariant:(nonnull BUYProductVariant *)variant withTotalQuantity:(NSInteger)quantity
{
BUYCartLineItem *lineItem = [[BUYCartLineItem alloc] initWithVariant:variant];
BUYCartLineItem *existingLineItem = [self.lineItemsSet member:lineItem];
......
......@@ -35,6 +35,8 @@
@class BUYOrder;
@class BUYShippingRate;
@class BUYTaxLine;
@class BUYLineItem;
@class BUYGiftCard;
/**
* The checkout object. This is the main object that you will interact with when creating orders on Shopify.
......@@ -125,13 +127,12 @@
* Note: These are different from BUYCartLineItems in that the line item
* objects do not include the BUYProductVariant
*/
@property (nonatomic, readonly, copy) NSArray *lineItems;
@property (nonatomic, readonly, copy) NSArray<__kindof BUYLineItem *> *lineItems;
/**
* Array of tax line objects on the checkout
*/
@property (nonatomic, readonly, copy) NSArray *taxLines;
@property (nonatomic, readonly, copy) NSArray<BUYTaxLine *> *taxLines;
/**
* The mailing address associated with the payment method
*/
......@@ -162,7 +163,7 @@
/**
* An array of BUYGiftCard objects applied to the checkout
*/
@property (nonatomic, strong, readonly) NSArray *giftCards;
@property (nonatomic, strong, readonly) NSArray<BUYGiftCard *> *giftCards;
/**
* Channel ID where the checkout was created
......@@ -238,6 +239,11 @@
@property (nonatomic, copy, readonly) NSString *customerId;
/**
* An optional note attached to the order
*/
@property (nonatomic, copy) NSString *note;
/**
* The BUYOrder for a completed checkout
*/
@property (nonatomic, strong, readonly) BUYOrder *order;
......
......@@ -53,7 +53,7 @@
- (instancetype)initWithCart:(BUYCart *)cart
{
self = [super initWithDictionary:@{}];
self = [super init];
if (self) {
_lineItems = [cart.lineItems copy];
[self markPropertyAsDirty:@"lineItems"];
......@@ -160,6 +160,7 @@
self.updatedAtDate = [dateFormatter dateFromString:dictionary[@"updated_at"]];
self.creditCard = [BUYMaskedCreditCard convertObject:dictionary[@"credit_card"]];
self.customerId = [dictionary[@"customer_id"] copy];
self.note = dictionary[@"note"];
self.privacyPolicyURL = [NSURL buy_urlWithString:dictionary[@"privacy_policy_url"]];
self.refundPolicyURL = [NSURL buy_urlWithString:dictionary[@"refund_policy_url"]];
......
......@@ -39,7 +39,7 @@
/**
* An array of variant ids associated with the image.
*/
@property (nonatomic, readonly, copy) NSArray *variantIds;
@property (nonatomic, readonly, copy) NSArray<NSNumber *> *variantIds;
/**
* Creation date of the image
......
......@@ -64,19 +64,19 @@
/**
* A list of BUYProductVariant objects, each one representing a slightly different version of the product.
*/
@property (nonatomic, readonly, copy) NSArray *variants;
@property (nonatomic, readonly, copy) NSArray<BUYProductVariant *> *variants;
/**
* A list of BUYImage objects, each one representing an image associated with the product.
*/
@property (nonatomic, readonly, copy) NSArray *images;
@property (nonatomic, readonly, copy) NSArray<BUYImage *> *images;
/**
* Custom product property names like "Size", "Color", and "Material".
* Products are based on permutations of these options.
* A product may have a maximum of 3 options. 255 characters limit each.
*/
@property (nonatomic, readonly, copy) NSArray *options;
@property (nonatomic, readonly, copy) NSArray<BUYOption *> *options;
/**
* The description of the product, complete with HTML formatting.
......@@ -89,6 +89,12 @@
@property (nonatomic, readonly, assign) BOOL available;
/**
* A categorization that a product can be tagged with, commonly used for filtering and searching.
* Each tag has a character limit of 255.
*/
@property (nonatomic, readonly, copy) NSSet<NSString *> *tags;
/**
* The product is published on the current sales channel
*/
@property (nonatomic, readonly, assign) BOOL published;
......
......@@ -53,6 +53,9 @@
_createdAtDate = [dateFormatter dateFromString:dictionary[@"created_at"]];
_updatedAtDate = [dateFormatter dateFromString:dictionary[@"updated_at"]];
_publishedAtDate = [dateFormatter dateFromString:dictionary[@"published_at"]];
NSArray *tagsArray = [dictionary[@"tags"] componentsSeparatedByString:@", "];
NSSet *tagsSet = [NSSet setWithArray:tagsArray];
_tags = [tagsSet copy];
}
@end
......@@ -27,6 +27,7 @@
#import "BUYObject.h"
@class BUYProduct;
@class BUYOptionValue;
/**
* A BUYProductVariant is a different version of a product, such as differing sizes or differing colours.
......@@ -46,7 +47,7 @@
/**
* Custom properties that a shop owner can use to define BUYProductVariants.
*/
@property (nonatomic, readonly, copy) NSArray *options;
@property (nonatomic, readonly, copy) NSArray<BUYOptionValue *> *options;
/**
* The price of the BUYProductVariant.
......
......@@ -74,7 +74,7 @@
/**
* A list of two-letter country codes identifying the countries that the shop ships to.
*/
@property (nonatomic, readonly, copy) NSArray *shipsToCountries;
@property (nonatomic, readonly, copy) NSArray<NSString *> *shipsToCountries;
/**
* The URL for the web storefront
......
......@@ -44,7 +44,11 @@
closeButton.frame = CGRectMake(0, 0, 22, 22);
UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:closeButton];
self.topViewController.navigationItem.leftBarButtonItem = barButtonItem;
if ([[UINavigationBar class] respondsToSelector:@selector(appearanceWhenContainedInInstancesOfClasses:)]) {
[[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[BUYNavigationController class]]] setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
} else {
[[UINavigationBar appearanceWhenContainedIn:[BUYNavigationController class], nil] setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
}
return self;
}
......@@ -87,7 +91,11 @@
_theme = theme;
self.navigationBar.barStyle = [theme navigationBarStyle];
[self updateCloseButtonImageWithTintColor:NO duration:0];
if ([[UINavigationBar class] respondsToSelector:@selector(appearanceWhenContainedInInstancesOfClasses:)]) {
[[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[BUYNavigationController class]]] setTitleTextAttributes:@{ NSForegroundColorAttributeName: [theme navigationBarTitleColor] }];
} else {
[[UINavigationBar appearanceWhenContainedIn:[BUYNavigationController class], nil] setTitleTextAttributes:@{ NSForegroundColorAttributeName: [theme navigationBarTitleColor] }];
}
}
-(UIViewController *)childViewControllerForStatusBarStyle
......
......@@ -125,9 +125,17 @@
/**
* The inset for the table view and scroll indicator, allowing for custom insets.
*
* @param edgeInsets The edge inset to set for the table view
* @param edgeInsets The edge inset to set for the table view.
* @param appendToCurrentInset A flag that allows for adding the edge insets to the current edgeinsets of the table view.
*/
- (void)setInsets:(UIEdgeInsets)edgeInsets appendToCurrentInset:(BOOL)appendToCurrentInset;
/**
* Sets the top inset specifically for when the product view is pushed into a navigation controller stack
* instead of presented modally.
*
* @param topInset The inset to use for insetting the product view inside the container.
*/
- (void)setTopInset:(CGFloat)topInset;
@end
......@@ -44,6 +44,7 @@
@property (nonatomic, strong) UILabel *poweredByShopifyLabel;
@property (nonatomic, strong) NSLayoutConstraint *poweredByShopifyLabelConstraint;
@property (nonatomic, strong) BUYProductViewErrorView *errorView;
@property (nonatomic, strong) NSLayoutConstraint *topInsetConstraint;
@end
......@@ -121,11 +122,20 @@
options:0
metrics:nil
views:NSDictionaryOfVariableBindings(_tableView)]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_tableView]|"
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[_tableView]|"
options:0
metrics:nil
views:NSDictionaryOfVariableBindings(_tableView)]];
_topInsetConstraint = [NSLayoutConstraint constraintWithItem:self.tableView
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:self
attribute:NSLayoutAttributeTop
multiplier:1.0
constant:0];
[self addConstraint:_topInsetConstraint];
CGFloat size = MIN(CGRectGetWidth(rect), CGRectGetHeight(rect));
if ([product.images count] > 0) {
_productViewHeader = [[BUYProductViewHeader alloc] initWithFrame:CGRectMake(0, 0, size, size) theme:theme];
......@@ -163,7 +173,7 @@
options:0
metrics:nil
views:NSDictionaryOfVariableBindings(_productViewFooter)]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[_productViewFooter]|"
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[_productViewFooter]-|"
options:0
metrics:nil
views:NSDictionaryOfVariableBindings(_productViewFooter)]];
......@@ -193,7 +203,7 @@
- (void)layoutSubviews
{
[super layoutSubviews];
[self setInsets:UIEdgeInsetsMake(self.tableView.contentInset.top, self.tableView.contentInset.left, CGRectGetHeight(self.productViewFooter.frame), self.tableView.contentInset.right) appendToCurrentInset:NO];
[self setInsets:UIEdgeInsetsMake(self.tableView.contentInset.top, self.tableView.contentInset.left, CGRectGetHeight(self.bounds) - CGRectGetMinY(self.productViewFooter.frame), self.tableView.contentInset.right) appendToCurrentInset:NO];
}
- (void)setTheme:(BUYTheme *)theme
......@@ -233,6 +243,10 @@
if (footerViewHeight <= 0) {
footerViewHeight = 0;
}
// Add the top inset for the navigation bar (when pushed in a navigation controller stack, not presented)
footerViewHeight += -self.topInsetConstraint.constant;
self.footerHeightLayoutConstraint.constant = footerViewHeight;
self.footerOffsetLayoutConstraint.constant = -footerViewHeight;
......@@ -325,4 +339,9 @@
self.tableView.contentInset = self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake(top, left, bottom, right);
}
- (void)setTopInset:(CGFloat)topInset
{
self.topInsetConstraint.constant = topInset;
}
@end
......@@ -90,6 +90,7 @@ CGFloat const BUYMaxProductViewHeight = 640.0;
{
self = [super initWithClient:client];
if (self) {
self.theme = theme? : [[BUYTheme alloc] init];
self.modalPresentationStyle = UIModalPresentationCustom;
......@@ -118,6 +119,8 @@ CGFloat const BUYMaxProductViewHeight = 640.0;
attribute:NSLayoutAttributeCenterX
multiplier:1.0
constant:0.0]];
}
return self;
}
......@@ -175,6 +178,10 @@ CGFloat const BUYMaxProductViewHeight = 640.0;
[super viewWillAppear:animated];
[self setupNavigationBarAppearance];
[self.navigationController setNavigationBarHidden:self.isLoading];
CGFloat bottomMargin = 0;
bottomMargin += self.tabBarController ? CGRectGetHeight(self.tabBarController.tabBar.bounds) : 0;
bottomMargin += self.navigationController.isToolbarHidden ? 0 : CGRectGetHeight(self.navigationController.toolbar.bounds);
_productView.layoutMargins = UIEdgeInsetsMake(self.productView.layoutMargins.top, self.productView.layoutMargins.left, bottomMargin, self.productView.layoutMargins.right);
}
- (void)viewDidLayoutSubviews
......@@ -195,7 +202,7 @@ CGFloat const BUYMaxProductViewHeight = 640.0;
- (void)setupNavigationBarAppearance
{
if (self.navigationBar == nil && _productView) {
if (self.navigationBar == nil && _productView && self.presentingViewController != nil) {
for (UIView *view in [self.navigationController.navigationBar subviews]) {
if (CGRectGetHeight(view.bounds) >= 44) {
// Get a reference to the UINavigationBar
......@@ -211,6 +218,8 @@ CGFloat const BUYMaxProductViewHeight = 640.0;
}
// Hide the navigation bar
[self scrollViewDidScroll:self.productView.tableView];
} else if (self.navigationController && _productView && self.presentingViewController == nil) {
[self.productView setTopInset:CGRectGetHeight(self.navigationController.navigationBar.bounds) + self.navigationController.topLayoutGuide.length];
}
}
......@@ -460,9 +469,11 @@ CGFloat const BUYMaxProductViewHeight = 640.0;
[(BUYNavigationController*)self.navigationController updateCloseButtonImageWithTintColor:YES duration:0];
self.navigationBar.alpha = 1;
self.navigationBarTitle.alpha = 1;
// When using 3D Touch, the initial height of the navigation bar (without UIStatusBar) doesn't match the final height (with UIStatusBar)
// so we're forced to set it manually in case it's not tall enough. Of course, this is only valid for products with no product images.
[self.productView setInsets:UIEdgeInsetsMake(MAX(CGRectGetHeight(self.navigationBar.bounds), 64), 0, 0, 0) appendToCurrentInset:YES];
CGFloat topInset = 0;
if (self.presentingViewController) {
topInset = CGRectGetHeight([[(UINavigationController*)self.presentingViewController navigationBar] bounds]) + self.presentingViewController.topLayoutGuide.length;
}
[self.productView setInsets:UIEdgeInsetsMake(topInset, 0, 0, 0) appendToCurrentInset:YES];
}
}
}
......
......@@ -47,9 +47,15 @@
// Add custom back button
UIImage *buttonImage = [[BUYImageKit imageOfVariantBackImageWithFrame:CGRectMake(0, 0, 12, 18)] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
if ([[UIBarButtonItem class] respondsToSelector:@selector(appearanceWhenContainedInInstancesOfClasses:)]) {
[[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[BUYNavigationController class]]] setBackButtonBackgroundImage:[buttonImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 12, 0, 0)]
forState:UIControlStateNormal
barMetrics:UIBarMetricsDefault];
} else {
[[UIBarButtonItem appearanceWhenContainedIn:[BUYNavigationController class], nil] setBackButtonBackgroundImage:[buttonImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 12, 0, 0)]
forState:UIControlStateNormal
barMetrics:UIBarMetricsDefault];
}
_breadsCrumbsView = [BUYVariantOptionBreadCrumbsView new];
_breadsCrumbsView.translatesAutoresizingMaskIntoConstraints = NO;
......
//
// Buy.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 Shopify Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#import <UIKit/UIKit.h>
//! Project version number for BuyDynamic.
FOUNDATION_EXPORT double BuyDynamicVersionNumber;
//! Project version string for BuyDynamic.
FOUNDATION_EXPORT const unsigned char BuyDynamicVersionString[];
#import <Buy/BUYAddress.h>
#import <Buy/BUYCart.h>
#import <Buy/BUYCheckout.h>
#import <Buy/BUYCreditCard.h>
#import <Buy/BUYDiscount.h>
#import <Buy/BUYGiftCard.h>
#import <Buy/BUYLineItem.h>
#import <Buy/BUYClient.h>
#import <Buy/BUYClient+Test.h>
#import <Buy/BUYImage.h>
#import <Buy/BUYOption.h>
#import <Buy/BUYOptionValue.h>
#import <Buy/BUYOrder.h>
#import <Buy/BUYProduct.h>
#import <Buy/BUYProductVariant.h>
#import <Buy/BUYShippingRate.h>
#import <Buy/BUYShop.h>
#import <Buy/BUYStoreViewController.h>
#import <Buy/BUYTaxLine.h>
#import <Buy/BUYViewController.h>
#import <Buy/BUYApplePayAdditions.h>
#import <Buy/BUYApplePayHelpers.h>
#import <Buy/BUYPaymentButton.h>
#import <Buy/BUYProductViewController.h>
#import <Buy/BUYTheme.h>
#import <Buy/BUYCartLineItem.h>
#import <Buy/BUYCollection.h>
#import <Buy/BUYMaskedCreditCard.h>
#import <Buy/BUYError.h>
......@@ -57,5 +57,4 @@ NSString * const BUYPartialAddressPlaceholder = @"---";
return valid;
}
@end
......@@ -37,7 +37,7 @@
* Returns an array of summary items for all Apple Pay requests. Will use 'PAY TOTAL' as the summary label. Apple recommends
* including the business name in the summary label, so it is recommended to use `buy_summaryItemsWithShopName` instead.
*/
- (NSArray *)buy_summaryItems;
- (nonnull NSArray<PKPaymentSummaryItem *> *)buy_summaryItems;
/**
* Returns an array of summary items for all Apple Pay requests using the shop name in the "PAY" section
......@@ -46,7 +46,7 @@
*
* @return An array of PKPaymentSummaryItems
*/
- (NSArray *)buy_summaryItemsWithShopName:(NSString *)shopName;
- (nonnull NSArray<PKPaymentSummaryItem *> *)buy_summaryItemsWithShopName:(nullable NSString *)shopName;
@end
......@@ -59,13 +59,13 @@
*
* @return An array of PKShippingMethods
*/
+ (NSArray *)buy_convertShippingRatesToShippingMethods:(NSArray *)rates;
+ (nonnull NSArray<PKShippingMethod *> *)buy_convertShippingRatesToShippingMethods:(nonnull NSArray<BUYShippingRate *> *)rates;
@end
@interface BUYAddress (ApplePay)
+ (NSString *)buy_emailFromRecord:(ABRecordRef)record;
+ (nullable NSString *)buy_emailFromRecord:(nullable ABRecordRef)record;
/**
* Creates a BUYAddress from an ABRecordRef
......@@ -74,7 +74,7 @@
*
* @return The BUYAddress created from an ABRecordRef
*/
+ (BUYAddress *)buy_addressFromRecord:(ABRecordRef)record NS_DEPRECATED_IOS(8_0, 9_0, "Use the CNContact backed `buy_addressFromContact:` instead");
+ (nonnull BUYAddress *)buy_addressFromRecord:(nullable ABRecordRef)record NS_DEPRECATED_IOS(8_0, 9_0, "Use the CNContact backed `buy_addressFromContact:` instead");
/**
* Creates a BUYAddress from a PKContact
......@@ -83,6 +83,6 @@
*
* @return The BUYAddress created from a PKContact
*/
+ (BUYAddress *)buy_addressFromContact:(PKContact*)contact NS_AVAILABLE_IOS(9_0);
+ (nonnull BUYAddress *)buy_addressFromContact:(nullable PKContact*)contact NS_AVAILABLE_IOS(9_0);
@end
......@@ -38,11 +38,11 @@
@implementation BUYCheckout (ApplePay)
- (NSArray *)buy_summaryItemsWithShopName:(NSString *)shopName {
- (nonnull NSArray<PKPaymentSummaryItem *> *)buy_summaryItemsWithShopName:(nullable NSString *)shopName {
BOOL hasDiscount = [self.discount.amount compare:[NSDecimalNumber zero]] == NSOrderedDescending;
NSMutableArray *summaryItems = [[NSMutableArray alloc] init];
NSMutableArray<PKPaymentSummaryItem *> *summaryItems = [[NSMutableArray alloc] init];
if (hasDiscount || [self.lineItems count] > 1) {
NSDecimalNumber *lineItemSubtotal = [NSDecimalNumber zero];
......@@ -76,10 +76,11 @@
NSString *itemLabel = shopName ?: @"TOTAL";
[summaryItems addObject:[PKPaymentSummaryItem summaryItemWithLabel:itemLabel amount:self.paymentDue ?: [NSDecimalNumber zero]]];
return summaryItems;
}
- (NSArray *)buy_summaryItems
- (nonnull NSArray<PKPaymentSummaryItem *> *)buy_summaryItems
{
return [self buy_summaryItemsWithShopName:nil];
}
......@@ -88,9 +89,9 @@
@implementation BUYShippingRate (ApplePay)
+ (NSArray *)buy_convertShippingRatesToShippingMethods:(NSArray *)rates
+ (nonnull NSArray<PKShippingMethod *> *)buy_convertShippingRatesToShippingMethods:(nonnull NSArray<BUYShippingRate *> *)rates
{
NSMutableArray *shippingMethods = [[NSMutableArray alloc] init];
NSMutableArray<PKShippingMethod *> *shippingMethods = [[NSMutableArray alloc] init];
for (BUYShippingRate *shippingRate in rates) {
PKShippingMethod *shippingMethod = [[PKShippingMethod alloc] init];
shippingMethod.label = shippingRate.title;
......@@ -121,7 +122,7 @@
@implementation BUYAddress (ApplePay)
+ (NSString *)buy_emailFromRecord:(ABRecordRef)record
+ (nullable NSString *)buy_emailFromRecord:(nullable ABRecordRef)record
{
ABMultiValueRef emailMultiValue = ABRecordCopyValue(record, kABPersonEmailProperty);
CFArrayRef allEmails = ABMultiValueCopyArrayOfAllValues(emailMultiValue);
......@@ -136,7 +137,7 @@
return email;
}
+ (BUYAddress *)buy_addressFromRecord:(ABRecordRef)record
+ (nonnull BUYAddress *)buy_addressFromRecord:(nullable ABRecordRef)record
{
BUYAddress *address = [[BUYAddress alloc] init];
......@@ -193,7 +194,7 @@
return address;
}
+ (BUYAddress *)buy_addressFromContact:(PKContact*)contact
+ (nonnull BUYAddress *)buy_addressFromContact:(nullable PKContact*)contact
{
BUYAddress *address = [[BUYAddress alloc] init];
......
......@@ -264,8 +264,7 @@ const NSTimeInterval PollDelay = 0.5;
self.shippingRates = shippingRates;
if ([self.shippingRates count] == 0) {
// Shipping address not supported
self.checkout.shippingRate = nil;
// Shipping address is not supported and no shipping rates were returned
if (completion) {
completion(PKPaymentAuthorizationStatusInvalidShippingPostalAddress, nil, [self.checkout buy_summaryItemsWithShopName:self.shop.name]);
}
......
Pod::Spec.new do |s|
s.name = 'Mobile-Buy-SDK'
s.version = '1.2.0'
s.version = '1.2.1'
s.summary = 'Sell with Shopify in iOS apps'
s.description = 'Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using Apple Pay or their credit card.'
s.homepage = 'https://developers.shopify.com/mobile-buy-sdk'
......@@ -9,9 +9,9 @@ Pod::Spec.new do |s|
s.platform = :ios, '8.0'
s.source = { :git => 'https://github.com/Shopify/mobile-buy-sdk-ios.git', :tag => s.version }
s.source_files = 'Mobile Buy SDK/Mobile Buy SDK/**/*.{h,m,mm}'
s.exclude_files = 'Mobile Buy SDK/Mobile Buy SDK/Buy.h'
s.public_header_files = 'Mobile Buy SDK/Mobile Buy SDK/**/*.{h}'
s.module_map = 'Mobile Buy SDK/Mobile Buy SDK/Buy.modulemap'
s.public_header_files = 'Mobile Buy SDK/Mobile Buy SDK/**/*.h'
s.exclude_files = 'Mobile Buy SDK/Mobile Buy SDK/Static Framework/*'
s.module_name = 'Buy'
s.frameworks = 'PassKit'
s.libraries = 'c++'
s.requires_arc = true
......
![Mobile Buy SDK](http://s3.amazonaws.com/shopify-marketing_assets/static/mbsdk-github.png)
[![Build status](https://badge.buildkite.com/d8fe8aa44d801c6238ab767867e4fb09abe516bb2933b577cc.svg?branch=develop)](https://buildkite.com/shopify/mobile-buy-sdk-ios)
[![Build status](https://badge.buildkite.com/3951692121947fbf7bb06c4b741601fc091efea3fa119a4f88.svg)](https://buildkite.com/shopify/mobile-buy-sdk-ios)
[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/Shopify/mobile-buy-sdk-ios/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/shopify/mobile-buy-sdk-ios.svg)](https://github.com/Shopify/mobile-buy-sdk-ios/releases)
[![Cocoapods](https://img.shields.io/cocoapods/v/mobile-buy-sdk.svg)](https://cocoapods.org/pods/mobile-buy-sdk)
[![Cocoapods](https://img.shields.io/cocoapods/v/Mobile-Buy-SDK.svg)](https://cocoapods.org/pods/Mobile-Buy-SDK)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
# Mobile Buy SDK for iOS
......@@ -16,21 +16,23 @@ Please find all documentation on the [Mobile Buy SDK for iOS page](https://docs.
### Installation
#### Manual Installation (Project)
<a href="../../releases/latest">Download the latest version</a>
#### Dynamic Framework Installation
1. Drag the `Mobile Buy SDK.xcodeproj` into your existing project
2. Add the `Buy` target as a `Target Dependancy` in the `Build Phases` of your project's target
3. Add the `Buy` target in the `Link Binary with Libraries` section in `Build Phases`
3. Add the `Buy` (second target on the list is the Dynamic framework) target in the `Embedded Binaries` section in `Build Phases`
See the [Sample Apps](/Mobile Buy SDK Sample Apps/) for an example of Dynamic Framework usage.
#### Manual Installation (Framework)
#### Static Framework Installation
If you would like to not include the Mobile Buy SDK Project within your existing project, you can link directly to the `Buy.framework`.
1. Open the `Mobile Buy SDK.xcodeproj` and build the `Universal Framework` Target
2. Drag the `Buy.framework` that was just created from `Mobile Buy SDK Sample Apps` onto the `Linked Frameworks and Libraries` section for the target you want to add the framework to. Check Copy items if needed so the framework is copied to your project
3. In the `Build Settings` tab, add `-all_load` to `Other Linker Flags`.
1. Open the `Mobile Buy SDK.xcodeproj` and build the `Static Universal Framework` scheme
2. Drag the `Buy.framework` that was just created from `Mobile Buy SDK Sample Apps` into the `Linked Frameworks and Libraries` section for the target you want to add the framework to. Check Copy items if needed so the framework is copied to your project
3. In the `Build Settings` tab, add `-all_load` to `Other Linker Flags`
#### CocoaPods
......@@ -42,6 +44,10 @@ pod "Mobile-Buy-SDK"
Then run `pod install`
```objc
#import "Buy.h"
```
#### Carthage
Add the following line to your Cartfile
......@@ -84,23 +90,35 @@ Consult the [Usage Section](https://docs.shopify.com/mobile-buy-sdk/ios/integrat
### Building the SDK
Clone this repo or download as .zip and open `Mobile Buy SDK.xcworkspace`.
Clone this repo or download as .zip and open `Mobile Buy SDK.xcodeproj`.
The workspace includes the Mobile Buy SDK project and the sample app projects. The sample apps can also be opened outside the workspace with the `.xcodeproj` files found in the sample app folders. However, if you need to use breakpoints or inspect methods in the SDK, run the sample apps from the workspace.
The workspace includes the Mobile Buy SDK project.
### Mobile Buy SDK Targets and schemes
The Mobile Buy SDK includes a number of targets and schemes:
* **Buy**: This is the Mobile Buy SDK framework. This build is based on the current build configuration. To build a universal framework that can run on a device and on the Simulator and to be included in your app, please refer to the `Universal Framework` target below
* **Buy**: This is the Mobile Buy SDK dynamic framework. Please refer to the installation section above
* **Universal Framework**: This builds the framework using `build_universal.sh` script in the `Universal Framework` target and copies the built framework in the `/Mobile Buy SDK Sample Apps` folder. Build this target if you have made any changes to the framework that you want to test with the sample apps as the sample apps do not build the framework directly but embed the already built framework
* **Buy Static** (target only): This is the Mobile Buy SDK static framework. This build is based on the current build configuration. To build a universal framework that can run on a device and on the Simulator and to be included in your app, please refer to the `Static Universal Framework` target below
* **Static Universal Framework**: This builds a **static** framework from the `Buy Static` target using the `build_universal.sh` script in the `Static Universal Framework` target and copies the built framework in the `/Mobile Buy SDK Sample Apps` folder. This is a fat binary that includes arm and i386 slices. Build this target if you have made any changes to the framework that you want to test with the sample apps as the sample apps do not build the framework directly but embed the already built framework
* **Mobile Buy SDK Tests**: Tests for the Mobile Buy SDK framework. See instructions below
* **Documentation**: This generates appledoc documentation for the framework
* **Playground**: This target is a basic app that depends directly on the `Buy` framework target and builds the framework every time using the `Playground` app's build configuration. You may use this app and target to play around with the SDK. Be sure not to check in any changes you may have made in files related to this app
* **Playground**: This is a basic app that depends directly on the `Buy` dynamic framework. You may use this app and target to play around with the SDK. Be sure not to check in any changes you may have made in files related to this app
### Sample Apps
The repo includes 3 sample apps. Each sample apps embeds the dynamic framework and includes readme files with more information:
* [Advanced Sample App](/Mobile Buy SDK Sample Apps/Sample App Advanced/README.md)
* [Swift Sample App](/Mobile Buy SDK Sample Apps/Sample App Swift/README.md)
* [Web Sample App](/Mobile Buy SDK Sample Apps/Sample App Web/README.md)
We suggest you take a look at the **Advanced Sample App** and test your shop with the sample app before you begin. If you run into any issues, the **Advanced Sample App** is also a great resource for debugging integration issues and checkout.
### Unit Tests
......
# Mobile Buy SDK Release Notes prior to 1.2.0 (Open Source)
Here is a reverse-chronologically ordered list of patch notes for the Mobile Buy SDK for iOS prior to the SDK becoming open source at 1.2.0.
For release notes following the 1.2.0 (open source) release, please see [Github releases](https://github.com/Shopify/mobile-buy-sdk-ios/releases).
### Version 1.1.6
###### Released September 28, 2015
* Add "PAY [SHOP NAME]" to `PKPaymentAuthorizationViewController` when using `BUYApplePayHelpers`. This is also available through `buy_summaryItemsWithShopName:` in `BUYApplePayAdditions`. Apple's HIG specifies that the store's name is required in the summary items for the total amount.
* Set `DWARF` to suppress compiler warnings for all sample apps.
### Version 1.1.5
###### Released September 17, 2015
* [Advanced Sample App](https://docs.shopify.com/mobile-buy-sdk/ios/advanced-sample-app) which takes the developer through all the steps from downloading products to building a cart and completing a checkout.
* Fix for additional country code validation for Apple Pay, where addresses from the `PKPaymentAuthorizationViewControllerDelegate` sometimes don't return country codes correctly.
### Version 1.1.4
###### Released September 10, 2015
* Add support for the SafariViewController on iOS 9.
* Add support for Discover credit cards.
* Use new Contact API for Apple Pay on iOS 9.
* Option breadcrumbs for variant selection in `BUYProductViewController`.
### Version 1.1.3
###### Released September 2, 2015
* Use of HTTPs for all network calls.
* Improvements to shipping address validation including client-side pre-condition check for address when user selects an address in the `PKPaymentViewController`.
* BUYProduct objects with no images will no longer show the header placeholder in `BUYProductViewController`.
* `setVariant:withQuantity:` available on `BUYCart` to easily add or remove `BUYCartLineItem` objects for an associated `BUYProductVariant`.
* Updated documentation.
* `sourceUrl` has been removed from `BUYCheckout`.
### Version 1.1.2
###### Released August 20, 2015
`BUYProductViewController`:
* Products with one variant will now correctly show the variant but variant selection flow is disabled.
* Prices and "Sold Out" are now displayed for the last variant option in the variant selection flow.
* Variant selection controller size tied to device width and height for better UI on larger device screens.
* An error alert is shown if an error occurs creating a new checkout.
* Improved iPad presentation.
* Fixed an issue where dark theme wasn't properly applied to all views.
* Added `initWithClient:theme:` to more easily set the theme.
* Navigation bar title colour fix.
Other changes:
* `source` and `source_name` are now correctly set to `mobile_app` for checkouts, which propagates to orders in the shop admin. An *order.json* will include both and the orders CSV file will include the `source`.
* `sourceId` on `BUYCheckout` has been changed to `sourceIdentifer`. This is a `readonly` property, which automatically gets the channel ID for the Mobile App channel. This gets shows in *orders.json* as `source_identifier` on the shop admin.
* Clearer documentation for `reservationTime`.
* Fixed an issue with summary items for Apple Pay.
* Fix crash on `getCollections:` when a collection does not include an image.
### Version 1.1.1
###### Released August 12, 2015
* `BUYLineItem` now uses `lineItemIdentifier` as its identifier.
* Fix an issue where image would reset while scrolling.
* Added "Powered by Shopify" footer in `BUYProductViewController`.
* Hiding image page control on scrolling in `BUYProductViewController`.
* `webReturnToLabel` on `BUYCheckout` can now correctly be used for the web checkout return-to-app-name button.
* Unavailable variants now appear as "Sold Out" and the customer is unable to checkout via the web and Apple Pay using the `BUYProductViewController`.
* Improved support for portrait orientation for the `BUYProductViewController` when presented in landscape apps.
### Version 1.1
###### Released August 6, 2015
* Product View: Easily display and sell products from your shop using the new `BUYProductViewController`, which can be presented from any view controller in your app.
* Support for Product Collections.
* Support for custom properties on `BUYLineItem`.
* Added better support for responsive web checkout.
* Added `BUYApplePayHelpers` to help easily support Apple Pay if `BUYViewController` isn't used.
* `getCompletionStatusOfCheckout:completion:` no longer returns the `BUYCheckout` object that was passed in - use `getCheckout:completion:` to retrieve the updated `BUYCheckout` object.
* Added `isApplePayAvailable` flag on `BUYViewController` that returns YES if the customer can pay with Apple Pay.
* Applying or removing gift cards now applies/removes the gift card(s) on the BUYCheckout and updates the `paymentDue` amount on the `BUYCheckout` object.
* `BUYProduct` and `BUYProductVariant` objects now include an `inventory` flag.
* Add support for Storyboard usage for `BUYViewController`.
* Added `BUYCartLineItem` which contains the original `BUYProductVariant` objects added to the cart.
* `BUYLineItem` objects on a `BUYCheckout` object now reference variant IDs, not a BUYProductVariant.
* `sku` property has been added to `BUYProductVariant` objects.
* Added `paymentSessionId` on `BUYCheckout`.
* Better error messaging.
### Version 1.0.3
###### Released July 2, 2015
* Fixed an issue retrieving a cart when using Apple Pay and WKWebView checkout
### Version 1.0.2
###### Released June 25, 2015
* Changed SDK to a static framework (see updated [Getting Started guide](https://docs.shopify.com/mobile-buy-sdk/integration-guide))
* Fixed `BUYTaxLine` parsing
* Fixed channel attribution
* Removed `app.js`
* Updated docs
### Version 1.0.1
###### Released May 26, 2015
* Supports Apple Pay purchases without shipping requirement
* Fixes missing symbols for `getProductId:completion:`
### Version 1.0
###### Released May 19, 2015
* Initial public release
#!/bin/sh
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
TARGET_NAME="Buy Static"
FRAMEWORK_NAME="Buy"
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Build Device and Simulator versions
xcodebuild -target "${FRAMEWORK_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -OBJROOT="${OBJROOT}" -sdk iphoneos BUILD_DIR="${BUILD_DIR}" SYMROOT="${SYMROOT}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${FRAMEWORK_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -OBJROOT="${OBJROOT}" -sdk iphonesimulator BUILD_DIR="${BUILD_DIR}" SYMROOT="${SYMROOT}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${TARGET_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -OBJROOT="${OBJROOT}" -sdk iphoneos BUILD_DIR="${BUILD_DIR}" SYMROOT="${SYMROOT}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${TARGET_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -OBJROOT="${OBJROOT}" -sdk iphonesimulator BUILD_DIR="${BUILD_DIR}" SYMROOT="${SYMROOT}" BUILD_ROOT="${BUILD_ROOT}" clean build
# Copy the framework structure (from iphoneos build) to the universal folder
cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.framework" "${UNIVERSAL_OUTPUTFOLDER}/"
......@@ -17,6 +18,6 @@ cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.framework" "${UN
lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}"
# Copy the framework to the sample apps folder
rm -rf "${SRCROOT}/../Mobile Buy SDK Sample Apps/${FRAMEWORK_NAME}.framework"
rm -rf "${SRCROOT}/../Mobile Buy SDK Sample Apps/${TARGET_NAME}.framework"
cp -r "${UNIVERSAL_OUTPUTFOLDER}/${FRAMEWORK_NAME}.framework" "${SRCROOT}/../Mobile Buy SDK Sample Apps"
xcodebuild test -workspace "Mobile Buy SDK.xcworkspace" \
xcodebuild test -project "Mobile Buy SDK/Mobile Buy SDK.xcodeproj" \
-scheme "Mobile Buy SDK Tests" \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment