Commit 39fe7b7b by Brent Gulanowski Committed by GitHub

Merge pull request #247 from Shopify/bugfix/static-header

Update CocoaPods support for version 2.0
parents 4e533e96 5590e6b7
......@@ -277,7 +277,7 @@
[operation cancel];
}];
[self waitForExpectationsWithTimeout:5.0 handler:^(NSError *error) {}];
[self waitForExpectationsWithTimeout:10.0 handler:^(NSError *error) {}];
}
- (void)testCancellationWithoutQueue
......
......@@ -447,7 +447,6 @@
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; };
90C856B71BD6B19D00936926 /* Buy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Buy.h; path = "Mobile Buy SDK/Static Framework/Buy.h"; sourceTree = "<group>"; };
90C856B81BD6B19D00936926 /* Buy.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = Buy.modulemap; path = "Mobile Buy SDK/Static Framework/Buy.modulemap"; sourceTree = "<group>"; };
90DA8DF11BC6A82D0027BCB7 /* Buy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Buy.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
90E80E461AFBBB68003A9909 /* AppledocSettings.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppledocSettings.plist; path = docs/AppledocSettings.plist; sourceTree = "<group>"; };
......@@ -1011,7 +1010,6 @@
F773749E19C77E460039681C /* Supporting Files */ = {
isa = PBXGroup;
children = (
90C856B71BD6B19D00936926 /* Buy.h */,
90C856B81BD6B19D00936926 /* Buy.modulemap */,
F773743619C771D10039681C /* LICENSE */,
90B043AF1B0D380D006CA6FC /* README.md */,
......
......@@ -26,12 +26,7 @@
#import <UIKit/UIKit.h>
//! Project version number for Buy.
FOUNDATION_EXPORT double BuyVersionNumber;
//! Project version string for Buy.
FOUNDATION_EXPORT const unsigned char BuyVersionString[];
// Model types
#import <Buy/BUYAccountCredentials.h>
#import <Buy/BUYAddress.h>
#import <Buy/BUYCart.h>
......@@ -49,12 +44,24 @@ FOUNDATION_EXPORT const unsigned char BuyVersionString[];
#import <Buy/BUYOption.h>
#import <Buy/BUYOptionValue.h>
#import <Buy/BUYOrder.h>
#import <Buy/BUYPaymentToken.h>
#import <Buy/BUYProduct.h>
#import <Buy/BUYProductVariant.h>
#import <Buy/BUYShippingRate.h>
#import <Buy/BUYShop.h>
#import <Buy/BUYTaxLine.h>
// Model support
#import <Buy/BUYError.h>
#import <Buy/BUYError+BUYAdditions.h>
#import <Buy/BUYManagedObject.h>
#import <Buy/BUYModelManager.h>
#import <Buy/BUYModelManagerProtocol.h>
#import <Buy/BUYObject.h>
#import <Buy/BUYObjectProtocol.h>
#import <Buy/BUYShopifyErrorCodes.h>
// Checkout support
#import <Buy/BUYApplePayAdditions.h>
#import <Buy/BUYApplePayAuthorizationDelegate.h>
#import <Buy/BUYApplePayPaymentProvider.h>
......@@ -62,31 +69,25 @@ FOUNDATION_EXPORT const unsigned char BuyVersionString[];
#import <Buy/BUYPaymentProvider.h>
#import <Buy/BUYWebCheckoutPaymentProvider.h>
// Client API
#import <Buy/BUYClientTypes.h>
#import <Buy/BUYClient.h>
#import <Buy/BUYClient+Address.h>
#import <Buy/BUYClient+Customers.h>
#import <Buy/BUYClient+Checkout.h>
#import <Buy/BUYClient+Storefront.h>
#import <Buy/BUYError.h>
#import <Buy/BUYError+BUYAdditions.h>
#import <Buy/BUYManagedObject.h>
#import <Buy/BUYModelManager.h>
#import <Buy/BUYModelManagerProtocol.h>
#import <Buy/BUYObjectProtocol.h>
#import <Buy/BUYShopifyErrorCodes.h>
#import <Buy/BUYPaymentToken.h>
// Foundation extensions
#import <Buy/NSArray+BUYAdditions.h>
#import <Buy/NSDate+BUYAdditions.h>
#import <Buy/NSDateFormatter+BUYAdditions.h>
#import <Buy/NSDecimalNumber+BUYAdditions.h>
#import <Buy/NSDictionary+BUYAdditions.h>
#import <Buy/NSDictionary+BUYAdditions.h>
#import <Buy/NSEntityDescription+BUYAdditions.h>
#import <Buy/NSException+BUYAdditions.h>
#import <Buy/NSPropertyDescription+BUYAdditions.h>
#import <Buy/NSRegularExpression+BUYAdditions.h>
#import <Buy/NSString+BUYAdditions.h>
#import <Buy/NSURL+BUYAdditions.h>
// Core Data extensions
#import <Buy/NSEntityDescription+BUYAdditions.h>
#import <Buy/NSPropertyDescription+BUYAdditions.h>
#import <Buy/NSRegularExpression+BUYAdditions.h>
......@@ -39,6 +39,11 @@ NSString * const BUYDeliveryRangeTransformerName = @"BUYDeliveryRange";
NSString * const BUYFlatArrayTransformerName = @"BUYFlatArray";
NSString * const BUYProductTagsTransformerName = @"BUYProductTags";
@interface NSBundle (BUYAdditions)
+ (instancetype)frameworkBundle;
+ (instancetype)resourcesBundle;
@end
@interface BUYModelManager ()
@property (nonatomic, strong) NSManagedObjectModel *model;
@end
......@@ -57,7 +62,7 @@ NSString * const BUYProductTagsTransformerName = @"BUYProductTags";
- (instancetype)init
{
return [self initWithManagedObjectModel:[NSManagedObjectModel mergedModelFromBundles:@[[NSBundle bundleForClass:[self class]]]]];
return [self initWithManagedObjectModel:[NSManagedObjectModel mergedModelFromBundles:@[[NSBundle resourcesBundle]]]];
}
- (instancetype)initWithManagedObjectModel:(NSManagedObjectModel *)model
......@@ -120,3 +125,26 @@ NSString * const BUYProductTagsTransformerName = @"BUYProductTags";
}
@end
@implementation NSBundle (BUYAdditions)
+ (instancetype)frameworkBundle
{
return [NSBundle bundleForClass:[BUYModelManager class]];
}
+ (NSURL *)resourcesBundleURL
{
return [[self frameworkBundle] URLForResource:@"Buy" withExtension:@"bundle"];
}
+ (instancetype)resourcesBundle
{
#if COCOAPODS
return [NSBundle bundleWithURL:[self resourcesBundleURL]];
#else
return [self frameworkBundle];
#endif
}
@end
//
// 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.
//
/**
* Umbrella header used for Cocoapods
*/
#import "BUYAccountCredentials.h"
#import "BUYAddress.h"
#import "BUYCart.h"
#import "BUYCartLineItem.h"
#import "BUYCheckout.h"
#import "BUYCheckoutAttribute.h"
#import "BUYCollection.h"
#import "BUYCreditCard.h"
#import "BUYCustomer.h"
#import "BUYDiscount.h"
#import "BUYGiftCard.h"
#import "BUYImageLink.h"
#import "BUYLineItem.h"
#import "BUYMaskedCreditCard.h"
#import "BUYOption.h"
#import "BUYOptionValue.h"
#import "BUYOrder.h"
#import "BUYProduct.h"
#import "BUYProductVariant.h"
#import "BUYShippingRate.h"
#import "BUYShop.h"
#import "BUYTaxLine.h"
#import "BUYApplePayAdditions.h"
#import "BUYApplePayHelpers.h"
#import "BUYApplePayPaymentProvider.h"
#import "BUYPaymentController.h"
#import "BUYPaymentProvider.h"
#import "BUYWebCheckoutPaymentProvider.h"
#import "BUYClientTypes.h"
#import "BUYClient.h"
#import "BUYClient+Address.h"
#import "BUYClient+Customers.h"
#import "BUYClient+Checkout.h"
#import "BUYClient+Storefront.h"
#import "BUYError.h"
#import "BUYError+BUYAdditions.h"
#import "BUYManagedObject.h"
#import "BUYModelManager.h"
#import "BUYModelManagerProtocol.h"
#import "BUYObjectProtocol.h"
#import "BUYShopifyErrorCodes.h"
#import "BUYPaymentToken.h"
#import "NSArray+BUYAdditions.h"
#import "NSDate+BUYAdditions.h"
#import "NSDateFormatter+BUYAdditions.h"
#import "NSDecimalNumber+BUYAdditions.h"
#import "NSDictionary+BUYAdditions.h"
#import "NSDictionary+BUYAdditions.h"
#import "NSEntityDescription+BUYAdditions.h"
#import "NSException+BUYAdditions.h"
#import "NSPropertyDescription+BUYAdditions.h"
#import "NSRegularExpression+BUYAdditions.h"
#import "NSString+BUYAdditions.h"
#import "NSURL+BUYAdditions.h"
Pod::Spec.new do |s|
s.name = 'Mobile-Buy-SDK'
s.version = '1.2.6'
s.version = '2.0.0'
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'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = 'Shopify Inc.'
s.platform = :ios, '8.0'
s.resource_bundles = { 'Buy' => 'Mobile Buy SDK/Mobile Buy SDK/Models/Mobile Buy SDK.xcdatamodeld' }
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.public_header_files = 'Mobile Buy SDK/Mobile Buy SDK/**/*.h'
s.exclude_files = 'Mobile Buy SDK/Mobile Buy SDK/Buy.h'
s.public_header_files = 'Mobile Buy SDK/Mobile Buy SDK/Buy.h', 'Mobile Buy SDK/Mobile Buy SDK/**/*.h'
s.header_dir = 'Buy'
s.module_name = 'Buy'
s.frameworks = 'PassKit'
s.libraries = 'c++'
......
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