Closes gh-47. Initial implementation of OS X build integrating changes submitted by Felix Holmgren (https://github.com/Felixyz/RestKit).

* Factored out display of alerts into RKAlert interface that hides the differences between UIKit and OS X Cocoa.
* Added macosx to supported platforms to enable build on OS X.
* Configured project to use conditional architectures to enable building on OS X and iOS from the same targets.
* Implemented a bare-bones OS X example app.
* Create `rake build` task for building RestKit against iOS and OS X SDK for quick testing.
This commit is contained in:
Blake Watters
2011-04-10 02:19:55 -04:00
parent cef335d02b
commit 9593612aab
25 changed files with 4970 additions and 58 deletions

View File

@@ -6,7 +6,10 @@
// Copyright 2010 Two Toasters. All rights reserved.
//
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#endif
#import "RKRequestQueue.h"
#import "RKResponse.h"
#import "RKNotifications.h"
@@ -40,7 +43,7 @@ static const NSInteger kMaxConcurrentLoads = 5;
_requests = [[NSMutableArray alloc] init];
_suspended = NO;
_totalLoading = 0;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(responseDidLoad:)
name:RKResponseReceivedNotification
@@ -49,6 +52,7 @@ static const NSInteger kMaxConcurrentLoads = 5;
selector:@selector(responseDidLoad:)
name:RKRequestFailedWithErrorNotification
object:nil];
#if TARGET_OS_IPHONE
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(willTransitionToBackground)
name:UIApplicationDidEnterBackgroundNotification
@@ -57,6 +61,7 @@ static const NSInteger kMaxConcurrentLoads = 5;
selector:@selector(willTransitionToForeground)
name:UIApplicationWillEnterForegroundNotification
object:nil];
#endif
}
return self;
}