Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial Commit

  • Loading branch information...
commit 03585bd418e599ac3327d5a9a3d97af1fe8d7491 0 parents
@mattt mattt authored
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "AFNetworking"]
+ path = AFNetworking
+ url = https://github.com/AFNetworking/AFNetworking.git
1  AFNetworking
@@ -0,0 +1 @@
+Subproject commit c0d7e11449b1f2c392f5aba656ab0706c0c15487
71 CargoBay/CargoBay.h
@@ -0,0 +1,71 @@
+// CargoBay.h
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// 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 <Foundation/Foundation.h>
+#import <StoreKit/StoreKit.h>
+
+@class AFHTTPClient;
+
+@interface CargoBay : NSObject <SKPaymentTransactionObserver>
+
+@property (nonatomic) AFHTTPClient *productsHTTPClient;
+
++ (CargoBay *)sharedManager;
+
+///---------------------
+/// @name Product Lookup
+///---------------------
+
+- (void)productsWithIdentifiers:(NSSet *)identifiers
+ success:(void (^)(NSArray *products, NSArray *invalidIdentifiers))success
+ failure:(void (^)(NSError *error))failure;
+
+- (void)productsWithRequest:(NSURLRequest *)request
+ success:(void (^)(NSArray *products, NSArray *invalidIdentifiers))success
+ failure:(void (^)(NSError *error))failure;
+
+///-------------------------------
+/// @name Transaction Verification
+///-------------------------------
+
+- (void)verifyTransaction:(SKPaymentTransaction *)transaction
+ success:(void (^)(NSDictionary *receipt))success
+ failure:(void (^)(NSError *error))failure;
+
+///--------------------------------------------------
+/// @name Transaction Queue Observer Delegate Methods
+///--------------------------------------------------
+
+- (void)setPaymentQueueUpdatedTransactionsBlock:(void (^)(SKPaymentQueue *queue, NSArray *transactions))block;
+
+- (void)setPaymentQueueRemovedTransactionsBlock:(void (^)(SKPaymentQueue *queue, NSArray *transactions))block;
+
+- (void)setPaymentQueueRestoreCompletedTransactionsWithSuccess:(void (^)(SKPaymentQueue *queue))success
+ failure:(void (^)(SKPaymentQueue *queue, NSError *error))failure;
+
+@end
+
+///----------------
+/// @name Constants
+///----------------
+
+extern NSString * const CargoBarErrorDomain;
289 CargoBay/CargoBay.m
@@ -0,0 +1,289 @@
+// CargoBay.m
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// 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 "CargoBay.h"
+
+#import "AFHTTPClient.h"
+#import "AFJSONRequestOperation.h"
+
+NSString * const CargoBarErrorDomain = @"CargoBarErrorDomain";
+
+static NSString * const kCargoBayReceiptVerificationBaseURLString = @"https://buy.itunes.apple.com/";
+
+typedef void (^CargoBayPaymentQueueProductSuccessBlock)(NSArray *products, NSArray *invalidIdentifiers);
+typedef void (^CargoBayPaymentQueueProductFailureBlock)(NSError *error);
+typedef void (^CargoBayPaymentQueueTransactionsBlock)(SKPaymentQueue *queue, NSArray *transactions);
+typedef void (^CargoBayPaymentQueueRestoreSuccessBlock)(SKPaymentQueue *queue);
+typedef void (^CargoBayPaymentQueueRestoreFailureBlock)(SKPaymentQueue *queue, NSError *error);
+
+static NSString * CBBase64EncodedStringFromData(NSData *data) {
+ NSUInteger length = [data length];
+ NSMutableData *mutableData = [NSMutableData dataWithLength:((length + 2) / 3) * 4];
+
+ uint8_t *input = (uint8_t *)[data bytes];
+ uint8_t *output = (uint8_t *)[mutableData mutableBytes];
+
+ for (NSUInteger i = 0; i < length; i += 3) {
+ NSUInteger value = 0;
+ for (NSUInteger j = i; j < (i + 3); j++) {
+ value <<= 8;
+ if (j < length) {
+ value |= (0xFF & input[j]);
+ }
+ }
+
+ static uint8_t const kAFBase64EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+ NSUInteger idx = (i / 3) * 4;
+ output[idx + 0] = kAFBase64EncodingTable[(value >> 18) & 0x3F];
+ output[idx + 1] = kAFBase64EncodingTable[(value >> 12) & 0x3F];
+ output[idx + 2] = (i + 1) < length ? kAFBase64EncodingTable[(value >> 6) & 0x3F] : '=';
+ output[idx + 3] = (i + 2) < length ? kAFBase64EncodingTable[(value >> 0) & 0x3F] : '=';
+ }
+
+ return [[NSString alloc] initWithData:mutableData encoding:NSASCIIStringEncoding];
+}
+
+@interface CargoBayProductRequestDelegate : NSObject <SKRequestDelegate, SKProductsRequestDelegate> {
+@private
+ CargoBayPaymentQueueProductSuccessBlock _success;
+ CargoBayPaymentQueueProductFailureBlock _failure;
+}
+
++ (void)registerDelegate:(CargoBayProductRequestDelegate *)delegate;
++ (void)unregisterDelegate:(CargoBayProductRequestDelegate *)delegate;
+
+- (id)initWithSuccess:(void (^)(NSArray *products, NSArray *invalidIdentifiers))success
+ failure:(void (^)(NSError *error))failure;
+@end
+
+#pragma mark -
+
+@implementation CargoBay {
+@private
+ AFHTTPClient *_receiptVerificationClient;
+
+ CargoBayPaymentQueueTransactionsBlock _paymentQueueTransactionsUpdated;
+ CargoBayPaymentQueueTransactionsBlock _paymentQueueTransactionsRemoved;
+ CargoBayPaymentQueueRestoreSuccessBlock _paymentQueueRestoreSuccessBlock;
+ CargoBayPaymentQueueRestoreFailureBlock _paymentQueueRestoreFailureBlock;
+}
+
++ (CargoBay *)sharedManager {
+ static CargoBay *_sharedManager = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ _sharedManager = [[CargoBay alloc] init];
+ });
+
+ return _sharedManager;
+}
+
+- (id)init {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+
+ _receiptVerificationClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:kCargoBayReceiptVerificationBaseURLString]];
+ [_receiptVerificationClient setDefaultHeader:@"Accept" value:@"application/json"];
+ [_receiptVerificationClient registerHTTPOperationClass:[AFJSONRequestOperation class]];
+
+ return self;
+}
+
+- (void)productsWithIdentifiers:(NSSet *)identifiers
+ success:(void (^)(NSArray *products, NSArray *invalidIdentifiers))success
+ failure:(void (^)(NSError *error))failure
+{
+ SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:identifiers];
+
+ id <SKProductsRequestDelegate> delegate = [[CargoBayProductRequestDelegate alloc] initWithSuccess:success failure:failure];
+ request.delegate = delegate;
+
+ [CargoBayProductRequestDelegate registerDelegate:delegate];
+ [request start];
+}
+
+- (void)productsWithRequest:(NSURLRequest *)request
+ success:(void (^)(NSArray *products, NSArray *invalidIdentifiers))success
+ failure:(void (^)(NSError *error))failure
+{
+ if (!_productsHTTPClient) {
+ return;
+ }
+
+ AFHTTPRequestOperation *operation = [_productsHTTPClient HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *operation, id responseObject) {
+ if (success && [responseObject isKindOfClass:[NSArray class]]) {
+ [self productsWithIdentifiers:[NSSet setWithArray:responseObject] success:success failure:failure];
+ }
+ } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
+ if (failure) {
+ failure(error);
+ }
+ }];
+
+ [_productsHTTPClient.operationQueue addOperation:operation];
+}
+
+- (void)verifyTransaction:(SKPaymentTransaction *)transaction
+ success:(void (^)(NSDictionary *receipt))success
+ failure:(void (^)(NSError *error))failure
+{
+ if (transaction.transactionState != SKPaymentTransactionStatePurchased) {
+ return;
+ }
+
+ [_receiptVerificationClient getPath:@"verifyReceipt" parameters:[NSDictionary dictionaryWithObject:CBBase64EncodedStringFromData(transaction.transactionReceipt) forKey:@"receipt-data"] success:^(AFHTTPRequestOperation *operation, id responseObject) {
+ NSInteger status = [[responseObject valueForKey:@"status"] integerValue];
+ if (status == 0) {
+ if (success) {
+ NSDictionary *receipt = [responseObject valueForKey:@"receipt"];
+ success(receipt);
+ }
+ } else {
+ if (failure) {
+ NSDictionary *userInfo = [NSDictionary dictionaryWithObject:[responseObject valueForKey:@"exception"] forKey:NSLocalizedFailureReasonErrorKey];
+
+ NSError *error = [[NSError alloc] initWithDomain:CargoBarErrorDomain code:status userInfo:userInfo];
+ failure(error);
+ }
+ }
+ } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
+ if (failure) {
+ failure(error);
+ }
+ }];
+}
+
+- (void)setPaymentQueueUpdatedTransactionsBlock:(void (^)(SKPaymentQueue *queue, NSArray *transactions))block {
+ _paymentQueueTransactionsUpdated = [block copy];
+}
+
+- (void)setPaymentQueueRemovedTransactionsBlock:(void (^)(SKPaymentQueue *queue, NSArray *transactions))block {
+ _paymentQueueTransactionsRemoved = [block copy];
+}
+
+- (void)setPaymentQueueRestoreCompletedTransactionsWithSuccess:(void (^)(SKPaymentQueue *queue))success
+ failure:(void (^)(SKPaymentQueue *queue, NSError *error))failure
+{
+ _paymentQueueRestoreSuccessBlock = [success copy];
+ _paymentQueueRestoreFailureBlock = [failure copy];
+}
+
+#pragma mark - SKPaymentTransactionObserver
+
+- (void)paymentQueue:(SKPaymentQueue *)queue
+ updatedTransactions:(NSArray *)transactions
+{
+ if (_paymentQueueTransactionsUpdated) {
+ _paymentQueueTransactionsUpdated(queue, transactions);
+ }
+}
+
+- (void)paymentQueue:(SKPaymentQueue *)queue
+ removedTransactions:(NSArray *)transactions
+{
+ if (_paymentQueueTransactionsRemoved) {
+ _paymentQueueTransactionsRemoved(queue, transactions);
+ }
+}
+
+- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue {
+ if (_paymentQueueRestoreSuccessBlock) {
+ _paymentQueueRestoreSuccessBlock(queue);
+ }
+}
+
+- (void)paymentQueue:(SKPaymentQueue *)queue
+restoreCompletedTransactionsFailedWithError:(NSError *)error
+{
+ if (_paymentQueueRestoreFailureBlock) {
+ _paymentQueueRestoreFailureBlock(queue, error);
+ }
+}
+
+@end
+
+#pragma mark -
+
+@interface CargoBayProductRequestDelegate ()
++ (NSMutableSet *)registeredDelegates;
+@end
+
+@implementation CargoBayProductRequestDelegate
+
++ (NSMutableSet *)registeredDelegates {
+ static NSMutableSet *_mutableRegisteredDelegates = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ _mutableRegisteredDelegates = [[NSMutableSet alloc] init];
+ });
+
+ return _mutableRegisteredDelegates;
+}
+
++ (void)registerDelegate:(CargoBayProductRequestDelegate *)delegate {
+ [[self registeredDelegates] addObject:delegate];
+}
+
++ (void)unregisterDelegate:(CargoBayProductRequestDelegate *)delegate {
+ [[self registeredDelegates] removeObject:delegate];
+}
+
+- (id)initWithSuccess:(void (^)(NSArray *, NSArray *))success failure:(void (^)(NSError *))failure {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+
+ _success = [success copy];
+ _failure = [failure copy];
+
+ return self;
+}
+
+#pragma mark - SKRequestDelegate
+
+- (void)request:(SKRequest *)request
+didFailWithError:(NSError *)error
+{
+ if (_failure) {
+ _failure(error);
+ }
+
+ [[self class] unregisterDelegate:self];
+}
+
+#pragma mark - SKProductsRequestDelegate
+
+- (void)productsRequest:(SKProductsRequest *)request
+ didReceiveResponse:(SKProductsResponse *)response
+{
+ if (_success) {
+ _success(response.products, response.invalidProductIdentifiers);
+ }
+
+ [[self class] unregisterDelegate:self];
+}
+
+@end
33 Example/AppDelegate.h
@@ -0,0 +1,33 @@
+// AppDelegate.h
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// 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>
+
+@class ViewController;
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) ViewController *viewController;
+
+@end
67 Example/AppDelegate.m
@@ -0,0 +1,67 @@
+// AppDelegate.m
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// 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 <StoreKit/StoreKit.h>
+#import "AppDelegate.h"
+
+#import "ViewController.h"
+
+#import "CargoBay.h"
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application
+didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ [[SKPaymentQueue defaultQueue] addTransactionObserver:[CargoBay sharedManager]];
+
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
392 Example/CargoBay.xcodeproj/project.pbxproj
@@ -0,0 +1,392 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ F853B17815FD71A100D5AC59 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F853B17715FD71A100D5AC59 /* UIKit.framework */; };
+ F853B17A15FD71A100D5AC59 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F853B17915FD71A100D5AC59 /* Foundation.framework */; };
+ F853B17C15FD71A100D5AC59 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F853B17B15FD71A100D5AC59 /* CoreGraphics.framework */; };
+ F8AA37E315FD71F800C21309 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F8AA37DC15FD71F800C21309 /* ViewController.xib */; };
+ F8AA37E415FD71F800C21309 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA37DE15FD71F800C21309 /* AppDelegate.m */; };
+ F8AA37E515FD71F800C21309 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA37DF15FD71F800C21309 /* main.m */; };
+ F8AA37E615FD71F800C21309 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA37E015FD71F800C21309 /* ViewController.m */; };
+ F8AA37EC15FD724E00C21309 /* CargoBay.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA37EB15FD724E00C21309 /* CargoBay.m */; };
+ F8AA37EF15FD747D00C21309 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8AA37EE15FD747D00C21309 /* StoreKit.framework */; };
+ F8AA380E15FD7A5300C21309 /* AFHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA37FA15FD7A5300C21309 /* AFHTTPClient.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8AA380F15FD7A5300C21309 /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA37FC15FD7A5300C21309 /* AFHTTPRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8AA381015FD7A5300C21309 /* AFImageRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA37FE15FD7A5300C21309 /* AFImageRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8AA381115FD7A5300C21309 /* AFJSONRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA380015FD7A5300C21309 /* AFJSONRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8AA381215FD7A5300C21309 /* AFJSONUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA380215FD7A5300C21309 /* AFJSONUtilities.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8AA381315FD7A5300C21309 /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA380415FD7A5300C21309 /* AFNetworkActivityIndicatorManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8AA381415FD7A5300C21309 /* AFPropertyListRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA380715FD7A5300C21309 /* AFPropertyListRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8AA381515FD7A5300C21309 /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA380915FD7A5300C21309 /* AFURLConnectionOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8AA381615FD7A5300C21309 /* AFXMLRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA380B15FD7A5300C21309 /* AFXMLRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8AA381715FD7A5300C21309 /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AA380D15FD7A5300C21309 /* UIImageView+AFNetworking.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ F853B17315FD71A100D5AC59 /* CargoBay.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CargoBay.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ F853B17715FD71A100D5AC59 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ F853B17915FD71A100D5AC59 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ F853B17B15FD71A100D5AC59 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ F8AA37D615FD71F800C21309 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = SOURCE_ROOT; };
+ F8AA37D715FD71F800C21309 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = SOURCE_ROOT; };
+ F8AA37D815FD71F800C21309 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = SOURCE_ROOT; };
+ F8AA37DB15FD71F800C21309 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = InfoPlist.strings; sourceTree = "<group>"; };
+ F8AA37DD15FD71F800C21309 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = ViewController.xib; sourceTree = "<group>"; };
+ F8AA37DE15FD71F800C21309 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = SOURCE_ROOT; };
+ F8AA37DF15FD71F800C21309 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; };
+ F8AA37E015FD71F800C21309 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = SOURCE_ROOT; };
+ F8AA37E115FD71F800C21309 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; };
+ F8AA37EA15FD724E00C21309 /* CargoBay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CargoBay.h; sourceTree = "<group>"; };
+ F8AA37EB15FD724E00C21309 /* CargoBay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CargoBay.m; sourceTree = "<group>"; };
+ F8AA37EE15FD747D00C21309 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
+ F8AA37F915FD7A5300C21309 /* AFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPClient.h; sourceTree = "<group>"; };
+ F8AA37FA15FD7A5300C21309 /* AFHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPClient.m; sourceTree = "<group>"; };
+ F8AA37FB15FD7A5300C21309 /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = "<group>"; };
+ F8AA37FC15FD7A5300C21309 /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = "<group>"; };
+ F8AA37FD15FD7A5300C21309 /* AFImageRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFImageRequestOperation.h; sourceTree = "<group>"; };
+ F8AA37FE15FD7A5300C21309 /* AFImageRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageRequestOperation.m; sourceTree = "<group>"; };
+ F8AA37FF15FD7A5300C21309 /* AFJSONRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFJSONRequestOperation.h; sourceTree = "<group>"; };
+ F8AA380015FD7A5300C21309 /* AFJSONRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFJSONRequestOperation.m; sourceTree = "<group>"; };
+ F8AA380115FD7A5300C21309 /* AFJSONUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFJSONUtilities.h; sourceTree = "<group>"; };
+ F8AA380215FD7A5300C21309 /* AFJSONUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFJSONUtilities.m; sourceTree = "<group>"; };
+ F8AA380315FD7A5300C21309 /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkActivityIndicatorManager.h; sourceTree = "<group>"; };
+ F8AA380415FD7A5300C21309 /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityIndicatorManager.m; sourceTree = "<group>"; };
+ F8AA380515FD7A5300C21309 /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworking.h; sourceTree = "<group>"; };
+ F8AA380615FD7A5300C21309 /* AFPropertyListRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFPropertyListRequestOperation.h; sourceTree = "<group>"; };
+ F8AA380715FD7A5300C21309 /* AFPropertyListRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFPropertyListRequestOperation.m; sourceTree = "<group>"; };
+ F8AA380815FD7A5300C21309 /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLConnectionOperation.h; sourceTree = "<group>"; };
+ F8AA380915FD7A5300C21309 /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLConnectionOperation.m; sourceTree = "<group>"; };
+ F8AA380A15FD7A5300C21309 /* AFXMLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFXMLRequestOperation.h; sourceTree = "<group>"; };
+ F8AA380B15FD7A5300C21309 /* AFXMLRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFXMLRequestOperation.m; sourceTree = "<group>"; };
+ F8AA380C15FD7A5300C21309 /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+AFNetworking.h"; sourceTree = "<group>"; };
+ F8AA380D15FD7A5300C21309 /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+AFNetworking.m"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ F853B17015FD71A100D5AC59 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F8AA37EF15FD747D00C21309 /* StoreKit.framework in Frameworks */,
+ F853B17815FD71A100D5AC59 /* UIKit.framework in Frameworks */,
+ F853B17A15FD71A100D5AC59 /* Foundation.framework in Frameworks */,
+ F853B17C15FD71A100D5AC59 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ F853B16815FD71A100D5AC59 = {
+ isa = PBXGroup;
+ children = (
+ F853B17D15FD71A100D5AC59 /* CargoBay Example */,
+ F853B17615FD71A100D5AC59 /* Frameworks */,
+ F853B17415FD71A100D5AC59 /* Products */,
+ F8AA37ED15FD725300C21309 /* Vendor */,
+ );
+ sourceTree = "<group>";
+ };
+ F853B17415FD71A100D5AC59 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ F853B17315FD71A100D5AC59 /* CargoBay.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ F853B17615FD71A100D5AC59 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ F8AA37EE15FD747D00C21309 /* StoreKit.framework */,
+ F853B17715FD71A100D5AC59 /* UIKit.framework */,
+ F853B17915FD71A100D5AC59 /* Foundation.framework */,
+ F853B17B15FD71A100D5AC59 /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ F853B17D15FD71A100D5AC59 /* CargoBay Example */ = {
+ isa = PBXGroup;
+ children = (
+ F8AA37D615FD71F800C21309 /* AppDelegate.h */,
+ F8AA37DE15FD71F800C21309 /* AppDelegate.m */,
+ F8AA37D715FD71F800C21309 /* ViewController.h */,
+ F8AA37E015FD71F800C21309 /* ViewController.m */,
+ F8AA37E815FD720300C21309 /* Supporting Files */,
+ );
+ name = "CargoBay Example";
+ path = CargoBay;
+ sourceTree = "<group>";
+ };
+ F8AA37D915FD71F800C21309 /* en.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ F8AA37DA15FD71F800C21309 /* InfoPlist.strings */,
+ F8AA37DC15FD71F800C21309 /* ViewController.xib */,
+ );
+ path = en.lproj;
+ sourceTree = SOURCE_ROOT;
+ };
+ F8AA37E815FD720300C21309 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ F8AA37D815FD71F800C21309 /* Prefix.pch */,
+ F8AA37DF15FD71F800C21309 /* main.m */,
+ F8AA37E115FD71F800C21309 /* Info.plist */,
+ F8AA37D915FD71F800C21309 /* en.lproj */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ F8AA37E915FD724E00C21309 /* CargoBay */ = {
+ isa = PBXGroup;
+ children = (
+ F8AA37EA15FD724E00C21309 /* CargoBay.h */,
+ F8AA37EB15FD724E00C21309 /* CargoBay.m */,
+ );
+ name = CargoBay;
+ path = ../CargoBay;
+ sourceTree = "<group>";
+ };
+ F8AA37ED15FD725300C21309 /* Vendor */ = {
+ isa = PBXGroup;
+ children = (
+ F8AA37F815FD7A5300C21309 /* AFNetworking */,
+ F8AA37E915FD724E00C21309 /* CargoBay */,
+ );
+ name = Vendor;
+ sourceTree = "<group>";
+ };
+ F8AA37F815FD7A5300C21309 /* AFNetworking */ = {
+ isa = PBXGroup;
+ children = (
+ F8AA37F915FD7A5300C21309 /* AFHTTPClient.h */,
+ F8AA37FA15FD7A5300C21309 /* AFHTTPClient.m */,
+ F8AA37FB15FD7A5300C21309 /* AFHTTPRequestOperation.h */,
+ F8AA37FC15FD7A5300C21309 /* AFHTTPRequestOperation.m */,
+ F8AA37FD15FD7A5300C21309 /* AFImageRequestOperation.h */,
+ F8AA37FE15FD7A5300C21309 /* AFImageRequestOperation.m */,
+ F8AA37FF15FD7A5300C21309 /* AFJSONRequestOperation.h */,
+ F8AA380015FD7A5300C21309 /* AFJSONRequestOperation.m */,
+ F8AA380115FD7A5300C21309 /* AFJSONUtilities.h */,
+ F8AA380215FD7A5300C21309 /* AFJSONUtilities.m */,
+ F8AA380315FD7A5300C21309 /* AFNetworkActivityIndicatorManager.h */,
+ F8AA380415FD7A5300C21309 /* AFNetworkActivityIndicatorManager.m */,
+ F8AA380515FD7A5300C21309 /* AFNetworking.h */,
+ F8AA380615FD7A5300C21309 /* AFPropertyListRequestOperation.h */,
+ F8AA380715FD7A5300C21309 /* AFPropertyListRequestOperation.m */,
+ F8AA380815FD7A5300C21309 /* AFURLConnectionOperation.h */,
+ F8AA380915FD7A5300C21309 /* AFURLConnectionOperation.m */,
+ F8AA380A15FD7A5300C21309 /* AFXMLRequestOperation.h */,
+ F8AA380B15FD7A5300C21309 /* AFXMLRequestOperation.m */,
+ F8AA380C15FD7A5300C21309 /* UIImageView+AFNetworking.h */,
+ F8AA380D15FD7A5300C21309 /* UIImageView+AFNetworking.m */,
+ );
+ name = AFNetworking;
+ path = ../AFNetworking/AFNetworking;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ F853B17215FD71A100D5AC59 /* CargoBay */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = F853B19115FD71A200D5AC59 /* Build configuration list for PBXNativeTarget "CargoBay" */;
+ buildPhases = (
+ F853B16F15FD71A100D5AC59 /* Sources */,
+ F853B17015FD71A100D5AC59 /* Frameworks */,
+ F853B17115FD71A100D5AC59 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = CargoBay;
+ productName = CargoBay;
+ productReference = F853B17315FD71A100D5AC59 /* CargoBay.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ F853B16A15FD71A100D5AC59 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0440;
+ ORGANIZATIONNAME = "Mattt Thompson";
+ };
+ buildConfigurationList = F853B16D15FD71A100D5AC59 /* Build configuration list for PBXProject "CargoBay" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = F853B16815FD71A100D5AC59;
+ productRefGroup = F853B17415FD71A100D5AC59 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ F853B17215FD71A100D5AC59 /* CargoBay */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ F853B17115FD71A100D5AC59 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F8AA37E315FD71F800C21309 /* ViewController.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ F853B16F15FD71A100D5AC59 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F8AA37E415FD71F800C21309 /* AppDelegate.m in Sources */,
+ F8AA37E515FD71F800C21309 /* main.m in Sources */,
+ F8AA37E615FD71F800C21309 /* ViewController.m in Sources */,
+ F8AA37EC15FD724E00C21309 /* CargoBay.m in Sources */,
+ F8AA380E15FD7A5300C21309 /* AFHTTPClient.m in Sources */,
+ F8AA380F15FD7A5300C21309 /* AFHTTPRequestOperation.m in Sources */,
+ F8AA381015FD7A5300C21309 /* AFImageRequestOperation.m in Sources */,
+ F8AA381115FD7A5300C21309 /* AFJSONRequestOperation.m in Sources */,
+ F8AA381215FD7A5300C21309 /* AFJSONUtilities.m in Sources */,
+ F8AA381315FD7A5300C21309 /* AFNetworkActivityIndicatorManager.m in Sources */,
+ F8AA381415FD7A5300C21309 /* AFPropertyListRequestOperation.m in Sources */,
+ F8AA381515FD7A5300C21309 /* AFURLConnectionOperation.m in Sources */,
+ F8AA381615FD7A5300C21309 /* AFXMLRequestOperation.m in Sources */,
+ F8AA381715FD7A5300C21309 /* UIImageView+AFNetworking.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ F8AA37DA15FD71F800C21309 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F8AA37DB15FD71F800C21309 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ F8AA37DC15FD71F800C21309 /* ViewController.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F8AA37DD15FD71F800C21309 /* en */,
+ );
+ name = ViewController.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ F853B18F15FD71A200D5AC59 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ F853B19015FD71A200D5AC59 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ F853B19215FD71A200D5AC59 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Prefix.pch;
+ INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ F853B19315FD71A200D5AC59 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Prefix.pch;
+ INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ F853B16D15FD71A100D5AC59 /* Build configuration list for PBXProject "CargoBay" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F853B18F15FD71A200D5AC59 /* Debug */,
+ F853B19015FD71A200D5AC59 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ F853B19115FD71A200D5AC59 /* Build configuration list for PBXNativeTarget "CargoBay" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F853B19215FD71A200D5AC59 /* Debug */,
+ F853B19315FD71A200D5AC59 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = F853B16A15FD71A100D5AC59 /* Project object */;
+}
7 Example/CargoBay.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:CargoBay.xcodeproj">
+ </FileRef>
+</Workspace>
38 Example/Info.plist
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mattt.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
10 Example/Prefix.pch
@@ -0,0 +1,10 @@
+#import <Availability.h>
+
+#ifndef __IPHONE_4_0
+#warning "This project uses features only available in iOS SDK 4.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
27 Example/ViewController.h
@@ -0,0 +1,27 @@
+// ViewController.h
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// 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>
+
+@interface ViewController : UIViewController
+
+@end
48 Example/ViewController.m
@@ -0,0 +1,48 @@
+// ViewController.m
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// 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 "ViewController.h"
+
+@interface ViewController ()
+
+@end
+
+@implementation ViewController
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+}
+
+@end
2  Example/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
119 Example/en.lproj/ViewController.xib
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1280</int>
+ <string key="IBDocument.SystemVersion">11C25</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1919</string>
+ <string key="IBDocument.AppKitVersion">1138.11</string>
+ <string key="IBDocument.HIToolboxVersion">566.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">916</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBProxyObject</string>
+ <string>IBUIView</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC43NQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">ViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">7</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">ViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/ViewController.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">916</string>
+ </data>
+</archive>
18 Example/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// CargoBay
+//
+// Created by Mattt Thompson on 2012/09/09.
+// Copyright (c) 2012年 Mattt Thompson. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+
+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.
79 README.md
@@ -0,0 +1,79 @@
+# CargoBay
+**The Essential StoreKit Companion**
+
+[`StoreKit`](http://developer.apple.com/library/ios/#documentation/StoreKit/Reference/StoreKit_Collection/) is the Apple framework for [making In-App Purchases](http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction/Introduction.html). It's pretty good in its own right, but it has a few rough edges.
+
+`CargoBay` smooths out those rough parts by providing:
+
+- Block-based interface for requesting product information
+- Ability to request product information for identifiers asynchronously from a remote web service
+- Block-based callbacks for payment queue observation delegate methods
+- One-step receipt verification
+
+## Usage
+
+### Product Requests
+
+```objective-c
+NSArray *identifiers = @[
+ @"com.example.myapp.apple",
+ @"com.example.myapp.pear",
+ @"com.example.myapp.banana"
+];
+
+[[CargoBay sharedManager] productsWithIdentifiers:[NSSet setWithArray:identifiers]
+success:^(NSArray *products, NSArray *invalidIdentifiers) {
+ NSLog(@"Products: %@", products);
+ NSLog(@"Invalid Identifiers: %@", invalidIdentifiers);
+} failure:^(NSError *error) {
+ NSLog(@"Error: %@", error);
+}];
+```
+
+### Getting Product Identifiers From Server
+
+```objective-c
+NSURL *URL = [NSURL URLWithString:@"http://example.com/products"];
+[[CargoBay sharedManager] productsWithURLRequest:[NSURLRequest requestWithURL:URL]
+success:^(NSArray *products, NSArray *invalidIdentifiers) {
+ // ...
+} failure:^(NSError *error) {
+ // ...
+}];
+```
+
+### Payment Queue Observation
+
+**AppDelegate.m**
+
+```objective-c
+- (void)application:(UIApplication *)application didFinishLoadingWithOptions:(NSDictionary *)options {
+ [[CargoBay sharedManager] setPaymentQueueUpdatedTransactionsBlock:^(SKPaymentQueue *queue, NSArray *transactions) {
+ NSLog(@"Updated Transactions: %@", transactions);
+ }];
+
+ [[SKPaymentQueue defaultQueue] addTransactionObserver:[CargoBay sharedManager]];
+
+ // ...
+}
+```
+
+### Verifying Receipts
+
+```objective-c
+[[CargoBay sharedManager] verifyTransaction:(SKPaymentTransaction *) success:^(NSDictionary *receipt) {
+ NSLog(@"Receipt: %@", receipt);
+}
+ failure:^(NSError *error) {
+ NSLog(@"Error %d (%@)", [error code], [error localizedDescription]);
+}];
+```
+
+### Contact
+
+[Mattt Thompson](http://github.com/mattt)
+[@mattt](https://twitter.com/mattt)
+
+## License
+
+CargoBay is available under the MIT license. See the LICENSE file for more info.
Please sign in to comment.
Something went wrong with that request. Please try again.