diff --git a/.gitignore b/.gitignore index 7720bee6..e5436a76 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ dist .bundle xcodebuild.log Pods/Documentation +*.xccheckout diff --git a/.travis.yml b/.travis.yml index 570a2364..e409b027 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,7 @@ language: objective-c -before_install: sudo gem update --system && bundle install --without scripts -script: bundle exec rake debug:cleanbuild +install: true +env: + matrix: + - XCODE_SCHEME=libPusher SDK=iphonesimulator + - XCODE_SCHEME=libPusher-OSX SDK=macosx10.9 +script: xctool -workspace libPusher.xcworkspace -scheme $XCODE_SCHEME -sdk $SDK build test diff --git a/CHANGES.md b/CHANGES.md index 2df54ed2..995b4cde 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,13 +1,71 @@ -# 1.5 - May 2013 +# 1.5 - December 2013 + +This release contains some significant bug fixes and API changes. All deprecated API in this release will be removed in the next release after this one. + +## Upgrade notes + +This is a summary of the changes in this release and notes on how to upgrade. The recommended way of installing libPusher is to use CocoaPods. + +As of this version, support for iOS < 5.0 and OSX < 10.8 has been dropped. + +### Connection is no longer automatic + +`PTPusher` will no longer connect automatically on initialisation and all methods that accept a connect `connectAutomatically` parameter (including the initialiser and all factory methods) are deprecated. + +You should now explicitly call `connect` when you are ready to connect. + +The method `reconnectAutomatically` has been removed completely (see below). + +### Improvements to disconnection handling + +`PTPusher` now goes to great lengths to ensure it remains connected whenever possible, including correctly handling error codes returned by the Pusher service (see http://pusher.com/docs/pusher_protocol#error-codes). + +In most cases where the connection fails or disconnects, Pusher will attempt to reconnect either immediately or after a configured delay (which defaults to 5s and can still be customised using the `reconnectDelay` property. + +In the case where Pusher returns a 4100 error code (over capacity), reconnection attempts will be attempted using a linear back-off delay. In all cases, Pusher will limit reconnection attempts to a maximum of three attempts before giving up. + +There are two circumstances in which the client will not reconnect automatically: + + * The client disconnects with an error code in the 4000-4099 range, which generally indicates a client misconfiguration. + * The client is not able to connect in the first place (i.e. it fails on it's first attempt), which normally indicates that there is no network connection or there is a server-side issue. + +A new delegate method, `pusher:connection:didDisconnectWithError:willAttemptReconnect:` will be called when Pusher disconnects. The `willAttemptReconnect:` parameter will indicate to clients that `PTPusher` will automatically reconnect. If this is `NO`, clients should decide how they want to proceed (e.g. you may want to check network reachability and manually reconnect when reachability changes). + +These changes should ensure that libPusher is much more reliable. You no longer need to explicitly disconnect and reconnect the client when going to the background or when the device is locked - in these situations the client will automatically reconnect when the app returns to the foreground or the device is unlocked. + +The delegate methods `pusher:connection:didDisconnectWithError` and `pusher:connection:didDisconnect:` are now deprecated and will be removed in the next release. + +Additionally, the `reconnectAutomatically` property of `PTPusher` has been deprecated. Setting this will not affect the automatic reconnection behaviour of `PTPusher`. If you need to take control of the auto-reconnect behaviour, a new delegate method is provided, `pusher:connectionWillAutomaticallyReconnect:afterDelay:`. Returning `NO` from this method will prevent the automatic reconnection attempt from happening. You will be responsible for manually reconnecting the client. + +Pusher can be prevented from connecting *at any time* by returning `NO` from another new delegate method, `pusher:connectionWillConnect:`. + +### Changes to presence channel members API + +The API for accessing members of a channel has been brought in line with the JavaScript client. + +Presence channels have a property `members`, which returns a instance of `PTPusherChannelMembers`, which is an unordered collection of members. Members can be retrieved by ID using the `memberWithID:` method. Members are represented by instances of the class `PTPusherChannelMember` rather than `NSDictionary` - see the headers for more information. There is also a property, `me`, which returns your own member object. + +### Experimental ReactiveExtensions + +This release contains some extensions that allow binding to events using ReactiveCocoa signals. These extensions are bundled as a separate library and if you're using CocoaPods, a sub-spec that is excluded from the default spec. These are still experimental so proceed with caution. You can add them to your project by adding `libPusher/ReactiveExtensions` to your `Podfile`. + +### Bug Fixes + +* There have been numerous bug fixes around connection handling and Pusher should generally be more stable and remain connected in most cases where you have network connectivity. +* libPusher now uses socket-native ping/pong and also sends client-side pings to keep the connection alive. +* Removed an assertion that would cause a crash if trying to send a client-send event when not connected. +* Calling `unsubscribe` on a channel while disconnected works as expected, with the channel being removed from the channels list and all bindings removed. + +### Other enhancements and changes -* Deprecated `reconnectAutomatically`, which is now ignored. Pusher will now try and reconnect automatically whenever possible by default, based on the error code returned by Pusher as defined in the latest Pusher protocol. -* Generally improved reconnection strategy. -* Added a global Pusher.h header file to reduce the number of imports needed -* Added `pusher:connectionWillConnect:` delegate method. -* Deprecated `pusher:willAuthorizeChannelWithRequest:` delegate method, replaced with pusher:willAuthorizeChannel:withRequest:. * Bumped Pusher protocol to version 6. -* Removed support for iOS4. * Switched to latest SocketRocket backend, improved threading issues +* Removed private headers from CocoaPod specification +* Removed `PTPusher` property, `reconnectAutomatically` +* Moved fatal protocol errors that disallow reconnection into a new `PTPusherFatalErrorDomain` error domain. +* Fixed 64bit warnings. +* Removed JSONKit support. +* Log warnings when calling deprecated delegate methods. # 1.4 - October 2012 diff --git a/Default-568h@2x.png b/Default-568h@2x.png new file mode 100644 index 00000000..0891b7aa Binary files /dev/null and b/Default-568h@2x.png differ diff --git a/Functional Specs/SpecHelper.m b/Functional Specs/SpecHelper.m index f59a4b51..b5cedbff 100644 --- a/Functional Specs/SpecHelper.m +++ b/Functional Specs/SpecHelper.m @@ -20,14 +20,13 @@ PTPusher *newTestClientWithMockConnection(void) { PTPusherMockConnection *mockConnection = [[PTPusherMockConnection alloc] init]; - PTPusher *client = [[PTPusher alloc] initWithConnection:mockConnection connectAutomatically:NO]; + PTPusher *client = [[PTPusher alloc] initWithConnection:mockConnection]; client.delegate = [PTPusherClientTestHelperDelegate sharedInstance]; return [client retain]; } PTPusher *newTestClientDisconnected(void) { - PTPusher *client = [PTPusher pusherWithKey:PUSHER_API_KEY connectAutomatically:NO encrypted:kUSE_ENCRYPTED_CONNECTION]; - client.delegate = [PTPusherClientTestHelperDelegate sharedInstance]; + PTPusher *client = [PTPusher pusherWithKey:PUSHER_API_KEY delegate:[PTPusherClientTestHelperDelegate sharedInstance] encrypted:NO]; return [client retain]; } diff --git a/Gemfile b/Gemfile index 46cc49ad..b6913243 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ group :building do gem "rest-client" gem "xcodebuild-rb", :git => "git://github.com/lukeredpath/xcodebuild-rb.git" gem "xcodeproj" - gem "cocoapods", '~> 0.22.0' + gem "cocoapods", '~> 0.28.0' gem "github-downloads", :git => "git://github.com/lukeredpath/github-downloads.git" gem "osx_keychain" gem "ios-sim-test", :git => "git://github.com/alloy/ios-sim-test.git" diff --git a/Gemfile.lock b/Gemfile.lock index c73ebef9..b2fe5800 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,7 +20,7 @@ GIT GIT remote: git://github.com/lukeredpath/xcodebuild-rb.git - revision: eadcfbb4924b99f9f65775368e2ba5fc43a499fa + revision: 689feb53dc4f7f0132b70b33436dc13495e9fd4c specs: xcodebuild-rb (0.2.0) state_machine (~> 1.1.2) @@ -28,77 +28,83 @@ GIT GEM remote: https://rubygems.org/ specs: - RubyInline (3.11.4) + RubyInline (3.12.2) ZenTest (~> 4.3) - ZenTest (4.8.4) - activesupport (3.2.13) - i18n (= 0.6.1) + ZenTest (4.9.5) + activesupport (3.2.15) + i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) - claide (0.3.2) - cocoapods (0.22.2) - activesupport (~> 3.2.13) - claide (~> 0.3.2) - cocoapods-core (= 0.22.2) - cocoapods-downloader (~> 0.1.1) + claide (0.4.0) + cocoapods (0.28.0) + activesupport (>= 3.2.15, < 4) + claide (~> 0.4.0) + cocoapods-core (= 0.28.0) + cocoapods-downloader (~> 0.2.0) colored (~> 1.2) escape (~> 0.0.4) - json (~> 1.8.0) - open4 (~> 1.3.0) - xcodeproj (~> 0.8.1) - cocoapods-core (0.22.2) - activesupport (~> 3.2.13) - json (~> 1.8.0) - nap (~> 0.5.1) - cocoapods-downloader (0.1.1) + json_pure (~> 1.8) + open4 (~> 1.3) + xcodeproj (~> 0.14.1) + cocoapods-core (0.28.0) + activesupport (>= 3.2.15, < 4) + fuzzy_match (~> 2.0.4) + json (~> 1.8) + nap (~> 0.5) + cocoapods-downloader (0.2.0) colored (1.2) daemons (1.1.9) escape (0.0.4) - eventmachine (1.0.0) - highline (1.6.15) - hirb (0.7.0) - i18n (0.6.1) - json (1.8.0) + eventmachine (1.0.3) + fuzzy_match (2.0.4) + highline (1.6.20) + hirb (0.7.1) + httpclient (2.3.4.1) + i18n (0.6.5) + json (1.8.1) + json_pure (1.8.1) macaddr (1.6.1) systemu (~> 2.5.0) - mime-types (1.19) - multi_json (1.7.7) + mime-types (2.0) + multi_json (1.8.2) nap (0.5.1) open4 (1.3.0) osx_keychain (1.0.0) RubyInline (~> 3) - pusher (0.11.1) + pusher (0.12.0) + httpclient (~> 2.3.0) multi_json (~> 1.0) signature (~> 0.1.6) - rack (1.4.1) - rack-protection (1.2.0) + rack (1.5.2) + rack-protection (1.5.1) rack rake (10.1.0) rest-client (1.6.7) mime-types (>= 1.16) - signature (0.1.6) + signature (0.1.7) simpleconsole (0.1.1) - sinatra (1.3.3) - rack (~> 1.3, >= 1.3.6) - rack-protection (~> 1.2) - tilt (~> 1.3, >= 1.3.3) + sinatra (1.4.4) + rack (~> 1.4) + rack-protection (~> 1.4) + tilt (~> 1.3, >= 1.3.4) state_machine (1.1.2) systemu (2.5.2) - thin (1.5.0) + thin (1.6.1) daemons (>= 1.0.9) - eventmachine (>= 0.12.6) + eventmachine (>= 1.0.0) rack (>= 1.0.0) - tilt (1.3.3) - uuid (2.3.6) + tilt (1.4.1) + uuid (2.3.7) macaddr (~> 1.0) - xcodeproj (0.8.1) - activesupport (~> 3.2.13) + xcodeproj (0.14.1) + activesupport (~> 3.0) colored (~> 1.2) + rake PLATFORMS ruby DEPENDENCIES - cocoapods (~> 0.22.0) + cocoapods (~> 0.28.0) github-downloads! ios-sim-test! json diff --git a/Library/JSONKit.h b/Library/JSONKit.h deleted file mode 100644 index 16228870..00000000 --- a/Library/JSONKit.h +++ /dev/null @@ -1,251 +0,0 @@ -// -// JSONKit.h -// http://github.com/johnezang/JSONKit -// Dual licensed under either the terms of the BSD License, or alternatively -// under the terms of the Apache License, Version 2.0, as specified below. -// - -/* - Copyright (c) 2011, John Engelhart - - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the Zang Industries nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - Copyright 2011 John Engelhart - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#include -#include -#include -#include -#include - -#ifdef __OBJC__ -#import -#import -#import -#import -#import -#import -#endif // __OBJC__ - -#ifdef __cplusplus -extern "C" { -#endif - - - // For Mac OS X < 10.5. -#ifndef NSINTEGER_DEFINED -#define NSINTEGER_DEFINED -#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) - typedef long NSInteger; - typedef unsigned long NSUInteger; -#define NSIntegerMin LONG_MIN -#define NSIntegerMax LONG_MAX -#define NSUIntegerMax ULONG_MAX -#else // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) - typedef int NSInteger; - typedef unsigned int NSUInteger; -#define NSIntegerMin INT_MIN -#define NSIntegerMax INT_MAX -#define NSUIntegerMax UINT_MAX -#endif // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) -#endif // NSINTEGER_DEFINED - - -#ifndef _JSONKIT_H_ -#define _JSONKIT_H_ - -#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__APPLE_CC__) && (__APPLE_CC__ >= 5465) -#define JK_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#else -#define JK_DEPRECATED_ATTRIBUTE -#endif - -#define JSONKIT_VERSION_MAJOR 1 -#define JSONKIT_VERSION_MINOR 4 - - typedef NSUInteger JKFlags; - - /* - JKParseOptionComments : Allow C style // and /_* ... *_/ (without a _, obviously) comments in JSON. - JKParseOptionUnicodeNewlines : Allow Unicode recommended (?:\r\n|[\n\v\f\r\x85\p{Zl}\p{Zp}]) newlines. - JKParseOptionLooseUnicode : Normally the decoder will stop with an error at any malformed Unicode. - This option allows JSON with malformed Unicode to be parsed without reporting an error. - Any malformed Unicode is replaced with \uFFFD, or "REPLACEMENT CHARACTER". - */ - - enum { - JKParseOptionNone = 0, - JKParseOptionStrict = 0, - JKParseOptionComments = (1 << 0), - JKParseOptionUnicodeNewlines = (1 << 1), - JKParseOptionLooseUnicode = (1 << 2), - JKParseOptionPermitTextAfterValidJSON = (1 << 3), - JKParseOptionValidFlags = (JKParseOptionComments | JKParseOptionUnicodeNewlines | JKParseOptionLooseUnicode | JKParseOptionPermitTextAfterValidJSON), - }; - typedef JKFlags JKParseOptionFlags; - - enum { - JKSerializeOptionNone = 0, - JKSerializeOptionPretty = (1 << 0), - JKSerializeOptionEscapeUnicode = (1 << 1), - JKSerializeOptionEscapeForwardSlashes = (1 << 4), - JKSerializeOptionValidFlags = (JKSerializeOptionPretty | JKSerializeOptionEscapeUnicode | JKSerializeOptionEscapeForwardSlashes), - }; - typedef JKFlags JKSerializeOptionFlags; - -#ifdef __OBJC__ - - typedef struct JKParseState JKParseState; // Opaque internal, private type. - - // As a general rule of thumb, if you use a method that doesn't accept a JKParseOptionFlags argument, it defaults to JKParseOptionStrict - - @interface JSONDecoder : NSObject { - JKParseState *parseState; - } -+ (id)decoder; -+ (id)decoderWithParseOptions:(JKParseOptionFlags)parseOptionFlags; -- (id)initWithParseOptions:(JKParseOptionFlags)parseOptionFlags; -- (void)clearCache; - -// The parse... methods were deprecated in v1.4 in favor of the v1.4 objectWith... methods. -- (id)parseUTF8String:(const unsigned char *)string length:(size_t)length JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithUTF8String:length: instead. -- (id)parseUTF8String:(const unsigned char *)string length:(size_t)length error:(NSError **)error JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithUTF8String:length:error: instead. - // The NSData MUST be UTF8 encoded JSON. -- (id)parseJSONData:(NSData *)jsonData JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithData: instead. -- (id)parseJSONData:(NSData *)jsonData error:(NSError **)error JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithData:error: instead. - -// Methods that return immutable collection objects. -- (id)objectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length; -- (id)objectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length error:(NSError **)error; -// The NSData MUST be UTF8 encoded JSON. -- (id)objectWithData:(NSData *)jsonData; -- (id)objectWithData:(NSData *)jsonData error:(NSError **)error; - -// Methods that return mutable collection objects. -- (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length; -- (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length error:(NSError **)error; -// The NSData MUST be UTF8 encoded JSON. -- (id)mutableObjectWithData:(NSData *)jsonData; -- (id)mutableObjectWithData:(NSData *)jsonData error:(NSError **)error; - -@end - - //////////// -#pragma mark Deserializing methods - //////////// - - @interface NSString (JSONKitDeserializing) -- (id)objectFromJSONString; -- (id)objectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags; -- (id)objectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error; -- (id)mutableObjectFromJSONString; -- (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags; -- (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error; -@end - - @interface NSData (JSONKitDeserializing) -// The NSData MUST be UTF8 encoded JSON. -- (id)objectFromJSONData; -- (id)objectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags; -- (id)objectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error; -- (id)mutableObjectFromJSONData; -- (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags; -- (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error; -@end - - //////////// -#pragma mark Serializing methods - //////////// - - @interface NSString (JSONKitSerializing) -// Convenience methods for those that need to serialize the receiving NSString (i.e., instead of having to serialize a NSArray with a single NSString, you can "serialize to JSON" just the NSString). -// Normally, a string that is serialized to JSON has quotation marks surrounding it, which you may or may not want when serializing a single string, and can be controlled with includeQuotes: -// includeQuotes:YES `a "test"...` -> `"a \"test\"..."` -// includeQuotes:NO `a "test"...` -> `a \"test\"...` -- (NSData *)JSONData; // Invokes JSONDataWithOptions:JKSerializeOptionNone includeQuotes:YES -- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error; -- (NSString *)JSONString; // Invokes JSONStringWithOptions:JKSerializeOptionNone includeQuotes:YES -- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error; -@end - - @interface NSArray (JSONKitSerializing) -- (NSData *)JSONData; -- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error; -- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error; -- (NSString *)JSONString; -- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error; -- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error; -@end - - @interface NSDictionary (JSONKitSerializing) -- (NSData *)JSONData; -- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error; -- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error; -- (NSString *)JSONString; -- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error; -- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error; -@end - -#ifdef __BLOCKS__ - - @interface NSArray (JSONKitSerializingBlockAdditions) -- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error; -- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error; -@end - - @interface NSDictionary (JSONKitSerializingBlockAdditions) -- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error; -- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error; -@end - -#endif - - -#endif // __OBJC__ - -#endif // _JSONKIT_H_ - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/Library/NSString+Hashing.m b/Library/NSString+Hashing.m index f2b95fb8..c622d04b 100644 --- a/Library/NSString+Hashing.m +++ b/Library/NSString+Hashing.m @@ -9,7 +9,7 @@ - (NSString *)MD5Hash; const char *cStr = [self UTF8String]; unsigned char result[CC_MD5_DIGEST_LENGTH]; - CC_MD5( cStr, strlen(cStr), result ); + CC_MD5( cStr, (CC_LONG)strlen(cStr), result ); return [NSString stringWithFormat: @"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", diff --git a/Library/PTBlockEventListener.m b/Library/PTBlockEventListener.m index 4bc624ca..65dca87b 100644 --- a/Library/PTBlockEventListener.m +++ b/Library/PTBlockEventListener.m @@ -8,8 +8,12 @@ #import "PTBlockEventListener.h" +@interface PTBlockEventListener : NSObject +@end @implementation PTBlockEventListener { + PTBlockEventListenerBlock _block; + dispatch_queue_t _queue; BOOL _invalid; } @@ -18,11 +22,11 @@ - (id)initWithBlock:(PTBlockEventListenerBlock)aBlock dispatchQueue:(dispatch_qu NSParameterAssert(aBlock); if ((self = [super init])) { - block = [aBlock copy]; - queue = aQueue; + _block = [aBlock copy]; + _queue = aQueue; _invalid = NO; #if !OS_OBJECT_USE_OBJC - dispatch_retain(queue); + dispatch_retain(_queue); #endif } return self; @@ -31,7 +35,7 @@ - (id)initWithBlock:(PTBlockEventListenerBlock)aBlock dispatchQueue:(dispatch_qu - (void)dealloc { #if !OS_OBJECT_USE_OBJC - dispatch_release(queue); + dispatch_release(_queue); #endif } @@ -42,9 +46,9 @@ - (void)invalidate - (void)dispatchEvent:(PTPusherEvent *)event { - dispatch_async(queue, ^{ + dispatch_async(_queue, ^{ if (!_invalid) { - block(event); + _block(event); } }); } diff --git a/Library/PTJSON.h b/Library/PTJSON.h deleted file mode 100644 index 3683320a..00000000 --- a/Library/PTJSON.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// PTJSON.h -// libPusher -// -// Created by Luke Redpath on 30/03/2012. -// Copyright (c) 2012 LJR Software Limited. All rights reserved. -// - -#import -#import "PTJSONParser.h" - -extern NSString *const PTJSONParserNotAvailable; - -@interface PTJSON : NSObject - -/** - Returns a JSON parser appropriate for the current platform. - - A runtime check is performed for the presence of NSJSONSerialization - (available on iOS 5.0 and OSX 10.7 and later). If it is available, - it will be used, otherwise it will fall back to using JSONKit. - - Important note: If you intend to support users of iOS 4.x, you must - ensure that you link JSONKit to your project as it is no longer - embedded within libPusher. - */ -+ (id)JSONParser; - -@end - -@interface PTJSONKitParser : NSObject -+ (id)JSONKitParser; -@end - -@interface PTNSJSONParser : NSObject -+ (id)NSJSONParser; -@end \ No newline at end of file diff --git a/Library/PTJSON.m b/Library/PTJSON.m index 174e300c..dda71c18 100644 --- a/Library/PTJSON.m +++ b/Library/PTJSON.m @@ -7,59 +7,21 @@ // #import "PTJSON.h" -#import "JSONKit.h" #import "PTPusherMacros.h" -NSString *const PTJSONParserNotAvailable = @"PTJSONParserNotAvailable"; +@interface PTNSJSONParser : NSObject ++ (id)NSJSONParser; +@end @implementation PTJSON + (id)JSONParser { - if (![NSJSONSerialization class]) { - if (NSClassFromString(@"JSONDecoder") == nil) { - [NSException raise:PTJSONParserNotAvailable - format:@"No JSON parser available. To support iOS4, you should link JSONKit to your project."]; - } - return [PTJSONKitParser JSONKitParser]; - } return [PTNSJSONParser NSJSONParser]; } @end -@implementation PTJSONKitParser - -+ (id)JSONKitParser -{ - PT_DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ - return [[self alloc] init]; - }); -} - -- (NSData *)JSONDataFromObject:(id)object -{ - return [object JSONData]; -} - -- (NSString *)JSONStringFromObject:(id)object -{ - return [object JSONString]; -} - -- (id)objectFromJSONData:(NSData *)data -{ - return [data objectFromJSONData]; -} - -- (id)objectFromJSONString:(NSString *)string -{ - return [string objectFromJSONString]; -} - -@end - - @implementation PTNSJSONParser + (id)NSJSONParser diff --git a/Library/PTPusher.h b/Library/PTPusher.h index d7fdeea5..72a4de6a 100644 --- a/Library/PTPusher.h +++ b/Library/PTPusher.h @@ -20,10 +20,24 @@ extern NSString *const PTPusherEventReceivedNotification; */ extern NSString *const PTPusherEventUserInfoKey; -/** The error domain for all PTPusher errors. +/** The error domain for all non-fatal PTPusher errors. + * + * These will be any errors not in the range of 4000-4099. + * + * See: http://pusher.com/docs/pusher_protocol#error-codes */ extern NSString *const PTPusherErrorDomain; +/** The error domain for all fatal PTPusher errors. + * + * These will be any errors in the range of 4000-4099. If your + * connection fails or disconnects with one of these errors, you + * will typically not be able to reconnect immediately (or at all). + * + * See: http://pusher.com/docs/pusher_protocol#error-codes + */ +extern NSString *const PTPusherFatalErrorDomain; + /** The key for any underlying PTPusherEvent associated with a PTPusher error's userInfo dictionary. */ extern NSString *const PTPusherErrorUnderlyingEventKey; @@ -35,9 +49,8 @@ extern NSString *const PTPusherErrorUnderlyingEventKey; /** A PTPusher object provides a high level API for communicating with the Pusher service. - The provided API allows you to connect and disconnect from the service, subscribe and unsubscribe - from channels and bind to events. There is also beta support for sending events directly over the - connection (instead of using the Pusher REST API). + A single instance of `PTPusher` can be used to connect to the service, subscribe to channels and send + events. To create an instance of PTPusher, you will need your Pusher API key. This can be obtained from your account dashboard. @@ -46,28 +59,22 @@ extern NSString *const PTPusherErrorUnderlyingEventKey; lifecycle, such as connection, disconnection, reconnection and channel subscribe/unsubscribe events. Whilst PTPusher exposes it's connection object as a readonly property, there is no need to manage or - create this connection manually. The connection can be queried for it's current connection state and + create this connection yourself. The connection can be queried for it's current connection state and socket ID if needed. PTPusher aims to mirror the Pusher Javascript client API as much as possible although whilst the - Javascript API uses event binding for any interesting events - not just server or other client events - + Javascript API uses event binding for any system events, such as channel subscription libPusher uses standard Cocoa and Objective-C patterns such as delegation and notification where it makes sense to do so. PTPusher will attempt to try and remain connected whenever possible. If the connection disconnects, then depending on the error code returned, it will either try to reconnect immediately, reconnect after - a configured delay or not reconnect at all. - - If the connection fails to connect for some reason, PTPusher will notify its delegate without trying - to reconnect - it is up to you to evaluate the error and decide whether or not to reconnect. + a configured delay or not reconnect at all. See the project README for more information on this. Note: due to various problems people have had connecting to Pusher without SSL over a 3G connection, it is highly recommend that you use SSL. For this reason, SSL is enabled by default. */ -@interface PTPusher : NSObject { - PTPusherEventDispatcher *dispatcher; - NSMutableDictionary *channels; -} +@interface PTPusher : NSObject ///------------------------------------------------------------------------------------/ /// @name Properties @@ -77,24 +84,7 @@ extern NSString *const PTPusherErrorUnderlyingEventKey; The delegate must implement the PTPusherDelegate protocol. The delegate is not retained. */ -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 @property (nonatomic, weak) id delegate; -#else -@property (nonatomic, unsafe_unretained) id delegate; -#endif - - - -/** This property is deprecated and will be ignored. - * - * The client will always attempt to reconnect when it disconnects as long as the error - * code it disconnected with permits automatic reconnection (see the Pusher protocol documentation - * for an overview of error codes: http://pusher.com/docs/pusher_protocol). - * - * If you want to prevent the client from automatically reconnecting, you can do so by returning - * NO from the delegate method pusher:connectionWillConnect:. - */ -@property (nonatomic, assign, getter=shouldReconnectAutomatically) BOOL reconnectAutomatically __PUSHER_DEPRECATED__; /** Specifies the delay between reconnection attempts. Defaults to 5 seconds. */ @@ -128,55 +118,36 @@ extern NSString *const PTPusherErrorUnderlyingEventKey; /// @name Creating new instances ///------------------------------------------------------------------------------------/ -- (id)initWithConnection:(PTPusherConnection *)connection connectAutomatically:(BOOL)connectAutomatically; - -/** Returns a new PTPusher instance with a connection configured with the given key. - - Instances created using this method will connect automatically. Specify the delegate here - to ensure that it is notified about the connection status during connection. If you assign - a delegate using the delegate property after this method returns, it may not be notified - of connection events. - - @deprecated Use pusherWithKey:delegate:encrypted: - @param key Your application's API key. It can be found in the API Access section of your application within the Pusher user dashboard. - @param delegate The delegate for this instance +/** Initialises a new instance. This is the designated initialiser. + * + * Clients should typically use one of the factory methods provided, which will configure the + * connection object for you using the standard Pusher host and port. + * + * If you need to connect to Pusher using an alternative endpoint URL, e.g. for testing + * purposes, then you can initialise an instance of `PTPusherConnection` with an appropriate + * URL and pass it into this method. + * + * @param connection An initialised connection for this instance. */ -+ (id)pusherWithKey:(NSString *)key delegate:(id)delegate __PUSHER_DEPRECATED__; +- (id)initWithConnection:(PTPusherConnection *)connection; /** Returns a new PTPusher instance with a connection configured with the given key. - Instances created using this method will connect automatically. Specify the delegate here - to ensure that it is notified about the connection status during connection. If you assign - a delegate using the delegate property after this method returns, it may not be notified - of connection events. - @param key Your application's API key. It can be found in the API Access section of your application within the Pusher user dashboard. @param delegate The delegate for this instance @param isEncrypted If yes, a secure connection over SSL will be established. */ + (id)pusherWithKey:(NSString *)key delegate:(id)delegate encrypted:(BOOL)isEncrypted; -/** Initialises a new PTPusher instance with a connection configured with the given key. - - If you intend to set a delegate for this instance, you are recommended to set connectAutomatically - to NO, set the delegate then manually call connect. - - @deprecated Use pusherWithKey:connectAutomatically:encrypted: - @param key Your application's API key. It can be found in the API Access section of your application within the Pusher user dashboard. - @param connect Automatically If YES, the connection will be connected on initialisation. - */ -+ (id)pusherWithKey:(NSString *)key connectAutomatically:(BOOL)connectAutomatically __PUSHER_DEPRECATED__; - -/** Initialises a new PTPusher instance with a connection configured with the given key. +/** Returns a new PTPusher instance with an connection configured with the given key. - If you intend to set a delegate for this instance, you are recommended to set connectAutomatically - to NO, set the delegate then manually call connect. + Instances created using this method will be encrypted by default. This requires SSL access on your account, + which is generally recommended for mobile connections. @param key Your application's API key. It can be found in the API Access section of your application within the Pusher user dashboard. - @param connectAutomatically If YES, the connection will be connected on initialisation. - @param isEncrypted If yes, a secure connection over SSL will be established. + @param delegate The delegate for this instance */ -+ (id)pusherWithKey:(NSString *)key connectAutomatically:(BOOL)connectAutomatically encrypted:(BOOL)isEncrypted; ++ (id)pusherWithKey:(NSString *)key delegate:(id)delegate; ///------------------------------------------------------------------------------------/ /// @name Managing the connection @@ -203,7 +174,30 @@ extern NSString *const PTPusherErrorUnderlyingEventKey; This method can be used to subscribe to any type of channel, including private and presence channels by including the appropriate channel name prefix. + Note: this method returns the channel object immediately, but it might not yet be + subscribed - subscription is asynchronous. You do not have to wait for a channel + to become subscribed before setting up event bindings. If you care about when the + channel is subscribed, you can use key-value observing on it's `isSubscribed` + property or implement the appropriate `PTPusherDelegate` method. + + It is valid to call this (or any of the other subscribe methods) while the client is + not connected. All channels default to unsubscribed and any subcribed channels will + become implicitly unsubscribed if the client disconnects. When the client connects, + all channels will be re-subscribed to automatically. + + When you subscribe to a channel, `PTPusher` keeps a strong reference to that channel + and maintains that reference until the channel is explicitly unsubscribed (by calling + `-[PTPusherChannel unsubscribe]`. + + If you maintain your own strong reference to the returned channel object, you should + be aware that once unsubscribed, the object will no longer be of any use. For this + reason you should be wary of passing around strong references to channels that you + may unsubscribe from. + + For more information on channel lifetime, see the README. + @param name The name of the channel to subscribe to. + @returns The channel object. */ - (PTPusherChannel *)subscribeToChannelNamed:(NSString *)name; @@ -240,13 +234,24 @@ extern NSString *const PTPusherErrorUnderlyingEventKey; This method is deprecated. You should use -[PTPusherChannel unsubscribe] instead. + When you explicitly unsubscribe from a channel, it will never be re-subscribed to and + PTPusher will remove any of it's references to the channel. If you maintain no strong + references to the channel of your own, the channel object will be deallocated. + + If you do maintain a strong reference to a channel object, you should discard it after + calling `unsubscribe`. + @param channel The channel to unsubscribe from. */ - (void)unsubscribeFromChannel:(PTPusherChannel *)channel __PUSHER_DEPRECATED__; /** Returns a previously subscribed channel with the given name. - If the channel specified has not been subscribed to, this method will return nil. + If the channel specified has not been subscribed to previously, or has been explicilty + unsubscribed from, this will return nil. + + This method will return channels that have become implicitly unsubscribed from if the + client has disconnected. @param name The name of the channel required. */ @@ -276,5 +281,38 @@ extern NSString *const PTPusherErrorUnderlyingEventKey; */ - (void)sendEventNamed:(NSString *)name data:(id)data channel:(NSString *)channelName; +///------------------------------------------------------------------------------------/ +/// @name Deprecated methods +///------------------------------------------------------------------------------------/ + +/** Initialises a new PTPusher instance with a connection configured with the given key. + + If you intend to set a delegate for this instance, you are recommended to set connectAutomatically + to NO, set the delegate then manually call connect. + + @deprecated Use pusherWithKey:delegate:encrypted: or pusherWithKey:delegate: + @param key Your application's API key. It can be found in the API Access section of your application within the Pusher user dashboard. + @param connect Automatically If YES, the connection will be connected on initialisation. + */ ++ (id)pusherWithKey:(NSString *)key connectAutomatically:(BOOL)connectAutomatically __PUSHER_DEPRECATED__; + +/** Initialises a new PTPusher instance with a connection configured with the given key. + + If you intend to set a delegate for this instance, you are recommended to set connectAutomatically + to NO, set the delegate then manually call connect. + + @deprecated Use pusherWithKey:delegate:encrypted: or pusherWithKey:delegate: + @param key Your application's API key. It can be found in the API Access section of your application within the Pusher user dashboard. + @param connectAutomatically If YES, the connection will be connected on initialisation. + @param isEncrypted If yes, a secure connection over SSL will be established. + */ ++ (id)pusherWithKey:(NSString *)key connectAutomatically:(BOOL)connectAutomatically encrypted:(BOOL)isEncrypted __PUSHER_DEPRECATED__; + +/** + * @deprecated See initWithConnection: + */ +- (id)initWithConnection:(PTPusherConnection *)connection connectAutomatically:(BOOL)connectAutomatically __PUSHER_DEPRECATED__; + + @end diff --git a/Library/PTPusher.m b/Library/PTPusher.m index 0f10dedc..30ffe558 100644 --- a/Library/PTPusher.m +++ b/Library/PTPusher.m @@ -15,14 +15,23 @@ #import "PTBlockEventListener.h" #import "PTPusherErrors.h" #import "PTPusherChannelAuthorizationOperation.h" +#import "PTPusherChannel_Private.h" #define kPUSHER_HOST @"ws.pusherapp.com" +typedef NS_ENUM(NSUInteger, PTPusherAutoReconnectMode) { + PTPusherAutoReconnectModeNoReconnect, + PTPusherAutoReconnectModeReconnectImmediately, + PTPusherAutoReconnectModeReconnectWithConfiguredDelay, + PTPusherAutoReconnectModeReconnectWithBackoffDelay +}; + NSURL *PTPusherConnectionURL(NSString *host, NSString *key, NSString *clientID, BOOL secure); NSString *const PTPusherEventReceivedNotification = @"PTPusherEventReceivedNotification"; NSString *const PTPusherEventUserInfoKey = @"PTPusherEventUserInfoKey"; NSString *const PTPusherErrorDomain = @"PTPusherErrorDomain"; +NSString *const PTPusherFatalErrorDomain = @"PTPusherFatalErrorDomain"; NSString *const PTPusherErrorUnderlyingEventKey = @"PTPusherErrorUnderlyingEventKey"; /** The Pusher protocol version, used to determined which features @@ -44,26 +53,27 @@ @interface PTPusher () @property (nonatomic, strong, readwrite) PTPusherConnection *connection; @end -@interface PTPusherChannel () -/* These methods should only be called internally */ -- (void)subscribeWithAuthorization:(NSDictionary *)authData; -- (void)unsubscribe; -- (void)markAsUnsubscribed; -@end - #pragma mark - @implementation PTPusher { NSOperationQueue *authorizationQueue; + NSUInteger _numberOfReconnectAttempts; + NSUInteger _maximumNumberOfReconnectAttempts; + PTPusherEventDispatcher *dispatcher; + NSMutableDictionary *channels; } -@synthesize connection = _connection; -@synthesize delegate; -@synthesize reconnectAutomatically; -@synthesize reconnectDelay; -@synthesize authorizationURL; - - (id)initWithConnection:(PTPusherConnection *)connection connectAutomatically:(BOOL)connectAutomatically +{ + if ((self = [self initWithConnection:connection])) { + if (connectAutomatically) { + [self connect]; + } + } + return self; +} + +- (id)initWithConnection:(PTPusherConnection *)connection { if (self = [super init]) { dispatcher = [[PTPusherEventDispatcher alloc] init]; @@ -77,9 +87,17 @@ - (id)initWithConnection:(PTPusherConnection *)connection connectAutomatically:( self.connection.delegate = self; self.reconnectDelay = kPTPusherDefaultReconnectDelay; - if (connectAutomatically) { - [self connect]; - } + /* Three reconnection attempts should be more than enough attempts + * to reconnect where the user has simply locked their device or + * backgrounded the app. + * + * If there is no internet connection, we will only end up retrying + * once as after the first failure we will no longer auto-retry. + * + * We may consider making this user-customisable in future but not + * for now. + */ + _maximumNumberOfReconnectAttempts = 3; } return self; } @@ -91,23 +109,31 @@ + (id)pusherWithKey:(NSString *)key delegate:(id)delegate + (id)pusherWithKey:(NSString *)key delegate:(id)delegate encrypted:(BOOL)isEncrypted { - PTPusher *pusher = [self pusherWithKey:key connectAutomatically:NO encrypted:isEncrypted]; + NSURL *serviceURL = PTPusherConnectionURL(kPUSHER_HOST, key, @"libPusher", isEncrypted); + PTPusherConnection *connection = [[PTPusherConnection alloc] initWithURL:serviceURL]; + PTPusher *pusher = [[self alloc] initWithConnection:connection]; pusher.delegate = delegate; - [pusher connect]; return pusher; } +#pragma mark - Deprecated methods + + (id)pusherWithKey:(NSString *)key connectAutomatically:(BOOL)connectAutomatically { - return [self pusherWithKey:key connectAutomatically:connectAutomatically encrypted:YES]; + PTPusher *client = [self pusherWithKey:key delegate:nil encrypted:YES]; + if (connectAutomatically) { + [client connect]; + } + return client; } + (id)pusherWithKey:(NSString *)key connectAutomatically:(BOOL)connectAutomatically encrypted:(BOOL)isEncrypted { - NSURL *serviceURL = PTPusherConnectionURL(kPUSHER_HOST, key, @"libPusher", isEncrypted); - PTPusherConnection *connection = [[PTPusherConnection alloc] initWithURL:serviceURL]; - PTPusher *pusher = [[self alloc] initWithConnection:connection connectAutomatically:connectAutomatically]; - return pusher; + PTPusher *client = [self pusherWithKey:key delegate:nil encrypted:isEncrypted]; + if (connectAutomatically) { + [client connect]; + } + return client; } - (void)dealloc; @@ -118,8 +144,14 @@ - (void)dealloc; #pragma mark - Connection management +- (void)setReconnectDelay:(NSTimeInterval)reconnectDelay +{ + _reconnectDelay = MAX(reconnectDelay, 1); +} + - (void)connect { + _numberOfReconnectAttempts = 0; [self.connection connect]; } @@ -159,10 +191,10 @@ - (void)removeAllBindings - (PTPusherChannel *)subscribeToChannelNamed:(NSString *)name { - PTPusherChannel *channel = [channels objectForKey:name]; + PTPusherChannel *channel = channels[name]; if (channel == nil) { channel = [PTPusherChannel channelWithName:name pusher:self]; - [channels setObject:channel forKey:name]; + channels[name] = channel; } // private/presence channels require a socketID to authenticate if (self.connection.isConnected && self.connection.socketID) { @@ -190,26 +222,42 @@ - (PTPusherPresenceChannel *)subscribeToPresenceChannelNamed:(NSString *)name de - (PTPusherChannel *)channelNamed:(NSString *)name { - return [channels objectForKey:name]; -} - + return channels[name]; +} + +/* This is only called when a client explicitly unsubscribes from a channel + * by calling either [channel unsubscribe] or using the deprecated API + * [client unsubscribeFromChannel:]. + * + * This effectively ends the lifetime of a channel: the client will remove it + * from it's channels collection and all bindings will be removed. If no other + * code outside of libPusher has a strong reference to the channel, it will + * be deallocated. + * + * This is different to implicit unsubscribes (where the connection has been lost) + * where the channel will object will remain and be re-subscribed when connection + * is re-established. + * + * A pusher:unsubscribe event will only be sent if there is a connection, otherwise + * it's not necessary as the channel is already implicitly unsubscribed due to the + * disconnection. + */ - (void)__unsubscribeFromChannel:(PTPusherChannel *)channel { NSParameterAssert(channel != nil); - if (channel.isSubscribed == NO) return; + [channel removeAllBindings]; - [self sendEventNamed:@"pusher:unsubscribe" - data:[NSDictionary dictionaryWithObject:channel.name forKey:@"channel"]]; + if (self.connection.isConnected) { + [self sendEventNamed:@"pusher:unsubscribe" + data:@{@"channel": channel.name}]; + } - [channel removeAllBindings]; - [channel markAsUnsubscribed]; + [channels removeObjectForKey:channel.name]; if ([self.delegate respondsToSelector:@selector(pusher:didUnsubscribeFromChannel:)]) { [self.delegate pusher:self didUnsubscribeFromChannel:channel]; } - - [channels removeObjectForKey:channel.name]; } - (void)unsubscribeFromChannel:(PTPusherChannel *)channel @@ -235,6 +283,13 @@ - (void)subscribeToChannel:(PTPusherChannel *)channel }]; } +- (void)subscribeAll +{ + for (PTPusherChannel *channel in [channels allValues]) { + [self subscribeToChannel:channel]; + } +} + #pragma mark - Sending events - (void)sendEventNamed:(NSString *)name data:(id)data @@ -246,15 +301,20 @@ - (void)sendEventNamed:(NSString *)name data:(id)data channel:(NSString *)channe { NSParameterAssert(name); + if (self.connection.isConnected == NO) { + NSLog(@"Warning: attempting to send event while disconnected. Event will not be sent."); + return; + } + NSMutableDictionary *payload = [NSMutableDictionary dictionary]; - [payload setObject:name forKey:PTPusherEventKey]; + payload[PTPusherEventKey] = name; if (data) { - [payload setObject:data forKey:PTPusherDataKey]; + payload[PTPusherDataKey] = data; } if (channelName) { - [payload setObject:channelName forKey:PTPusherChannelKey]; + payload[PTPusherChannelKey] = channelName; } [self.connection send:payload]; } @@ -271,13 +331,13 @@ - (BOOL)pusherConnectionWillConnect:(PTPusherConnection *)connection - (void)pusherConnectionDidConnect:(PTPusherConnection *)connection { + _numberOfReconnectAttempts = 0; + if ([self.delegate respondsToSelector:@selector(pusher:connectionDidConnect:)]) { [self.delegate pusher:self connectionDidConnect:connection]; } - for (PTPusherChannel *channel in [channels allValues]) { - [self subscribeToChannel:channel]; - } + [self subscribeAll]; } - (void)pusherConnection:(PTPusherConnection *)connection didDisconnectWithCode:(NSInteger)errorCode reason:(NSString *)reason wasClean:(BOOL)wasClean @@ -289,34 +349,38 @@ - (void)pusherConnection:(PTPusherConnection *)connection didDisconnectWithCode: reason = @"Unknown error"; // not sure what could cause this to be nil, but just playing it safe } + NSString *errorDomain = PTPusherErrorDomain; + + if (errorCode >= 400 && errorCode <= 4099) { + errorDomain = PTPusherFatalErrorDomain; + } + // check for error codes based on the Pusher Websocket protocol see http://pusher.com/docs/pusher_protocol - error = [NSError errorWithDomain:PTPusherErrorDomain code:errorCode userInfo:[NSDictionary dictionaryWithObject:reason forKey:@"reason"]]; + error = [NSError errorWithDomain:errorDomain code:errorCode userInfo:@{@"reason": reason}]; // 4000-4099 -> The connection SHOULD NOT be re-established unchanged. if (errorCode >= 4000 && errorCode <= 4099) { - [self handleDisconnection:connection error:error willReconnect:NO]; + [self handleDisconnection:connection error:error reconnectMode:PTPusherAutoReconnectModeNoReconnect]; } else // 4200-4299 -> The connection SHOULD be re-established immediately. if(errorCode >= 4200 && errorCode <= 4299) { - [self handleDisconnection:connection error:error willReconnect:YES]; - [self reconnectAfterDelay:0]; + [self handleDisconnection:connection error:error reconnectMode:PTPusherAutoReconnectModeReconnectImmediately]; } else { // i.e. 4100-4199 -> The connection SHOULD be re-established after backing off. - [self handleDisconnection:connection error:error willReconnect:YES]; - [self reconnectAfterDelay:self.reconnectDelay]; + [self handleDisconnection:connection error:error reconnectMode:PTPusherAutoReconnectModeReconnectWithBackoffDelay]; } } else { - [self handleDisconnection:connection error:error willReconnect:NO]; + [self handleDisconnection:connection error:error reconnectMode:PTPusherAutoReconnectModeReconnectWithConfiguredDelay]; } } - (void)pusherConnection:(PTPusherConnection *)connection didFailWithError:(NSError *)error wasConnected:(BOOL)wasConnected { if (wasConnected) { - [self handleDisconnection:connection error:error willReconnect:NO]; + [self handleDisconnection:connection error:error reconnectMode:PTPusherAutoReconnectModeReconnectImmediately]; } else { if ([self.delegate respondsToSelector:@selector(pusher:connection:failedWithError:)]) { @@ -334,34 +398,53 @@ - (void)pusherConnection:(PTPusherConnection *)connection didReceiveEvent:(PTPus } if (event.channel) { - [[channels objectForKey:event.channel] dispatchEvent:event]; + [channels[event.channel] dispatchEvent:event]; } [dispatcher dispatchEvent:event]; [[NSNotificationCenter defaultCenter] postNotificationName:PTPusherEventReceivedNotification object:self - userInfo:[NSDictionary dictionaryWithObject:event forKey:PTPusherEventUserInfoKey]]; + userInfo:@{PTPusherEventUserInfoKey: event}]; } -- (void)handleDisconnection:(PTPusherConnection *)connection error:(NSError *)error willReconnect:(BOOL)willReconnect +- (void)handleDisconnection:(PTPusherConnection *)connection error:(NSError *)error reconnectMode:(PTPusherAutoReconnectMode)reconnectMode { [authorizationQueue cancelAllOperations]; for (PTPusherChannel *channel in [channels allValues]) { - [channel markAsUnsubscribed]; + [channel handleDisconnect]; } if ([self.delegate respondsToSelector:@selector(pusher:connectionDidDisconnect:)]) { // deprecated call #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" + NSLog(@"pusher:connectionDidDisconnect: is deprecated and will be removed in 1.6. Use pusher:connection:didDisconnectWithError:willAttemptReconnect: instead."); [self.delegate pusher:self connectionDidDisconnect:connection]; #pragma clang diagnostic pop } + + if ([self.delegate respondsToSelector:@selector(pusher:connection:didDisconnectWithError:)]) { // deprecated call +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + NSLog(@"pusher:connectionDidDisconnectWithError: is deprecated and will be removed in 1.6. Use pusher:connection:didDisconnectWithError:willAttemptReconnect: instead."); + [self.delegate pusher:self connection:connection didDisconnectWithError:error]; +#pragma clang diagnostic pop + } + + BOOL willReconnect = NO; + + if (reconnectMode > PTPusherAutoReconnectModeNoReconnect && _numberOfReconnectAttempts < _maximumNumberOfReconnectAttempts) { + willReconnect = YES; + } if ([self.delegate respondsToSelector:@selector(pusher:connection:didDisconnectWithError:willAttemptReconnect:)]) { [self.delegate pusher:self connection:connection didDisconnectWithError:error willAttemptReconnect:willReconnect]; } + + if (willReconnect) { + [self reconnectUsingMode:reconnectMode]; + } } #pragma mark - Private @@ -371,8 +454,27 @@ - (void)beginAuthorizationOperation:(PTPusherChannelAuthorizationOperation *)ope [authorizationQueue addOperation:operation]; } -- (void)reconnectAfterDelay:(NSUInteger)delay +- (void)reconnectUsingMode:(PTPusherAutoReconnectMode)reconnectMode { + _numberOfReconnectAttempts++; + + NSTimeInterval delay; + + switch (reconnectMode) { + case PTPusherAutoReconnectModeReconnectImmediately: + delay = 0; + break; + case PTPusherAutoReconnectModeReconnectWithConfiguredDelay: + delay = self.reconnectDelay; + break; + case PTPusherAutoReconnectModeReconnectWithBackoffDelay: + delay = self.reconnectDelay * _numberOfReconnectAttempts; + break; + default: + delay = 0; + break; + } + if ([self.delegate respondsToSelector:@selector(pusher:connectionWillAutomaticallyReconnect:afterDelay:)]) { BOOL shouldProceed = [self.delegate pusher:self connectionWillAutomaticallyReconnect:_connection afterDelay:delay]; diff --git a/Library/PTPusherAPI.h b/Library/PTPusherAPI.h index d843535a..04e0d274 100644 --- a/Library/PTPusherAPI.h +++ b/Library/PTPusherAPI.h @@ -13,21 +13,27 @@ This functionality used to be part of the main PTPusher library but has been extracted into a standalone component. - The PTPusher client has alpha support for channel-based event triggering - but for general event triggering the API can be used. + The PTPusher client has support for client-sent events but if your account does not + support these you can use this class to send events using the standard Pusher REST API. As well as your Pusher API key, you will also need your app ID and secret key - for signing requests. + for signing requests. You should take care not to expose these in your application's + header files. */ -@interface PTPusherAPI : NSObject { - NSString *key, *appID, *secretKey; - NSOperationQueue *operationQueue; -} +@interface PTPusherAPI : NSObject ///------------------------------------------------------------------------------------/ /// @name Initialisation ///------------------------------------------------------------------------------------/ +/** Designated initializer + + You will need your account credentials which can be located on your account dashboard. + + @param aKey Your Pusher API key + @param anAppID Your Pusher app ID + @param aSecretKey Your Pusher app secret. + */ - (id)initWithKey:(NSString *)aKey appID:(NSString *)anAppID secretKey:(NSString *)aSecretKey; ///------------------------------------------------------------------------------------/ diff --git a/Library/PTPusherAPI.m b/Library/PTPusherAPI.m index 3c7627a4..9931f85d 100644 --- a/Library/PTPusherAPI.m +++ b/Library/PTPusherAPI.m @@ -15,7 +15,10 @@ #define kPUSHER_API_DEFAULT_HOST @"api.pusherapp.com" -@implementation PTPusherAPI +@implementation PTPusherAPI { + NSString *key, *appID, *secretKey; + NSOperationQueue *operationQueue; +} - (id)initWithKey:(NSString *)aKey appID:(NSString *)anAppID secretKey:(NSString *)aSecretKey { @@ -37,19 +40,19 @@ - (void)triggerEvent:(NSString *)eventName onChannel:(NSString *)channelName dat NSMutableDictionary *queryParameters = [NSMutableDictionary dictionary]; - [queryParameters setObject:[[bodyString MD5Hash] lowercaseString] forKey:@"body_md5"]; - [queryParameters setObject:key forKey:@"auth_key"]; - [queryParameters setObject:[NSNumber numberWithDouble:time(NULL)] forKey:@"auth_timestamp"]; - [queryParameters setObject:@"1.0" forKey:@"auth_version"]; - [queryParameters setObject:eventName forKey:@"name"]; + queryParameters[@"body_md5"] = [[bodyString MD5Hash] lowercaseString]; + queryParameters[@"auth_key"] = key; + queryParameters[@"auth_timestamp"] = @((double)time(NULL)); + queryParameters[@"auth_version"] = @"1.0"; + queryParameters[@"name"] = eventName; if (socketID) { - [queryParameters setObject:socketID forKey:@"socket_id"]; + queryParameters[@"socket_id"] = socketID; } NSString *signatureString = [NSString stringWithFormat:@"POST\n%@\n%@", path, [queryParameters sortedQueryString]]; - [queryParameters setObject:[signatureString HMACDigestUsingSecretKey:secretKey] forKey:@"auth_signature"]; + queryParameters[@"auth_signature"] = [signatureString HMACDigestUsingSecretKey:secretKey]; NSString *URLString = [NSString stringWithFormat:@"http://%@%@?%@", kPUSHER_API_DEFAULT_HOST, path, [queryParameters sortedQueryString]]; diff --git a/Library/PTPusherChannel.h b/Library/PTPusherChannel.h index d8a381e3..2c21dac3 100644 --- a/Library/PTPusherChannel.h +++ b/Library/PTPusherChannel.h @@ -10,7 +10,7 @@ #import "PTPusherEventPublisher.h" #import "PTEventListener.h" #import "PTPusherPresenceChannelDelegate.h" - +#import "PTPusherMacros.h" @class PTPusher; @class PTPusherEventDispatcher; @@ -35,17 +35,15 @@ Channels can be subscribed to or unsubscribed to at any time, even before the initial Pusher connection has been established. + + Generally, channel objects will exist from the point of creation until you explicitly unsubscribe + from them, unless you maintain your own strong references to the channel object. Channels become + implicitly unsubscribed when the connection is lost but will be re-subscribed once connection + is re-established. This means you can use the same channel object across connections. + + See the README for more information on channel object lifetime. */ -@interface PTPusherChannel : NSObject { - NSString *name; -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 - __weak PTPusher *pusher; -#else - __unsafe_unretained PTPusher *pusher; -#endif - PTPusherEventDispatcher *dispatcher; - NSMutableArray *internalBindings; -} +@interface PTPusherChannel : NSObject ///------------------------------------------------------------------------------------/ /// @name Properties @@ -60,39 +58,36 @@ Whilst public channels are subscribed to immediately, presence and private channels require authorization first. This property will be set to YES once an internal Pusher event has been received indicating that the channel subscription has been registered. + + You can bind to events on a channel without waiting for it to become subscribed and any + event bindings will be kept if the channel becomes unsubscribed due to a loss of connection. */ @property (nonatomic, readonly, getter=isSubscribed) BOOL subscribed; /** Indicates whether or not this is a private channel. - - The value of this property will be YES for private and presence channels. */ @property (nonatomic, readonly) BOOL isPrivate; /** Indicates whether or not this is a presence channel. - - The value of this property will be YES for presence channels only. */ @property (nonatomic, readonly) BOOL isPresence; -///------------------------------------------------------------------------------------/ -/// @name Initialisation -///------------------------------------------------------------------------------------/ - + (id)channelWithName:(NSString *)name pusher:(PTPusher *)pusher; - (id)initWithName:(NSString *)channelName pusher:(PTPusher *)pusher; - -///------------------------------------------------------------------------------------/ -/// @name Authorization -///------------------------------------------------------------------------------------/ - - (void)authorizeWithCompletionHandler:(void(^)(BOOL, NSDictionary *, NSError *))completionHandler; ///------------------------------------------------------------------------------------/ /// @name Unsubscribing ///------------------------------------------------------------------------------------/ -/** Unsubscribes from the channel. +/** Unsubscribes from the channel. + + PTPusher will remove any strong references to the channel when you unsusbcribe. If you + do not have any strong references to the channel object, it will be deallocated after + unsubscribing. + + If there is an active connection when this is called, an unsubscribe event will be + ssent to the server. */ - (void)unsubscribe; @@ -105,11 +100,9 @@ Private channel names always have the prefix of "private-". - Only private and presence channels support the triggering client events. + Only private and presence channels support client triggered events. */ -@interface PTPusherPrivateChannel : PTPusherChannel { - NSMutableArray *clientEventBuffer; -} +@interface PTPusherPrivateChannel : PTPusherChannel ///------------------------------------------------------------------------------------/ /// @name Triggering events @@ -136,6 +129,8 @@ @end +@class PTPusherChannelMembers; + /** A PTPusherPresenceChannel object represents a Pusher presence channel. Presence channels build on the security of Private channels and expose the additional feature @@ -150,10 +145,7 @@ @see PTPusherPresenceChannelDelegate */ -@interface PTPusherPresenceChannel : PTPusherPrivateChannel { - NSMutableDictionary *members; - NSMutableArray *memberIDs; // store these separately to preserve order -} +@interface PTPusherPresenceChannel : PTPusherPrivateChannel ///------------------------------------------------------------------------------------/ /// @name Properties @@ -164,29 +156,96 @@ The presence delegate will be notified of presence channel-specific events, such as the initial member list on subscription and member added/removed events. */ -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 @property (nonatomic, weak) id presenceDelegate; -#else -@property (nonatomic, unsafe_unretained) id presenceDelegate; -#endif -/** Returns the current list of channel members. - - Members are stored as a dictionary of dictionaries, keyed on the member's "user_id" field. - - @deprecated Use the methods below for accessing member data. +/** Returns the channel member list. */ -@property (nonatomic, readonly) NSDictionary *members; +@property (nonatomic, readonly) PTPusherChannelMembers *members; + +///------------------------------------------------------------------------------------/ +/// @name Deprecated methods +///------------------------------------------------------------------------------------/ /** Returns a dictionary of member metadata (email, name etc.) for the given member ID. + * + * @deprecated Use the members object. */ -- (NSDictionary *)infoForMemberWithID:(NSString *)memberID; +- (NSDictionary *)infoForMemberWithID:(NSString *)memberID __PUSHER_DEPRECATED__; /** Returns an array of available member IDs + * + * @deprecated Use the members object. */ -- (NSArray *)memberIDs; +- (NSArray *)memberIDs __PUSHER_DEPRECATED__; /** Returns the number of members currently connected to this channel. + * + * @deprecated Use the members object. + */ +- (NSInteger)memberCount __PUSHER_DEPRECATED__; +@end + +/** Represents a single member in a presence channel. + * + * Object subscripting can be used to access individual keys in a user's info dictionary. + * */ -- (NSInteger)memberCount; +@interface PTPusherChannelMember : NSObject + +/** The user's ID. + */ +@property (nonatomic, readonly) NSString *userID; + +/** A dictionary of user info - this is normally application specific. + * + */ +@property (nonatomic, readonly) NSDictionary *userInfo; + +/** Provides object subscripting access to userInfo data. + */ +- (id)objectForKeyedSubscript:(id )key; + +@end + +/** Represents an unordered collection of members in a presence channel. + * + * Individual members are represented by instances of the class PTPusherChannelMember. + * + * This object supports subscripting for member access (where the user ID is the key). + * + * If you require an ordered list of members (e.g. to display in a table view) + * you should implement the presence delegate methods and maintain your own ordered list. + * + */ +@interface PTPusherChannelMembers : NSObject + +/** The number of members in the channel. + */ +@property (nonatomic, readonly) NSInteger count; + +/** The ID of the client's member. + */ +@property (nonatomic, copy, readonly) NSString *myID; + +/** The client member. + */ +@property (nonatomic, readonly) PTPusherChannelMember *me; + +/** Can be used to look up a channel member by ID. + + @return The member with the given ID, or nil if it does not exist. + */ +- (PTPusherChannelMember *)memberWithID:(NSString *)userID; + +/** Can be used to iterate over each member in the channel. + */ +- (void)enumerateObjectsUsingBlock:(void (^)(id obj, BOOL *stop))block; + +/** Provides object subscripting access to members by key. + + @param key The member ID + @returns The member with the specified ID, or nil if it does not exist. + */ +- (id)objectForKeyedSubscript:(id )key; + @end diff --git a/Library/PTPusherChannel.m b/Library/PTPusherChannel.m index 1e4e9a96..ededbb7c 100644 --- a/Library/PTPusherChannel.m +++ b/Library/PTPusherChannel.m @@ -14,23 +14,24 @@ #import "PTBlockEventListener.h" #import "PTPusherChannelAuthorizationOperation.h" #import "PTPusherErrors.h" +#import "PTJSON.h" @interface PTPusher () - (void)__unsubscribeFromChannel:(PTPusherChannel *)channel; - (void)beginAuthorizationOperation:(PTPusherChannelAuthorizationOperation *)operation; @end -@interface PTPusherChannel () +@interface PTPusherChannel () +@property (nonatomic, weak) PTPusher *pusher; +@property (nonatomic, strong) PTPusherEventDispatcher *dispatcher; @property (nonatomic, assign, readwrite) BOOL subscribed; +@property (nonatomic, readonly) NSMutableArray *internalBindings; @end #pragma mark - @implementation PTPusherChannel -@synthesize name; -@synthesize subscribed; - + (id)channelWithName:(NSString *)name pusher:(PTPusher *)pusher { if ([name hasPrefix:@"private-"]) { @@ -45,10 +46,10 @@ + (id)channelWithName:(NSString *)name pusher:(PTPusher *)pusher - (id)initWithName:(NSString *)channelName pusher:(PTPusher *)aPusher { if (self = [super init]) { - name = [channelName copy]; - pusher = aPusher; - dispatcher = [[PTPusherEventDispatcher alloc] init]; - internalBindings = [[NSMutableArray alloc] init]; + _name = [channelName copy]; + _pusher = aPusher; + _dispatcher = [[PTPusherEventDispatcher alloc] init]; + _internalBindings = [[NSMutableArray alloc] init]; /* Set up event handlers for pre-defined channel events @@ -57,20 +58,15 @@ - (id)initWithName:(NSString *)channelName pusher:(PTPusher *)aPusher Using a target-action binding will create a retain cycle between the channel and the target/action binding object. */ - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 __weak PTPusherChannel *weakChannel = self; -#else - __unsafe_unretained PTPusherChannel *weakChannel = self; -#endif - [internalBindings addObject: + [self.internalBindings addObject: [self bindToEventNamed:@"pusher_internal:subscription_succeeded" handleWithBlock:^(PTPusherEvent *event) { [weakChannel handleSubscribeEvent:event]; }]]; - [internalBindings addObject: + [self.internalBindings addObject: [self bindToEventNamed:@"subscription_error" handleWithBlock:^(PTPusherEvent *event) { [weakChannel handleSubcribeErrorEvent:event]; @@ -81,8 +77,8 @@ - (id)initWithName:(NSString *)channelName pusher:(PTPusher *)aPusher - (void)dealloc { - [internalBindings enumerateObjectsUsingBlock:^(id object, NSUInteger index, BOOL *stop) { - [dispatcher removeBinding:object]; + [self.internalBindings enumerateObjectsUsingBlock:^(id object, NSUInteger index, BOOL *stop) { + [_dispatcher removeBinding:object]; }]; } @@ -102,17 +98,17 @@ - (void)handleSubscribeEvent:(PTPusherEvent *)event { self.subscribed = YES; - if ([pusher.delegate respondsToSelector:@selector(pusher:didSubscribeToChannel:)]) { - [pusher.delegate pusher:pusher didSubscribeToChannel:self]; + if ([self.pusher.delegate respondsToSelector:@selector(pusher:didSubscribeToChannel:)]) { + [self.pusher.delegate pusher:self.pusher didSubscribeToChannel:self]; } } - (void)handleSubcribeErrorEvent:(PTPusherEvent *)event { - if ([pusher.delegate respondsToSelector:@selector(pusher:didFailToSubscribeToChannel:withError:)]) { - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:event forKey:PTPusherErrorUnderlyingEventKey]; + if ([self.pusher.delegate respondsToSelector:@selector(pusher:didFailToSubscribeToChannel:withError:)]) { + NSDictionary *userInfo = @{PTPusherErrorUnderlyingEventKey: event}; NSError *error = [NSError errorWithDomain:PTPusherErrorDomain code:PTPusherSubscriptionError userInfo:userInfo]; - [pusher.delegate pusher:pusher didFailToSubscribeToChannel:self withError:error]; + [self.pusher.delegate pusher:self.pusher didFailToSubscribeToChannel:self withError:error]; } } @@ -120,14 +116,14 @@ - (void)handleSubcribeErrorEvent:(PTPusherEvent *)event - (void)authorizeWithCompletionHandler:(void(^)(BOOL, NSDictionary *, NSError *))completionHandler { - completionHandler(YES, [NSDictionary dictionary], nil); // public channels do not require authorization + completionHandler(YES, @{}, nil); // public channels do not require authorization } #pragma mark - Binding to events - (PTPusherEventBinding *)bindToEventNamed:(NSString *)eventName target:(id)target action:(SEL)selector { - return [dispatcher addEventListenerForEventNamed:eventName target:target action:selector]; + return [self.dispatcher addEventListenerForEventNamed:eventName target:target action:selector]; } - (PTPusherEventBinding *)bindToEventNamed:(NSString *)eventName handleWithBlock:(PTPusherEventBlockHandler)block @@ -137,12 +133,12 @@ - (PTPusherEventBinding *)bindToEventNamed:(NSString *)eventName handleWithBlock - (PTPusherEventBinding *)bindToEventNamed:(NSString *)eventName handleWithBlock:(PTPusherEventBlockHandler)block queue:(dispatch_queue_t)queue { - return [dispatcher addEventListenerForEventNamed:eventName block:block queue:queue]; + return [self.dispatcher addEventListenerForEventNamed:eventName block:block queue:queue]; } - (void)removeBinding:(PTPusherEventBinding *)binding { - [dispatcher removeBinding:binding]; + [self.dispatcher removeBinding:binding]; } - (void)removeAllBindings @@ -151,16 +147,16 @@ - (void)removeAllBindings // need to unpack the bindings from the nested arrays, so we can // iterate over them safely whilst removing them from the dispatcher - for (NSArray *bindingsArray in [dispatcher.bindings allValues]) { + for (NSArray *bindingsArray in [self.dispatcher.bindings allValues]) { for (PTPusherEventBinding *binding in bindingsArray) { - if (![internalBindings containsObject:binding]) { + if (![self.internalBindings containsObject:binding]) { [bindingsToRemove addObject:binding]; } } } for (PTPusherEventBinding *binding in bindingsToRemove) { - [dispatcher removeBinding:binding]; + [self.dispatcher removeBinding:binding]; } } @@ -168,12 +164,12 @@ - (void)removeAllBindings - (void)dispatchEvent:(PTPusherEvent *)event { - [dispatcher dispatchEvent:event]; + [self.dispatcher dispatchEvent:event]; [[NSNotificationCenter defaultCenter] postNotificationName:PTPusherEventReceivedNotification object:self - userInfo:[NSDictionary dictionaryWithObject:event forKey:PTPusherEventUserInfoKey]]; + userInfo:@{PTPusherEventUserInfoKey: event}]; } #pragma mark - Internal use only @@ -182,17 +178,17 @@ - (void)subscribeWithAuthorization:(NSDictionary *)authData { if (self.isSubscribed) return; - [pusher sendEventNamed:@"pusher:subscribe" - data:[NSDictionary dictionaryWithObject:self.name forKey:@"channel"] + [self.pusher sendEventNamed:@"pusher:subscribe" + data:@{@"channel": self.name} channel:nil]; } - (void)unsubscribe { - [pusher __unsubscribeFromChannel:self]; + [self.pusher __unsubscribeFromChannel:self]; } -- (void)markAsUnsubscribed +- (void)handleDisconnect { self.subscribed = NO; } @@ -202,16 +198,16 @@ - (void)markAsUnsubscribed #pragma mark - @implementation PTPusherPrivateChannel { - NSOperationQueue *clientEventQueue; + NSOperationQueue *_clientEventQueue; } - (id)initWithName:(NSString *)channelName pusher:(PTPusher *)aPusher { if ((self = [super initWithName:channelName pusher:aPusher])) { - clientEventQueue = [[NSOperationQueue alloc] init]; - clientEventQueue.maxConcurrentOperationCount = 1; - clientEventQueue.name = @"com.pusher.libPusher.clientEventQueue"; - clientEventQueue.suspended = YES; + _clientEventQueue = [[NSOperationQueue alloc] init]; + _clientEventQueue.maxConcurrentOperationCount = 1; + _clientEventQueue.name = @"com.pusher.libPusher.clientEventQueue"; + _clientEventQueue.suspended = YES; } return self; } @@ -219,13 +215,13 @@ - (id)initWithName:(NSString *)channelName pusher:(PTPusher *)aPusher - (void)handleSubscribeEvent:(PTPusherEvent *)event { [super handleSubscribeEvent:event]; - [clientEventQueue setSuspended:NO]; + [_clientEventQueue setSuspended:NO]; } -- (void)markAsUnSubscribed +- (void)handleDisconnect { - [super markAsUnsubscribed]; - [clientEventQueue setSuspended:YES]; + [super handleDisconnect]; + [_clientEventQueue setSuspended:YES]; } - (BOOL)isPrivate @@ -235,7 +231,7 @@ - (BOOL)isPrivate - (void)authorizeWithCompletionHandler:(void(^)(BOOL, NSDictionary *, NSError *))completionHandler { - PTPusherChannelAuthorizationOperation *authOperation = [PTPusherChannelAuthorizationOperation operationWithAuthorizationURL:pusher.authorizationURL channelName:self.name socketID:pusher.connection.socketID]; + PTPusherChannelAuthorizationOperation *authOperation = [PTPusherChannelAuthorizationOperation operationWithAuthorizationURL:self.pusher.authorizationURL channelName:self.name socketID:self.pusher.connection.socketID]; [authOperation setCompletionHandler:^(PTPusherChannelAuthorizationOperation *operation) { completionHandler(operation.isAuthorized, operation.authorizationData, operation.error); @@ -243,16 +239,17 @@ - (void)authorizeWithCompletionHandler:(void(^)(BOOL, NSDictionary *, NSError *) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" - if ([pusher.delegate respondsToSelector:@selector(pusher:willAuthorizeChannelWithRequest:)]) { // deprecated call - [pusher.delegate pusher:pusher willAuthorizeChannelWithRequest:authOperation.mutableURLRequest]; + NSLog(@"willAuthorizeChannelWithRequest: is deprecated and will be removed in 1.6. Use pusher:willAuthorizeChannel:withRequest: instead."); + if ([self.pusher.delegate respondsToSelector:@selector(pusher:willAuthorizeChannelWithRequest:)]) { // deprecated call + [self.pusher.delegate pusher:self.pusher willAuthorizeChannelWithRequest:authOperation.mutableURLRequest]; } #pragma clang diagnostic pop - if ([pusher.delegate respondsToSelector:@selector(pusher:willAuthorizeChannel:withRequest:)]) { - [pusher.delegate pusher:pusher willAuthorizeChannel:self withRequest:authOperation.mutableURLRequest]; + if ([self.pusher.delegate respondsToSelector:@selector(pusher:willAuthorizeChannel:withRequest:)]) { + [self.pusher.delegate pusher:self.pusher willAuthorizeChannel:self withRequest:authOperation.mutableURLRequest]; } - [pusher beginAuthorizationOperation:authOperation]; + [self.pusher beginAuthorizationOperation:authOperation]; } - (void)subscribeWithAuthorization:(NSDictionary *)authData @@ -260,9 +257,9 @@ - (void)subscribeWithAuthorization:(NSDictionary *)authData if (self.isSubscribed) return; NSMutableDictionary *eventData = [authData mutableCopy]; - [eventData setObject:self.name forKey:@"channel"]; + eventData[@"channel"] = self.name; - [pusher sendEventNamed:@"pusher:subscribe" + [self.pusher sendEventNamed:@"pusher:subscribe" data:eventData channel:nil]; } @@ -275,16 +272,10 @@ - (void)triggerEventNamed:(NSString *)eventName data:(id)eventData eventName = [@"client-" stringByAppendingString:eventName]; } -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 - __weak PTPusherChannel *weakSelf = self; - __weak PTPusher *weakPusher = pusher; -#else - __unsafe_unretained PTPusherChannel *weakSelf = self; - __unsafe_unretained PTPusher *weakPusher = pusher; -#endif + __weak PTPusherChannel *weakSelf = self; - [clientEventQueue addOperationWithBlock:^{ - [weakPusher sendEventNamed:eventName data:eventData channel:weakSelf.name]; + [_clientEventQueue addOperationWithBlock:^{ + [weakSelf.pusher sendEventNamed:eventName data:eventData channel:weakSelf.name]; }]; } @@ -292,34 +283,36 @@ - (void)triggerEventNamed:(NSString *)eventName data:(id)eventData #pragma mark - -@implementation PTPusherPresenceChannel +@interface PTPusherChannelMembers () + +@property (nonatomic, copy, readwrite) NSString *myID; -@synthesize presenceDelegate; -@synthesize members; +- (void)reset; +- (void)handleSubscription:(NSDictionary *)subscriptionData; +- (PTPusherChannelMember *)handleMemberAdded:(NSDictionary *)memberData; +- (PTPusherChannelMember *)handleMemberRemoved:(NSDictionary *)memberData; + +@end + +@implementation PTPusherPresenceChannel - (id)initWithName:(NSString *)channelName pusher:(PTPusher *)aPusher { if ((self = [super initWithName:channelName pusher:aPusher])) { - members = [[NSMutableDictionary alloc] init]; - memberIDs = [[NSMutableArray alloc] init]; - + _members = [[PTPusherChannelMembers alloc] init]; + /* Set up event handlers for pre-defined channel events. As above, use blocks as proxies to a weak channel reference to avoid retain cycles. */ -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 __weak PTPusherPresenceChannel *weakChannel = self; -#else - __unsafe_unretained PTPusherPresenceChannel *weakChannel = self; -#endif - - [internalBindings addObject: + [self.internalBindings addObject: [self bindToEventNamed:@"pusher_internal:member_added" handleWithBlock:^(PTPusherEvent *event) { [weakChannel handleMemberAddedEvent:event]; }]]; - [internalBindings addObject: + [self.internalBindings addObject: [self bindToEventNamed:@"pusher_internal:member_removed" handleWithBlock:^(PTPusherEvent *event) { [weakChannel handleMemberRemovedEvent:event]; @@ -329,13 +322,39 @@ - (id)initWithName:(NSString *)channelName pusher:(PTPusher *)aPusher return self; } +- (void)handleDisconnect +{ + [super handleDisconnect]; + [self.members reset]; +} + +- (void)subscribeWithAuthorization:(NSDictionary *)authData +{ + [super subscribeWithAuthorization:authData]; + + NSDictionary *channelData = [[PTJSON JSONParser] objectFromJSONString:authData[@"channel_data"]]; + self.members.myID = channelData[@"user_id"]; +} + - (void)handleSubscribeEvent:(PTPusherEvent *)event { - NSDictionary *presenceData = [event.data objectForKey:@"presence"]; [super handleSubscribeEvent:event]; - [members setDictionary:[presenceData objectForKey:@"hash"]]; - [memberIDs setArray:[presenceData objectForKey:@"ids"]]; - [self.presenceDelegate presenceChannel:self didSubscribeWithMemberList:memberIDs]; + + [self.members handleSubscription:event.data]; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + if ([self.presenceDelegate respondsToSelector:@selector(presenceChannel:didSubscribeWithMemberList:)]) { // deprecated call + NSLog(@"presenceChannel:didSubscribeWithMemberList: is deprecated and will be removed in 1.6. Use presenceChannelDidSubscribe: instead."); + NSMutableArray *members = [NSMutableArray arrayWithCapacity:self.members.count]; + [self.members enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { + [members addObject:obj]; + }]; + [self.presenceDelegate presenceChannel:self didSubscribeWithMemberList:members]; + } +#pragma clang diagnostic pop + + [self.presenceDelegate presenceChannelDidSubscribe:self]; } - (BOOL)isPresence @@ -345,38 +364,162 @@ - (BOOL)isPresence - (NSDictionary *)infoForMemberWithID:(NSString *)memberID { - return [members objectForKey:memberID]; + return self.members[memberID]; } - (NSArray *)memberIDs { - return [memberIDs copy]; + NSMutableArray *memberIDs = [NSMutableArray array]; + [self.members enumerateObjectsUsingBlock:^(PTPusherChannelMember *member, BOOL *stop) { + [memberIDs addObject:member.userID]; + }]; + return memberIDs; } - (NSInteger)memberCount { - return [memberIDs count]; + return self.members.count; } - (void)handleMemberAddedEvent:(PTPusherEvent *)event { - NSString *memberID = [event.data objectForKey:@"user_id"]; - NSDictionary *memberInfo = [event.data objectForKey:@"user_info"]; - if (memberInfo == nil) { - memberInfo = [NSDictionary dictionary]; + PTPusherChannelMember *member = [self.members handleMemberAdded:event.data]; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + if ([self.presenceDelegate respondsToSelector:@selector(presenceChannel:memberAddedWithID:memberInfo:)]) { // deprecated call + NSLog(@"presenceChannel:memberAddedWithID:memberInfo: is deprecated and will be removed in 1.6. Use presenceChannel:memberAdded: instead."); + [self.presenceDelegate presenceChannel:self memberAddedWithID:member.userID memberInfo:member.userInfo]; } - [memberIDs addObject:memberID]; - [members setObject:memberInfo forKey:memberID]; - [self.presenceDelegate presenceChannel:self memberAddedWithID:memberID memberInfo:memberInfo]; +#pragma clang diagnostic pop + + [self.presenceDelegate presenceChannel:self memberAdded:member]; } - (void)handleMemberRemovedEvent:(PTPusherEvent *)event { - NSString *memberID = [event.data valueForKey:@"user_id"]; - NSInteger memberIndex = [memberIDs indexOfObject:memberID]; - [memberIDs removeObject:memberID]; - [members removeObjectForKey:memberID]; - [self.presenceDelegate presenceChannel:self memberRemovedWithID:memberID atIndex:memberIndex]; + PTPusherChannelMember *member = [self.members handleMemberRemoved:event.data]; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + if ([self.presenceDelegate respondsToSelector:@selector(presenceChannel:memberRemovedWithID:atIndex:)]) { // deprecated call + NSLog(@"presenceChannel:memberRemovedWithID:atIndex: is deprecated and will be removed in 1.6. Use presenceChannel:memberRemoved: instead."); + // we just send an index of -1 here: I don't want to jump through hoops to support a deprecated API call + [self.presenceDelegate presenceChannel:self memberRemovedWithID:member.userID atIndex:-1]; + } +#pragma clang diagnostic pop + + [self.presenceDelegate presenceChannel:self memberRemoved:member]; +} + +@end + +#pragma mark - + +@implementation PTPusherChannelMember + +- (id)initWithUserID:(NSString *)userID userInfo:(NSDictionary *)userInfo +{ + if ((self = [super init])) { + _userID = [userID copy]; + _userInfo = [userInfo copy]; + } + return self; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"", self.userID, self.userInfo]; +} + +- (id)objectForKeyedSubscript:(id )key +{ + return self.userInfo[key]; +} + +@end + +@implementation PTPusherChannelMembers { + NSMutableDictionary *_members; +} + +- (id)init +{ + self = [super init]; + if (self) { + _members = [[NSMutableDictionary alloc] init]; + } + return self; +} + +- (void)reset +{ + _members = [[NSMutableDictionary alloc] init]; + self.myID = nil; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"", _members]; +} + +- (NSInteger)count +{ + return _members.count; +} + +- (id)objectForKeyedSubscript:(id )key +{ + return _members[key]; +} + +- (void)enumerateObjectsUsingBlock:(void (^)(id obj, BOOL *stop))block +{ + [_members enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { + block(obj, stop); + }]; +} + + +- (PTPusherChannelMember *)me +{ + return self[self.myID]; +} + +- (PTPusherChannelMember *)memberWithID:(NSString *)userID +{ + return self[userID]; +} + +#pragma mark - Channel event handling + +- (void)handleSubscription:(NSDictionary *)subscriptionData +{ + NSDictionary *memberHash = subscriptionData[@"presence"][@"hash"]; + + [memberHash enumerateKeysAndObjectsUsingBlock:^(NSString *userID, NSDictionary *userInfo, BOOL *stop) { + PTPusherChannelMember *member = [[PTPusherChannelMember alloc] initWithUserID:userID userInfo:userInfo]; + _members[userID] = member; + }]; +} + +- (PTPusherChannelMember *)handleMemberAdded:(NSDictionary *)memberData +{ + PTPusherChannelMember *member = [self memberWithID:memberData[@"user_id"]]; + if (member == nil) { + member = [[PTPusherChannelMember alloc] initWithUserID:memberData[@"user_id"] userInfo:memberData[@"user_info"]]; + _members[member.userID] = member; + } + return member; +} + +- (PTPusherChannelMember *)handleMemberRemoved:(NSDictionary *)memberData +{ + PTPusherChannelMember *member = [self memberWithID:memberData[@"user_id"]]; + if (member) { + [_members removeObjectForKey:member.userID]; + } + return member; } @end diff --git a/Library/PTPusherChannelAuthorizationOperation.m b/Library/PTPusherChannelAuthorizationOperation.m index db0463f9..ab859d8c 100644 --- a/Library/PTPusherChannelAuthorizationOperation.m +++ b/Library/PTPusherChannelAuthorizationOperation.m @@ -22,11 +22,6 @@ @interface PTPusherChannelAuthorizationOperation () @implementation PTPusherChannelAuthorizationOperation -@synthesize authorized; -@synthesize authorizationData; -@synthesize completionHandler; -@synthesize error; - - (NSMutableURLRequest *)mutableURLRequest { // we can be sure this is always mutable @@ -47,8 +42,8 @@ + (id)operationWithAuthorizationURL:(NSURL *)URL channelName:(NSString *)channel [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; NSMutableDictionary *requestData = [NSMutableDictionary dictionary]; - [requestData setObject:socketID forKey:@"socket_id"]; - [requestData setObject:channelName forKey:@"channel_name"]; + requestData[@"socket_id"] = socketID; + requestData[@"channel_name"] = channelName; [request setHTTPBody:[[requestData sortedQueryString] dataUsingEncoding:NSUTF8StringEncoding]]; @@ -63,31 +58,31 @@ - (void)finish } if (self.connectionError) { - self.error = [NSError errorWithDomain:PTPusherErrorDomain code:PTPusherChannelAuthorizationConnectionError userInfo:[NSDictionary dictionaryWithObject:self.connectionError forKey:NSUnderlyingErrorKey]]; + self.error = [NSError errorWithDomain:PTPusherErrorDomain code:PTPusherChannelAuthorizationConnectionError userInfo:@{NSUnderlyingErrorKey: self.connectionError}]; } else { - authorized = YES; + _authorized = YES; if ([URLResponse isKindOfClass:[NSHTTPURLResponse class]]) { - authorized = ([(NSHTTPURLResponse *)URLResponse statusCode] == 200 || [(NSHTTPURLResponse *)URLResponse statusCode] == 201); + _authorized = ([(NSHTTPURLResponse *)URLResponse statusCode] == 200 || [(NSHTTPURLResponse *)URLResponse statusCode] == 201); } - if (authorized) { - authorizationData = [[PTJSON JSONParser] objectFromJSONData:responseData]; + if (_authorized) { + _authorizationData = [[PTJSON JSONParser] objectFromJSONData:responseData]; - if (![authorizationData isKindOfClass:[NSDictionary class]]) { + if (![_authorizationData isKindOfClass:[NSDictionary class]]) { NSDictionary *userInfo = nil; - if (authorizationData) { // make sure it isn't nil as a result of invalid JSON first - userInfo = [NSDictionary dictionaryWithObjectsAndKeys:@"Authorization data was not a dictionary", @"reason", authorizationData, @"authorization_data", nil]; + if (_authorizationData) { // make sure it isn't nil as a result of invalid JSON first + userInfo = @{@"reason": @"Authorization data was not a dictionary", @"authorization_data": _authorizationData}; } else { - userInfo = [NSDictionary dictionaryWithObject:@"Authorization data was not valid JSON" forKey:@"reason"]; + userInfo = @{@"reason": @"Authorization data was not valid JSON"}; } self.error = [NSError errorWithDomain:PTPusherErrorDomain code:PTPusherChannelAuthorizationBadResponseError userInfo:userInfo]; - authorized = NO; + _authorized = NO; } } } @@ -132,7 +127,7 @@ - (BOOL)isAuthorized - (NSDictionary *)authorizationData { - return [NSDictionary dictionary]; + return @{}; } - (NSMutableURLRequest *)mutableURLRequest diff --git a/Library/PTPusherConnection.h b/Library/PTPusherConnection.h index 32e43b47..fa9768e1 100644 --- a/Library/PTPusherConnection.h +++ b/Library/PTPusherConnection.h @@ -34,39 +34,53 @@ typedef enum { @interface PTPusherConnection : NSObject -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 @property (nonatomic, weak) id delegate; -#else -@property (nonatomic, unsafe_unretained) id delegate; -#endif + +/** Indicates if the connection is connected to the Pusher service. + + @return YES, if the socket has connected and a handshake has been received from the server, otherwise NO. + */ @property (nonatomic, readonly, getter=isConnected) BOOL connected; + +/** The unique socket ID for this connection. + + Every time the connection connects to the service, a new socket ID is received on handshake. + + This is normally used when authorizing private and presence channel subscriptions. + */ @property (nonatomic, copy, readonly) NSString *socketID; -///------------------------------------------------------------------------------------/ -/// @name Initialisation -///------------------------------------------------------------------------------------/ +/** The Pusher service URL. + */ +@property (nonatomic, readonly) NSURL *URL; -/** Creates a new PTPusherConnection instance. +/* If the connection does not receive any new data within the time specified, + a ping event will be sent. - Connections are not opened immediately; an explicit call to connect is required. + Defaults to 120s as recommended by the Pusher protocol documentation. You should not + normally need to change this. + */ +@property (nonatomic, assign) NSTimeInterval activityTimeout; + +/* The amount of time to wait for a pong in response to a ping before disconnecting. - @param aURL The websocket endpoint - @param delegate The delegate for this connection + Defaults to 30s as recommended by the Pusher protocol documentation. You should not + normally need to change this. */ -- (id)initWithURL:(NSURL *)aURL; +@property (nonatomic, assign) NSTimeInterval pongTimeout; + +///------------------------------------------------------------------------------------/ +/// @name Initialisation +///------------------------------------------------------------------------------------/ /** Creates a new PTPusherConnection instance. Connections are not opened immediately; an explicit call to connect is required. - DEPRECATED IN VERSION 1.2. The secure parameter is now ignored; secure mode will be - enabled automatically when the URL protocol is wss. - @param aURL The websocket endpoint @param delegate The delegate for this connection - @param secure Whether this connection should be secure (TLS) */ -- (id)initWithURL:(NSURL *)aURL secure:(BOOL)secure __PUSHER_DEPRECATED__; +- (id)initWithURL:(NSURL *)aURL; ///------------------------------------------------------------------------------------/ /// @name Managing connections @@ -76,10 +90,15 @@ typedef enum { The delegate will only be sent a didConnect message when the web socket receives a 'connection_established' event from Pusher, regardless of the web socket's connection state. + + Calling this does nothing if already connected. */ - (void)connect; -/** Closes the web socket connection */ +/** Closes the web socket connection + + Calling this does nothing if already disconnected. + */ - (void)disconnect; ///------------------------------------------------------------------------------------/ @@ -93,4 +112,21 @@ typedef enum { */ - (void)send:(id)object; +///------------------------------------------------------------------------------------/ +/// @name Deprecated methods +///------------------------------------------------------------------------------------/ + +/** Creates a new PTPusherConnection instance. + + Connections are not opened immediately; an explicit call to connect is required. + + DEPRECATED IN VERSION 1.2. The secure parameter is now ignored; secure mode will be + enabled automatically when the URL protocol is wss. + + @param aURL The websocket endpoint + @param delegate The delegate for this connection + @param secure Whether this connection should be secure (TLS) + */ +- (id)initWithURL:(NSURL *)aURL secure:(BOOL)secure __PUSHER_DEPRECATED__; + @end diff --git a/Library/PTPusherConnection.m b/Library/PTPusherConnection.m index 3f885483..b2023ea3 100644 --- a/Library/PTPusherConnection.m +++ b/Library/PTPusherConnection.m @@ -14,12 +14,13 @@ NSString *const PTPusherConnectionEstablishedEvent = @"pusher:connection_established"; NSString *const PTPusherConnectionPingEvent = @"pusher:ping"; +NSString *const PTPusherConnectionPongEvent = @"pusher:pong"; @interface PTPusherConnection () @property (nonatomic, copy) NSString *socketID; @property (nonatomic, assign) PTPusherConnectionState state; - -- (void)respondToPingEvent; +@property (nonatomic, strong) NSTimer *pingTimer; +@property (nonatomic, strong) NSTimer *pongTimer; @end @implementation PTPusherConnection { @@ -27,10 +28,6 @@ @implementation PTPusherConnection { NSURLRequest *request; } -@synthesize delegate = _delegate; -@synthesize state; -@synthesize socketID; - - (id)initWithURL:(NSURL *)aURL secure:(BOOL)secure { return [self initWithURL:aURL secure:NO]; @@ -40,12 +37,22 @@ - (id)initWithURL:(NSURL *)aURL { if ((self = [super init])) { request = [NSURLRequest requestWithURL:aURL]; + +#ifdef DEBUG + NSLog(@"[pusher] Debug logging enabled"); +#endif + + // Timeout defaults as recommended by the Pusher protocol documentation. + self.activityTimeout = 120.0; + self.pongTimeout = 30.0; } return self; } -- (void)dealloc +- (void)dealloc { + [self.pingTimer invalidate]; + [self.pongTimer invalidate]; [socket setDelegate:nil]; [socket close]; } @@ -55,12 +62,17 @@ - (BOOL)isConnected return (self.state == PTPusherConnectionConnected); } +- (NSURL *)URL +{ + return request.URL; +} + #pragma mark - Connection management - (void)connect; { if (self.state >= PTPusherConnectionConnecting) return; - + BOOL shouldConnect = [self.delegate pusherConnectionWillConnect:self]; if (!shouldConnect) return; @@ -86,7 +98,7 @@ - (void)disconnect; - (void)send:(id)object { - NSAssert(self.isConnected, @"Cannot send data unless connected."); + if (self.isConnected == NO) return; NSData *JSONData = [[PTJSON JSONParser] JSONDataFromObject:object]; NSString *message = [[NSString alloc] initWithData:JSONData encoding:NSUTF8StringEncoding]; @@ -102,34 +114,47 @@ - (void)webSocketDidOpen:(SRWebSocket *)webSocket - (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error; { + [self.pingTimer invalidate]; + [self.pongTimer invalidate]; + BOOL wasConnected = self.isConnected; self.state = PTPusherConnectionDisconnected; - [self.delegate pusherConnection:self didFailWithError:error wasConnected:wasConnected]; self.socketID = nil; socket = nil; + + // we always call this last, to prevent a race condition if the delegate calls 'connect' + [self.delegate pusherConnection:self didFailWithError:error wasConnected:wasConnected]; } - (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean { + [self.pingTimer invalidate]; + [self.pongTimer invalidate]; + self.state = PTPusherConnectionDisconnected; - [self.delegate pusherConnection:self didDisconnectWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean]; self.socketID = nil; socket = nil; + + // we always call this last, to prevent a race condition if the delegate calls 'connect' + [self.delegate pusherConnection:self didDisconnectWithCode:(NSInteger)code reason:(NSString *)reason wasClean:wasClean]; } - (void)webSocket:(SRWebSocket *)webSocket didReceiveMessage:(NSString *)message { + [self resetPingPongTimer]; + NSDictionary *messageDictionary = [[PTJSON JSONParser] objectFromJSONString:message]; PTPusherEvent *event = [PTPusherEvent eventFromMessageDictionary:messageDictionary]; - if ([event.name isEqualToString:PTPusherConnectionPingEvent]) { - // don't forward on ping events, just handle them and return - [self respondToPingEvent]; + if ([event.name isEqualToString:PTPusherConnectionPongEvent]) { +#ifdef DEBUG + NSLog(@"[pusher] Server responded to ping (pong!)"); +#endif return; } if ([event.name isEqualToString:PTPusherConnectionEstablishedEvent]) { - self.socketID = [event.data objectForKey:@"socket_id"]; + self.socketID = (event.data)[@"socket_id"]; self.state = PTPusherConnectionConnected; [self.delegate pusherConnectionDidConnect:self]; @@ -138,15 +163,40 @@ - (void)webSocket:(SRWebSocket *)webSocket didReceiveMessage:(NSString *)message [self.delegate pusherConnection:self didReceiveEvent:event]; } -#pragma mark - +#pragma mark - Ping/Pong/Activity Timeouts + +- (void)sendPing +{ + [self send:@{@"event": @"pusher:ping"}]; +} + +- (void)resetPingPongTimer +{ + [self.pingTimer invalidate]; + // Any activity also invalidates the pong timer if set + [self.pongTimer invalidate]; + + self.pingTimer = [NSTimer scheduledTimerWithTimeInterval:self.activityTimeout target:self selector:@selector(handleActivityTimeout) userInfo:nil repeats:NO]; +} + +- (void)handleActivityTimeout +{ +#ifdef DEBUG + NSLog(@"[pusher] Pusher connection activity timeout reached, sending ping to server"); +#endif + + [self sendPing]; + + self.pongTimer = [NSTimer scheduledTimerWithTimeInterval:self.pongTimeout target:self selector:@selector(handlePongTimeout) userInfo:nil repeats:NO]; +} -- (void)respondToPingEvent +- (void)handlePongTimeout { #ifdef DEBUG - NSLog(@"[pusher] Responding to ping (pong!)"); + NSLog(@"[pusher] Server did not respond to ping within timeout, disconnecting"); #endif - [self send:[NSDictionary dictionaryWithObject:@"pusher:pong" forKey:@"event"]]; + [self disconnect]; } @end diff --git a/Library/PTPusherDelegate.h b/Library/PTPusherDelegate.h index c8e3640d..d495e1d5 100644 --- a/Library/PTPusherDelegate.h +++ b/Library/PTPusherDelegate.h @@ -14,7 +14,8 @@ @class PTPusherEvent; @class PTPusherErrorEvent; -/** The PTPusherDelegate protocol can be implemented to receive important events in a PTPusher object's lifetime. +/** Implementing the PTPusherDelegate protocol lets you react to important events in the Pusher client's + lifetime, such as connection and disconnection, channel subscription and errors. All of the delegate methods are optional; you only need to implement what is required for your app. @@ -25,6 +26,10 @@ @optional +///------------------------------------------------------------------------------------/ +/// @name Connection handling +///------------------------------------------------------------------------------------/ + /** Notifies the delegate that the PTPusher instance is about to connect to the Pusher service. @param pusher The PTPusher instance that is connecting. @@ -40,14 +45,6 @@ */ - (void)pusher:(PTPusher *)pusher connectionDidConnect:(PTPusherConnection *)connection; -/** Notifies the delegate that the PTPusher instance has disconnected from the Pusher service. - - @deprecated Use pusher:connection:didDisconnectWithError: - @param pusher The PTPusher instance that has connected. - @param connection The connection for the pusher instance. - */ -- (void)pusher:(PTPusher *)pusher connectionDidDisconnect:(PTPusherConnection *)connection __PUSHER_DEPRECATED__; - /** Notifies the delegate that the PTPusher instance has disconnected from the Pusher service. Clients should check the value of the willAttemptReconnect parameter before trying to reconnect manually. @@ -58,6 +55,9 @@ immediately following this one. Clients can return NO from that delegate method to cancel the automatic reconnection attempt. + If the client has disconnected due to a fatal Pusher error (as indicated by the error code), + willAttemptReconnect will be NO and the error domain will be `PTPusherFatalErrorDomain`. + @param pusher The PTPusher instance that has connected. @param connection The connection for the pusher instance. @param error If the connection disconnected abnormally, error will be non-nil. @@ -87,19 +87,9 @@ */ - (BOOL)pusher:(PTPusher *)pusher connectionWillAutomaticallyReconnect:(PTPusherConnection *)connection afterDelay:(NSTimeInterval)delay; -/** Notifies the delegate of the request that will be used to authorize access to a channel. - - When using the Pusher Javascript client, authorization typically relies on an existing session cookie - on the server; when the Javascript client makes an AJAX POST to the server, the server can return - the user's credentials based on their current session. - - When using libPusher, there will likely be no existing server-side session; authorization will - need to happen by some other means (e.g. an authorization token or HTTP basic auth). - - By implementing this delegate method, you will be able to set any credentials as necessary by - modifying the request as required (such as setting POST parameters or headers). - */ -- (void)pusher:(PTPusher *)pusher willAuthorizeChannelWithRequest:(NSMutableURLRequest *)request __PUSHER_DEPRECATED__; +///------------------------------------------------------------------------------------/ +/// @name Channel subscription and authorization +///------------------------------------------------------------------------------------/ /** Notifies the delegate of the request that will be used to authorize access to a channel. @@ -112,6 +102,10 @@ By implementing this delegate method, you will be able to set any credentials as necessary by modifying the request as required (such as setting POST parameters or headers). + + @param pusher The PTPusher instance that is requesting authorization + @param channel The channel that requires authorizing + @param request A mutable URL request that will be POSTed to the configured `authorizationURL` */ - (void)pusher:(PTPusher *)pusher willAuthorizeChannel:(PTPusherChannel *)channel withRequest:(NSMutableURLRequest *)request; @@ -143,6 +137,10 @@ */ - (void)pusher:(PTPusher *)pusher didFailToSubscribeToChannel:(PTPusherChannel *)channel withError:(NSError *)error; +///------------------------------------------------------------------------------------/ +/// @name Errors +///------------------------------------------------------------------------------------/ + /** Notifies the delegate that an error event has been received. If a client is binding to all events, either through the client or using NSNotificationCentre, they will also @@ -152,4 +150,41 @@ @param errorEvent The error event. */ - (void)pusher:(PTPusher *)pusher didReceiveErrorEvent:(PTPusherErrorEvent *)errorEvent; + + +///------------------------------------------------------------------------------------/ +/// @name Deprecated methods +///------------------------------------------------------------------------------------/ + +/** Notifies the delegate that the PTPusher instance has disconnected from the Pusher service. + + @deprecated Use pusher:connection:didDisconnectWithError:willAttemptReconnect: + @param pusher The PTPusher instance that has connected. + @param connection The connection for the pusher instance. + */ +- (void)pusher:(PTPusher *)pusher connectionDidDisconnect:(PTPusherConnection *)connection __PUSHER_DEPRECATED__; + +/** Notifies the delegate that the PTPusher instance has disconnected from the Pusher service. + + @deprecated Use pusher:connection:didDisconnectWithError:willAttemptReconnect: + @param pusher The PTPusher instance that has connected. + @param connection The connection for the pusher instance. + @param error If the connection disconnected abnormally, error will be non-nil. + */ +- (void)pusher:(PTPusher *)pusher connection:(PTPusherConnection *)connection didDisconnectWithError:(NSError *)error __PUSHER_DEPRECATED__; + +/** Notifies the delegate of the request that will be used to authorize access to a channel. + + When using the Pusher Javascript client, authorization typically relies on an existing session cookie + on the server; when the Javascript client makes an AJAX POST to the server, the server can return + the user's credentials based on their current session. + + When using libPusher, there will likely be no existing server-side session; authorization will + need to happen by some other means (e.g. an authorization token or HTTP basic auth). + + By implementing this delegate method, you will be able to set any credentials as necessary by + modifying the request as required (such as setting POST parameters or headers). + */ +- (void)pusher:(PTPusher *)pusher willAuthorizeChannelWithRequest:(NSMutableURLRequest *)request __PUSHER_DEPRECATED__; + @end diff --git a/Library/PTPusherEvent.h b/Library/PTPusherEvent.h index 9bdc85f2..dd1d4f44 100644 --- a/Library/PTPusherEvent.h +++ b/Library/PTPusherEvent.h @@ -17,9 +17,7 @@ extern NSString *const PTPusherChannelKey; All events dispatched by libPusher (via either bindings or notifications) will be represented by instances of this class. */ -@interface PTPusherEvent : NSObject { - NSString *_name; -} +@interface PTPusherEvent : NSObject ///------------------------------------------------------------------------------------/ /// @name Properties @@ -46,6 +44,7 @@ extern NSString *const PTPusherChannelKey; - (id)initWithEventName:(NSString *)name channel:(NSString *)channel data:(id)data; + (id)eventFromMessageDictionary:(NSDictionary *)dictionary; + @end typedef enum { @@ -66,11 +65,7 @@ typedef enum { /** A textual description of the error. */ -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 @property (weak, nonatomic, readonly) NSString *message; -#else -@property (unsafe_unretained, nonatomic, readonly) NSString *message; -#endif /** The error code. See PTPusherServerErrorCodes for available errors. */ diff --git a/Library/PTPusherEvent.m b/Library/PTPusherEvent.m index b431ef5f..2ac766e5 100644 --- a/Library/PTPusherEvent.m +++ b/Library/PTPusherEvent.m @@ -15,17 +15,12 @@ @implementation PTPusherEvent -@synthesize name = _name; -@synthesize data = _data; -@synthesize channel = _channel; -@synthesize timeReceived = _timeReceived; - + (id)eventFromMessageDictionary:(NSDictionary *)dictionary { - if ([[dictionary objectForKey:PTPusherEventKey] isEqualToString:@"pusher:error"]) { - return [[PTPusherErrorEvent alloc] initWithEventName:[dictionary objectForKey:PTPusherEventKey] channel:nil data:[dictionary objectForKey:PTPusherDataKey]]; + if ([dictionary[PTPusherEventKey] isEqualToString:@"pusher:error"]) { + return [[PTPusherErrorEvent alloc] initWithEventName:dictionary[PTPusherEventKey] channel:nil data:dictionary[PTPusherDataKey]]; } - return [[self alloc] initWithEventName:[dictionary objectForKey:PTPusherEventKey] channel:[dictionary objectForKey:PTPusherChannelKey] data:[dictionary objectForKey:PTPusherDataKey]]; + return [[self alloc] initWithEventName:dictionary[PTPusherEventKey] channel:dictionary[PTPusherChannelKey] data:dictionary[PTPusherDataKey]]; } - (id)initWithEventName:(NSString *)name channel:(NSString *)channel data:(id)data @@ -65,12 +60,12 @@ @implementation PTPusherErrorEvent - (NSString *)message { - return [self.data objectForKey:@"message"]; + return (self.data)[@"message"]; } - (NSInteger)code { - id eventCode = [self.data objectForKey:@"code"]; + id eventCode = (self.data)[@"code"]; if (eventCode == nil || eventCode == [NSNull null]) { return PTPusherErrorUnknown; @@ -80,7 +75,7 @@ - (NSInteger)code - (NSString *)description { - return [NSString stringWithFormat:@"", self.code, self.message]; + return [NSString stringWithFormat:@"", (long)self.code, self.message]; } @end diff --git a/Library/PTPusherEventDispatcher.h b/Library/PTPusherEventDispatcher.h index 922d6781..0355acaf 100644 --- a/Library/PTPusherEventDispatcher.h +++ b/Library/PTPusherEventDispatcher.h @@ -20,9 +20,17 @@ - (void)removeAllBindings; @end +/** Represents an event binding created when calling one of the binding methods defined + in the PTPusherEventBindings protocol. + + You should keep a reference to binding objects if you need to remove them later. + + For more information on managing event bindings, see the README. + */ @interface PTPusherEventBinding : NSObject -/** The event this binding binds to. */ +/** The event name this binding is bound to. + */ @property (nonatomic, readonly) NSString *eventName; /** Returns YES if this binding is still attached to its event publisher. diff --git a/Library/PTPusherEventDispatcher.m b/Library/PTPusherEventDispatcher.m index bd873e42..c2936d7a 100644 --- a/Library/PTPusherEventDispatcher.m +++ b/Library/PTPusherEventDispatcher.m @@ -14,15 +14,13 @@ - (void)invalidate; @end @implementation PTPusherEventDispatcher { - NSMutableDictionary *bindings; + NSMutableDictionary *_bindings; } -@synthesize bindings; - - (id)init { if ((self = [super init])) { - bindings = [[NSMutableDictionary alloc] init]; + _bindings = [[NSMutableDictionary alloc] init]; } return self; } @@ -31,11 +29,11 @@ - (id)init - (PTPusherEventBinding *)addEventListener:(id)listener forEventNamed:(NSString *)eventName { - NSMutableArray *bindingsForEvent = [bindings objectForKey:eventName]; + NSMutableArray *bindingsForEvent = _bindings[eventName]; if (bindingsForEvent == nil) { bindingsForEvent = [NSMutableArray array]; - [bindings setObject:bindingsForEvent forKey:eventName]; + _bindings[eventName] = bindingsForEvent; } PTPusherEventBinding *binding = [[PTPusherEventBinding alloc] initWithEventListener:listener eventName:eventName]; [bindingsForEvent addObject:binding]; @@ -45,7 +43,7 @@ - (PTPusherEventBinding *)addEventListener:(id)listener forEven - (void)removeBinding:(PTPusherEventBinding *)binding { - NSMutableArray *bindingsForEvent = [bindings objectForKey:binding.eventName]; + NSMutableArray *bindingsForEvent = _bindings[binding.eventName]; if ([bindingsForEvent containsObject:binding]) { [binding invalidate]; @@ -55,19 +53,19 @@ - (void)removeBinding:(PTPusherEventBinding *)binding - (void)removeAllBindings { - for (NSArray *eventBindings in [bindings allValues]) { + for (NSArray *eventBindings in [_bindings allValues]) { for (PTPusherEventBinding *binding in eventBindings) { [binding invalidate]; } } - [bindings removeAllObjects]; + [_bindings removeAllObjects]; } #pragma mark - Dispatching events - (void)dispatchEvent:(PTPusherEvent *)event { - for (PTPusherEventBinding *binding in [bindings objectForKey:event.name]) { + for (PTPusherEventBinding *binding in _bindings[event.name]) { [binding dispatchEvent:event]; } } @@ -78,8 +76,6 @@ @implementation PTPusherEventBinding { id _eventListener; } -@synthesize eventName = _eventName; - - (id)initWithEventListener:(id)eventListener eventName:(NSString *)eventName { if ((self = [super init])) { diff --git a/Library/PTPusherMockConnection.m b/Library/PTPusherMockConnection.m index 28d35dd2..423ef47d 100644 --- a/Library/PTPusherMockConnection.m +++ b/Library/PTPusherMockConnection.m @@ -18,7 +18,7 @@ @implementation PTPusherMockConnection { - (id)init { - if ((self = [super init])) { + if ((self = [super initWithURL:nil])) { sentClientEvents = [[NSMutableArray alloc] init]; } return self; @@ -31,7 +31,7 @@ - (void)connect NSInteger socketID = (NSInteger)[NSDate timeIntervalSinceReferenceDate]; [self simulateServerEventNamed:PTPusherConnectionEstablishedEvent - data:[NSDictionary dictionaryWithObject:[NSNumber numberWithInteger:socketID] forKey:@"socket_id"]]; + data:@{@"socket_id": @(socketID)}]; } - (void)disconnect @@ -55,14 +55,14 @@ - (void)simulateServerEventNamed:(NSString *)name data:(id)data channel:(NSStrin { NSMutableDictionary *event = [NSMutableDictionary dictionary]; - [event setObject:name forKey:PTPusherEventKey]; + event[PTPusherEventKey] = name; if (data) { - [event setObject:data forKey:PTPusherDataKey]; + event[PTPusherDataKey] = data; } if (channelName) { - [event setObject:channelName forKey:PTPusherChannelKey]; + event[PTPusherChannelKey] = channelName; } NSString *message = [[PTJSON JSONParser] JSONStringFromObject:event]; @@ -92,7 +92,7 @@ - (void)handleSubscribeEvent:(PTPusherEvent *)subscribeEvent { [self simulateServerEventNamed:@"pusher_internal:subscription_succeeded" data:nil - channel:[subscribeEvent.data objectForKey:PTPusherChannelKey]]; + channel:(subscribeEvent.data)[PTPusherChannelKey]]; } @end diff --git a/Library/PTPusherPresenceChannelDelegate.h b/Library/PTPusherPresenceChannelDelegate.h index f69005cd..e2452d10 100644 --- a/Library/PTPusherPresenceChannelDelegate.h +++ b/Library/PTPusherPresenceChannelDelegate.h @@ -7,7 +7,9 @@ // #import +#import "PTPusherMacros.h" +@class PTPusherChannelMember; @class PTPusherPresenceChannel; @protocol PTPusherPresenceChannelDelegate @@ -16,32 +18,45 @@ Whenever you subscribe to a presence channel, a list of current subscribers will be returned by Pusher. - The list will be an array of member IDs. Further metadata can be obtained by asking the channel object - for information about a particular member using `-[PTPusherChannel infoForMemberWithID:]`. + The members list can be accessed using the `members` property on the channel. + + @param channel The presence channel that was subscribed to. + */ +- (void)presenceChannelDidSubscribe:(PTPusherPresenceChannel *)channel; + +/** Notifies the delegate that a member has joined the channel. @param channel The presence channel that was subscribed to. - @param members The current members subscribed to the channel. + @param member The member that was removed. */ -- (void)presenceChannel:(PTPusherPresenceChannel *)channel didSubscribeWithMemberList:(NSArray *)members; -/** Notifies the delegate that a new member subscribed to the presence channel. +- (void)presenceChannel:(PTPusherPresenceChannel *)channel memberAdded:(PTPusherChannelMember *)member; + +/** Notifies the delegate that a member has left from the channel. - The member info can contain arbitrary user data returned by the authorization server. - @param channel The presence channel that was subscribed to. - @param memberID The ID for the new member. - @param memberInfo The custom user data for the new member. + @param member The member that was removed. */ -- (void)presenceChannel:(PTPusherPresenceChannel *)channel memberAddedWithID:(NSString *)memberID memberInfo:(NSDictionary *)memberInfo; +- (void)presenceChannel:(PTPusherPresenceChannel *)channel memberRemoved:(PTPusherChannelMember *)member; + +#pragma mark - Deprecated methods + +@optional + +/** Notifies the delegate that the presence channel subscribed successfully. + @deprecated Use presenceChannelDidSubscribe: and access the members property. + */ +- (void)presenceChannel:(PTPusherPresenceChannel *)channel didSubscribeWithMemberList:(NSArray *)members __PUSHER_DEPRECATED__; + +/** Notifies the delegate that a member has joined the channel. + @deprecated Use presenceChannel:memberAdded: + */ + +- (void)presenceChannel:(PTPusherPresenceChannel *)channel memberAddedWithID:(NSString *)memberID memberInfo:(NSDictionary *)memberInfo __PUSHER_DEPRECATED__; /** Notifies the delegate that a member subscribed to the presence channel has unsubscribed. - - The member data can contain arbitrary user data returned by the authorization server. - - @param channel The presence channel that was subscribed to. - @param memberID The ID of the member removed. - @param index The internal index of the member (depends on the order joined/left or returned in the server member list) + @deprecated Use presenceChannel:memberRemoved: */ -- (void)presenceChannel:(PTPusherPresenceChannel *)channel memberRemovedWithID:(NSString *)memberID atIndex:(NSInteger)index; +- (void)presenceChannel:(PTPusherPresenceChannel *)channel memberRemovedWithID:(NSString *)memberID atIndex:(NSInteger)index __PUSHER_DEPRECATED__; @end diff --git a/Library/PTTargetActionEventListener.m b/Library/PTTargetActionEventListener.m index b18dd11c..27ea68ec 100644 --- a/Library/PTTargetActionEventListener.m +++ b/Library/PTTargetActionEventListener.m @@ -8,16 +8,20 @@ #import "PTTargetActionEventListener.h" +@interface PTTargetActionEventListener : NSObject +@end @implementation PTTargetActionEventListener { + id _target; + SEL _action; BOOL _invalid; } - (id)initWithTarget:(id)aTarget action:(SEL)aSelector { if (self = [super init]) { - target = aTarget; - action = aSelector; + _target = aTarget; + _action = aSelector; _invalid = NO; } return self; @@ -30,7 +34,7 @@ - (void)invalidate - (NSString *)description; { - return [NSString stringWithFormat:@"", target, NSStringFromSelector(action)]; + return [NSString stringWithFormat:@"", _target, NSStringFromSelector(_action)]; } - (void)dispatchEvent:(PTPusherEvent *)event; @@ -38,7 +42,7 @@ - (void)dispatchEvent:(PTPusherEvent *)event; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks" if (!_invalid) { - [target performSelector:action withObject:event]; + [_target performSelector:_action withObject:event]; } #pragma clang diagnostic pop } diff --git a/Library/NSDictionary+QueryString.h b/Library/Private Headers/NSDictionary+QueryString.h similarity index 100% rename from Library/NSDictionary+QueryString.h rename to Library/Private Headers/NSDictionary+QueryString.h diff --git a/Library/NSString+Hashing.h b/Library/Private Headers/NSString+Hashing.h similarity index 100% rename from Library/NSString+Hashing.h rename to Library/Private Headers/NSString+Hashing.h diff --git a/Library/PTBlockEventListener.h b/Library/Private Headers/PTBlockEventListener.h similarity index 70% rename from Library/PTBlockEventListener.h rename to Library/Private Headers/PTBlockEventListener.h index 3b23276b..6db2b46a 100644 --- a/Library/PTBlockEventListener.h +++ b/Library/Private Headers/PTBlockEventListener.h @@ -10,17 +10,8 @@ #import "PTEventListener.h" #import "PTPusherEventDispatcher.h" -@class PTPusherEvent; - typedef void (^PTBlockEventListenerBlock)(PTPusherEvent *); -@interface PTBlockEventListener : NSObject { - PTBlockEventListenerBlock block; - dispatch_queue_t queue; -} -- (id)initWithBlock:(PTBlockEventListenerBlock)aBlock dispatchQueue:(dispatch_queue_t)queue; -@end - @interface PTPusherEventDispatcher (PTBlockEventFactory) - (PTPusherEventBinding *)addEventListenerForEventNamed:(NSString *)eventName diff --git a/Library/PTJSONParser.h b/Library/Private Headers/PTJSON.h similarity index 56% rename from Library/PTJSONParser.h rename to Library/Private Headers/PTJSON.h index b12e292c..86d23e61 100644 --- a/Library/PTJSONParser.h +++ b/Library/Private Headers/PTJSON.h @@ -1,5 +1,5 @@ // -// PTJSONParser.h +// PTJSON.h // libPusher // // Created by Luke Redpath on 30/03/2012. @@ -16,3 +16,15 @@ - (id)objectFromJSONString:(NSString *)string; @end + +@interface PTJSON : NSObject + +/** + Returns a JSON parser appropriate for the current platform. + + As of libPusher 1.5, the lowest supported deployment target is iOS 5.0 + so this will always return a parser that uses NSJSONSerialisation. + */ ++ (id)JSONParser; + +@end diff --git a/Library/PTPusherChannelAuthorizationOperation.h b/Library/Private Headers/PTPusherChannelAuthorizationOperation.h similarity index 85% rename from Library/PTPusherChannelAuthorizationOperation.h rename to Library/Private Headers/PTPusherChannelAuthorizationOperation.h index 5a7be70b..e30a50ac 100644 --- a/Library/PTPusherChannelAuthorizationOperation.h +++ b/Library/Private Headers/PTPusherChannelAuthorizationOperation.h @@ -19,11 +19,7 @@ typedef enum { @property (nonatomic, copy) void (^completionHandler)(PTPusherChannelAuthorizationOperation *); @property (nonatomic, readonly, getter=isAuthorized) BOOL authorized; @property (nonatomic, strong, readonly) NSDictionary *authorizationData; -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 @property (weak, nonatomic, readonly) NSMutableURLRequest *mutableURLRequest; -#else -@property (unsafe_unretained, nonatomic, readonly) NSMutableURLRequest *mutableURLRequest; -#endif @property (nonatomic, readonly) NSError *error; + (id)operationWithAuthorizationURL:(NSURL *)URL channelName:(NSString *)channelName socketID:(NSString *)socketID; diff --git a/Library/Private Headers/PTPusherChannel_Private.h b/Library/Private Headers/PTPusherChannel_Private.h new file mode 100644 index 00000000..938fc50f --- /dev/null +++ b/Library/Private Headers/PTPusherChannel_Private.h @@ -0,0 +1,16 @@ +// +// PTPusherChannel_Private.h +// libPusher +// +// Created by Luke Redpath on 25/11/2013. +// +// + +/** + * These methods are for internal use only. + */ +@interface PTPusherChannel () +- (void)subscribeWithAuthorization:(NSDictionary *)authData; +- (void)unsubscribe; +- (void)handleDisconnect; +@end diff --git a/Library/PTTargetActionEventListener.h b/Library/Private Headers/PTTargetActionEventListener.h similarity index 73% rename from Library/PTTargetActionEventListener.h rename to Library/Private Headers/PTTargetActionEventListener.h index 43fb235b..74f4e5aa 100644 --- a/Library/PTTargetActionEventListener.h +++ b/Library/Private Headers/PTTargetActionEventListener.h @@ -10,14 +10,6 @@ #import "PTEventListener.h" #import "PTPusherEventDispatcher.h" - -@interface PTTargetActionEventListener : NSObject { - id target; - SEL action; -} -- (id)initWithTarget:(id)aTarget action:(SEL)aSelector; -@end - @interface PTPusherEventDispatcher (PTTargetActionFactory) - (PTPusherEventBinding *)addEventListenerForEventNamed:(NSString *)eventName target:(id)target action:(SEL)action; @end diff --git a/Library/PTURLRequestOperation.h b/Library/Private Headers/PTURLRequestOperation.h similarity index 100% rename from Library/PTURLRequestOperation.h rename to Library/Private Headers/PTURLRequestOperation.h diff --git a/Podfile b/Podfile index a983eb29..cbbdb642 100644 --- a/Podfile +++ b/Podfile @@ -1,7 +1,16 @@ -platform :ios, :deployment_target => '4.0' +# This podfile is intended for development on libPusher. +# +# If you are working on libPusher, you do not need to have CocoaPods installed +# unless you want to install new development dependencies as the Pods directory +# is part of the source tree. +# +platform :ios, :deployment_target => '5.0' -pod 'Reachability' -pod 'SocketRocket', :head +inhibit_all_warnings! + +pod 'Reachability', '~> 3.1' +pod 'SocketRocket', '0.3.1-beta2' +pod 'ReactiveCocoa', '~> 2.1' post_install do |installer| # we don't want to link static lib to the icucore dylib or it will fail to build @@ -17,6 +26,6 @@ end target :specs, :exclusive => true do link_with ['Functional Specs', 'UnitTests'] - pod 'Kiwi' - pod 'OHHTTPStubs' + pod 'Kiwi', '~> 2.2' + pod 'OHHTTPStubs', '~> 3.0' end diff --git a/Podfile.lock b/Podfile.lock index c2d3fab0..fa03d39b 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,19 +1,33 @@ PODS: - - Kiwi (2.2) - - OHHTTPStubs (1.0.1) - - Reachability (3.0.0) - - SocketRocket (HEAD based on 0.2.0) + - Kiwi (2.2.3): + - Kiwi/SenTestingKit + - Kiwi/ARC (2.2.3) + - Kiwi/NonARC (2.2.3) + - Kiwi/SenTestingKit (2.2.3): + - Kiwi/ARC + - Kiwi/NonARC + - OHHTTPStubs (3.0.2) + - Reachability (3.1.1) + - ReactiveCocoa (2.1.7): + - ReactiveCocoa/Core + - ReactiveCocoa/no-arc + - ReactiveCocoa/Core (2.1.7): + - ReactiveCocoa/no-arc + - ReactiveCocoa/no-arc (2.1.7) + - SocketRocket (0.3.1-beta2) DEPENDENCIES: - - Kiwi - - OHHTTPStubs - - Reachability - - SocketRocket (HEAD) + - Kiwi (~> 2.2) + - OHHTTPStubs (~> 3.0) + - Reachability (~> 3.1) + - ReactiveCocoa (~> 2.1) + - SocketRocket (= 0.3.1-beta2) SPEC CHECKSUMS: - Kiwi: db174bba4ee8068b15d7122f1b22fb64b7c1d378 - OHHTTPStubs: 25b40f0c39ce8dab25b3fc4b52d630e7a665f3fb - Reachability: 500bd76bf6cd8ff2c6fb715fc5f44ef6e4c024f2 - SocketRocket: bca43a94bd9aac3a629df42c06843402399ee67b + Kiwi: 04c51e880831d291748ec702d42c4101f7eb95c9 + OHHTTPStubs: 7be864a1c40c6a5007fe3e8679c109ca45590803 + Reachability: be4883bb93f31e38266ae3365e5600a317aae735 + ReactiveCocoa: 1117f7968c8667d2ca00b5aa47156fabcb56af75 + SocketRocket: 7ac946bcce46287a791dfff3c1f8daa692821dae -COCOAPODS: 0.22.2 +COCOAPODS: 0.28.0 diff --git a/Pods/BuildHeaders/Kiwi/KWAfterAllNode.h b/Pods/BuildHeaders/Kiwi/KWAfterAllNode.h index 4e9be08d..9eeb57f6 120000 --- a/Pods/BuildHeaders/Kiwi/KWAfterAllNode.h +++ b/Pods/BuildHeaders/Kiwi/KWAfterAllNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWAfterAllNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWAfterAllNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWAfterEachNode.h b/Pods/BuildHeaders/Kiwi/KWAfterEachNode.h index 450df359..b8072885 120000 --- a/Pods/BuildHeaders/Kiwi/KWAfterEachNode.h +++ b/Pods/BuildHeaders/Kiwi/KWAfterEachNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWAfterEachNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWAfterEachNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWAny.h b/Pods/BuildHeaders/Kiwi/KWAny.h index 681893a7..0d334e71 120000 --- a/Pods/BuildHeaders/Kiwi/KWAny.h +++ b/Pods/BuildHeaders/Kiwi/KWAny.h @@ -1 +1 @@ -../../Kiwi/Classes/KWAny.h \ No newline at end of file +../../Kiwi/Classes/Core/KWAny.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWAsyncVerifier.h b/Pods/BuildHeaders/Kiwi/KWAsyncVerifier.h index 33cf289c..55ca577c 120000 --- a/Pods/BuildHeaders/Kiwi/KWAsyncVerifier.h +++ b/Pods/BuildHeaders/Kiwi/KWAsyncVerifier.h @@ -1 +1 @@ -../../Kiwi/Classes/KWAsyncVerifier.h \ No newline at end of file +../../Kiwi/Classes/Verifiers/KWAsyncVerifier.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeBetweenMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeBetweenMatcher.h index bbe53145..75f94424 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeBetweenMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWBeBetweenMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeBetweenMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeBetweenMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeEmptyMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeEmptyMatcher.h index f5a06897..fc8c89a8 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeEmptyMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWBeEmptyMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeEmptyMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeEmptyMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeIdenticalToMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeIdenticalToMatcher.h index b746586e..6e8e6be1 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeIdenticalToMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWBeIdenticalToMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeIdenticalToMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeIdenticalToMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeKindOfClassMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeKindOfClassMatcher.h index 06fbe032..d4170aad 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeKindOfClassMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWBeKindOfClassMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeKindOfClassMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeKindOfClassMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeMemberOfClassMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeMemberOfClassMatcher.h index 08101ce8..9b96c095 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeMemberOfClassMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWBeMemberOfClassMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeMemberOfClassMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeMemberOfClassMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeNilMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeNilMatcher.h deleted file mode 120000 index be56da65..00000000 --- a/Pods/BuildHeaders/Kiwi/KWBeNilMatcher.h +++ /dev/null @@ -1 +0,0 @@ -../../Kiwi/Classes/KWBeNilMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeNonNilMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeNonNilMatcher.h deleted file mode 120000 index 16c909a3..00000000 --- a/Pods/BuildHeaders/Kiwi/KWBeNonNilMatcher.h +++ /dev/null @@ -1 +0,0 @@ -../../Kiwi/Classes/KWBeNonNilMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeSubclassOfClassMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeSubclassOfClassMatcher.h index 264f776d..ce788b78 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeSubclassOfClassMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWBeSubclassOfClassMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeSubclassOfClassMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeSubclassOfClassMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeTrueMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeTrueMatcher.h index 321d3471..6bbe534c 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeTrueMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWBeTrueMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeTrueMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeTrueMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeWithinMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeWithinMatcher.h index 895f8602..ab3ad9d6 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeWithinMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWBeWithinMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeWithinMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeWithinMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeZeroMatcher.h b/Pods/BuildHeaders/Kiwi/KWBeZeroMatcher.h index 98481608..5c6a52d2 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeZeroMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWBeZeroMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeZeroMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeZeroMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeforeAllNode.h b/Pods/BuildHeaders/Kiwi/KWBeforeAllNode.h index 139d69a7..e50bbfc5 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeforeAllNode.h +++ b/Pods/BuildHeaders/Kiwi/KWBeforeAllNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeforeAllNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWBeforeAllNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBeforeEachNode.h b/Pods/BuildHeaders/Kiwi/KWBeforeEachNode.h index f72e71cd..e25d7548 120000 --- a/Pods/BuildHeaders/Kiwi/KWBeforeEachNode.h +++ b/Pods/BuildHeaders/Kiwi/KWBeforeEachNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeforeEachNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWBeforeEachNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBlock.h b/Pods/BuildHeaders/Kiwi/KWBlock.h index a6a57c3a..0262aa9f 120000 --- a/Pods/BuildHeaders/Kiwi/KWBlock.h +++ b/Pods/BuildHeaders/Kiwi/KWBlock.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBlock.h \ No newline at end of file +../../Kiwi/Classes/Core/KWBlock.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBlockNode.h b/Pods/BuildHeaders/Kiwi/KWBlockNode.h index d6fc3575..250e21bd 120000 --- a/Pods/BuildHeaders/Kiwi/KWBlockNode.h +++ b/Pods/BuildHeaders/Kiwi/KWBlockNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBlockNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWBlockNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWBlockRaiseMatcher.h b/Pods/BuildHeaders/Kiwi/KWBlockRaiseMatcher.h index 68a0b994..0e3150b6 120000 --- a/Pods/BuildHeaders/Kiwi/KWBlockRaiseMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWBlockRaiseMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBlockRaiseMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBlockRaiseMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWCallSite.h b/Pods/BuildHeaders/Kiwi/KWCallSite.h index e2a84e7a..693a01b2 120000 --- a/Pods/BuildHeaders/Kiwi/KWCallSite.h +++ b/Pods/BuildHeaders/Kiwi/KWCallSite.h @@ -1 +1 @@ -../../Kiwi/Classes/KWCallSite.h \ No newline at end of file +../../Kiwi/Classes/Core/KWCallSite.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWCaptureSpy.h b/Pods/BuildHeaders/Kiwi/KWCaptureSpy.h index ed1d8653..54a3ca28 120000 --- a/Pods/BuildHeaders/Kiwi/KWCaptureSpy.h +++ b/Pods/BuildHeaders/Kiwi/KWCaptureSpy.h @@ -1 +1 @@ -../../Kiwi/Classes/KWCaptureSpy.h \ No newline at end of file +../../Kiwi/Classes/Core/KWCaptureSpy.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWChangeMatcher.h b/Pods/BuildHeaders/Kiwi/KWChangeMatcher.h index da16244e..be6e80b0 120000 --- a/Pods/BuildHeaders/Kiwi/KWChangeMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWChangeMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWChangeMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWChangeMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWConformToProtocolMatcher.h b/Pods/BuildHeaders/Kiwi/KWConformToProtocolMatcher.h index c4512e33..749ed755 120000 --- a/Pods/BuildHeaders/Kiwi/KWConformToProtocolMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWConformToProtocolMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWConformToProtocolMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWConformToProtocolMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWContainMatcher.h b/Pods/BuildHeaders/Kiwi/KWContainMatcher.h index 3b564a74..672fd9fd 120000 --- a/Pods/BuildHeaders/Kiwi/KWContainMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWContainMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWContainMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWContainMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWContainStringMatcher.h b/Pods/BuildHeaders/Kiwi/KWContainStringMatcher.h index 2eae470d..3ee51f0d 120000 --- a/Pods/BuildHeaders/Kiwi/KWContainStringMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWContainStringMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWContainStringMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWContainStringMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWContextNode.h b/Pods/BuildHeaders/Kiwi/KWContextNode.h index 367e4497..7f72f768 120000 --- a/Pods/BuildHeaders/Kiwi/KWContextNode.h +++ b/Pods/BuildHeaders/Kiwi/KWContextNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWContextNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWContextNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWCountType.h b/Pods/BuildHeaders/Kiwi/KWCountType.h index f48c43f5..1f022278 120000 --- a/Pods/BuildHeaders/Kiwi/KWCountType.h +++ b/Pods/BuildHeaders/Kiwi/KWCountType.h @@ -1 +1 @@ -../../Kiwi/Classes/KWCountType.h \ No newline at end of file +../../Kiwi/Classes/Core/KWCountType.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWDeviceInfo.h b/Pods/BuildHeaders/Kiwi/KWDeviceInfo.h index ad0e2df9..3e3bb0cb 120000 --- a/Pods/BuildHeaders/Kiwi/KWDeviceInfo.h +++ b/Pods/BuildHeaders/Kiwi/KWDeviceInfo.h @@ -1 +1 @@ -../../Kiwi/Classes/KWDeviceInfo.h \ No newline at end of file +../../Kiwi/Classes/Core/KWDeviceInfo.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWEqualMatcher.h b/Pods/BuildHeaders/Kiwi/KWEqualMatcher.h index d55c9324..e8426758 120000 --- a/Pods/BuildHeaders/Kiwi/KWEqualMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWEqualMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWEqualMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWEqualMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWExample.h b/Pods/BuildHeaders/Kiwi/KWExample.h index 7c20cd1b..01414923 120000 --- a/Pods/BuildHeaders/Kiwi/KWExample.h +++ b/Pods/BuildHeaders/Kiwi/KWExample.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExample.h \ No newline at end of file +../../Kiwi/Classes/Core/KWExample.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWExampleDelegate.h b/Pods/BuildHeaders/Kiwi/KWExampleDelegate.h new file mode 120000 index 00000000..0e139351 --- /dev/null +++ b/Pods/BuildHeaders/Kiwi/KWExampleDelegate.h @@ -0,0 +1 @@ +../../Kiwi/Classes/Core/KWExampleDelegate.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWExampleGroupBuilder.h b/Pods/BuildHeaders/Kiwi/KWExampleGroupBuilder.h deleted file mode 120000 index 0fe8c739..00000000 --- a/Pods/BuildHeaders/Kiwi/KWExampleGroupBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Kiwi/Classes/KWExampleGroupBuilder.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWExampleGroupDelegate.h b/Pods/BuildHeaders/Kiwi/KWExampleGroupDelegate.h deleted file mode 120000 index 0ed4e5e2..00000000 --- a/Pods/BuildHeaders/Kiwi/KWExampleGroupDelegate.h +++ /dev/null @@ -1 +0,0 @@ -../../Kiwi/Classes/KWExampleGroupDelegate.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWExampleNode.h b/Pods/BuildHeaders/Kiwi/KWExampleNode.h index 261f5073..6fd17907 120000 --- a/Pods/BuildHeaders/Kiwi/KWExampleNode.h +++ b/Pods/BuildHeaders/Kiwi/KWExampleNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExampleNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWExampleNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWExampleNodeVisitor.h b/Pods/BuildHeaders/Kiwi/KWExampleNodeVisitor.h index 3d7f7d8d..0347cd98 120000 --- a/Pods/BuildHeaders/Kiwi/KWExampleNodeVisitor.h +++ b/Pods/BuildHeaders/Kiwi/KWExampleNodeVisitor.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExampleNodeVisitor.h \ No newline at end of file +../../Kiwi/Classes/Core/KWExampleNodeVisitor.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWExampleSuite.h b/Pods/BuildHeaders/Kiwi/KWExampleSuite.h index fc621509..849831b5 120000 --- a/Pods/BuildHeaders/Kiwi/KWExampleSuite.h +++ b/Pods/BuildHeaders/Kiwi/KWExampleSuite.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExampleSuite.h \ No newline at end of file +../../Kiwi/Classes/Core/KWExampleSuite.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWExampleSuiteBuilder.h b/Pods/BuildHeaders/Kiwi/KWExampleSuiteBuilder.h new file mode 120000 index 00000000..84f06e28 --- /dev/null +++ b/Pods/BuildHeaders/Kiwi/KWExampleSuiteBuilder.h @@ -0,0 +1 @@ +../../Kiwi/Classes/Core/KWExampleSuiteBuilder.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWExistVerifier.h b/Pods/BuildHeaders/Kiwi/KWExistVerifier.h index fefc7316..3f0dc32e 120000 --- a/Pods/BuildHeaders/Kiwi/KWExistVerifier.h +++ b/Pods/BuildHeaders/Kiwi/KWExistVerifier.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExistVerifier.h \ No newline at end of file +../../Kiwi/Classes/Verifiers/KWExistVerifier.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWExpectationType.h b/Pods/BuildHeaders/Kiwi/KWExpectationType.h index bb33bfcc..216d889a 120000 --- a/Pods/BuildHeaders/Kiwi/KWExpectationType.h +++ b/Pods/BuildHeaders/Kiwi/KWExpectationType.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExpectationType.h \ No newline at end of file +../../Kiwi/Classes/Core/KWExpectationType.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWFailure.h b/Pods/BuildHeaders/Kiwi/KWFailure.h index b55a3bcd..2b5a88d8 120000 --- a/Pods/BuildHeaders/Kiwi/KWFailure.h +++ b/Pods/BuildHeaders/Kiwi/KWFailure.h @@ -1 +1 @@ -../../Kiwi/Classes/KWFailure.h \ No newline at end of file +../../Kiwi/Classes/Core/KWFailure.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWFormatter.h b/Pods/BuildHeaders/Kiwi/KWFormatter.h index 80c47df4..234fa846 120000 --- a/Pods/BuildHeaders/Kiwi/KWFormatter.h +++ b/Pods/BuildHeaders/Kiwi/KWFormatter.h @@ -1 +1 @@ -../../Kiwi/Classes/KWFormatter.h \ No newline at end of file +../../Kiwi/Classes/Core/KWFormatter.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWFutureObject.h b/Pods/BuildHeaders/Kiwi/KWFutureObject.h index 401eaf06..e1e18065 120000 --- a/Pods/BuildHeaders/Kiwi/KWFutureObject.h +++ b/Pods/BuildHeaders/Kiwi/KWFutureObject.h @@ -1 +1 @@ -../../Kiwi/Classes/KWFutureObject.h \ No newline at end of file +../../Kiwi/Classes/Core/KWFutureObject.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWGenericMatchEvaluator.h b/Pods/BuildHeaders/Kiwi/KWGenericMatchEvaluator.h index c3aeaecd..e47bfc23 120000 --- a/Pods/BuildHeaders/Kiwi/KWGenericMatchEvaluator.h +++ b/Pods/BuildHeaders/Kiwi/KWGenericMatchEvaluator.h @@ -1 +1 @@ -../../Kiwi/Classes/KWGenericMatchEvaluator.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWGenericMatchEvaluator.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWGenericMatcher.h b/Pods/BuildHeaders/Kiwi/KWGenericMatcher.h index 5c48a70b..ed0db0e2 120000 --- a/Pods/BuildHeaders/Kiwi/KWGenericMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWGenericMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWGenericMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWGenericMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWGenericMatchingAdditions.h b/Pods/BuildHeaders/Kiwi/KWGenericMatchingAdditions.h index 61c0fcd8..4b296a21 120000 --- a/Pods/BuildHeaders/Kiwi/KWGenericMatchingAdditions.h +++ b/Pods/BuildHeaders/Kiwi/KWGenericMatchingAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/KWGenericMatchingAdditions.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWGenericMatchingAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWHaveMatcher.h b/Pods/BuildHeaders/Kiwi/KWHaveMatcher.h index c2bd2831..6603a8db 120000 --- a/Pods/BuildHeaders/Kiwi/KWHaveMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWHaveMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWHaveMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWHaveMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWHaveValueMatcher.h b/Pods/BuildHeaders/Kiwi/KWHaveValueMatcher.h index 19b108be..aa68353d 120000 --- a/Pods/BuildHeaders/Kiwi/KWHaveValueMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWHaveValueMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWHaveValueMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWHaveValueMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWInequalityMatcher.h b/Pods/BuildHeaders/Kiwi/KWInequalityMatcher.h index 8d85cb4c..563f2990 120000 --- a/Pods/BuildHeaders/Kiwi/KWInequalityMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWInequalityMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWInequalityMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWInequalityMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWIntercept.h b/Pods/BuildHeaders/Kiwi/KWIntercept.h index b9fae629..5aab538c 120000 --- a/Pods/BuildHeaders/Kiwi/KWIntercept.h +++ b/Pods/BuildHeaders/Kiwi/KWIntercept.h @@ -1 +1 @@ -../../Kiwi/Classes/KWIntercept.h \ No newline at end of file +../../Kiwi/NonARC/KWIntercept.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWInvocationCapturer.h b/Pods/BuildHeaders/Kiwi/KWInvocationCapturer.h index 383f8e86..786c20db 120000 --- a/Pods/BuildHeaders/Kiwi/KWInvocationCapturer.h +++ b/Pods/BuildHeaders/Kiwi/KWInvocationCapturer.h @@ -1 +1 @@ -../../Kiwi/Classes/KWInvocationCapturer.h \ No newline at end of file +../../Kiwi/Classes/Core/KWInvocationCapturer.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWItNode.h b/Pods/BuildHeaders/Kiwi/KWItNode.h index 37b3ed5c..115be894 120000 --- a/Pods/BuildHeaders/Kiwi/KWItNode.h +++ b/Pods/BuildHeaders/Kiwi/KWItNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWItNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWItNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWMatchVerifier.h b/Pods/BuildHeaders/Kiwi/KWMatchVerifier.h index 78de3b22..741e295d 120000 --- a/Pods/BuildHeaders/Kiwi/KWMatchVerifier.h +++ b/Pods/BuildHeaders/Kiwi/KWMatchVerifier.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMatchVerifier.h \ No newline at end of file +../../Kiwi/Classes/Verifiers/KWMatchVerifier.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWMatcher.h b/Pods/BuildHeaders/Kiwi/KWMatcher.h index a3869b44..6d1fda1a 120000 --- a/Pods/BuildHeaders/Kiwi/KWMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMatcher.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWMatcherFactory.h b/Pods/BuildHeaders/Kiwi/KWMatcherFactory.h index d6ef256a..053ae051 120000 --- a/Pods/BuildHeaders/Kiwi/KWMatcherFactory.h +++ b/Pods/BuildHeaders/Kiwi/KWMatcherFactory.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMatcherFactory.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMatcherFactory.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWMatchers.h b/Pods/BuildHeaders/Kiwi/KWMatchers.h index 121cbff1..37dc93d8 120000 --- a/Pods/BuildHeaders/Kiwi/KWMatchers.h +++ b/Pods/BuildHeaders/Kiwi/KWMatchers.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMatchers.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMatchers.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWMatching.h b/Pods/BuildHeaders/Kiwi/KWMatching.h index b46afda0..5094f6ce 120000 --- a/Pods/BuildHeaders/Kiwi/KWMatching.h +++ b/Pods/BuildHeaders/Kiwi/KWMatching.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMatching.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMatching.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWMessagePattern.h b/Pods/BuildHeaders/Kiwi/KWMessagePattern.h index 00983f2d..7db1ee20 120000 --- a/Pods/BuildHeaders/Kiwi/KWMessagePattern.h +++ b/Pods/BuildHeaders/Kiwi/KWMessagePattern.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMessagePattern.h \ No newline at end of file +../../Kiwi/NonARC/KWMessagePattern.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWMessageSpying.h b/Pods/BuildHeaders/Kiwi/KWMessageSpying.h index 31fb60e6..f2b7dc0d 120000 --- a/Pods/BuildHeaders/Kiwi/KWMessageSpying.h +++ b/Pods/BuildHeaders/Kiwi/KWMessageSpying.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMessageSpying.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMessageSpying.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWMessageTracker.h b/Pods/BuildHeaders/Kiwi/KWMessageTracker.h index af301a13..0529de79 120000 --- a/Pods/BuildHeaders/Kiwi/KWMessageTracker.h +++ b/Pods/BuildHeaders/Kiwi/KWMessageTracker.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMessageTracker.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMessageTracker.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWMock.h b/Pods/BuildHeaders/Kiwi/KWMock.h index 5d2b6887..d07edac9 120000 --- a/Pods/BuildHeaders/Kiwi/KWMock.h +++ b/Pods/BuildHeaders/Kiwi/KWMock.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMock.h \ No newline at end of file +../../Kiwi/Classes/Mocking/KWMock.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWNilMatcher.h b/Pods/BuildHeaders/Kiwi/KWNilMatcher.h new file mode 120000 index 00000000..fbe052f1 --- /dev/null +++ b/Pods/BuildHeaders/Kiwi/KWNilMatcher.h @@ -0,0 +1 @@ +../../Kiwi/Classes/Matchers/KWNilMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWNull.h b/Pods/BuildHeaders/Kiwi/KWNull.h index 3a8677c9..af2cb10c 120000 --- a/Pods/BuildHeaders/Kiwi/KWNull.h +++ b/Pods/BuildHeaders/Kiwi/KWNull.h @@ -1 +1 @@ -../../Kiwi/Classes/KWNull.h \ No newline at end of file +../../Kiwi/Classes/Core/KWNull.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWObjCUtilities.h b/Pods/BuildHeaders/Kiwi/KWObjCUtilities.h index f9c04a29..f6cc0b91 120000 --- a/Pods/BuildHeaders/Kiwi/KWObjCUtilities.h +++ b/Pods/BuildHeaders/Kiwi/KWObjCUtilities.h @@ -1 +1 @@ -../../Kiwi/Classes/KWObjCUtilities.h \ No newline at end of file +../../Kiwi/Classes/Core/KWObjCUtilities.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWPendingNode.h b/Pods/BuildHeaders/Kiwi/KWPendingNode.h index 6a2a4ab1..7ff39e4f 120000 --- a/Pods/BuildHeaders/Kiwi/KWPendingNode.h +++ b/Pods/BuildHeaders/Kiwi/KWPendingNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWPendingNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWPendingNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWProbe.h b/Pods/BuildHeaders/Kiwi/KWProbe.h index 8eae9947..d6cdabbb 120000 --- a/Pods/BuildHeaders/Kiwi/KWProbe.h +++ b/Pods/BuildHeaders/Kiwi/KWProbe.h @@ -1 +1 @@ -../../Kiwi/Classes/KWProbe.h \ No newline at end of file +../../Kiwi/Classes/Core/KWProbe.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWProbePoller.h b/Pods/BuildHeaders/Kiwi/KWProbePoller.h index 852d35e4..a1aee4ca 120000 --- a/Pods/BuildHeaders/Kiwi/KWProbePoller.h +++ b/Pods/BuildHeaders/Kiwi/KWProbePoller.h @@ -1 +1 @@ -../../Kiwi/Classes/KWProbePoller.h \ No newline at end of file +../../Kiwi/Classes/Core/KWProbePoller.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWRaiseMatcher.h b/Pods/BuildHeaders/Kiwi/KWRaiseMatcher.h index bdcd8ae6..4f4b4d92 120000 --- a/Pods/BuildHeaders/Kiwi/KWRaiseMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWRaiseMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWRaiseMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWRaiseMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWReceiveMatcher.h b/Pods/BuildHeaders/Kiwi/KWReceiveMatcher.h index 5dfb172d..c7c16f0f 120000 --- a/Pods/BuildHeaders/Kiwi/KWReceiveMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWReceiveMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWReceiveMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWReceiveMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWRegisterMatchersNode.h b/Pods/BuildHeaders/Kiwi/KWRegisterMatchersNode.h index 6ee09af7..0d88f5df 120000 --- a/Pods/BuildHeaders/Kiwi/KWRegisterMatchersNode.h +++ b/Pods/BuildHeaders/Kiwi/KWRegisterMatchersNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWRegisterMatchersNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWRegisterMatchersNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWRegularExpressionPatternMatcher.h b/Pods/BuildHeaders/Kiwi/KWRegularExpressionPatternMatcher.h index c9b56b5d..322e8d11 120000 --- a/Pods/BuildHeaders/Kiwi/KWRegularExpressionPatternMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWRegularExpressionPatternMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWRegularExpressionPatternMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWRegularExpressionPatternMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWReporting.h b/Pods/BuildHeaders/Kiwi/KWReporting.h index 76724b40..d220f49c 120000 --- a/Pods/BuildHeaders/Kiwi/KWReporting.h +++ b/Pods/BuildHeaders/Kiwi/KWReporting.h @@ -1 +1 @@ -../../Kiwi/Classes/KWReporting.h \ No newline at end of file +../../Kiwi/Classes/Core/KWReporting.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWRespondToSelectorMatcher.h b/Pods/BuildHeaders/Kiwi/KWRespondToSelectorMatcher.h index 638ffc9b..53da1b3d 120000 --- a/Pods/BuildHeaders/Kiwi/KWRespondToSelectorMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWRespondToSelectorMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWRespondToSelectorMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWRespondToSelectorMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWSpec.h b/Pods/BuildHeaders/Kiwi/KWSpec.h index 01ff65d9..b35172e7 120000 --- a/Pods/BuildHeaders/Kiwi/KWSpec.h +++ b/Pods/BuildHeaders/Kiwi/KWSpec.h @@ -1 +1 @@ -../../Kiwi/Classes/KWSpec.h \ No newline at end of file +../../Kiwi/Classes/Core/KWSpec.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWStringContainsMatcher.h b/Pods/BuildHeaders/Kiwi/KWStringContainsMatcher.h index 31a35fa8..43c9cd42 120000 --- a/Pods/BuildHeaders/Kiwi/KWStringContainsMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWStringContainsMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWStringContainsMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWStringContainsMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWStringPrefixMatcher.h b/Pods/BuildHeaders/Kiwi/KWStringPrefixMatcher.h index 6332ce41..351d3e72 120000 --- a/Pods/BuildHeaders/Kiwi/KWStringPrefixMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWStringPrefixMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWStringPrefixMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWStringPrefixMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWStringUtilities.h b/Pods/BuildHeaders/Kiwi/KWStringUtilities.h index c6b107f1..e6225dc8 120000 --- a/Pods/BuildHeaders/Kiwi/KWStringUtilities.h +++ b/Pods/BuildHeaders/Kiwi/KWStringUtilities.h @@ -1 +1 @@ -../../Kiwi/Classes/KWStringUtilities.h \ No newline at end of file +../../Kiwi/Classes/Core/KWStringUtilities.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWStub.h b/Pods/BuildHeaders/Kiwi/KWStub.h index 38e5d0dc..6c8519fd 120000 --- a/Pods/BuildHeaders/Kiwi/KWStub.h +++ b/Pods/BuildHeaders/Kiwi/KWStub.h @@ -1 +1 @@ -../../Kiwi/Classes/KWStub.h \ No newline at end of file +../../Kiwi/NonARC/KWStub.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWSymbolicator.h b/Pods/BuildHeaders/Kiwi/KWSymbolicator.h index 0f442f62..2bc8b59f 120000 --- a/Pods/BuildHeaders/Kiwi/KWSymbolicator.h +++ b/Pods/BuildHeaders/Kiwi/KWSymbolicator.h @@ -1 +1 @@ -../../Kiwi/Classes/KWSymbolicator.h \ No newline at end of file +../../Kiwi/NonARC/KWSymbolicator.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWTestCase.h b/Pods/BuildHeaders/Kiwi/KWTestCase.h deleted file mode 120000 index 04096f4a..00000000 --- a/Pods/BuildHeaders/Kiwi/KWTestCase.h +++ /dev/null @@ -1 +0,0 @@ -../../Kiwi/Classes/KWTestCase.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWUserDefinedMatcher.h b/Pods/BuildHeaders/Kiwi/KWUserDefinedMatcher.h index e6a74c19..241b176a 120000 --- a/Pods/BuildHeaders/Kiwi/KWUserDefinedMatcher.h +++ b/Pods/BuildHeaders/Kiwi/KWUserDefinedMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWUserDefinedMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWUserDefinedMatcher.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWValue.h b/Pods/BuildHeaders/Kiwi/KWValue.h index 1546da51..f5aabfb5 120000 --- a/Pods/BuildHeaders/Kiwi/KWValue.h +++ b/Pods/BuildHeaders/Kiwi/KWValue.h @@ -1 +1 @@ -../../Kiwi/Classes/KWValue.h \ No newline at end of file +../../Kiwi/Classes/Core/KWValue.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWVerifying.h b/Pods/BuildHeaders/Kiwi/KWVerifying.h index 7e7e7f32..10c41b73 120000 --- a/Pods/BuildHeaders/Kiwi/KWVerifying.h +++ b/Pods/BuildHeaders/Kiwi/KWVerifying.h @@ -1 +1 @@ -../../Kiwi/Classes/KWVerifying.h \ No newline at end of file +../../Kiwi/Classes/Verifiers/KWVerifying.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KWWorkarounds.h b/Pods/BuildHeaders/Kiwi/KWWorkarounds.h index 4535bdc0..5394bed7 120000 --- a/Pods/BuildHeaders/Kiwi/KWWorkarounds.h +++ b/Pods/BuildHeaders/Kiwi/KWWorkarounds.h @@ -1 +1 @@ -../../Kiwi/Classes/KWWorkarounds.h \ No newline at end of file +../../Kiwi/Classes/Core/KWWorkarounds.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/Kiwi.h b/Pods/BuildHeaders/Kiwi/Kiwi.h index 2a5426ef..90584f1e 120000 --- a/Pods/BuildHeaders/Kiwi/Kiwi.h +++ b/Pods/BuildHeaders/Kiwi/Kiwi.h @@ -1 +1 @@ -../../Kiwi/Classes/Kiwi.h \ No newline at end of file +../../Kiwi/Classes/Core/Kiwi.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KiwiBlockMacros.h b/Pods/BuildHeaders/Kiwi/KiwiBlockMacros.h index 04077045..c0407583 120000 --- a/Pods/BuildHeaders/Kiwi/KiwiBlockMacros.h +++ b/Pods/BuildHeaders/Kiwi/KiwiBlockMacros.h @@ -1 +1 @@ -../../Kiwi/Classes/KiwiBlockMacros.h \ No newline at end of file +../../Kiwi/Classes/Core/KiwiBlockMacros.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KiwiConfiguration.h b/Pods/BuildHeaders/Kiwi/KiwiConfiguration.h index e5928521..cdd209e3 120000 --- a/Pods/BuildHeaders/Kiwi/KiwiConfiguration.h +++ b/Pods/BuildHeaders/Kiwi/KiwiConfiguration.h @@ -1 +1 @@ -../../Kiwi/Classes/KiwiConfiguration.h \ No newline at end of file +../../Kiwi/Classes/Core/KiwiConfiguration.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/KiwiMacros.h b/Pods/BuildHeaders/Kiwi/KiwiMacros.h index eb8ad23d..936b3590 120000 --- a/Pods/BuildHeaders/Kiwi/KiwiMacros.h +++ b/Pods/BuildHeaders/Kiwi/KiwiMacros.h @@ -1 +1 @@ -../../Kiwi/Classes/KiwiMacros.h \ No newline at end of file +../../Kiwi/Classes/Core/KiwiMacros.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/NSInvocation+KiwiAdditions.h b/Pods/BuildHeaders/Kiwi/NSInvocation+KiwiAdditions.h index 0a19c57e..216b70b1 120000 --- a/Pods/BuildHeaders/Kiwi/NSInvocation+KiwiAdditions.h +++ b/Pods/BuildHeaders/Kiwi/NSInvocation+KiwiAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSInvocation+KiwiAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSInvocation+KiwiAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/NSInvocation+OCMAdditions.h b/Pods/BuildHeaders/Kiwi/NSInvocation+OCMAdditions.h index 1816d66e..5d505e9a 120000 --- a/Pods/BuildHeaders/Kiwi/NSInvocation+OCMAdditions.h +++ b/Pods/BuildHeaders/Kiwi/NSInvocation+OCMAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSInvocation+OCMAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSInvocation+OCMAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/NSMethodSignature+KiwiAdditions.h b/Pods/BuildHeaders/Kiwi/NSMethodSignature+KiwiAdditions.h index 83429ba5..816f65b7 120000 --- a/Pods/BuildHeaders/Kiwi/NSMethodSignature+KiwiAdditions.h +++ b/Pods/BuildHeaders/Kiwi/NSMethodSignature+KiwiAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSMethodSignature+KiwiAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSMethodSignature+KiwiAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/NSNumber+KiwiAdditions.h b/Pods/BuildHeaders/Kiwi/NSNumber+KiwiAdditions.h index 48e23543..aa1be1c1 120000 --- a/Pods/BuildHeaders/Kiwi/NSNumber+KiwiAdditions.h +++ b/Pods/BuildHeaders/Kiwi/NSNumber+KiwiAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSNumber+KiwiAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSNumber+KiwiAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/NSObject+KiwiMockAdditions.h b/Pods/BuildHeaders/Kiwi/NSObject+KiwiMockAdditions.h index 32160c6d..eba045f0 120000 --- a/Pods/BuildHeaders/Kiwi/NSObject+KiwiMockAdditions.h +++ b/Pods/BuildHeaders/Kiwi/NSObject+KiwiMockAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSObject+KiwiMockAdditions.h \ No newline at end of file +../../Kiwi/Classes/Mocking/NSObject+KiwiMockAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/NSObject+KiwiSpyAdditions.h b/Pods/BuildHeaders/Kiwi/NSObject+KiwiSpyAdditions.h index 4da2d797..9746eafd 120000 --- a/Pods/BuildHeaders/Kiwi/NSObject+KiwiSpyAdditions.h +++ b/Pods/BuildHeaders/Kiwi/NSObject+KiwiSpyAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSObject+KiwiSpyAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSObject+KiwiSpyAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/NSObject+KiwiStubAdditions.h b/Pods/BuildHeaders/Kiwi/NSObject+KiwiStubAdditions.h index a64ea2c1..09dc8adc 120000 --- a/Pods/BuildHeaders/Kiwi/NSObject+KiwiStubAdditions.h +++ b/Pods/BuildHeaders/Kiwi/NSObject+KiwiStubAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSObject+KiwiStubAdditions.h \ No newline at end of file +../../Kiwi/Classes/Stubbing/NSObject+KiwiStubAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/NSObject+KiwiVerifierAdditions.h b/Pods/BuildHeaders/Kiwi/NSObject+KiwiVerifierAdditions.h index 68f6f438..9def95d7 120000 --- a/Pods/BuildHeaders/Kiwi/NSObject+KiwiVerifierAdditions.h +++ b/Pods/BuildHeaders/Kiwi/NSObject+KiwiVerifierAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSObject+KiwiVerifierAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSObject+KiwiVerifierAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/NSProxy+KiwiVerifierAdditions.h b/Pods/BuildHeaders/Kiwi/NSProxy+KiwiVerifierAdditions.h index 1e078742..f58050df 120000 --- a/Pods/BuildHeaders/Kiwi/NSProxy+KiwiVerifierAdditions.h +++ b/Pods/BuildHeaders/Kiwi/NSProxy+KiwiVerifierAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSProxy+KiwiVerifierAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSProxy+KiwiVerifierAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/NSValue+KiwiAdditions.h b/Pods/BuildHeaders/Kiwi/NSValue+KiwiAdditions.h index 5b157129..e411b0c8 120000 --- a/Pods/BuildHeaders/Kiwi/NSValue+KiwiAdditions.h +++ b/Pods/BuildHeaders/Kiwi/NSValue+KiwiAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSValue+KiwiAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSValue+KiwiAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Kiwi/SenTestSuite+KiwiAdditions.h b/Pods/BuildHeaders/Kiwi/SenTestSuite+KiwiAdditions.h index 67fee890..e1e643a7 120000 --- a/Pods/BuildHeaders/Kiwi/SenTestSuite+KiwiAdditions.h +++ b/Pods/BuildHeaders/Kiwi/SenTestSuite+KiwiAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/SenTestSuite+KiwiAdditions.h \ No newline at end of file +../../Kiwi/SenTestingKit/SenTestSuite+KiwiAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubs.h b/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubs.h index ddea87e2..c1b5c94e 120000 --- a/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubs.h +++ b/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubs.h @@ -1 +1 @@ -../../OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.h \ No newline at end of file +../../OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h \ No newline at end of file diff --git a/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse+HTTPMessage.h b/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse+HTTPMessage.h new file mode 120000 index 00000000..c7dea8a5 --- /dev/null +++ b/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse+HTTPMessage.h @@ -0,0 +1 @@ +../../OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+HTTPMessage.h \ No newline at end of file diff --git a/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse+JSON.h b/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse+JSON.h new file mode 120000 index 00000000..078fe3df --- /dev/null +++ b/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse+JSON.h @@ -0,0 +1 @@ +../../OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.h \ No newline at end of file diff --git a/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse.h b/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse.h index fe2a9462..bfce4e4b 120000 --- a/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse.h +++ b/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse.h @@ -1 +1 @@ -../../OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.h \ No newline at end of file +../../OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/RACObjCRuntime.h b/Pods/BuildHeaders/ReactiveCocoa/RACObjCRuntime.h new file mode 120000 index 00000000..ed85580d --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/RACObjCRuntime.h @@ -0,0 +1 @@ +../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSArray+RACSequenceAdditions.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSArray+RACSequenceAdditions.h new file mode 120000 index 00000000..d483f628 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSArray+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSArray+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSData+RACSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSData+RACSupport.h new file mode 120000 index 00000000..792279d3 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSData+RACSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSData+RACSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h new file mode 120000 index 00000000..bbd102d9 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h new file mode 120000 index 00000000..62cd0258 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSFileHandle+RACSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSFileHandle+RACSupport.h new file mode 120000 index 00000000..051e192f --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSFileHandle+RACSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSFileHandle+RACSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSInvocation+RACTypeParsing.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSInvocation+RACTypeParsing.h new file mode 120000 index 00000000..1aa061d0 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSInvocation+RACTypeParsing.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSInvocation+RACTypeParsing.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSNotificationCenter+RACSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSNotificationCenter+RACSupport.h new file mode 120000 index 00000000..2cc66960 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSNotificationCenter+RACSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSNotificationCenter+RACSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACDeallocating.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACDeallocating.h new file mode 120000 index 00000000..1c593905 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACDeallocating.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDeallocating.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACDescription.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACDescription.h new file mode 120000 index 00000000..6398be58 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACDescription.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDescription.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.h new file mode 120000 index 00000000..483ec955 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACKVOWrapper.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACLifting.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACLifting.h new file mode 120000 index 00000000..b50f89fe --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACLifting.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACPropertySubscribing.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACPropertySubscribing.h new file mode 120000 index 00000000..bcfb7499 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACPropertySubscribing.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACPropertySubscribing.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACSelectorSignal.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACSelectorSignal.h new file mode 120000 index 00000000..3693dd5d --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSObject+RACSelectorSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACSelectorSignal.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h new file mode 120000 index 00000000..27b912c9 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSSet+RACSequenceAdditions.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSSet+RACSequenceAdditions.h new file mode 120000 index 00000000..2a63c51c --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSSet+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSSet+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSString+RACKeyPathUtilities.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSString+RACKeyPathUtilities.h new file mode 120000 index 00000000..5240f714 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSString+RACKeyPathUtilities.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACKeyPathUtilities.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSString+RACSequenceAdditions.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSString+RACSequenceAdditions.h new file mode 120000 index 00000000..95b24f28 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSString+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSString+RACSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSString+RACSupport.h new file mode 120000 index 00000000..ec99678b --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSString+RACSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSURLConnection+RACSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSURLConnection+RACSupport.h new file mode 120000 index 00000000..439fa69a --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/NSURLConnection+RACSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSURLConnection+RACSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACArraySequence.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACArraySequence.h new file mode 120000 index 00000000..86205094 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACArraySequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACArraySequence.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACBacktrace.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACBacktrace.h new file mode 120000 index 00000000..0ab8ceb8 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACBacktrace.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBacktrace.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACBehaviorSubject.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACBehaviorSubject.h new file mode 120000 index 00000000..3d7e251d --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACBehaviorSubject.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBehaviorSubject.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACBlockTrampoline.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACBlockTrampoline.h new file mode 120000 index 00000000..85af616a --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACBlockTrampoline.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBlockTrampoline.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACChannel.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACChannel.h new file mode 120000 index 00000000..2e0294b9 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACChannel.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACChannel.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACCommand.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACCommand.h new file mode 120000 index 00000000..51f2e7b6 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACCommand.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCommand.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACCompoundDisposable.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACCompoundDisposable.h new file mode 120000 index 00000000..a3aa6140 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACCompoundDisposable.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposable.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDelegateProxy.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDelegateProxy.h new file mode 120000 index 00000000..017bab38 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDelegateProxy.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDelegateProxy.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDisposable.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDisposable.h new file mode 120000 index 00000000..321d2cef --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDisposable.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDynamicSequence.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDynamicSequence.h new file mode 120000 index 00000000..71eadc71 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDynamicSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSequence.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDynamicSignal.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDynamicSignal.h new file mode 120000 index 00000000..8fe338be --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACDynamicSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSignal.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEXTKeyPathCoding.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEXTKeyPathCoding.h new file mode 120000 index 00000000..d4c111b2 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEXTKeyPathCoding.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTKeyPathCoding.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEXTRuntimeExtensions.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEXTRuntimeExtensions.h new file mode 120000 index 00000000..13ff8429 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEXTRuntimeExtensions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTRuntimeExtensions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEXTScope.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEXTScope.h new file mode 120000 index 00000000..f0af58e0 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEXTScope.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTScope.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEagerSequence.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEagerSequence.h new file mode 120000 index 00000000..9680c7ab --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEagerSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEagerSequence.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEmptySequence.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEmptySequence.h new file mode 120000 index 00000000..bfb47325 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEmptySequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySequence.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEmptySignal.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEmptySignal.h new file mode 120000 index 00000000..70abee6e --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEmptySignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySignal.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACErrorSignal.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACErrorSignal.h new file mode 120000 index 00000000..04261d13 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACErrorSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACErrorSignal.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEvent.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEvent.h new file mode 120000 index 00000000..159e888d --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACEvent.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEvent.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACGroupedSignal.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACGroupedSignal.h new file mode 120000 index 00000000..4c454aaf --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACGroupedSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACGroupedSignal.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACImmediateScheduler.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACImmediateScheduler.h new file mode 120000 index 00000000..1bcb87b7 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACImmediateScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACImmediateScheduler.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACKVOChannel.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACKVOChannel.h new file mode 120000 index 00000000..70319d27 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACKVOChannel.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOChannel.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACKVOTrampoline.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACKVOTrampoline.h new file mode 120000 index 00000000..e6092790 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACKVOTrampoline.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOTrampoline.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection+Private.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection+Private.h new file mode 120000 index 00000000..1ff80204 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection+Private.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection+Private.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection.h new file mode 120000 index 00000000..bcc72f01 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACPassthroughSubscriber.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACPassthroughSubscriber.h new file mode 120000 index 00000000..8255a672 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACPassthroughSubscriber.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACPassthroughSubscriber.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler+Subclass.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler+Subclass.h new file mode 120000 index 00000000..2df1574b --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler+Subclass.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler+Subclass.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler.h new file mode 120000 index 00000000..c3cd6c99 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACReplaySubject.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACReplaySubject.h new file mode 120000 index 00000000..ad35864c --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACReplaySubject.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReplaySubject.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACReturnSignal.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACReturnSignal.h new file mode 120000 index 00000000..9d94ffce --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACReturnSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReturnSignal.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACScheduler+Private.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACScheduler+Private.h new file mode 120000 index 00000000..9a2ee197 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACScheduler+Private.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler+Private.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACScheduler.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACScheduler.h new file mode 120000 index 00000000..d12e38a5 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACScopedDisposable.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACScopedDisposable.h new file mode 120000 index 00000000..f8f3aa87 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACScopedDisposable.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScopedDisposable.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSequence.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSequence.h new file mode 120000 index 00000000..64ec6092 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSequence.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSerialDisposable.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSerialDisposable.h new file mode 120000 index 00000000..9a7ee27f --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSerialDisposable.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSerialDisposable.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSignal+Operations.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSignal+Operations.h new file mode 120000 index 00000000..68992d5c --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSignal+Operations.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSignal.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSignal.h new file mode 120000 index 00000000..30b3dd7a --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSignalSequence.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSignalSequence.h new file mode 120000 index 00000000..56bf5c1e --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSignalSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalSequence.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACStream+Private.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACStream+Private.h new file mode 120000 index 00000000..15ea9270 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACStream+Private.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream+Private.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACStream.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACStream.h new file mode 120000 index 00000000..ff066205 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACStream.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACStringSequence.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACStringSequence.h new file mode 120000 index 00000000..73ac6501 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACStringSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStringSequence.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubject.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubject.h new file mode 120000 index 00000000..e1f2bb01 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubject.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubject.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriber+Private.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriber+Private.h new file mode 120000 index 00000000..6cda6038 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriber+Private.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber+Private.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriber.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriber.h new file mode 120000 index 00000000..5d36efca --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriber.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h new file mode 120000 index 00000000..b4f4d37e --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriptionScheduler.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriptionScheduler.h new file mode 120000 index 00000000..bc66909c --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACSubscriptionScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptionScheduler.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTargetQueueScheduler.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTargetQueueScheduler.h new file mode 120000 index 00000000..696d5bb4 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTargetQueueScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTargetQueueScheduler.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTestScheduler.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTestScheduler.h new file mode 120000 index 00000000..72d525cd --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTestScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTestScheduler.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTuple.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTuple.h new file mode 120000 index 00000000..0fd18d66 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTuple.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTuple.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTupleSequence.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTupleSequence.h new file mode 120000 index 00000000..cd59437a --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACTupleSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTupleSequence.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACUnarySequence.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACUnarySequence.h new file mode 120000 index 00000000..99dd034e --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACUnarySequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnarySequence.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACUnit.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACUnit.h new file mode 120000 index 00000000..617a4316 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACUnit.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnit.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACValueTransformer.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACValueTransformer.h new file mode 120000 index 00000000..1b6e4345 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACValueTransformer.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACValueTransformer.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACmetamacros.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACmetamacros.h new file mode 120000 index 00000000..631220ef --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/RACmetamacros.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACmetamacros.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h new file mode 120000 index 00000000..9a1ff24c --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/ReactiveCocoa.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIActionSheet+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIActionSheet+RACSignalSupport.h new file mode 120000 index 00000000..9c68b99c --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIActionSheet+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIAlertView+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIAlertView+RACSignalSupport.h new file mode 120000 index 00000000..07a76a05 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIAlertView+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIAlertView+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h new file mode 120000 index 00000000..8ec0050f --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIButton+RACCommandSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIButton+RACCommandSupport.h new file mode 120000 index 00000000..b3293260 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIButton+RACCommandSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIButton+RACCommandSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h new file mode 120000 index 00000000..c4099a98 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupport.h new file mode 120000 index 00000000..270404bd --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h new file mode 120000 index 00000000..f916e5a0 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIDatePicker+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIDatePicker+RACSignalSupport.h new file mode 120000 index 00000000..9deca0fb --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIDatePicker+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIDatePicker+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h new file mode 120000 index 00000000..99f169e3 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h new file mode 120000 index 00000000..3dfb3b21 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h new file mode 120000 index 00000000..2e30090b --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UISlider+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UISlider+RACSignalSupport.h new file mode 120000 index 00000000..b300c499 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UISlider+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISlider+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIStepper+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIStepper+RACSignalSupport.h new file mode 120000 index 00000000..00188b20 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UIStepper+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIStepper+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UISwitch+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UISwitch+RACSignalSupport.h new file mode 120000 index 00000000..a3c963be --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UISwitch+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISwitch+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UITableViewCell+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UITableViewCell+RACSignalSupport.h new file mode 120000 index 00000000..341fcc6e --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UITableViewCell+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITableViewCell+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UITextField+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UITextField+RACSignalSupport.h new file mode 120000 index 00000000..d32d800c --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UITextField+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextField+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UITextView+RACSignalSupport.h b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UITextView+RACSignalSupport.h new file mode 120000 index 00000000..cd337c32 --- /dev/null +++ b/Pods/BuildHeaders/ReactiveCocoa/ReactiveCocoa/UITextView+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextView+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWAfterAllNode.h b/Pods/Headers/Kiwi/KWAfterAllNode.h index 4e9be08d..9eeb57f6 120000 --- a/Pods/Headers/Kiwi/KWAfterAllNode.h +++ b/Pods/Headers/Kiwi/KWAfterAllNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWAfterAllNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWAfterAllNode.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWAfterEachNode.h b/Pods/Headers/Kiwi/KWAfterEachNode.h index 450df359..b8072885 120000 --- a/Pods/Headers/Kiwi/KWAfterEachNode.h +++ b/Pods/Headers/Kiwi/KWAfterEachNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWAfterEachNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWAfterEachNode.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWAny.h b/Pods/Headers/Kiwi/KWAny.h index 681893a7..0d334e71 120000 --- a/Pods/Headers/Kiwi/KWAny.h +++ b/Pods/Headers/Kiwi/KWAny.h @@ -1 +1 @@ -../../Kiwi/Classes/KWAny.h \ No newline at end of file +../../Kiwi/Classes/Core/KWAny.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWAsyncVerifier.h b/Pods/Headers/Kiwi/KWAsyncVerifier.h index 33cf289c..55ca577c 120000 --- a/Pods/Headers/Kiwi/KWAsyncVerifier.h +++ b/Pods/Headers/Kiwi/KWAsyncVerifier.h @@ -1 +1 @@ -../../Kiwi/Classes/KWAsyncVerifier.h \ No newline at end of file +../../Kiwi/Classes/Verifiers/KWAsyncVerifier.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeBetweenMatcher.h b/Pods/Headers/Kiwi/KWBeBetweenMatcher.h index bbe53145..75f94424 120000 --- a/Pods/Headers/Kiwi/KWBeBetweenMatcher.h +++ b/Pods/Headers/Kiwi/KWBeBetweenMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeBetweenMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeBetweenMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeEmptyMatcher.h b/Pods/Headers/Kiwi/KWBeEmptyMatcher.h index f5a06897..fc8c89a8 120000 --- a/Pods/Headers/Kiwi/KWBeEmptyMatcher.h +++ b/Pods/Headers/Kiwi/KWBeEmptyMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeEmptyMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeEmptyMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeIdenticalToMatcher.h b/Pods/Headers/Kiwi/KWBeIdenticalToMatcher.h index b746586e..6e8e6be1 120000 --- a/Pods/Headers/Kiwi/KWBeIdenticalToMatcher.h +++ b/Pods/Headers/Kiwi/KWBeIdenticalToMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeIdenticalToMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeIdenticalToMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeKindOfClassMatcher.h b/Pods/Headers/Kiwi/KWBeKindOfClassMatcher.h index 06fbe032..d4170aad 120000 --- a/Pods/Headers/Kiwi/KWBeKindOfClassMatcher.h +++ b/Pods/Headers/Kiwi/KWBeKindOfClassMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeKindOfClassMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeKindOfClassMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeMemberOfClassMatcher.h b/Pods/Headers/Kiwi/KWBeMemberOfClassMatcher.h index 08101ce8..9b96c095 120000 --- a/Pods/Headers/Kiwi/KWBeMemberOfClassMatcher.h +++ b/Pods/Headers/Kiwi/KWBeMemberOfClassMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeMemberOfClassMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeMemberOfClassMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeNilMatcher.h b/Pods/Headers/Kiwi/KWBeNilMatcher.h deleted file mode 120000 index be56da65..00000000 --- a/Pods/Headers/Kiwi/KWBeNilMatcher.h +++ /dev/null @@ -1 +0,0 @@ -../../Kiwi/Classes/KWBeNilMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeNonNilMatcher.h b/Pods/Headers/Kiwi/KWBeNonNilMatcher.h deleted file mode 120000 index 16c909a3..00000000 --- a/Pods/Headers/Kiwi/KWBeNonNilMatcher.h +++ /dev/null @@ -1 +0,0 @@ -../../Kiwi/Classes/KWBeNonNilMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeSubclassOfClassMatcher.h b/Pods/Headers/Kiwi/KWBeSubclassOfClassMatcher.h index 264f776d..ce788b78 120000 --- a/Pods/Headers/Kiwi/KWBeSubclassOfClassMatcher.h +++ b/Pods/Headers/Kiwi/KWBeSubclassOfClassMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeSubclassOfClassMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeSubclassOfClassMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeTrueMatcher.h b/Pods/Headers/Kiwi/KWBeTrueMatcher.h index 321d3471..6bbe534c 120000 --- a/Pods/Headers/Kiwi/KWBeTrueMatcher.h +++ b/Pods/Headers/Kiwi/KWBeTrueMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeTrueMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeTrueMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeWithinMatcher.h b/Pods/Headers/Kiwi/KWBeWithinMatcher.h index 895f8602..ab3ad9d6 120000 --- a/Pods/Headers/Kiwi/KWBeWithinMatcher.h +++ b/Pods/Headers/Kiwi/KWBeWithinMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeWithinMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeWithinMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeZeroMatcher.h b/Pods/Headers/Kiwi/KWBeZeroMatcher.h index 98481608..5c6a52d2 120000 --- a/Pods/Headers/Kiwi/KWBeZeroMatcher.h +++ b/Pods/Headers/Kiwi/KWBeZeroMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeZeroMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBeZeroMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeforeAllNode.h b/Pods/Headers/Kiwi/KWBeforeAllNode.h index 139d69a7..e50bbfc5 120000 --- a/Pods/Headers/Kiwi/KWBeforeAllNode.h +++ b/Pods/Headers/Kiwi/KWBeforeAllNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeforeAllNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWBeforeAllNode.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBeforeEachNode.h b/Pods/Headers/Kiwi/KWBeforeEachNode.h index f72e71cd..e25d7548 120000 --- a/Pods/Headers/Kiwi/KWBeforeEachNode.h +++ b/Pods/Headers/Kiwi/KWBeforeEachNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBeforeEachNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWBeforeEachNode.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBlock.h b/Pods/Headers/Kiwi/KWBlock.h index a6a57c3a..0262aa9f 120000 --- a/Pods/Headers/Kiwi/KWBlock.h +++ b/Pods/Headers/Kiwi/KWBlock.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBlock.h \ No newline at end of file +../../Kiwi/Classes/Core/KWBlock.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBlockNode.h b/Pods/Headers/Kiwi/KWBlockNode.h index d6fc3575..250e21bd 120000 --- a/Pods/Headers/Kiwi/KWBlockNode.h +++ b/Pods/Headers/Kiwi/KWBlockNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBlockNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWBlockNode.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWBlockRaiseMatcher.h b/Pods/Headers/Kiwi/KWBlockRaiseMatcher.h index 68a0b994..0e3150b6 120000 --- a/Pods/Headers/Kiwi/KWBlockRaiseMatcher.h +++ b/Pods/Headers/Kiwi/KWBlockRaiseMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWBlockRaiseMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWBlockRaiseMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWCallSite.h b/Pods/Headers/Kiwi/KWCallSite.h index e2a84e7a..693a01b2 120000 --- a/Pods/Headers/Kiwi/KWCallSite.h +++ b/Pods/Headers/Kiwi/KWCallSite.h @@ -1 +1 @@ -../../Kiwi/Classes/KWCallSite.h \ No newline at end of file +../../Kiwi/Classes/Core/KWCallSite.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWCaptureSpy.h b/Pods/Headers/Kiwi/KWCaptureSpy.h index ed1d8653..54a3ca28 120000 --- a/Pods/Headers/Kiwi/KWCaptureSpy.h +++ b/Pods/Headers/Kiwi/KWCaptureSpy.h @@ -1 +1 @@ -../../Kiwi/Classes/KWCaptureSpy.h \ No newline at end of file +../../Kiwi/Classes/Core/KWCaptureSpy.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWChangeMatcher.h b/Pods/Headers/Kiwi/KWChangeMatcher.h index da16244e..be6e80b0 120000 --- a/Pods/Headers/Kiwi/KWChangeMatcher.h +++ b/Pods/Headers/Kiwi/KWChangeMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWChangeMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWChangeMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWConformToProtocolMatcher.h b/Pods/Headers/Kiwi/KWConformToProtocolMatcher.h index c4512e33..749ed755 120000 --- a/Pods/Headers/Kiwi/KWConformToProtocolMatcher.h +++ b/Pods/Headers/Kiwi/KWConformToProtocolMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWConformToProtocolMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWConformToProtocolMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWContainMatcher.h b/Pods/Headers/Kiwi/KWContainMatcher.h index 3b564a74..672fd9fd 120000 --- a/Pods/Headers/Kiwi/KWContainMatcher.h +++ b/Pods/Headers/Kiwi/KWContainMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWContainMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWContainMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWContainStringMatcher.h b/Pods/Headers/Kiwi/KWContainStringMatcher.h index 2eae470d..3ee51f0d 120000 --- a/Pods/Headers/Kiwi/KWContainStringMatcher.h +++ b/Pods/Headers/Kiwi/KWContainStringMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWContainStringMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWContainStringMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWContextNode.h b/Pods/Headers/Kiwi/KWContextNode.h index 367e4497..7f72f768 120000 --- a/Pods/Headers/Kiwi/KWContextNode.h +++ b/Pods/Headers/Kiwi/KWContextNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWContextNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWContextNode.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWCountType.h b/Pods/Headers/Kiwi/KWCountType.h index f48c43f5..1f022278 120000 --- a/Pods/Headers/Kiwi/KWCountType.h +++ b/Pods/Headers/Kiwi/KWCountType.h @@ -1 +1 @@ -../../Kiwi/Classes/KWCountType.h \ No newline at end of file +../../Kiwi/Classes/Core/KWCountType.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWDeviceInfo.h b/Pods/Headers/Kiwi/KWDeviceInfo.h index ad0e2df9..3e3bb0cb 120000 --- a/Pods/Headers/Kiwi/KWDeviceInfo.h +++ b/Pods/Headers/Kiwi/KWDeviceInfo.h @@ -1 +1 @@ -../../Kiwi/Classes/KWDeviceInfo.h \ No newline at end of file +../../Kiwi/Classes/Core/KWDeviceInfo.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWEqualMatcher.h b/Pods/Headers/Kiwi/KWEqualMatcher.h index d55c9324..e8426758 120000 --- a/Pods/Headers/Kiwi/KWEqualMatcher.h +++ b/Pods/Headers/Kiwi/KWEqualMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWEqualMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWEqualMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWExample.h b/Pods/Headers/Kiwi/KWExample.h index 7c20cd1b..01414923 120000 --- a/Pods/Headers/Kiwi/KWExample.h +++ b/Pods/Headers/Kiwi/KWExample.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExample.h \ No newline at end of file +../../Kiwi/Classes/Core/KWExample.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWExampleDelegate.h b/Pods/Headers/Kiwi/KWExampleDelegate.h new file mode 120000 index 00000000..0e139351 --- /dev/null +++ b/Pods/Headers/Kiwi/KWExampleDelegate.h @@ -0,0 +1 @@ +../../Kiwi/Classes/Core/KWExampleDelegate.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWExampleGroupBuilder.h b/Pods/Headers/Kiwi/KWExampleGroupBuilder.h deleted file mode 120000 index 0fe8c739..00000000 --- a/Pods/Headers/Kiwi/KWExampleGroupBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Kiwi/Classes/KWExampleGroupBuilder.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWExampleGroupDelegate.h b/Pods/Headers/Kiwi/KWExampleGroupDelegate.h deleted file mode 120000 index 0ed4e5e2..00000000 --- a/Pods/Headers/Kiwi/KWExampleGroupDelegate.h +++ /dev/null @@ -1 +0,0 @@ -../../Kiwi/Classes/KWExampleGroupDelegate.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWExampleNode.h b/Pods/Headers/Kiwi/KWExampleNode.h index 261f5073..6fd17907 120000 --- a/Pods/Headers/Kiwi/KWExampleNode.h +++ b/Pods/Headers/Kiwi/KWExampleNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExampleNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWExampleNode.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWExampleNodeVisitor.h b/Pods/Headers/Kiwi/KWExampleNodeVisitor.h index 3d7f7d8d..0347cd98 120000 --- a/Pods/Headers/Kiwi/KWExampleNodeVisitor.h +++ b/Pods/Headers/Kiwi/KWExampleNodeVisitor.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExampleNodeVisitor.h \ No newline at end of file +../../Kiwi/Classes/Core/KWExampleNodeVisitor.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWExampleSuite.h b/Pods/Headers/Kiwi/KWExampleSuite.h index fc621509..849831b5 120000 --- a/Pods/Headers/Kiwi/KWExampleSuite.h +++ b/Pods/Headers/Kiwi/KWExampleSuite.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExampleSuite.h \ No newline at end of file +../../Kiwi/Classes/Core/KWExampleSuite.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWExampleSuiteBuilder.h b/Pods/Headers/Kiwi/KWExampleSuiteBuilder.h new file mode 120000 index 00000000..84f06e28 --- /dev/null +++ b/Pods/Headers/Kiwi/KWExampleSuiteBuilder.h @@ -0,0 +1 @@ +../../Kiwi/Classes/Core/KWExampleSuiteBuilder.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWExistVerifier.h b/Pods/Headers/Kiwi/KWExistVerifier.h index fefc7316..3f0dc32e 120000 --- a/Pods/Headers/Kiwi/KWExistVerifier.h +++ b/Pods/Headers/Kiwi/KWExistVerifier.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExistVerifier.h \ No newline at end of file +../../Kiwi/Classes/Verifiers/KWExistVerifier.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWExpectationType.h b/Pods/Headers/Kiwi/KWExpectationType.h index bb33bfcc..216d889a 120000 --- a/Pods/Headers/Kiwi/KWExpectationType.h +++ b/Pods/Headers/Kiwi/KWExpectationType.h @@ -1 +1 @@ -../../Kiwi/Classes/KWExpectationType.h \ No newline at end of file +../../Kiwi/Classes/Core/KWExpectationType.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWFailure.h b/Pods/Headers/Kiwi/KWFailure.h index b55a3bcd..2b5a88d8 120000 --- a/Pods/Headers/Kiwi/KWFailure.h +++ b/Pods/Headers/Kiwi/KWFailure.h @@ -1 +1 @@ -../../Kiwi/Classes/KWFailure.h \ No newline at end of file +../../Kiwi/Classes/Core/KWFailure.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWFormatter.h b/Pods/Headers/Kiwi/KWFormatter.h index 80c47df4..234fa846 120000 --- a/Pods/Headers/Kiwi/KWFormatter.h +++ b/Pods/Headers/Kiwi/KWFormatter.h @@ -1 +1 @@ -../../Kiwi/Classes/KWFormatter.h \ No newline at end of file +../../Kiwi/Classes/Core/KWFormatter.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWFutureObject.h b/Pods/Headers/Kiwi/KWFutureObject.h index 401eaf06..e1e18065 120000 --- a/Pods/Headers/Kiwi/KWFutureObject.h +++ b/Pods/Headers/Kiwi/KWFutureObject.h @@ -1 +1 @@ -../../Kiwi/Classes/KWFutureObject.h \ No newline at end of file +../../Kiwi/Classes/Core/KWFutureObject.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWGenericMatchEvaluator.h b/Pods/Headers/Kiwi/KWGenericMatchEvaluator.h index c3aeaecd..e47bfc23 120000 --- a/Pods/Headers/Kiwi/KWGenericMatchEvaluator.h +++ b/Pods/Headers/Kiwi/KWGenericMatchEvaluator.h @@ -1 +1 @@ -../../Kiwi/Classes/KWGenericMatchEvaluator.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWGenericMatchEvaluator.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWGenericMatcher.h b/Pods/Headers/Kiwi/KWGenericMatcher.h index 5c48a70b..ed0db0e2 120000 --- a/Pods/Headers/Kiwi/KWGenericMatcher.h +++ b/Pods/Headers/Kiwi/KWGenericMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWGenericMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWGenericMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWGenericMatchingAdditions.h b/Pods/Headers/Kiwi/KWGenericMatchingAdditions.h index 61c0fcd8..4b296a21 120000 --- a/Pods/Headers/Kiwi/KWGenericMatchingAdditions.h +++ b/Pods/Headers/Kiwi/KWGenericMatchingAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/KWGenericMatchingAdditions.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWGenericMatchingAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWHaveMatcher.h b/Pods/Headers/Kiwi/KWHaveMatcher.h index c2bd2831..6603a8db 120000 --- a/Pods/Headers/Kiwi/KWHaveMatcher.h +++ b/Pods/Headers/Kiwi/KWHaveMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWHaveMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWHaveMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWHaveValueMatcher.h b/Pods/Headers/Kiwi/KWHaveValueMatcher.h index 19b108be..aa68353d 120000 --- a/Pods/Headers/Kiwi/KWHaveValueMatcher.h +++ b/Pods/Headers/Kiwi/KWHaveValueMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWHaveValueMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWHaveValueMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWInequalityMatcher.h b/Pods/Headers/Kiwi/KWInequalityMatcher.h index 8d85cb4c..563f2990 120000 --- a/Pods/Headers/Kiwi/KWInequalityMatcher.h +++ b/Pods/Headers/Kiwi/KWInequalityMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWInequalityMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWInequalityMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWIntercept.h b/Pods/Headers/Kiwi/KWIntercept.h index b9fae629..5aab538c 120000 --- a/Pods/Headers/Kiwi/KWIntercept.h +++ b/Pods/Headers/Kiwi/KWIntercept.h @@ -1 +1 @@ -../../Kiwi/Classes/KWIntercept.h \ No newline at end of file +../../Kiwi/NonARC/KWIntercept.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWInvocationCapturer.h b/Pods/Headers/Kiwi/KWInvocationCapturer.h index 383f8e86..786c20db 120000 --- a/Pods/Headers/Kiwi/KWInvocationCapturer.h +++ b/Pods/Headers/Kiwi/KWInvocationCapturer.h @@ -1 +1 @@ -../../Kiwi/Classes/KWInvocationCapturer.h \ No newline at end of file +../../Kiwi/Classes/Core/KWInvocationCapturer.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWItNode.h b/Pods/Headers/Kiwi/KWItNode.h index 37b3ed5c..115be894 120000 --- a/Pods/Headers/Kiwi/KWItNode.h +++ b/Pods/Headers/Kiwi/KWItNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWItNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWItNode.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWMatchVerifier.h b/Pods/Headers/Kiwi/KWMatchVerifier.h index 78de3b22..741e295d 120000 --- a/Pods/Headers/Kiwi/KWMatchVerifier.h +++ b/Pods/Headers/Kiwi/KWMatchVerifier.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMatchVerifier.h \ No newline at end of file +../../Kiwi/Classes/Verifiers/KWMatchVerifier.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWMatcher.h b/Pods/Headers/Kiwi/KWMatcher.h index a3869b44..6d1fda1a 120000 --- a/Pods/Headers/Kiwi/KWMatcher.h +++ b/Pods/Headers/Kiwi/KWMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMatcher.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWMatcherFactory.h b/Pods/Headers/Kiwi/KWMatcherFactory.h index d6ef256a..053ae051 120000 --- a/Pods/Headers/Kiwi/KWMatcherFactory.h +++ b/Pods/Headers/Kiwi/KWMatcherFactory.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMatcherFactory.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMatcherFactory.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWMatchers.h b/Pods/Headers/Kiwi/KWMatchers.h index 121cbff1..37dc93d8 120000 --- a/Pods/Headers/Kiwi/KWMatchers.h +++ b/Pods/Headers/Kiwi/KWMatchers.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMatchers.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMatchers.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWMatching.h b/Pods/Headers/Kiwi/KWMatching.h index b46afda0..5094f6ce 120000 --- a/Pods/Headers/Kiwi/KWMatching.h +++ b/Pods/Headers/Kiwi/KWMatching.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMatching.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMatching.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWMessagePattern.h b/Pods/Headers/Kiwi/KWMessagePattern.h index 00983f2d..7db1ee20 120000 --- a/Pods/Headers/Kiwi/KWMessagePattern.h +++ b/Pods/Headers/Kiwi/KWMessagePattern.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMessagePattern.h \ No newline at end of file +../../Kiwi/NonARC/KWMessagePattern.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWMessageSpying.h b/Pods/Headers/Kiwi/KWMessageSpying.h index 31fb60e6..f2b7dc0d 120000 --- a/Pods/Headers/Kiwi/KWMessageSpying.h +++ b/Pods/Headers/Kiwi/KWMessageSpying.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMessageSpying.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMessageSpying.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWMessageTracker.h b/Pods/Headers/Kiwi/KWMessageTracker.h index af301a13..0529de79 120000 --- a/Pods/Headers/Kiwi/KWMessageTracker.h +++ b/Pods/Headers/Kiwi/KWMessageTracker.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMessageTracker.h \ No newline at end of file +../../Kiwi/Classes/Core/KWMessageTracker.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWMock.h b/Pods/Headers/Kiwi/KWMock.h index 5d2b6887..d07edac9 120000 --- a/Pods/Headers/Kiwi/KWMock.h +++ b/Pods/Headers/Kiwi/KWMock.h @@ -1 +1 @@ -../../Kiwi/Classes/KWMock.h \ No newline at end of file +../../Kiwi/Classes/Mocking/KWMock.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWNilMatcher.h b/Pods/Headers/Kiwi/KWNilMatcher.h new file mode 120000 index 00000000..fbe052f1 --- /dev/null +++ b/Pods/Headers/Kiwi/KWNilMatcher.h @@ -0,0 +1 @@ +../../Kiwi/Classes/Matchers/KWNilMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWNull.h b/Pods/Headers/Kiwi/KWNull.h index 3a8677c9..af2cb10c 120000 --- a/Pods/Headers/Kiwi/KWNull.h +++ b/Pods/Headers/Kiwi/KWNull.h @@ -1 +1 @@ -../../Kiwi/Classes/KWNull.h \ No newline at end of file +../../Kiwi/Classes/Core/KWNull.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWObjCUtilities.h b/Pods/Headers/Kiwi/KWObjCUtilities.h index f9c04a29..f6cc0b91 120000 --- a/Pods/Headers/Kiwi/KWObjCUtilities.h +++ b/Pods/Headers/Kiwi/KWObjCUtilities.h @@ -1 +1 @@ -../../Kiwi/Classes/KWObjCUtilities.h \ No newline at end of file +../../Kiwi/Classes/Core/KWObjCUtilities.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWPendingNode.h b/Pods/Headers/Kiwi/KWPendingNode.h index 6a2a4ab1..7ff39e4f 120000 --- a/Pods/Headers/Kiwi/KWPendingNode.h +++ b/Pods/Headers/Kiwi/KWPendingNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWPendingNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWPendingNode.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWProbe.h b/Pods/Headers/Kiwi/KWProbe.h index 8eae9947..d6cdabbb 120000 --- a/Pods/Headers/Kiwi/KWProbe.h +++ b/Pods/Headers/Kiwi/KWProbe.h @@ -1 +1 @@ -../../Kiwi/Classes/KWProbe.h \ No newline at end of file +../../Kiwi/Classes/Core/KWProbe.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWProbePoller.h b/Pods/Headers/Kiwi/KWProbePoller.h index 852d35e4..a1aee4ca 120000 --- a/Pods/Headers/Kiwi/KWProbePoller.h +++ b/Pods/Headers/Kiwi/KWProbePoller.h @@ -1 +1 @@ -../../Kiwi/Classes/KWProbePoller.h \ No newline at end of file +../../Kiwi/Classes/Core/KWProbePoller.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWRaiseMatcher.h b/Pods/Headers/Kiwi/KWRaiseMatcher.h index bdcd8ae6..4f4b4d92 120000 --- a/Pods/Headers/Kiwi/KWRaiseMatcher.h +++ b/Pods/Headers/Kiwi/KWRaiseMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWRaiseMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWRaiseMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWReceiveMatcher.h b/Pods/Headers/Kiwi/KWReceiveMatcher.h index 5dfb172d..c7c16f0f 120000 --- a/Pods/Headers/Kiwi/KWReceiveMatcher.h +++ b/Pods/Headers/Kiwi/KWReceiveMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWReceiveMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWReceiveMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWRegisterMatchersNode.h b/Pods/Headers/Kiwi/KWRegisterMatchersNode.h index 6ee09af7..0d88f5df 120000 --- a/Pods/Headers/Kiwi/KWRegisterMatchersNode.h +++ b/Pods/Headers/Kiwi/KWRegisterMatchersNode.h @@ -1 +1 @@ -../../Kiwi/Classes/KWRegisterMatchersNode.h \ No newline at end of file +../../Kiwi/Classes/Nodes/KWRegisterMatchersNode.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWRegularExpressionPatternMatcher.h b/Pods/Headers/Kiwi/KWRegularExpressionPatternMatcher.h index c9b56b5d..322e8d11 120000 --- a/Pods/Headers/Kiwi/KWRegularExpressionPatternMatcher.h +++ b/Pods/Headers/Kiwi/KWRegularExpressionPatternMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWRegularExpressionPatternMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWRegularExpressionPatternMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWReporting.h b/Pods/Headers/Kiwi/KWReporting.h index 76724b40..d220f49c 120000 --- a/Pods/Headers/Kiwi/KWReporting.h +++ b/Pods/Headers/Kiwi/KWReporting.h @@ -1 +1 @@ -../../Kiwi/Classes/KWReporting.h \ No newline at end of file +../../Kiwi/Classes/Core/KWReporting.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWRespondToSelectorMatcher.h b/Pods/Headers/Kiwi/KWRespondToSelectorMatcher.h index 638ffc9b..53da1b3d 120000 --- a/Pods/Headers/Kiwi/KWRespondToSelectorMatcher.h +++ b/Pods/Headers/Kiwi/KWRespondToSelectorMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWRespondToSelectorMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWRespondToSelectorMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWSpec.h b/Pods/Headers/Kiwi/KWSpec.h index 01ff65d9..b35172e7 120000 --- a/Pods/Headers/Kiwi/KWSpec.h +++ b/Pods/Headers/Kiwi/KWSpec.h @@ -1 +1 @@ -../../Kiwi/Classes/KWSpec.h \ No newline at end of file +../../Kiwi/Classes/Core/KWSpec.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWStringContainsMatcher.h b/Pods/Headers/Kiwi/KWStringContainsMatcher.h index 31a35fa8..43c9cd42 120000 --- a/Pods/Headers/Kiwi/KWStringContainsMatcher.h +++ b/Pods/Headers/Kiwi/KWStringContainsMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWStringContainsMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWStringContainsMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWStringPrefixMatcher.h b/Pods/Headers/Kiwi/KWStringPrefixMatcher.h index 6332ce41..351d3e72 120000 --- a/Pods/Headers/Kiwi/KWStringPrefixMatcher.h +++ b/Pods/Headers/Kiwi/KWStringPrefixMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWStringPrefixMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWStringPrefixMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWStringUtilities.h b/Pods/Headers/Kiwi/KWStringUtilities.h index c6b107f1..e6225dc8 120000 --- a/Pods/Headers/Kiwi/KWStringUtilities.h +++ b/Pods/Headers/Kiwi/KWStringUtilities.h @@ -1 +1 @@ -../../Kiwi/Classes/KWStringUtilities.h \ No newline at end of file +../../Kiwi/Classes/Core/KWStringUtilities.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWStub.h b/Pods/Headers/Kiwi/KWStub.h index 38e5d0dc..6c8519fd 120000 --- a/Pods/Headers/Kiwi/KWStub.h +++ b/Pods/Headers/Kiwi/KWStub.h @@ -1 +1 @@ -../../Kiwi/Classes/KWStub.h \ No newline at end of file +../../Kiwi/NonARC/KWStub.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWSymbolicator.h b/Pods/Headers/Kiwi/KWSymbolicator.h index 0f442f62..2bc8b59f 120000 --- a/Pods/Headers/Kiwi/KWSymbolicator.h +++ b/Pods/Headers/Kiwi/KWSymbolicator.h @@ -1 +1 @@ -../../Kiwi/Classes/KWSymbolicator.h \ No newline at end of file +../../Kiwi/NonARC/KWSymbolicator.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWTestCase.h b/Pods/Headers/Kiwi/KWTestCase.h deleted file mode 120000 index 04096f4a..00000000 --- a/Pods/Headers/Kiwi/KWTestCase.h +++ /dev/null @@ -1 +0,0 @@ -../../Kiwi/Classes/KWTestCase.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWUserDefinedMatcher.h b/Pods/Headers/Kiwi/KWUserDefinedMatcher.h index e6a74c19..241b176a 120000 --- a/Pods/Headers/Kiwi/KWUserDefinedMatcher.h +++ b/Pods/Headers/Kiwi/KWUserDefinedMatcher.h @@ -1 +1 @@ -../../Kiwi/Classes/KWUserDefinedMatcher.h \ No newline at end of file +../../Kiwi/Classes/Matchers/KWUserDefinedMatcher.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWValue.h b/Pods/Headers/Kiwi/KWValue.h index 1546da51..f5aabfb5 120000 --- a/Pods/Headers/Kiwi/KWValue.h +++ b/Pods/Headers/Kiwi/KWValue.h @@ -1 +1 @@ -../../Kiwi/Classes/KWValue.h \ No newline at end of file +../../Kiwi/Classes/Core/KWValue.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWVerifying.h b/Pods/Headers/Kiwi/KWVerifying.h index 7e7e7f32..10c41b73 120000 --- a/Pods/Headers/Kiwi/KWVerifying.h +++ b/Pods/Headers/Kiwi/KWVerifying.h @@ -1 +1 @@ -../../Kiwi/Classes/KWVerifying.h \ No newline at end of file +../../Kiwi/Classes/Verifiers/KWVerifying.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KWWorkarounds.h b/Pods/Headers/Kiwi/KWWorkarounds.h index 4535bdc0..5394bed7 120000 --- a/Pods/Headers/Kiwi/KWWorkarounds.h +++ b/Pods/Headers/Kiwi/KWWorkarounds.h @@ -1 +1 @@ -../../Kiwi/Classes/KWWorkarounds.h \ No newline at end of file +../../Kiwi/Classes/Core/KWWorkarounds.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/Kiwi.h b/Pods/Headers/Kiwi/Kiwi.h index 2a5426ef..90584f1e 120000 --- a/Pods/Headers/Kiwi/Kiwi.h +++ b/Pods/Headers/Kiwi/Kiwi.h @@ -1 +1 @@ -../../Kiwi/Classes/Kiwi.h \ No newline at end of file +../../Kiwi/Classes/Core/Kiwi.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KiwiBlockMacros.h b/Pods/Headers/Kiwi/KiwiBlockMacros.h index 04077045..c0407583 120000 --- a/Pods/Headers/Kiwi/KiwiBlockMacros.h +++ b/Pods/Headers/Kiwi/KiwiBlockMacros.h @@ -1 +1 @@ -../../Kiwi/Classes/KiwiBlockMacros.h \ No newline at end of file +../../Kiwi/Classes/Core/KiwiBlockMacros.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KiwiConfiguration.h b/Pods/Headers/Kiwi/KiwiConfiguration.h index e5928521..cdd209e3 120000 --- a/Pods/Headers/Kiwi/KiwiConfiguration.h +++ b/Pods/Headers/Kiwi/KiwiConfiguration.h @@ -1 +1 @@ -../../Kiwi/Classes/KiwiConfiguration.h \ No newline at end of file +../../Kiwi/Classes/Core/KiwiConfiguration.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/KiwiMacros.h b/Pods/Headers/Kiwi/KiwiMacros.h index eb8ad23d..936b3590 120000 --- a/Pods/Headers/Kiwi/KiwiMacros.h +++ b/Pods/Headers/Kiwi/KiwiMacros.h @@ -1 +1 @@ -../../Kiwi/Classes/KiwiMacros.h \ No newline at end of file +../../Kiwi/Classes/Core/KiwiMacros.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/NSInvocation+KiwiAdditions.h b/Pods/Headers/Kiwi/NSInvocation+KiwiAdditions.h index 0a19c57e..216b70b1 120000 --- a/Pods/Headers/Kiwi/NSInvocation+KiwiAdditions.h +++ b/Pods/Headers/Kiwi/NSInvocation+KiwiAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSInvocation+KiwiAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSInvocation+KiwiAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/NSInvocation+OCMAdditions.h b/Pods/Headers/Kiwi/NSInvocation+OCMAdditions.h index 1816d66e..5d505e9a 120000 --- a/Pods/Headers/Kiwi/NSInvocation+OCMAdditions.h +++ b/Pods/Headers/Kiwi/NSInvocation+OCMAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSInvocation+OCMAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSInvocation+OCMAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/NSMethodSignature+KiwiAdditions.h b/Pods/Headers/Kiwi/NSMethodSignature+KiwiAdditions.h index 83429ba5..816f65b7 120000 --- a/Pods/Headers/Kiwi/NSMethodSignature+KiwiAdditions.h +++ b/Pods/Headers/Kiwi/NSMethodSignature+KiwiAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSMethodSignature+KiwiAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSMethodSignature+KiwiAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/NSNumber+KiwiAdditions.h b/Pods/Headers/Kiwi/NSNumber+KiwiAdditions.h index 48e23543..aa1be1c1 120000 --- a/Pods/Headers/Kiwi/NSNumber+KiwiAdditions.h +++ b/Pods/Headers/Kiwi/NSNumber+KiwiAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSNumber+KiwiAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSNumber+KiwiAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/NSObject+KiwiMockAdditions.h b/Pods/Headers/Kiwi/NSObject+KiwiMockAdditions.h index 32160c6d..eba045f0 120000 --- a/Pods/Headers/Kiwi/NSObject+KiwiMockAdditions.h +++ b/Pods/Headers/Kiwi/NSObject+KiwiMockAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSObject+KiwiMockAdditions.h \ No newline at end of file +../../Kiwi/Classes/Mocking/NSObject+KiwiMockAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/NSObject+KiwiSpyAdditions.h b/Pods/Headers/Kiwi/NSObject+KiwiSpyAdditions.h index 4da2d797..9746eafd 120000 --- a/Pods/Headers/Kiwi/NSObject+KiwiSpyAdditions.h +++ b/Pods/Headers/Kiwi/NSObject+KiwiSpyAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSObject+KiwiSpyAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSObject+KiwiSpyAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/NSObject+KiwiStubAdditions.h b/Pods/Headers/Kiwi/NSObject+KiwiStubAdditions.h index a64ea2c1..09dc8adc 120000 --- a/Pods/Headers/Kiwi/NSObject+KiwiStubAdditions.h +++ b/Pods/Headers/Kiwi/NSObject+KiwiStubAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSObject+KiwiStubAdditions.h \ No newline at end of file +../../Kiwi/Classes/Stubbing/NSObject+KiwiStubAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/NSObject+KiwiVerifierAdditions.h b/Pods/Headers/Kiwi/NSObject+KiwiVerifierAdditions.h index 68f6f438..9def95d7 120000 --- a/Pods/Headers/Kiwi/NSObject+KiwiVerifierAdditions.h +++ b/Pods/Headers/Kiwi/NSObject+KiwiVerifierAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSObject+KiwiVerifierAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSObject+KiwiVerifierAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/NSProxy+KiwiVerifierAdditions.h b/Pods/Headers/Kiwi/NSProxy+KiwiVerifierAdditions.h index 1e078742..f58050df 120000 --- a/Pods/Headers/Kiwi/NSProxy+KiwiVerifierAdditions.h +++ b/Pods/Headers/Kiwi/NSProxy+KiwiVerifierAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSProxy+KiwiVerifierAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSProxy+KiwiVerifierAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/NSValue+KiwiAdditions.h b/Pods/Headers/Kiwi/NSValue+KiwiAdditions.h index 5b157129..e411b0c8 120000 --- a/Pods/Headers/Kiwi/NSValue+KiwiAdditions.h +++ b/Pods/Headers/Kiwi/NSValue+KiwiAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/NSValue+KiwiAdditions.h \ No newline at end of file +../../Kiwi/Classes/Core/NSValue+KiwiAdditions.h \ No newline at end of file diff --git a/Pods/Headers/Kiwi/SenTestSuite+KiwiAdditions.h b/Pods/Headers/Kiwi/SenTestSuite+KiwiAdditions.h index 67fee890..e1e643a7 120000 --- a/Pods/Headers/Kiwi/SenTestSuite+KiwiAdditions.h +++ b/Pods/Headers/Kiwi/SenTestSuite+KiwiAdditions.h @@ -1 +1 @@ -../../Kiwi/Classes/SenTestSuite+KiwiAdditions.h \ No newline at end of file +../../Kiwi/SenTestingKit/SenTestSuite+KiwiAdditions.h \ No newline at end of file diff --git a/Pods/Headers/OHHTTPStubs/OHHTTPStubs.h b/Pods/Headers/OHHTTPStubs/OHHTTPStubs.h index ddea87e2..c1b5c94e 120000 --- a/Pods/Headers/OHHTTPStubs/OHHTTPStubs.h +++ b/Pods/Headers/OHHTTPStubs/OHHTTPStubs.h @@ -1 +1 @@ -../../OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.h \ No newline at end of file +../../OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h \ No newline at end of file diff --git a/Pods/Headers/OHHTTPStubs/OHHTTPStubsResponse+HTTPMessage.h b/Pods/Headers/OHHTTPStubs/OHHTTPStubsResponse+HTTPMessage.h new file mode 120000 index 00000000..c7dea8a5 --- /dev/null +++ b/Pods/Headers/OHHTTPStubs/OHHTTPStubsResponse+HTTPMessage.h @@ -0,0 +1 @@ +../../OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+HTTPMessage.h \ No newline at end of file diff --git a/Pods/Headers/OHHTTPStubs/OHHTTPStubsResponse+JSON.h b/Pods/Headers/OHHTTPStubs/OHHTTPStubsResponse+JSON.h new file mode 120000 index 00000000..078fe3df --- /dev/null +++ b/Pods/Headers/OHHTTPStubs/OHHTTPStubsResponse+JSON.h @@ -0,0 +1 @@ +../../OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.h \ No newline at end of file diff --git a/Pods/Headers/OHHTTPStubs/OHHTTPStubsResponse.h b/Pods/Headers/OHHTTPStubs/OHHTTPStubsResponse.h index fe2a9462..bfce4e4b 120000 --- a/Pods/Headers/OHHTTPStubs/OHHTTPStubsResponse.h +++ b/Pods/Headers/OHHTTPStubs/OHHTTPStubsResponse.h @@ -1 +1 @@ -../../OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.h \ No newline at end of file +../../OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/RACObjCRuntime.h b/Pods/Headers/ReactiveCocoa/RACObjCRuntime.h new file mode 120000 index 00000000..ed85580d --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/RACObjCRuntime.h @@ -0,0 +1 @@ +../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSArray+RACSequenceAdditions.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSArray+RACSequenceAdditions.h new file mode 120000 index 00000000..d483f628 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSArray+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSArray+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSData+RACSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSData+RACSupport.h new file mode 120000 index 00000000..792279d3 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSData+RACSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSData+RACSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h new file mode 120000 index 00000000..bbd102d9 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h new file mode 120000 index 00000000..62cd0258 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSFileHandle+RACSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSFileHandle+RACSupport.h new file mode 120000 index 00000000..051e192f --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSFileHandle+RACSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSFileHandle+RACSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSInvocation+RACTypeParsing.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSInvocation+RACTypeParsing.h new file mode 120000 index 00000000..1aa061d0 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSInvocation+RACTypeParsing.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSInvocation+RACTypeParsing.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSNotificationCenter+RACSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSNotificationCenter+RACSupport.h new file mode 120000 index 00000000..2cc66960 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSNotificationCenter+RACSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSNotificationCenter+RACSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACDeallocating.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACDeallocating.h new file mode 120000 index 00000000..1c593905 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACDeallocating.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDeallocating.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACDescription.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACDescription.h new file mode 120000 index 00000000..6398be58 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACDescription.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDescription.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.h new file mode 120000 index 00000000..483ec955 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACKVOWrapper.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACLifting.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACLifting.h new file mode 120000 index 00000000..b50f89fe --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACLifting.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACPropertySubscribing.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACPropertySubscribing.h new file mode 120000 index 00000000..bcfb7499 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACPropertySubscribing.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACPropertySubscribing.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACSelectorSignal.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACSelectorSignal.h new file mode 120000 index 00000000..3693dd5d --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSObject+RACSelectorSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACSelectorSignal.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h new file mode 120000 index 00000000..27b912c9 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSSet+RACSequenceAdditions.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSSet+RACSequenceAdditions.h new file mode 120000 index 00000000..2a63c51c --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSSet+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSSet+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSString+RACKeyPathUtilities.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSString+RACKeyPathUtilities.h new file mode 120000 index 00000000..5240f714 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSString+RACKeyPathUtilities.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACKeyPathUtilities.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSString+RACSequenceAdditions.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSString+RACSequenceAdditions.h new file mode 120000 index 00000000..95b24f28 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSString+RACSequenceAdditions.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSequenceAdditions.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSString+RACSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSString+RACSupport.h new file mode 120000 index 00000000..ec99678b --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSString+RACSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSURLConnection+RACSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSURLConnection+RACSupport.h new file mode 120000 index 00000000..439fa69a --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/NSURLConnection+RACSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSURLConnection+RACSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACArraySequence.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACArraySequence.h new file mode 120000 index 00000000..86205094 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACArraySequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACArraySequence.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACBacktrace.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACBacktrace.h new file mode 120000 index 00000000..0ab8ceb8 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACBacktrace.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBacktrace.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACBehaviorSubject.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACBehaviorSubject.h new file mode 120000 index 00000000..3d7e251d --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACBehaviorSubject.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBehaviorSubject.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACBlockTrampoline.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACBlockTrampoline.h new file mode 120000 index 00000000..85af616a --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACBlockTrampoline.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBlockTrampoline.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACChannel.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACChannel.h new file mode 120000 index 00000000..2e0294b9 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACChannel.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACChannel.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACCommand.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACCommand.h new file mode 120000 index 00000000..51f2e7b6 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACCommand.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCommand.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACCompoundDisposable.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACCompoundDisposable.h new file mode 120000 index 00000000..a3aa6140 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACCompoundDisposable.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposable.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDelegateProxy.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDelegateProxy.h new file mode 120000 index 00000000..017bab38 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDelegateProxy.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDelegateProxy.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDisposable.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDisposable.h new file mode 120000 index 00000000..321d2cef --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDisposable.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDynamicSequence.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDynamicSequence.h new file mode 120000 index 00000000..71eadc71 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDynamicSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSequence.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDynamicSignal.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDynamicSignal.h new file mode 120000 index 00000000..8fe338be --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACDynamicSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSignal.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEXTKeyPathCoding.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEXTKeyPathCoding.h new file mode 120000 index 00000000..d4c111b2 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEXTKeyPathCoding.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTKeyPathCoding.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEXTScope.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEXTScope.h new file mode 120000 index 00000000..f0af58e0 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEXTScope.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTScope.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEagerSequence.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEagerSequence.h new file mode 120000 index 00000000..9680c7ab --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEagerSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEagerSequence.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEmptySequence.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEmptySequence.h new file mode 120000 index 00000000..bfb47325 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEmptySequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySequence.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEmptySignal.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEmptySignal.h new file mode 120000 index 00000000..70abee6e --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEmptySignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySignal.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACErrorSignal.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACErrorSignal.h new file mode 120000 index 00000000..04261d13 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACErrorSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACErrorSignal.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEvent.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEvent.h new file mode 120000 index 00000000..159e888d --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACEvent.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEvent.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACGroupedSignal.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACGroupedSignal.h new file mode 120000 index 00000000..4c454aaf --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACGroupedSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACGroupedSignal.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACImmediateScheduler.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACImmediateScheduler.h new file mode 120000 index 00000000..1bcb87b7 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACImmediateScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACImmediateScheduler.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACKVOChannel.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACKVOChannel.h new file mode 120000 index 00000000..70319d27 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACKVOChannel.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOChannel.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACKVOTrampoline.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACKVOTrampoline.h new file mode 120000 index 00000000..e6092790 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACKVOTrampoline.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOTrampoline.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection.h new file mode 120000 index 00000000..bcc72f01 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACPassthroughSubscriber.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACPassthroughSubscriber.h new file mode 120000 index 00000000..8255a672 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACPassthroughSubscriber.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACPassthroughSubscriber.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler+Subclass.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler+Subclass.h new file mode 120000 index 00000000..2df1574b --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler+Subclass.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler+Subclass.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler.h new file mode 120000 index 00000000..c3cd6c99 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACReplaySubject.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACReplaySubject.h new file mode 120000 index 00000000..ad35864c --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACReplaySubject.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReplaySubject.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACReturnSignal.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACReturnSignal.h new file mode 120000 index 00000000..9d94ffce --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACReturnSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReturnSignal.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACScheduler.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACScheduler.h new file mode 120000 index 00000000..d12e38a5 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACScopedDisposable.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACScopedDisposable.h new file mode 120000 index 00000000..f8f3aa87 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACScopedDisposable.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScopedDisposable.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSequence.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSequence.h new file mode 120000 index 00000000..64ec6092 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSequence.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSerialDisposable.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSerialDisposable.h new file mode 120000 index 00000000..9a7ee27f --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSerialDisposable.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSerialDisposable.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSignal+Operations.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSignal+Operations.h new file mode 120000 index 00000000..68992d5c --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSignal+Operations.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSignal.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSignal.h new file mode 120000 index 00000000..30b3dd7a --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSignal.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSignalSequence.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSignalSequence.h new file mode 120000 index 00000000..56bf5c1e --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSignalSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalSequence.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACStream.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACStream.h new file mode 120000 index 00000000..ff066205 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACStream.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACStringSequence.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACStringSequence.h new file mode 120000 index 00000000..73ac6501 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACStringSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStringSequence.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubject.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubject.h new file mode 120000 index 00000000..e1f2bb01 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubject.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubject.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubscriber.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubscriber.h new file mode 120000 index 00000000..5d36efca --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubscriber.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h new file mode 120000 index 00000000..b4f4d37e --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubscriptionScheduler.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubscriptionScheduler.h new file mode 120000 index 00000000..bc66909c --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACSubscriptionScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptionScheduler.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTargetQueueScheduler.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTargetQueueScheduler.h new file mode 120000 index 00000000..696d5bb4 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTargetQueueScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTargetQueueScheduler.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTestScheduler.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTestScheduler.h new file mode 120000 index 00000000..72d525cd --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTestScheduler.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTestScheduler.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTuple.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTuple.h new file mode 120000 index 00000000..0fd18d66 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTuple.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTuple.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTupleSequence.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTupleSequence.h new file mode 120000 index 00000000..cd59437a --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACTupleSequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTupleSequence.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACUnarySequence.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACUnarySequence.h new file mode 120000 index 00000000..99dd034e --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACUnarySequence.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnarySequence.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACUnit.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACUnit.h new file mode 120000 index 00000000..617a4316 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACUnit.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnit.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACValueTransformer.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACValueTransformer.h new file mode 120000 index 00000000..1b6e4345 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACValueTransformer.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACValueTransformer.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACmetamacros.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACmetamacros.h new file mode 120000 index 00000000..631220ef --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/RACmetamacros.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACmetamacros.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h new file mode 120000 index 00000000..9a1ff24c --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/ReactiveCocoa.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIActionSheet+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIActionSheet+RACSignalSupport.h new file mode 120000 index 00000000..9c68b99c --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIActionSheet+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIAlertView+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIAlertView+RACSignalSupport.h new file mode 120000 index 00000000..07a76a05 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIAlertView+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIAlertView+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h new file mode 120000 index 00000000..8ec0050f --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIButton+RACCommandSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIButton+RACCommandSupport.h new file mode 120000 index 00000000..b3293260 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIButton+RACCommandSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIButton+RACCommandSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h new file mode 120000 index 00000000..c4099a98 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupport.h new file mode 120000 index 00000000..270404bd --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIDatePicker+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIDatePicker+RACSignalSupport.h new file mode 120000 index 00000000..9deca0fb --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIDatePicker+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIDatePicker+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h new file mode 120000 index 00000000..99f169e3 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h new file mode 120000 index 00000000..3dfb3b21 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h new file mode 120000 index 00000000..2e30090b --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UISlider+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UISlider+RACSignalSupport.h new file mode 120000 index 00000000..b300c499 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UISlider+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISlider+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIStepper+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIStepper+RACSignalSupport.h new file mode 120000 index 00000000..00188b20 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UIStepper+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIStepper+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UISwitch+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UISwitch+RACSignalSupport.h new file mode 120000 index 00000000..a3c963be --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UISwitch+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISwitch+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UITableViewCell+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UITableViewCell+RACSignalSupport.h new file mode 120000 index 00000000..341fcc6e --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UITableViewCell+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITableViewCell+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UITextField+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UITextField+RACSignalSupport.h new file mode 120000 index 00000000..d32d800c --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UITextField+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextField+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UITextView+RACSignalSupport.h b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UITextView+RACSignalSupport.h new file mode 120000 index 00000000..cd337c32 --- /dev/null +++ b/Pods/Headers/ReactiveCocoa/ReactiveCocoa/UITextView+RACSignalSupport.h @@ -0,0 +1 @@ +../../../ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextView+RACSignalSupport.h \ No newline at end of file diff --git a/Pods/Kiwi/Classes/KWAny.h b/Pods/Kiwi/Classes/Core/KWAny.h similarity index 100% rename from Pods/Kiwi/Classes/KWAny.h rename to Pods/Kiwi/Classes/Core/KWAny.h diff --git a/Pods/Kiwi/Classes/Core/KWAny.m b/Pods/Kiwi/Classes/Core/KWAny.m new file mode 100644 index 00000000..880ae297 --- /dev/null +++ b/Pods/Kiwi/Classes/Core/KWAny.m @@ -0,0 +1,23 @@ +// +// Licensed under the terms in License.txt +// +// Copyright 2010 Allen Ding. All rights reserved. +// + +#import "KWAny.h" + +@implementation KWAny + +#pragma mark - Initializing + ++ (id)any { + static KWAny *sharedAny = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedAny = [self new]; + + }); + return sharedAny; +} + +@end diff --git a/Pods/Kiwi/Classes/KWBlock.h b/Pods/Kiwi/Classes/Core/KWBlock.h similarity index 58% rename from Pods/Kiwi/Classes/KWBlock.h rename to Pods/Kiwi/Classes/Core/KWBlock.h index 7a66cf98..3a147641 100644 --- a/Pods/Kiwi/Classes/KWBlock.h +++ b/Pods/Kiwi/Classes/Core/KWBlock.h @@ -6,14 +6,12 @@ #import "KiwiConfiguration.h" -typedef void (^KWVoidBlock)(void); - @interface KWBlock : NSObject #pragma mark - Initializing -- (id)initWithBlock:(KWVoidBlock)aBlock; +- (id)initWithBlock:(void (^)(void))block; -+ (id)blockWithBlock:(KWVoidBlock)aBlock; ++ (id)blockWithBlock:(void (^)(void))block; #pragma mark - Calling Blocks @@ -23,5 +21,5 @@ typedef void (^KWVoidBlock)(void); #pragma mark - Creating Blocks -KWBlock *theBlock(KWVoidBlock aBlock); -KWBlock *lambda(KWVoidBlock aBlock); +KWBlock *theBlock(void (^block)(void)); +KWBlock *lambda(void (^block)(void)); diff --git a/Pods/Kiwi/Classes/Core/KWBlock.m b/Pods/Kiwi/Classes/Core/KWBlock.m new file mode 100644 index 00000000..39b6b8d3 --- /dev/null +++ b/Pods/Kiwi/Classes/Core/KWBlock.m @@ -0,0 +1,50 @@ +// +// Licensed under the terms in License.txt +// +// Copyright 2010 Allen Ding. All rights reserved. +// + +#import "KWBlock.h" + +@interface KWBlock() + +#pragma mark - Properties + +@property (nonatomic, readonly, copy) void (^block)(void); + +@end + +@implementation KWBlock + +#pragma mark - Initializing + +- (id)initWithBlock:(void (^)(void))block { + self = [super init]; + if (self) { + _block = [block copy]; + } + + return self; +} + ++ (id)blockWithBlock:(void (^)(void))aBlock { + return [[self alloc] initWithBlock:aBlock]; +} + +#pragma mark - Calling Blocks + +- (void)call { + self.block(); +} + +@end + +#pragma mark - Creating Blocks + +KWBlock *theBlock(void (^block)(void)) { + return lambda(block); +} + +KWBlock *lambda(void (^block)(void)) { + return [KWBlock blockWithBlock:block]; +} diff --git a/Pods/Kiwi/Classes/KWCallSite.h b/Pods/Kiwi/Classes/Core/KWCallSite.h similarity index 100% rename from Pods/Kiwi/Classes/KWCallSite.h rename to Pods/Kiwi/Classes/Core/KWCallSite.h diff --git a/Pods/Kiwi/Classes/KWCallSite.m b/Pods/Kiwi/Classes/Core/KWCallSite.m similarity index 70% rename from Pods/Kiwi/Classes/KWCallSite.m rename to Pods/Kiwi/Classes/Core/KWCallSite.m index d97ee58b..0ab6115f 100644 --- a/Pods/Kiwi/Classes/KWCallSite.m +++ b/Pods/Kiwi/Classes/Core/KWCallSite.m @@ -11,28 +11,19 @@ @implementation KWCallSite #pragma mark - Initializing - (id)initWithFilename:(NSString *)aFilename lineNumber:(NSUInteger)aLineNumber { - if ((self = [super init])) { - filename = [aFilename copy]; - lineNumber = aLineNumber; + self = [super init]; + if (self) { + _filename = [aFilename copy]; + _lineNumber = aLineNumber; } return self; } + (id)callSiteWithFilename:(NSString *)aFilename lineNumber:(NSUInteger)aLineNumber { - return [[[self alloc] initWithFilename:aFilename lineNumber:aLineNumber] autorelease]; + return [[self alloc] initWithFilename:aFilename lineNumber:aLineNumber]; } -- (void)dealloc { - [filename release]; - [super dealloc]; -} - -#pragma mark - Accessing Call Site Properties - -@synthesize filename; -@synthesize lineNumber; - #pragma mark - Identifying and Comparing - (NSUInteger)hash { diff --git a/Pods/Kiwi/Classes/KWCaptureSpy.h b/Pods/Kiwi/Classes/Core/KWCaptureSpy.h similarity index 56% rename from Pods/Kiwi/Classes/KWCaptureSpy.h rename to Pods/Kiwi/Classes/Core/KWCaptureSpy.h index f739dc65..de5b6571 100644 --- a/Pods/Kiwi/Classes/KWCaptureSpy.h +++ b/Pods/Kiwi/Classes/Core/KWCaptureSpy.h @@ -1,11 +1,9 @@ -#import -#import "KWMock.h" #import "KWMessageSpying.h" @interface KWCaptureSpy : NSObject -- (id)initWithArgumentIndex:(NSUInteger)index; +@property (nonatomic, strong, readonly) id argument; -@property(nonatomic, readonly, retain) id argument; +- (id)initWithArgumentIndex:(NSUInteger)index; @end diff --git a/Pods/Kiwi/Classes/KWCaptureSpy.m b/Pods/Kiwi/Classes/Core/KWCaptureSpy.m similarity index 55% rename from Pods/Kiwi/Classes/KWCaptureSpy.m rename to Pods/Kiwi/Classes/Core/KWCaptureSpy.m index 9e4dd62b..a90af61f 100644 --- a/Pods/Kiwi/Classes/KWCaptureSpy.m +++ b/Pods/Kiwi/Classes/Core/KWCaptureSpy.m @@ -1,56 +1,64 @@ #import "KWCaptureSpy.h" + #import "KWObjCUtilities.h" +#import "KWNull.h" +#import "KWValue.h" #import "NSInvocation+KiwiAdditions.h" #import "NSMethodSignature+KiwiAdditions.h" -#import "KWValue.h" -@interface KWCaptureSpy() { - id _argument; -} -@property (nonatomic) BOOL argumentCaptured; -@property (nonatomic) NSUInteger argumentIndex; +@interface KWCaptureSpy() + +@property (nonatomic, strong) id argument; + @end -@implementation KWCaptureSpy -@dynamic argument; +@implementation KWCaptureSpy { + NSUInteger _argumentIndex; +} - (id)initWithArgumentIndex:(NSUInteger)index { - if ((self = [super init])) { + self = [super init]; + if (self) { _argumentIndex = index; - _argumentCaptured = NO; } return self; } - (id)argument { - if (!_argumentCaptured) { + if (!_argument) { @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Argument requested has yet to be captured." userInfo:nil]; } - return [[_argument retain] autorelease]; + + if(_argument == [KWNull null]) { + return nil; + } + else { + return _argument; + } } - (void)object:(id)anObject didReceiveInvocation:(NSInvocation *)anInvocation { - if (!_argumentCaptured) { + if (!_argument) { NSMethodSignature *signature = [anInvocation methodSignature]; const char *objCType = [signature messageArgumentTypeAtIndex:_argumentIndex]; - if (KWObjCTypeIsObject(objCType)) { - id argument = nil; - [anInvocation getMessageArgument:&argument atIndex:_argumentIndex]; + if (KWObjCTypeIsObject(objCType) || KWObjCTypeIsClass(objCType)) { + void* argumentBuffer = NULL; + [anInvocation getMessageArgument:&argumentBuffer atIndex:_argumentIndex]; + id argument = (__bridge id)argumentBuffer; if (KWObjCTypeIsBlock(objCType)) { _argument = [argument copy]; } else { - _argument = [argument retain]; + if(argument == nil) { + _argument = [KWNull null]; + } else { + _argument = argument; + } } } else { NSData *data = [anInvocation messageArgumentDataAtIndex:_argumentIndex]; - _argument = [[KWValue valueWithBytes:[data bytes] objCType:objCType] retain]; + _argument = [KWValue valueWithBytes:[data bytes] objCType:objCType]; } - _argumentCaptured = YES; } } -- (void)dealloc { - [_argument release]; - [super dealloc]; -} @end diff --git a/Pods/Kiwi/Classes/KWCountType.h b/Pods/Kiwi/Classes/Core/KWCountType.h similarity index 100% rename from Pods/Kiwi/Classes/KWCountType.h rename to Pods/Kiwi/Classes/Core/KWCountType.h diff --git a/Pods/Kiwi/Classes/KWDeviceInfo.h b/Pods/Kiwi/Classes/Core/KWDeviceInfo.h similarity index 100% rename from Pods/Kiwi/Classes/KWDeviceInfo.h rename to Pods/Kiwi/Classes/Core/KWDeviceInfo.h diff --git a/Pods/Kiwi/Classes/KWDeviceInfo.m b/Pods/Kiwi/Classes/Core/KWDeviceInfo.m similarity index 100% rename from Pods/Kiwi/Classes/KWDeviceInfo.m rename to Pods/Kiwi/Classes/Core/KWDeviceInfo.m diff --git a/Pods/Kiwi/Classes/KWExample.h b/Pods/Kiwi/Classes/Core/KWExample.h similarity index 67% rename from Pods/Kiwi/Classes/KWExample.h rename to Pods/Kiwi/Classes/Core/KWExample.h index 161d33e6..7d3e14f2 100644 --- a/Pods/Kiwi/Classes/KWExample.h +++ b/Pods/Kiwi/Classes/Core/KWExample.h @@ -11,7 +11,7 @@ #import "KWExampleNode.h" #import "KWExampleNodeVisitor.h" #import "KWReporting.h" -#import "KWExampleGroupDelegate.h" +#import "KWExampleDelegate.h" @class KWCallSite; @class KWExampleSuite; @@ -21,9 +21,9 @@ @interface KWExample : NSObject -@property (nonatomic, retain, readonly) NSMutableArray *lastInContexts; -@property (nonatomic, assign) KWExampleSuite *suite; -@property (nonatomic, assign) id unassignedVerifier; +@property (nonatomic, strong, readonly) NSMutableArray *lastInContexts; +@property (nonatomic, weak) KWExampleSuite *suite; +@property (nonatomic, strong) id unresolvedVerifier; - (id)initWithExampleNode:(id)node; @@ -59,26 +59,26 @@ #pragma mark - Building Example Groups -void describe(NSString *aDescription, KWVoidBlock aBlock); -void context(NSString *aDescription, KWVoidBlock aBlock); +void describe(NSString *aDescription, void (^block)(void)); +void context(NSString *aDescription, void (^block)(void)); void registerMatchers(NSString *aNamespacePrefix); -void beforeAll(KWVoidBlock aBlock); -void afterAll(KWVoidBlock aBlock); -void beforeEach(KWVoidBlock aBlock); -void afterEach(KWVoidBlock aBlock); -void it(NSString *aDescription, KWVoidBlock aBlock); -void specify(KWVoidBlock aBlock); -void pending_(NSString *aDescription, KWVoidBlock ignoredBlock); - -void describeWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock aBlock); -void contextWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock aBlock); +void beforeAll(void (^block)(void)); +void afterAll(void (^block)(void)); +void beforeEach(void (^block)(void)); +void afterEach(void (^block)(void)); +void it(NSString *aDescription, void (^block)(void)); +void specify(void (^block)(void)); +void pending_(NSString *aDescription, void (^block)(void)); + +void describeWithCallSite(KWCallSite *aCallSite, NSString *aDescription, void (^block)(void)); +void contextWithCallSite(KWCallSite *aCallSite, NSString *aDescription, void (^block)(void)); void registerMatchersWithCallSite(KWCallSite *aCallSite, NSString *aNamespacePrefix); -void beforeAllWithCallSite(KWCallSite *aCallSite, KWVoidBlock aBlock); -void afterAllWithCallSite(KWCallSite *aCallSite, KWVoidBlock aBlock); -void beforeEachWithCallSite(KWCallSite *aCallSite, KWVoidBlock aBlock); -void afterEachWithCallSite(KWCallSite *aCallSite, KWVoidBlock aBlock); -void itWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock aBlock); -void pendingWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock ignoredBlock); +void beforeAllWithCallSite(KWCallSite *aCallSite, void (^block)(void)); +void afterAllWithCallSite(KWCallSite *aCallSite, void (^block)(void)); +void beforeEachWithCallSite(KWCallSite *aCallSite, void (^block)(void)); +void afterEachWithCallSite(KWCallSite *aCallSite, void (^block)(void)); +void itWithCallSite(KWCallSite *aCallSite, NSString *aDescription, void (^block)(void)); +void pendingWithCallSite(KWCallSite *aCallSite, NSString *aDescription, void (^block)(void)); #define PRAGMA(x) _Pragma (#x) #define PENDING(x) PRAGMA(message ( "Pending: " #x )) diff --git a/Pods/Kiwi/Classes/Core/KWExample.m b/Pods/Kiwi/Classes/Core/KWExample.m new file mode 100644 index 00000000..41dd1a05 --- /dev/null +++ b/Pods/Kiwi/Classes/Core/KWExample.m @@ -0,0 +1,376 @@ +// +// Licensed under the terms in License.txt +// +// Copyright 2010 Allen Ding. All rights reserved. +// + +#import "KWExample.h" +#import "KWExampleSuiteBuilder.h" +#import "KWContextNode.h" +#import "KWMatcherFactory.h" +#import "KWExistVerifier.h" +#import "KWMatchVerifier.h" +#import "KWAsyncVerifier.h" +#import "KWFailure.h" +#import "KWContextNode.h" +#import "KWBeforeEachNode.h" +#import "KWBeforeAllNode.h" +#import "KWItNode.h" +#import "KWAfterEachNode.h" +#import "KWAfterAllNode.h" +#import "KWPendingNode.h" +#import "KWRegisterMatchersNode.h" +#import "KWWorkarounds.h" +#import "KWIntercept.h" +#import "KWExampleNode.h" +#import "KWExampleSuite.h" +#import "KWCallSite.h" +#import "KWSymbolicator.h" + +@interface KWExample () + +@property (nonatomic, readonly) NSMutableArray *verifiers; +@property (nonatomic, readonly) KWMatcherFactory *matcherFactory; +@property (nonatomic, weak) id delegate; +@property (nonatomic, assign) BOOL didNotFinish; +@property (nonatomic, strong) id exampleNode; +@property (nonatomic, assign) BOOL passed; + +- (void)reportResultForExampleNodeWithLabel:(NSString *)label; + +@end + +@implementation KWExample + +- (id)initWithExampleNode:(id)node { + self = [super init]; + if (self) { + _exampleNode = node; + _matcherFactory = [[KWMatcherFactory alloc] init]; + _verifiers = [[NSMutableArray alloc] init]; + _lastInContexts = [[NSMutableArray alloc] init]; + _passed = YES; + } + return self; +} + + +- (BOOL)isLastInContext:(KWContextNode *)context { + for (KWContextNode *contextWhereItLast in self.lastInContexts) { + if (context == contextWhereItLast) { + return YES; + } + } + return NO; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"", self.exampleNode.description]; +} + +#pragma mark - Adding Verifiers + +- (id)addVerifier:(id)aVerifier { + if (![self.verifiers containsObject:aVerifier]) + [self.verifiers addObject:aVerifier]; + + return aVerifier; +} + +- (id)addExistVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite { + id verifier = [KWExistVerifier existVerifierWithExpectationType:anExpectationType callSite:aCallSite reporter:self]; + [self addVerifier:verifier]; + return verifier; +} + +- (id)addMatchVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite { + if (self.unresolvedVerifier) { + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:@"Trying to add another verifier without specifying a matcher for the previous one." + userInfo:nil]; + } + id verifier = [KWMatchVerifier matchVerifierWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:self.matcherFactory reporter:self]; + [self addVerifier:verifier]; + self.unresolvedVerifier = verifier; + return verifier; +} + +- (id)addAsyncVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite timeout:(NSInteger)timeout shouldWait:(BOOL)shouldWait { + id verifier = [KWAsyncVerifier asyncVerifierWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:self.matcherFactory reporter:self probeTimeout:timeout shouldWait: shouldWait]; + [self addVerifier:verifier]; + return verifier; +} + +#pragma mark - Running examples + +- (void)runWithDelegate:(id)delegate; { + self.delegate = delegate; + [self.matcherFactory registerMatcherClassesWithNamespacePrefix:@"KW"]; + [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] setCurrentExample:self]; + [self.exampleNode acceptExampleNodeVisitor:self]; +} + +#pragma mark - Reporting failure + +- (NSString *)descriptionForExampleContext { + NSMutableArray *parts = [NSMutableArray array]; + + for (KWContextNode *context in [[self.exampleNode contextStack] reverseObjectEnumerator]) { + if ([context description] != nil) { + [parts addObject:[[context description] stringByAppendingString:@","]]; + } + } + + return [parts componentsJoinedByString:@" "]; +} + +- (KWFailure *)outputReadyFailureWithFailure:(KWFailure *)aFailure { + NSString *annotatedFailureMessage = [NSString stringWithFormat:@"'%@ %@' [FAILED], %@", + [self descriptionForExampleContext], [self.exampleNode description], + aFailure.message]; + +#if TARGET_IPHONE_SIMULATOR + // \uff1a is the unicode for a fill width colon, as opposed to a regular + // colon character (':'). This escape is performed so that Xcode doesn't + // truncate the error output in the build results window, which is running + // build time specs. + annotatedFailureMessage = [annotatedFailureMessage stringByReplacingOccurrencesOfString:@":" withString:@"\uff1a"]; +#endif // #if TARGET_IPHONE_SIMULATOR + + return [KWFailure failureWithCallSite:aFailure.callSite message:annotatedFailureMessage]; +} + +- (void)reportFailure:(KWFailure *)failure { + self.passed = NO; + [self.delegate example:self didFailWithFailure:[self outputReadyFailureWithFailure:failure]]; +} + +- (void)reportResultForExampleNodeWithLabel:(NSString *)label { + NSLog(@"+ '%@ %@' [%@]", [self descriptionForExampleContext], [self.exampleNode description], label); +} + +#pragma mark - Full description with context + +/** Pending cases will be marked yellow by XCode as not finished, because their description differs for -[SenTestCaseRun start] and -[SenTestCaseRun stop] methods + */ + +- (NSString *)pendingNotFinished { + BOOL reportPending = self.didNotFinish; + self.didNotFinish = YES; + return reportPending ? @"(PENDING)" : @""; +} + +- (NSString *)descriptionWithContext { + NSString *descriptionWithContext = [NSString stringWithFormat:@"%@ %@", + [self descriptionForExampleContext], + [self.exampleNode description] ? [self.exampleNode description] : @""]; + BOOL isPending = [self.exampleNode isKindOfClass:[KWPendingNode class]]; + return isPending ? [descriptionWithContext stringByAppendingString:[self pendingNotFinished]] : descriptionWithContext; +} + +#pragma mark - Visiting Nodes + +- (void)visitRegisterMatchersNode:(KWRegisterMatchersNode *)aNode { + [self.matcherFactory registerMatcherClassesWithNamespacePrefix:aNode.namespacePrefix]; +} + +- (void)visitBeforeAllNode:(KWBeforeAllNode *)aNode { + if (aNode.block == nil) + return; + + aNode.block(); +} + +- (void)visitAfterAllNode:(KWAfterAllNode *)aNode { + if (aNode.block == nil) + return; + + aNode.block(); +} + +- (void)visitBeforeEachNode:(KWBeforeEachNode *)aNode { + if (aNode.block == nil) + return; + + aNode.block(); +} + +- (void)visitAfterEachNode:(KWAfterEachNode *)aNode { + if (aNode.block == nil) + return; + + aNode.block(); +} + +- (void)visitItNode:(KWItNode *)aNode { + if (aNode.block == nil || aNode != self.exampleNode) + return; + + aNode.example = self; + + [aNode.context performExample:self withBlock:^{ + + @try { + + aNode.block(); + +#if KW_TARGET_HAS_INVOCATION_EXCEPTION_BUG + NSException *invocationException = KWGetAndClearExceptionFromAcrossInvocationBoundary(); + [invocationException raise]; +#endif // #if KW_TARGET_HAS_INVOCATION_EXCEPTION_BUG + + // Finish verifying and clear + for (id verifier in self.verifiers) { + [verifier exampleWillEnd]; + } + + if (self.unresolvedVerifier) { + KWFailure *failure = [KWFailure failureWithCallSite:self.unresolvedVerifier.callSite format:@"expected subject not to be nil"]; + [self reportFailure:failure]; + } + + } @catch (NSException *exception) { + KWFailure *failure = [KWFailure failureWithCallSite:aNode.callSite format:@"%@ \"%@\" raised", + [exception name], + [exception reason]]; + [self reportFailure:failure]; + } + + if (self.passed) { + [self reportResultForExampleNodeWithLabel:@"PASSED"]; + } + + // Always clear stubs and spies at the end of it blocks + KWClearStubsAndSpies(); + }]; +} + +- (void)visitPendingNode:(KWPendingNode *)aNode { + if (aNode != self.exampleNode) + return; + + [self reportResultForExampleNodeWithLabel:@"PENDING"]; +} + +- (NSString *)generateDescriptionForAnonymousItNode { + // anonymous specify blocks should only have one verifier, but use the first in any case + return [(self.verifiers)[0] descriptionForAnonymousItNode]; +} + +@end + +#pragma mark - Looking up CallSites + +KWCallSite *callSiteWithAddress(long address); +KWCallSite *callSiteAtAddressIfNecessary(long address); + +KWCallSite *callSiteAtAddressIfNecessary(long address){ + BOOL shouldLookup = [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] isFocused] && ![[KWExampleSuiteBuilder sharedExampleSuiteBuilder] foundFocus]; + return shouldLookup ? callSiteWithAddress(address) : nil; +} + +KWCallSite *callSiteWithAddress(long address){ + NSArray *args = @[@"-d", + @"-p", @(getpid()).stringValue, [NSString stringWithFormat:@"%lx", address]]; + NSString *callSite = [NSString stringWithShellCommand:@"/usr/bin/atos" arguments:args]; + + NSString *pattern = @".+\\((.+):([0-9]+)\\)"; + NSError *e; + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:NSRegularExpressionCaseInsensitive error:&e]; + NSArray *res = [regex matchesInString:callSite options:0 range:NSMakeRange(0, callSite.length)]; + + NSString *fileName = nil; + NSInteger lineNumber = 0; + + for (NSTextCheckingResult *ntcr in res) { + fileName = [callSite substringWithRange:[ntcr rangeAtIndex:1]]; + NSString *lineNumberMatch = [callSite substringWithRange:[ntcr rangeAtIndex:2]]; + lineNumber = lineNumberMatch.integerValue; + } + return [KWCallSite callSiteWithFilename:fileName lineNumber:lineNumber]; +} + +#pragma mark - Building Example Groups + +void describe(NSString *aDescription, void (^block)(void)) { + KWCallSite *callSite = callSiteAtAddressIfNecessary(kwCallerAddress()); + describeWithCallSite(callSite, aDescription, block); +} + +void context(NSString *aDescription, void (^block)(void)) { + KWCallSite *callSite = callSiteAtAddressIfNecessary(kwCallerAddress()); + contextWithCallSite(callSite, aDescription, block); +} + +void registerMatchers(NSString *aNamespacePrefix) { + registerMatchersWithCallSite(nil, aNamespacePrefix); +} + +void beforeAll(void (^block)(void)) { + beforeAllWithCallSite(nil, block); +} + +void afterAll(void (^block)(void)) { + afterAllWithCallSite(nil, block); +} + +void beforeEach(void (^block)(void)) { + beforeEachWithCallSite(nil, block); +} + +void afterEach(void (^block)(void)) { + afterEachWithCallSite(nil, block); +} + +void it(NSString *aDescription, void (^block)(void)) { + KWCallSite *callSite = callSiteAtAddressIfNecessary(kwCallerAddress()); + itWithCallSite(callSite, aDescription, block); +} + +void specify(void (^block)(void)) +{ + itWithCallSite(nil, nil, block); +} + +void pending_(NSString *aDescription, void (^ignoredBlock)(void)) { + pendingWithCallSite(nil, aDescription, ignoredBlock); +} + +void describeWithCallSite(KWCallSite *aCallSite, NSString *aDescription, void (^block)(void)) { + + contextWithCallSite(aCallSite, aDescription, block); +} + +void contextWithCallSite(KWCallSite *aCallSite, NSString *aDescription, void (^block)(void)) { + [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] pushContextNodeWithCallSite:aCallSite description:aDescription]; + block(); + [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] popContextNode]; +} + +void registerMatchersWithCallSite(KWCallSite *aCallSite, NSString *aNamespacePrefix) { + [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] setRegisterMatchersNodeWithCallSite:aCallSite namespacePrefix:aNamespacePrefix]; +} + +void beforeAllWithCallSite(KWCallSite *aCallSite, void (^block)(void)) { + [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] setBeforeAllNodeWithCallSite:aCallSite block:block]; +} + +void afterAllWithCallSite(KWCallSite *aCallSite, void (^block)(void)) { + [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] setAfterAllNodeWithCallSite:aCallSite block:block]; +} + +void beforeEachWithCallSite(KWCallSite *aCallSite, void (^block)(void)) { + [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] setBeforeEachNodeWithCallSite:aCallSite block:block]; +} + +void afterEachWithCallSite(KWCallSite *aCallSite, void (^block)(void)) { + [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] setAfterEachNodeWithCallSite:aCallSite block:block]; +} + +void itWithCallSite(KWCallSite *aCallSite, NSString *aDescription, void (^block)(void)) { + [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] addItNodeWithCallSite:aCallSite description:aDescription block:block]; +} + +void pendingWithCallSite(KWCallSite *aCallSite, NSString *aDescription, void (^ignoredBlock)(void)) { + [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] addPendingNodeWithCallSite:aCallSite description:aDescription]; +} diff --git a/Pods/Kiwi/Classes/KWExampleGroupDelegate.h b/Pods/Kiwi/Classes/Core/KWExampleDelegate.h similarity index 100% rename from Pods/Kiwi/Classes/KWExampleGroupDelegate.h rename to Pods/Kiwi/Classes/Core/KWExampleDelegate.h diff --git a/Pods/Kiwi/Classes/KWExampleNodeVisitor.h b/Pods/Kiwi/Classes/Core/KWExampleNodeVisitor.h similarity index 100% rename from Pods/Kiwi/Classes/KWExampleNodeVisitor.h rename to Pods/Kiwi/Classes/Core/KWExampleNodeVisitor.h diff --git a/Pods/Kiwi/Classes/KWExampleSuite.h b/Pods/Kiwi/Classes/Core/KWExampleSuite.h similarity index 100% rename from Pods/Kiwi/Classes/KWExampleSuite.h rename to Pods/Kiwi/Classes/Core/KWExampleSuite.h diff --git a/Pods/Kiwi/Classes/Core/KWExampleSuite.m b/Pods/Kiwi/Classes/Core/KWExampleSuite.m new file mode 100644 index 00000000..94e9dc63 --- /dev/null +++ b/Pods/Kiwi/Classes/Core/KWExampleSuite.m @@ -0,0 +1,86 @@ +// +// KWExampleSuite.m +// Kiwi +// +// Created by Luke Redpath on 17/10/2011. +// Copyright (c) 2011 Allen Ding. All rights reserved. +// + +#import "KWExampleSuite.h" + +#import "KWAfterAllNode.h" +#import "KWBeforeAllNode.h" +#import "KWContextNode.h" +#import "KWExample.h" +#import "KWStringUtilities.h" +#import "NSMethodSignature+KiwiAdditions.h" +#import + +#define kKWINVOCATION_EXAMPLE_GROUP_KEY @"__KWExampleGroupKey" + +@interface KWExampleSuite() + +@property (nonatomic, strong) KWContextNode *rootNode; +@property (nonatomic, strong) NSMutableArray *examples; + +@end + +@implementation KWExampleSuite + +- (id)initWithRootNode:(KWContextNode *)contextNode { + self = [super init]; + if (self) { + _rootNode = contextNode; + _examples = [[NSMutableArray alloc] init]; + } + return self; +} + + +- (void)addExample:(KWExample *)example { + [self.examples addObject:example]; + example.suite = self; +} + +- (void)markLastExampleAsLastInContext:(KWContextNode *)context +{ + if ([self.examples count] > 0) { + KWExample *lastExample = (KWExample *)[self.examples lastObject]; + [lastExample.lastInContexts addObject:context]; + } +} + +- (NSArray *)invocationsForTestCase { + NSMutableArray *invocations = [NSMutableArray array]; + + // Add a single dummy invocation for each example group + + for (KWExample *exampleGroup in self.examples) { + NSMethodSignature *methodSignature = [NSMethodSignature signatureWithObjCTypes:[KWEncodingForDefaultMethod() UTF8String]]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSignature]; + [invocations addObject:invocation]; + [invocation kw_setExample:exampleGroup]; + } + + return invocations; +} + +@end + +#pragma mark - + +// because SenTest will modify the invocation target, we'll have to store +// another reference to the example group so we can retrieve it later + +@implementation NSInvocation (KWExampleGroup) + +- (void)kw_setExample:(KWExample *)exampleGroup { + objc_setAssociatedObject(self, kKWINVOCATION_EXAMPLE_GROUP_KEY, exampleGroup, OBJC_ASSOCIATION_RETAIN); +} + +- (KWExample *)kw_example { + return objc_getAssociatedObject(self, kKWINVOCATION_EXAMPLE_GROUP_KEY); +} + +@end + diff --git a/Pods/Kiwi/Classes/KWExampleGroupBuilder.h b/Pods/Kiwi/Classes/Core/KWExampleSuiteBuilder.h similarity index 65% rename from Pods/Kiwi/Classes/KWExampleGroupBuilder.h rename to Pods/Kiwi/Classes/Core/KWExampleSuiteBuilder.h index f9f26af9..a2dc30a3 100644 --- a/Pods/Kiwi/Classes/KWExampleGroupBuilder.h +++ b/Pods/Kiwi/Classes/Core/KWExampleSuiteBuilder.h @@ -12,35 +12,33 @@ @class KWExampleSuite; @class KWContextNode; -@interface KWExampleGroupBuilder : NSObject +@interface KWExampleSuiteBuilder : NSObject #pragma mark - Initializing -+ (id)sharedExampleGroupBuilder; ++ (id)sharedExampleSuiteBuilder; #pragma mark - Building Example Groups -@property (nonatomic, readonly) BOOL isBuildingExampleGroup; -@property (nonatomic, retain, readonly) KWExampleSuite *exampleSuite; -@property (nonatomic, retain) KWExample *currentExample; -@property (nonatomic, retain) KWCallSite *focusedCallSite; +@property (nonatomic, readonly) BOOL isBuildingExampleSuite; +@property (nonatomic, strong, readonly) KWExampleSuite *currentExampleSuite; +@property (nonatomic, strong) KWExample *currentExample; +@property (nonatomic, strong) KWCallSite *focusedCallSite; //spec file name:line number of callsite - (void)focusWithURI:(NSString *)nodeUrl; -- (KWExampleSuite *)buildExampleGroups:(void (^)(void))buildingBlock; -- (KWExample *)currentExample; +- (KWExampleSuite *)buildExampleSuite:(void (^)(void))buildingBlock; - (void)pushContextNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription; - (void)popContextNode; - (void)setRegisterMatchersNodeWithCallSite:(KWCallSite *)aCallSite namespacePrefix:(NSString *)aNamespacePrefix; -- (void)setBeforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock; -- (void)setAfterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock; -- (void)setBeforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock; -- (void)setAfterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock; -- (void)addItNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(KWVoidBlock)aBlock; +- (void)setBeforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block; +- (void)setAfterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block; +- (void)setBeforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block; +- (void)setAfterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block; +- (void)addItNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(void (^)(void))block; - (void)addPendingNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription; - - (BOOL)isFocused; - (BOOL)foundFocus; diff --git a/Pods/Kiwi/Classes/KWExampleGroupBuilder.m b/Pods/Kiwi/Classes/Core/KWExampleSuiteBuilder.m similarity index 69% rename from Pods/Kiwi/Classes/KWExampleGroupBuilder.m rename to Pods/Kiwi/Classes/Core/KWExampleSuiteBuilder.m index 969ee91b..f1fc005a 100644 --- a/Pods/Kiwi/Classes/KWExampleGroupBuilder.m +++ b/Pods/Kiwi/Classes/Core/KWExampleSuiteBuilder.m @@ -4,96 +4,62 @@ // Copyright 2010 Allen Ding. All rights reserved. // -#import "KWExampleGroupBuilder.h" -#import "KWExample.h" +#import "KWExampleSuiteBuilder.h" + #import "KWAfterAllNode.h" #import "KWAfterEachNode.h" #import "KWBeforeAllNode.h" #import "KWBeforeEachNode.h" +#import "KWCallSite.h" #import "KWContextNode.h" +#import "KWExample.h" +#import "KWExampleSuite.h" #import "KWItNode.h" #import "KWPendingNode.h" #import "KWRegisterMatchersNode.h" -#import "KWExampleSuite.h" -#import "KWCallSite.h" #import "KWSymbolicator.h" -@interface KWExampleGroupBuilder() { - NSMutableSet *suites; -} +@interface KWExampleSuiteBuilder() #pragma mark - Building Example Groups -@property (nonatomic, retain, readwrite) KWExampleSuite *exampleSuite; +@property (nonatomic, strong) KWExampleSuite *currentExampleSuite; @property (nonatomic, readonly) NSMutableArray *contextNodeStack; +@property (nonatomic, strong) NSMutableSet *suites; + @property (nonatomic, assign) BOOL focusedContextNode; @property (nonatomic, assign) BOOL focusedItNode; @end - -@implementation KWExampleGroupBuilder - -@synthesize exampleSuite; -@synthesize currentExample; -@synthesize focusedCallSite; +@implementation KWExampleSuiteBuilder #pragma mark - Initializing -static KWExampleGroupBuilder *sharedExampleGroupBuilder = nil; - (id)init { - if ((self = [super init])) { - contextNodeStack = [[NSMutableArray alloc] init]; - suites = [[NSMutableSet alloc] init]; + self = [super init]; + if (self) { + _contextNodeStack = [[NSMutableArray alloc] init]; + _suites = [[NSMutableSet alloc] init]; [self focusWithURI:[[[NSProcessInfo processInfo] environment] objectForKey:@"KW_SPEC"]]; } return self; } -- (void)dealloc { - [suites release]; - [exampleSuite release]; - [contextNodeStack release]; - [focusedCallSite release]; - [super dealloc]; -} - -+ (id)sharedExampleGroupBuilder { - if (sharedExampleGroupBuilder == nil) { - sharedExampleGroupBuilder = [[super allocWithZone:nil] init]; - } - return sharedExampleGroupBuilder; -} ++ (id)sharedExampleSuiteBuilder { + static KWExampleSuiteBuilder *sharedExampleSuiteBuilder = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedExampleSuiteBuilder = [self new]; + }); -+ (id)allocWithZone:(NSZone *)zone { - return [[self sharedExampleGroupBuilder] retain]; + return sharedExampleSuiteBuilder; } -- (id)copyWithZone:(NSZone *)zone { - return self; -} - -- (id)retain { - return self; -} - -- (NSUInteger)retainCount { - return NSUIntegerMax; -} - -- (oneway void)release { -} - -- (id)autorelease { - return self; -} - -#pragma mark - Building Example Groups - #pragma mark - Focus - (void)focusWithURI:(NSString *)nodeUrl { @@ -104,13 +70,13 @@ - (void)focusWithURI:(NSString *)nodeUrl { } - (void)setFocusedCallSite:(KWCallSite *)aFocusedCallSite { - focusedCallSite = aFocusedCallSite; + _focusedCallSite = aFocusedCallSite; self.focusedItNode = NO; self.focusedContextNode = NO; } - (BOOL)isFocused { - return !!self.focusedCallSite; + return self.focusedCallSite != nil; } - (BOOL)foundFocus { @@ -119,25 +85,23 @@ - (BOOL)foundFocus { #pragma mark - Building Example Groups -@synthesize contextNodeStack; - -- (BOOL)isBuildingExampleGroup { +- (BOOL)isBuildingExampleSuite { return [self.contextNodeStack count] > 0; } -- (KWExampleSuite *)buildExampleGroups:(void (^)(void))buildingBlock +- (KWExampleSuite *)buildExampleSuite:(void (^)(void))buildingBlock { KWContextNode *rootNode = [KWContextNode contextNodeWithCallSite:nil parentContext:nil description:nil]; - self.exampleSuite = [[[KWExampleSuite alloc] initWithRootNode:rootNode] autorelease]; + self.currentExampleSuite = [[KWExampleSuite alloc] initWithRootNode:rootNode]; - [suites addObject:self.exampleSuite]; + [self.suites addObject:self.currentExampleSuite]; [self.contextNodeStack addObject:rootNode]; buildingBlock(); [self.contextNodeStack removeAllObjects]; - return self.exampleSuite; + return self.currentExampleSuite; } - (void)pushContextNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription { @@ -166,74 +130,73 @@ - (BOOL)shouldFocusContextNodeWithCallSite:(KWCallSite *)aCallSite parentNode:(K - (void)popContextNode { KWContextNode *contextNode = [self.contextNodeStack lastObject]; - [self.exampleSuite markLastExampleAsLastInContext:contextNode]; + [self.currentExampleSuite markLastExampleAsLastInContext:contextNode]; if ([self.contextNodeStack count] == 1) - [NSException raise:@"KWExampleGroupBuilderException" format:@"there is no open context to pop"]; + [NSException raise:@"KWExampleSuiteBuilderException" format:@"there is no open context to pop"]; [self.contextNodeStack removeLastObject]; } - (void)setRegisterMatchersNodeWithCallSite:(KWCallSite *)aCallSite namespacePrefix:(NSString *)aNamespacePrefix { if ([self.contextNodeStack count] == 0) - [NSException raise:@"KWExampleGroupBuilderException" format:@"an example group has not been started"]; + [NSException raise:@"KWExampleSuiteBuilderException" format:@"an example group has not been started"]; KWContextNode *contextNode = [self.contextNodeStack lastObject]; KWRegisterMatchersNode *registerMatchersNode = [KWRegisterMatchersNode registerMatchersNodeWithCallSite:aCallSite namespacePrefix:aNamespacePrefix]; [contextNode setRegisterMatchersNode:registerMatchersNode]; } -- (void)setBeforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock { +- (void)setBeforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block { if ([self.contextNodeStack count] == 0) - [NSException raise:@"KWExampleGroupBuilderException" format:@"an example group has not been started"]; + [NSException raise:@"KWExampleSuiteBuilderException" format:@"an example group has not been started"]; KWContextNode *contextNode = [self.contextNodeStack lastObject]; - KWBeforeAllNode *beforeAllNode = [KWBeforeAllNode beforeAllNodeWithCallSite:aCallSite block:aBlock]; + KWBeforeAllNode *beforeAllNode = [KWBeforeAllNode beforeAllNodeWithCallSite:aCallSite block:block]; [contextNode setBeforeAllNode:beforeAllNode]; } -- (void)setAfterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock { +- (void)setAfterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block { if ([self.contextNodeStack count] == 0) - [NSException raise:@"KWExampleGroupBuilderException" format:@"an example group has not been started"]; + [NSException raise:@"KWExampleSuiteBuilderException" format:@"an example group has not been started"]; KWContextNode *contextNode = [self.contextNodeStack lastObject]; - KWAfterAllNode *afterAllNode = [KWAfterAllNode afterAllNodeWithCallSite:aCallSite block:aBlock]; + KWAfterAllNode *afterAllNode = [KWAfterAllNode afterAllNodeWithCallSite:aCallSite block:block]; [contextNode setAfterAllNode:afterAllNode]; } -- (void)setBeforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock { +- (void)setBeforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block { if ([self.contextNodeStack count] == 0) - [NSException raise:@"KWExampleGroupBuilderException" format:@"an example group has not been started"]; + [NSException raise:@"KWExampleSuiteBuilderException" format:@"an example group has not been started"]; KWContextNode *contextNode = [self.contextNodeStack lastObject]; - KWBeforeEachNode *beforeEachNode = [KWBeforeEachNode beforeEachNodeWithCallSite:aCallSite block:aBlock]; + KWBeforeEachNode *beforeEachNode = [KWBeforeEachNode beforeEachNodeWithCallSite:aCallSite block:block]; [contextNode setBeforeEachNode:beforeEachNode]; } -- (void)setAfterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock { +- (void)setAfterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block { if ([self.contextNodeStack count] == 0) - [NSException raise:@"KWExampleGroupBuilderException" format:@"an example group has not been started"]; + [NSException raise:@"KWExampleSuiteBuilderException" format:@"an example group has not been started"]; KWContextNode *contextNode = [self.contextNodeStack lastObject]; - KWAfterEachNode *afterEachNode = [KWAfterEachNode afterEachNodeWithCallSite:aCallSite block:aBlock]; + KWAfterEachNode *afterEachNode = [KWAfterEachNode afterEachNodeWithCallSite:aCallSite block:block]; [contextNode setAfterEachNode:afterEachNode]; } -- (void)addItNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(KWVoidBlock)aBlock { +- (void)addItNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(void (^)(void))block { if ([self.contextNodeStack count] == 0) - [NSException raise:@"KWExampleGroupBuilderException" format:@"an example group has not been started"]; + [NSException raise:@"KWExampleSuiteBuilderException" format:@"an example group has not been started"]; KWContextNode *contextNode = [self.contextNodeStack lastObject]; if (self.isFocused && ![self shouldAddItNodeWithCallSite:aCallSite toContextNode:contextNode]) return; - KWItNode* itNode = [KWItNode itNodeWithCallSite:aCallSite description:aDescription context:contextNode block:aBlock]; + KWItNode* itNode = [KWItNode itNodeWithCallSite:aCallSite description:aDescription context:contextNode block:block]; [contextNode addItNode:itNode]; KWExample *example = [[KWExample alloc] initWithExampleNode:itNode]; - [self.exampleSuite addExample:example]; - [example release]; + [self.currentExampleSuite addExample:example]; } - (BOOL)shouldAddItNodeWithCallSite:(KWCallSite *)aCallSite toContextNode:(KWContextNode *)contextNode { @@ -250,14 +213,13 @@ - (BOOL)shouldAddItNodeWithCallSite:(KWCallSite *)aCallSite toContextNode:(KWCon - (void)addPendingNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription { if ([self.contextNodeStack count] == 0) - [NSException raise:@"KWExampleGroupBuilderException" format:@"an example group has not been started"]; + [NSException raise:@"KWExampleSuiteBuilderException" format:@"an example group has not been started"]; KWContextNode *contextNode = [self.contextNodeStack lastObject]; KWPendingNode *pendingNode = [KWPendingNode pendingNodeWithCallSite:aCallSite context:contextNode description:aDescription]; [contextNode addPendingNode:pendingNode]; KWExample *example = [[KWExample alloc] initWithExampleNode:pendingNode]; - [self.exampleSuite addExample:example]; - [example release]; + [self.currentExampleSuite addExample:example]; } @end diff --git a/Pods/Kiwi/Classes/KWExpectationType.h b/Pods/Kiwi/Classes/Core/KWExpectationType.h similarity index 100% rename from Pods/Kiwi/Classes/KWExpectationType.h rename to Pods/Kiwi/Classes/Core/KWExpectationType.h diff --git a/Pods/Kiwi/Classes/KWFailure.h b/Pods/Kiwi/Classes/Core/KWFailure.h similarity index 92% rename from Pods/Kiwi/Classes/KWFailure.h rename to Pods/Kiwi/Classes/Core/KWFailure.h index 9be5f8be..d516d68b 100644 --- a/Pods/Kiwi/Classes/KWFailure.h +++ b/Pods/Kiwi/Classes/Core/KWFailure.h @@ -21,7 +21,7 @@ #pragma mark - Properties @property (nonatomic, readonly) NSString *message; -@property (nonatomic, readonly) KWCallSite *callSite; +@property (nonatomic, weak, readonly) KWCallSite *callSite; #pragma mark - Getting Exception Representations diff --git a/Pods/Kiwi/Classes/KWFailure.m b/Pods/Kiwi/Classes/Core/KWFailure.m similarity index 59% rename from Pods/Kiwi/Classes/KWFailure.m rename to Pods/Kiwi/Classes/Core/KWFailure.m index 0b3efa2a..4bbea8f0 100644 --- a/Pods/Kiwi/Classes/KWFailure.m +++ b/Pods/Kiwi/Classes/Core/KWFailure.m @@ -13,9 +13,10 @@ @implementation KWFailure #pragma mark - Initializing - (id)initWithCallSite:(KWCallSite *)aCallSite message:(NSString *)aMessage { - if ((self = [super init])) { - callSite = [aCallSite retain]; - message = [aMessage copy]; + self = [super init]; + if (self) { + _callSite = aCallSite; + _message = [aMessage copy]; } return self; @@ -24,42 +25,33 @@ - (id)initWithCallSite:(KWCallSite *)aCallSite message:(NSString *)aMessage { - (id)initWithCallSite:(KWCallSite *)aCallSite format:(NSString *)format, ... { va_list argumentList; va_start(argumentList, format); - NSString *aMessage = [[[NSString alloc] initWithFormat:format arguments:argumentList] autorelease]; + NSString *aMessage = [[NSString alloc] initWithFormat:format arguments:argumentList]; return [self initWithCallSite:aCallSite message:aMessage]; } + (id)failureWithCallSite:(KWCallSite *)aCallSite message:(NSString *)aMessage { - return [[[self alloc] initWithCallSite:aCallSite message:aMessage] autorelease]; + return [[self alloc] initWithCallSite:aCallSite message:aMessage]; } + (id)failureWithCallSite:(KWCallSite *)aCallSite format:(NSString *)format, ... { va_list argumentList; va_start(argumentList, format); - NSString *message = [[[NSString alloc] initWithFormat:format arguments:argumentList] autorelease]; + NSString *message = [[NSString alloc] initWithFormat:format arguments:argumentList]; return [self failureWithCallSite:aCallSite message:message]; } -- (void)dealloc { - [callSite release]; - [message release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize message; -@synthesize callSite; - #pragma mark - Getting Exception Representations - (NSException *)exceptionValue { NSDictionary *userInfo = nil; if (self.callSite) { NSNumber *lineNumber = @(self.callSite.lineNumber); - userInfo = @{SenTestFilenameKey: self.callSite.filename, - SenTestLineNumberKey: lineNumber}; + userInfo = @{ + @"SenTestFilenameKey": self.callSite.filename, + @"SenTestLineNumberKey": lineNumber + }; } - return [NSException exceptionWithName:@"KWFailureException" reason:message userInfo:userInfo]; + return [NSException exceptionWithName:@"KWFailureException" reason:self.message userInfo:userInfo]; } @end diff --git a/Pods/Kiwi/Classes/KWFormatter.h b/Pods/Kiwi/Classes/Core/KWFormatter.h similarity index 82% rename from Pods/Kiwi/Classes/KWFormatter.h rename to Pods/Kiwi/Classes/Core/KWFormatter.h index 67ca87c9..34f86553 100644 --- a/Pods/Kiwi/Classes/KWFormatter.h +++ b/Pods/Kiwi/Classes/Core/KWFormatter.h @@ -11,5 +11,6 @@ #pragma mark - Getting Descriptions + (NSString *)formatObject:(id)anObject; ++ (NSString *)formatObjectIncludingClass:(id)anObject; @end diff --git a/Pods/Kiwi/Classes/KWFormatter.m b/Pods/Kiwi/Classes/Core/KWFormatter.m similarity index 74% rename from Pods/Kiwi/Classes/KWFormatter.m rename to Pods/Kiwi/Classes/Core/KWFormatter.m index bd801e0d..f12917e2 100644 --- a/Pods/Kiwi/Classes/KWFormatter.m +++ b/Pods/Kiwi/Classes/Core/KWFormatter.m @@ -24,13 +24,21 @@ + (NSString *)formatObject:(id)anObject { return [anObject description]; } ++ (NSString *)formatObjectIncludingClass:(id)anObject { + NSString *classString = [[anObject class] description]; + + if ([anObject isKindOfClass:[NSString class]]) + classString = @"NSString"; + + return [NSString stringWithFormat:@"(%@) %@", classString, [self formatObject:anObject]]; +} #pragma mark - Private + (NSString *)formattedCollection:(id)collection { - NSMutableString *description = [[[NSMutableString alloc] initWithString:@"("] autorelease]; + NSMutableString *description = [[NSMutableString alloc] initWithString:@"("]; NSUInteger index = 0; for (id object in collection) { diff --git a/Pods/Kiwi/Classes/KWFutureObject.h b/Pods/Kiwi/Classes/Core/KWFutureObject.h similarity index 100% rename from Pods/Kiwi/Classes/KWFutureObject.h rename to Pods/Kiwi/Classes/Core/KWFutureObject.h diff --git a/Pods/Kiwi/Classes/Core/KWFutureObject.m b/Pods/Kiwi/Classes/Core/KWFutureObject.m new file mode 100644 index 00000000..52c654b5 --- /dev/null +++ b/Pods/Kiwi/Classes/Core/KWFutureObject.m @@ -0,0 +1,40 @@ +// +// KWFutureObject.m +// iOSFalconCore +// +// Created by Luke Redpath on 13/01/2011. +// Copyright 2011 LJR Software Limited. All rights reserved. +// + +#import "KWFutureObject.h" + +@interface KWFutureObject() + +@property (nonatomic, strong) KWFutureObjectBlock block; + +@end + +@implementation KWFutureObject + ++ (id)objectWithObjectPointer:(id *)pointer { + return [self futureObjectWithBlock:^{ return *pointer; }]; +} + ++ (id)futureObjectWithBlock:(KWFutureObjectBlock)block { + return [[self alloc] initWithBlock:block]; +} + +- (id)initWithBlock:(KWFutureObjectBlock)aBlock { + self = [super init]; + if (self) { + _block = [aBlock copy]; + } + return self; +} + +- (id)object; { + return self.block(); +} + + +@end diff --git a/Pods/Kiwi/Classes/KWInvocationCapturer.h b/Pods/Kiwi/Classes/Core/KWInvocationCapturer.h similarity index 88% rename from Pods/Kiwi/Classes/KWInvocationCapturer.h rename to Pods/Kiwi/Classes/Core/KWInvocationCapturer.h index a75c2078..c02ab0c6 100644 --- a/Pods/Kiwi/Classes/KWInvocationCapturer.h +++ b/Pods/Kiwi/Classes/Core/KWInvocationCapturer.h @@ -20,8 +20,8 @@ #pragma mark - Properties -@property (nonatomic, readonly) id delegate; -@property (nonatomic, readonly) NSDictionary *userInfo; +@property (nonatomic, weak, readonly) id delegate; +@property (nonatomic, strong, readonly) NSDictionary *userInfo; @end diff --git a/Pods/Kiwi/Classes/KWInvocationCapturer.m b/Pods/Kiwi/Classes/Core/KWInvocationCapturer.m similarity index 92% rename from Pods/Kiwi/Classes/KWInvocationCapturer.m rename to Pods/Kiwi/Classes/Core/KWInvocationCapturer.m index a9e3c867..e340972b 100644 --- a/Pods/Kiwi/Classes/KWInvocationCapturer.m +++ b/Pods/Kiwi/Classes/Core/KWInvocationCapturer.m @@ -18,7 +18,7 @@ - (id)initWithDelegate:(id)aDelegate { - (id)initWithDelegate:(id)aDelegate userInfo:(NSDictionary *)aUserInfo { delegate = aDelegate; - userInfo = [aUserInfo retain]; + userInfo = aUserInfo; return self; } @@ -27,13 +27,9 @@ + (id)invocationCapturerWithDelegate:(id)aDelegate { } + (id)invocationCapturerWithDelegate:(id)aDelegate userInfo:(NSDictionary *)aUserInfo { - return [[[self alloc] initWithDelegate:aDelegate userInfo:aUserInfo] autorelease]; + return [[self alloc] initWithDelegate:aDelegate userInfo:aUserInfo]; } -- (void)dealloc { - [userInfo release]; - [super dealloc]; -} #pragma mark - Properties diff --git a/Pods/Kiwi/Classes/KWMatcher.h b/Pods/Kiwi/Classes/Core/KWMatcher.h similarity index 83% rename from Pods/Kiwi/Classes/KWMatcher.h rename to Pods/Kiwi/Classes/Core/KWMatcher.h index 6f88dcef..407cd9d3 100644 --- a/Pods/Kiwi/Classes/KWMatcher.h +++ b/Pods/Kiwi/Classes/Core/KWMatcher.h @@ -7,10 +7,7 @@ #import "KiwiConfiguration.h" #import "KWMatching.h" -@interface KWMatcher : NSObject { -@protected - id subject; -} +@interface KWMatcher : NSObject #pragma mark - Initializing @@ -20,7 +17,7 @@ #pragma mark - Properties -@property (nonatomic, readonly) id subject; +@property (nonatomic, strong) id subject; #pragma mark - Getting Matcher Strings diff --git a/Pods/Kiwi/Classes/KWMatcher.m b/Pods/Kiwi/Classes/Core/KWMatcher.m similarity index 83% rename from Pods/Kiwi/Classes/KWMatcher.m rename to Pods/Kiwi/Classes/Core/KWMatcher.m index 8ea178a1..9b3c481f 100644 --- a/Pods/Kiwi/Classes/KWMatcher.m +++ b/Pods/Kiwi/Classes/Core/KWMatcher.m @@ -13,32 +13,27 @@ @implementation KWMatcher #pragma mark - Initializing - (id)initWithSubject:(id)anObject { - if ((self = [super init])) { - subject = [anObject retain]; + self = [super init]; + if (self) { + _subject = anObject; } return self; } + (id)matcherWithSubject:(id)anObject { - return [[[self alloc] initWithSubject:anObject] autorelease]; + return [[self alloc] initWithSubject:anObject]; } -- (void)dealloc { - [subject release]; - [super dealloc]; -} #pragma mark - Properties -@synthesize subject; - - (id)subject { - if ([subject isKindOfClass:[KWFutureObject class]]) { - return [(KWFutureObject *)subject object]; + if ([_subject isKindOfClass:[KWFutureObject class]]) { + return [(KWFutureObject *)_subject object]; } - return subject; + return _subject; } #pragma mark - Getting Matcher Strings diff --git a/Pods/Kiwi/Classes/KWMatcherFactory.h b/Pods/Kiwi/Classes/Core/KWMatcherFactory.h similarity index 100% rename from Pods/Kiwi/Classes/KWMatcherFactory.h rename to Pods/Kiwi/Classes/Core/KWMatcherFactory.h diff --git a/Pods/Kiwi/Classes/KWMatcherFactory.m b/Pods/Kiwi/Classes/Core/KWMatcherFactory.m similarity index 74% rename from Pods/Kiwi/Classes/KWMatcherFactory.m rename to Pods/Kiwi/Classes/Core/KWMatcherFactory.m index b981ed29..79885bf8 100644 --- a/Pods/Kiwi/Classes/KWMatcherFactory.m +++ b/Pods/Kiwi/Classes/Core/KWMatcherFactory.m @@ -11,10 +11,10 @@ #import "KWUserDefinedMatcher.h" #import "KWMatchers.h" -@interface KWMatcherFactory() { - NSMutableDictionary *matcherClassChains; -} -- (Class)matcherClassForSelector:(SEL)aSelector subject:(id)anObject; +@interface KWMatcherFactory() + +@property (nonatomic, strong) NSMutableDictionary *matcherClassChains; + @end @implementation KWMatcherFactory @@ -22,39 +22,29 @@ @implementation KWMatcherFactory #pragma mark - Initializing - (id)init { - if ((self = [super init])) { - matcherClassChains = [[NSMutableDictionary alloc] init]; - registeredMatcherClasses = [[NSMutableArray alloc] init]; + self = [super init]; + if (self) { + _matcherClassChains = [[NSMutableDictionary alloc] init]; + _registeredMatcherClasses = [[NSMutableArray alloc] init]; } return self; } -- (void)dealloc { - [registeredMatcherClasses release]; - [matcherClassChains release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize registeredMatcherClasses; - #pragma mark - Registering Matcher Classes - (void)registerMatcherClass:(Class)aClass { if ([self.registeredMatcherClasses containsObject:aClass]) return; - [(NSMutableArray *)registeredMatcherClasses addObject:aClass]; + [(NSMutableArray *)self.registeredMatcherClasses addObject:aClass]; for (NSString *verificationSelectorString in [aClass matcherStrings]) { - NSMutableArray *matcherClassChain = matcherClassChains[verificationSelectorString]; + NSMutableArray *matcherClassChain = self.matcherClassChains[verificationSelectorString]; if (matcherClassChain == nil) { matcherClassChain = [[NSMutableArray alloc] init]; - matcherClassChains[verificationSelectorString] = matcherClassChain; - [matcherClassChain release]; + self.matcherClassChains[verificationSelectorString] = matcherClassChain; } [matcherClassChain removeObject:aClass]; @@ -69,7 +59,7 @@ - (void)registerMatcherClassesWithNamespacePrefix:(NSString *)aNamespacePrefix { if (matcherClasses == nil) { matcherClasses = [[NSMutableArray alloc] init]; int numberOfClasses = objc_getClassList(NULL, 0); - Class *classes = malloc(sizeof(Class) * numberOfClasses); + Class *classes = (Class *)malloc(sizeof(Class) * numberOfClasses); numberOfClasses = objc_getClassList(classes, numberOfClasses); if (numberOfClasses == 0) { @@ -110,7 +100,7 @@ - (void)registerMatcherClassesWithNamespacePrefix:(NSString *)aNamespacePrefix { #pragma mark - Getting Method Signatures - (NSMethodSignature *)methodSignatureForMatcherSelector:(SEL)aSelector { - NSMutableArray *matcherClassChain = matcherClassChains[NSStringFromSelector(aSelector)]; + NSMutableArray *matcherClassChain = self.matcherClassChains[NSStringFromSelector(aSelector)]; if ([matcherClassChain count] == 0) return nil; @@ -131,13 +121,13 @@ - (KWMatcher *)matcherFromInvocation:(NSInvocation *)anInvocation subject:(id)su // see if we can match with a user-defined matcher instead return [[KWMatchers matchers] matcherForSelector:selector subject:subject]; } - return [[[matcherClass alloc] initWithSubject:subject] autorelease]; + return [[matcherClass alloc] initWithSubject:subject]; } #pragma mark - Private methods - (Class)matcherClassForSelector:(SEL)aSelector subject:(id)anObject { - NSArray *matcherClassChain = matcherClassChains[NSStringFromSelector(aSelector)]; + NSArray *matcherClassChain = self.matcherClassChains[NSStringFromSelector(aSelector)]; for (Class matcherClass in matcherClassChain) { if ([matcherClass canMatchSubject:anObject]) diff --git a/Pods/Kiwi/Classes/KWMatchers.h b/Pods/Kiwi/Classes/Core/KWMatchers.h similarity index 100% rename from Pods/Kiwi/Classes/KWMatchers.h rename to Pods/Kiwi/Classes/Core/KWMatchers.h diff --git a/Pods/Kiwi/Classes/KWMatchers.m b/Pods/Kiwi/Classes/Core/KWMatchers.m similarity index 90% rename from Pods/Kiwi/Classes/KWMatchers.m rename to Pods/Kiwi/Classes/Core/KWMatchers.m index ede45e45..ab278957 100644 --- a/Pods/Kiwi/Classes/KWMatchers.m +++ b/Pods/Kiwi/Classes/Core/KWMatchers.m @@ -21,17 +21,18 @@ @implementation KWMatchers static id sharedMatchers = nil; + (void)initialize { - if (self == [KWMatchers class]) { - sharedMatchers = [[self alloc] init]; - } + if (self == [KWMatchers class]) { + sharedMatchers = [[self alloc] init]; + } } + (id)matchers { - return sharedMatchers; + return sharedMatchers; } - (id)init { - if ((self = [super init])) { + self = [super init]; + if (self) { userDefinedMatchers = [[NSMutableDictionary alloc] init]; } return self; diff --git a/Pods/Kiwi/Classes/KWMatching.h b/Pods/Kiwi/Classes/Core/KWMatching.h similarity index 97% rename from Pods/Kiwi/Classes/KWMatching.h rename to Pods/Kiwi/Classes/Core/KWMatching.h index 5a7dfd11..bf7c81ac 100644 --- a/Pods/Kiwi/Classes/KWMatching.h +++ b/Pods/Kiwi/Classes/Core/KWMatching.h @@ -24,6 +24,7 @@ @optional +- (BOOL)isNilMatcher; - (BOOL)shouldBeEvaluatedAtEndOfExample; - (BOOL)willEvaluateMultipleTimes; - (void)setWillEvaluateMultipleTimes:(BOOL)shouldEvaluateMultipleTimes; diff --git a/Pods/Kiwi/Classes/KWMessageSpying.h b/Pods/Kiwi/Classes/Core/KWMessageSpying.h similarity index 100% rename from Pods/Kiwi/Classes/KWMessageSpying.h rename to Pods/Kiwi/Classes/Core/KWMessageSpying.h diff --git a/Pods/Kiwi/Classes/KWMessageTracker.h b/Pods/Kiwi/Classes/Core/KWMessageTracker.h similarity index 100% rename from Pods/Kiwi/Classes/KWMessageTracker.h rename to Pods/Kiwi/Classes/Core/KWMessageTracker.h diff --git a/Pods/Kiwi/Classes/KWMessageTracker.m b/Pods/Kiwi/Classes/Core/KWMessageTracker.m similarity index 82% rename from Pods/Kiwi/Classes/KWMessageTracker.m rename to Pods/Kiwi/Classes/Core/KWMessageTracker.m index 5939b39c..121e374b 100644 --- a/Pods/Kiwi/Classes/KWMessageTracker.m +++ b/Pods/Kiwi/Classes/Core/KWMessageTracker.m @@ -12,7 +12,7 @@ @interface KWMessageTracker() #pragma mark - Properties -@property (nonatomic, readwrite) NSUInteger receivedCount; +@property (nonatomic, assign) NSUInteger receivedCount; @end @@ -21,35 +21,22 @@ @implementation KWMessageTracker #pragma mark - Initializing - (id)initWithSubject:(id)anObject messagePattern:(KWMessagePattern *)aMessagePattern countType:(KWCountType)aCountType count:(NSUInteger)aCount { - if ((self = [super init])) { - subject = [anObject retain]; - messagePattern = [aMessagePattern retain]; - countType = aCountType; - count = aCount; - [anObject addMessageSpy:self forMessagePattern:messagePattern]; + self = [super init]; + if (self) { + _subject = anObject; + _messagePattern = aMessagePattern; + _countType = aCountType; + _count = aCount; + [anObject addMessageSpy:self forMessagePattern:aMessagePattern]; } return self; } + (id)messageTrackerWithSubject:(id)anObject messagePattern:(KWMessagePattern *)aMessagePattern countType:(KWCountType)aCountType count:(NSUInteger)aCount { - return [[[self alloc] initWithSubject:anObject messagePattern:aMessagePattern countType:aCountType count:aCount] autorelease]; + return [[self alloc] initWithSubject:anObject messagePattern:aMessagePattern countType:aCountType count:aCount]; } -- (void)dealloc { - [subject release]; - [messagePattern release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize subject; -@synthesize messagePattern; -@synthesize countType; -@synthesize count; -@synthesize receivedCount; - #pragma mark - Spying on Messages - (void)object:(id)anObject didReceiveInvocation:(NSInvocation *)anInvocation { diff --git a/Pods/Kiwi/Classes/KWNull.h b/Pods/Kiwi/Classes/Core/KWNull.h similarity index 100% rename from Pods/Kiwi/Classes/KWNull.h rename to Pods/Kiwi/Classes/Core/KWNull.h diff --git a/Pods/Kiwi/Classes/Core/KWNull.m b/Pods/Kiwi/Classes/Core/KWNull.m new file mode 100644 index 00000000..6d3bf730 --- /dev/null +++ b/Pods/Kiwi/Classes/Core/KWNull.m @@ -0,0 +1,25 @@ +// +// Licensed under the terms in License.txt +// +// Copyright 2010 Allen Ding. All rights reserved. +// + +#import "KWNull.h" + +@implementation KWNull + +#pragma mark - Initializing + + ++ (id)null { + static KWNull *sharedNull = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedNull = [self new]; + + }); + + return sharedNull; +} + +@end diff --git a/Pods/Kiwi/Classes/KWObjCUtilities.h b/Pods/Kiwi/Classes/Core/KWObjCUtilities.h similarity index 94% rename from Pods/Kiwi/Classes/KWObjCUtilities.h rename to Pods/Kiwi/Classes/Core/KWObjCUtilities.h index 9decded0..ea97878a 100644 --- a/Pods/Kiwi/Classes/KWObjCUtilities.h +++ b/Pods/Kiwi/Classes/Core/KWObjCUtilities.h @@ -6,8 +6,7 @@ #import "KiwiConfiguration.h" -#pragma mark - -#pragma mark Objective-C Type Utilities +#pragma mark - Objective-C Type Utilities BOOL KWObjCTypeEqualToObjCType(const char *firstObjCType, const char *secondObjCType); BOOL KWObjCTypeIsNumeric(const char *objCType); diff --git a/Pods/Kiwi/Classes/KWObjCUtilities.m b/Pods/Kiwi/Classes/Core/KWObjCUtilities.m similarity index 90% rename from Pods/Kiwi/Classes/KWObjCUtilities.m rename to Pods/Kiwi/Classes/Core/KWObjCUtilities.m index eeb163d3..eb4a63cc 100644 --- a/Pods/Kiwi/Classes/KWObjCUtilities.m +++ b/Pods/Kiwi/Classes/Core/KWObjCUtilities.m @@ -7,8 +7,7 @@ #import "KWObjCUtilities.h" #import "KWStringUtilities.h" -#pragma mark - -#pragma mark Objective-C Type Utilities +#pragma mark - Objective-C Type Utilities BOOL KWObjCTypeEqualToObjCType(const char *firstObjCType, const char *secondObjCType) { return strcmp(firstObjCType, secondObjCType) == 0; @@ -75,9 +74,9 @@ BOOL KWObjCTypeIsUnknown(const char *objCType) { } NSUInteger KWObjCTypeLength(const char *objCType) { - NSString *encoding = KWEncodingWithObjCTypes(objCType, @encode(id), @encode(SEL), nil); - NSMethodSignature *signature = [NSMethodSignature signatureWithObjCTypes:[encoding UTF8String]]; - return [signature methodReturnLength]; + NSUInteger typeSize = 0; + NSGetSizeAndAlignment(objCType, &typeSize, NULL); + return typeSize; } BOOL KWObjCTypeIsBlock(const char *objCType) { diff --git a/Pods/Kiwi/Classes/KWProbe.h b/Pods/Kiwi/Classes/Core/KWProbe.h similarity index 100% rename from Pods/Kiwi/Classes/KWProbe.h rename to Pods/Kiwi/Classes/Core/KWProbe.h diff --git a/Pods/Kiwi/Classes/KWProbePoller.h b/Pods/Kiwi/Classes/Core/KWProbePoller.h similarity index 100% rename from Pods/Kiwi/Classes/KWProbePoller.h rename to Pods/Kiwi/Classes/Core/KWProbePoller.h diff --git a/Pods/Kiwi/Classes/Core/KWProbePoller.m b/Pods/Kiwi/Classes/Core/KWProbePoller.m new file mode 100644 index 00000000..b411da95 --- /dev/null +++ b/Pods/Kiwi/Classes/Core/KWProbePoller.m @@ -0,0 +1,72 @@ +// +// KWProbePoller.m +// iOSFalconCore +// +// Created by Luke Redpath on 13/01/2011. +// Copyright 2011 LJR Software Limited. All rights reserved. +// + +#import "KWProbePoller.h" + +@interface KWTimeout : NSObject + +@property (nonatomic, strong) NSDate *timeoutDate; + +@end + +@implementation KWTimeout + +- (id)initWithTimeout:(NSTimeInterval)timeout +{ + self = [super init]; + if (self) { + _timeoutDate = [[NSDate alloc] initWithTimeIntervalSinceNow:timeout]; + } + return self; +} + + +- (BOOL)hasTimedOut { + return [self.timeoutDate timeIntervalSinceDate:[NSDate date]] < 0; +} + +@end + + +@interface KWProbePoller() + +@property (nonatomic, assign) NSTimeInterval timeoutInterval; +@property (nonatomic, assign) NSTimeInterval delayInterval; +@property (nonatomic, assign) BOOL shouldWait; + +@end + +@implementation KWProbePoller + +- (id)initWithTimeout:(NSTimeInterval)theTimeout + delay:(NSTimeInterval)theDelay + shouldWait:(BOOL)wait { + self = [super init]; + if (self) { + _timeoutInterval = theTimeout; + _delayInterval = theDelay; + _shouldWait = wait; + } + return self; +} + +- (BOOL)check:(id)probe; { + KWTimeout *timeout = [[KWTimeout alloc] initWithTimeout:self.timeoutInterval]; + + while (self.shouldWait || ![probe isSatisfied]) { + if ([timeout hasTimedOut]) { + return [probe isSatisfied]; + } + [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:self.delayInterval]]; + [probe sample]; + } + + return YES; +} + +@end diff --git a/Pods/Kiwi/Classes/KWReporting.h b/Pods/Kiwi/Classes/Core/KWReporting.h similarity index 100% rename from Pods/Kiwi/Classes/KWReporting.h rename to Pods/Kiwi/Classes/Core/KWReporting.h diff --git a/Pods/Kiwi/Classes/KWSpec.h b/Pods/Kiwi/Classes/Core/KWSpec.h similarity index 88% rename from Pods/Kiwi/Classes/KWSpec.h rename to Pods/Kiwi/Classes/Core/KWSpec.h index 94802e0b..2ecf7260 100644 --- a/Pods/Kiwi/Classes/KWSpec.h +++ b/Pods/Kiwi/Classes/Core/KWSpec.h @@ -8,12 +8,16 @@ #import #import "KWExpectationType.h" #import "KWVerifying.h" -#import "KWExampleGroupDelegate.h" +#import "KWExampleDelegate.h" @class KWCallSite; +#ifdef XCT_EXPORT +@interface KWSpec : XCTestCase +#else @interface KWSpec : SenTestCase +#endif #pragma mark - Adding Verifiers diff --git a/Pods/Kiwi/Classes/Core/KWSpec.m b/Pods/Kiwi/Classes/Core/KWSpec.m new file mode 100644 index 00000000..e8cee22e --- /dev/null +++ b/Pods/Kiwi/Classes/Core/KWSpec.m @@ -0,0 +1,156 @@ +// +// Licensed under the terms in License.txt +// +// Copyright 2010 Allen Ding. All rights reserved. +// + +#import "KWSpec.h" +#import +#import +#import "KWCallSite.h" +#import "KWExample.h" +#import "KWExampleSuiteBuilder.h" +#import "KWIntercept.h" +#import "KWObjCUtilities.h" +#import "KWStringUtilities.h" +#import "NSMethodSignature+KiwiAdditions.h" +#import "KWFailure.h" +#import "KWExampleSuite.h" + + +@interface KWSpec() + +@property (nonatomic, strong) KWExample *currentExample; + +@end + +@implementation KWSpec + +/* Methods are only implemented by sub-classes */ + ++ (NSString *)file { return nil; } + ++ (void)buildExampleGroups {} + +/* SenTestingKit uses -description, XCTest uses -name when displaying tests + in test navigator. Use camel case to make method friendly names from example description. + */ + +- (NSString *)name { + return [self description]; +} + +- (NSString *)description { + KWExample *currentExample = self.currentExample ? self.currentExample : [[self invocation] kw_example]; + NSString *name = [currentExample descriptionWithContext]; + + // CamelCase the string + NSArray *words = [name componentsSeparatedByString:@" "]; + name = @""; + for (NSString *word in words) { + if ([word length] < 1) + { + continue; + } + name = [name stringByAppendingString:[[word substringToIndex:1] uppercaseString]]; + name = [name stringByAppendingString:[word substringFromIndex:1]]; + } + + // Replace the commas with underscores to separate the levels of context + name = [name stringByReplacingOccurrencesOfString:@"," withString:@"_"]; + + // Strip out characters not legal in function names + NSError *error = nil; + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[^a-zA-Z0-9_]*" options:0 error:&error]; + name = [regex stringByReplacingMatchesInString:name options:0 range:NSMakeRange(0, name.length) withTemplate:@""]; + + return [NSString stringWithFormat:@"-[%@ %@]", NSStringFromClass([self class]), name]; +} + +#pragma mark - Getting Invocations + +/* Called by the SenTestingKit test suite to get an array of invocations that + should be run on instances of test cases. */ + ++ (NSArray *)testInvocations { + SEL buildExampleGroups = @selector(buildExampleGroups); + + // Only return invocation if the receiver is a concrete spec that has overridden -buildExampleGroups. + if ([self methodForSelector:buildExampleGroups] == [KWSpec methodForSelector:buildExampleGroups]) + return nil; + + KWExampleSuite *exampleSuite = [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] buildExampleSuite:^{ + [self buildExampleGroups]; + }]; + + return [exampleSuite invocationsForTestCase]; +} + +#pragma mark - Running Specs + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" + +- (void)invokeTest { + self.currentExample = [[self invocation] kw_example]; + + @autoreleasepool { + + @try { + [self.currentExample runWithDelegate:self]; + } @catch (NSException *exception) { + if ([self respondsToSelector:@selector(recordFailureWithDescription:inFile:atLine:expected:)]) { + objc_msgSend(self, + @selector(recordFailureWithDescription:inFile:atLine:expected:), + [exception description], @"", 0, NO); + } else { + objc_msgSend(self, @selector(failWithException:), exception); + } + } + + [[self invocation] kw_setExample:nil]; + + } +} + +#pragma clang diagnostic pop + +#pragma mark - KWExampleGroupDelegate methods + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" + +- (void)example:(KWExample *)example didFailWithFailure:(KWFailure *)failure { + if ([self respondsToSelector:@selector(recordFailureWithDescription:inFile:atLine:expected:)]) { + objc_msgSend(self, + @selector(recordFailureWithDescription:inFile:atLine:expected:), + [[failure exceptionValue] description], + failure.callSite.filename, + failure.callSite.lineNumber, + NO); + } else { + objc_msgSend(self, @selector(failWithException:), [failure exceptionValue]); + } +} + +#pragma clang diagnostic pop + +#pragma mark - Verification proxies + ++ (id)addVerifier:(id)aVerifier { + return [[[KWExampleSuiteBuilder sharedExampleSuiteBuilder] currentExample] addVerifier:aVerifier]; +} + ++ (id)addExistVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite { + return [[[KWExampleSuiteBuilder sharedExampleSuiteBuilder] currentExample] addExistVerifierWithExpectationType:anExpectationType callSite:aCallSite]; +} + ++ (id)addMatchVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite { + return [[[KWExampleSuiteBuilder sharedExampleSuiteBuilder] currentExample] addMatchVerifierWithExpectationType:anExpectationType callSite:aCallSite]; +} + ++ (id)addAsyncVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite timeout:(NSInteger)timeout shouldWait:(BOOL)shouldWait { + return [[[KWExampleSuiteBuilder sharedExampleSuiteBuilder] currentExample] addAsyncVerifierWithExpectationType:anExpectationType callSite:aCallSite timeout:timeout shouldWait: shouldWait]; +} + +@end diff --git a/Pods/Kiwi/Classes/KWStringUtilities.h b/Pods/Kiwi/Classes/Core/KWStringUtilities.h similarity index 92% rename from Pods/Kiwi/Classes/KWStringUtilities.h rename to Pods/Kiwi/Classes/Core/KWStringUtilities.h index efd966a7..90264d94 100644 --- a/Pods/Kiwi/Classes/KWStringUtilities.h +++ b/Pods/Kiwi/Classes/Core/KWStringUtilities.h @@ -16,3 +16,4 @@ BOOL KWStringHasWord(NSString *string, NSString *word); NSString *KWEncodingWithObjCTypes(const char *firstType, ...) NS_REQUIRES_NIL_TERMINATION; NSString *KWEncodingForVoidMethod(void); +NSString *KWEncodingForDefaultMethod(void); diff --git a/Pods/Kiwi/Classes/KWStringUtilities.m b/Pods/Kiwi/Classes/Core/KWStringUtilities.m similarity index 95% rename from Pods/Kiwi/Classes/KWStringUtilities.m rename to Pods/Kiwi/Classes/Core/KWStringUtilities.m index 87c3103d..4e17197e 100644 --- a/Pods/Kiwi/Classes/KWStringUtilities.m +++ b/Pods/Kiwi/Classes/Core/KWStringUtilities.m @@ -86,3 +86,7 @@ BOOL KWStringHasWord(NSString *string, NSString *word) { NSString *KWEncodingForVoidMethod(void) { return KWEncodingWithObjCTypes(@encode(void), @encode(id), @encode(SEL), nil); } + +NSString *KWEncodingForDefaultMethod(void) { + return KWEncodingWithObjCTypes(@encode(id), @encode(id), @encode(SEL), nil); +} diff --git a/Pods/Kiwi/Classes/KWValue.h b/Pods/Kiwi/Classes/Core/KWValue.h similarity index 100% rename from Pods/Kiwi/Classes/KWValue.h rename to Pods/Kiwi/Classes/Core/KWValue.h diff --git a/Pods/Kiwi/Classes/KWValue.m b/Pods/Kiwi/Classes/Core/KWValue.m similarity index 98% rename from Pods/Kiwi/Classes/KWValue.m rename to Pods/Kiwi/Classes/Core/KWValue.m index 24b4150e..c131ce2e 100644 --- a/Pods/Kiwi/Classes/KWValue.m +++ b/Pods/Kiwi/Classes/Core/KWValue.m @@ -21,7 +21,8 @@ @implementation KWValue #pragma mark - Initializing - (id)initWithBytes:(const void *)bytes objCType:(const char *)anObjCType { - if ((self = [super init])) { + self = [super init]; + if (self) { objCType = anObjCType; value = [[NSValue alloc] initWithBytes:bytes objCType:anObjCType]; } @@ -30,7 +31,7 @@ - (id)initWithBytes:(const void *)bytes objCType:(const char *)anObjCType { } + (id)valueWithBytes:(const void *)bytes objCType:(const char *)type { - return [[[self alloc] initWithBytes:bytes objCType:type] autorelease]; + return [[self alloc] initWithBytes:bytes objCType:type]; } + (id)valueWithBool:(BOOL)aValue { @@ -93,10 +94,6 @@ + (id)valueWithUnsignedShort:(unsigned short)aValue { return [self valueWithBytes:&aValue objCType:@encode(unsigned short)]; } -- (void)dealloc { - [value release]; - [super dealloc]; -} #pragma mark - Properties diff --git a/Pods/Kiwi/Classes/KWWorkarounds.h b/Pods/Kiwi/Classes/Core/KWWorkarounds.h similarity index 100% rename from Pods/Kiwi/Classes/KWWorkarounds.h rename to Pods/Kiwi/Classes/Core/KWWorkarounds.h diff --git a/Pods/Kiwi/Classes/KWWorkarounds.m b/Pods/Kiwi/Classes/Core/KWWorkarounds.m similarity index 80% rename from Pods/Kiwi/Classes/KWWorkarounds.m rename to Pods/Kiwi/Classes/Core/KWWorkarounds.m index e4e98e9e..2d866bba 100644 --- a/Pods/Kiwi/Classes/KWWorkarounds.m +++ b/Pods/Kiwi/Classes/Core/KWWorkarounds.m @@ -14,11 +14,11 @@ void KWSetExceptionFromAcrossInvocationBoundary(NSException *anException) { if (KWExceptionAcrossInvokeBoundary != nil) return; - KWExceptionAcrossInvokeBoundary = [anException retain]; + KWExceptionAcrossInvokeBoundary = anException; } NSException *KWGetAndClearExceptionFromAcrossInvocationBoundary(void) { - NSException *exception = [KWExceptionAcrossInvokeBoundary autorelease]; + NSException *exception = KWExceptionAcrossInvokeBoundary; KWExceptionAcrossInvokeBoundary = nil; return exception; } diff --git a/Pods/Kiwi/Classes/Kiwi.h b/Pods/Kiwi/Classes/Core/Kiwi.h similarity index 95% rename from Pods/Kiwi/Classes/Kiwi.h rename to Pods/Kiwi/Classes/Core/Kiwi.h index 173e32c0..f2607987 100644 --- a/Pods/Kiwi/Classes/Kiwi.h +++ b/Pods/Kiwi/Classes/Core/Kiwi.h @@ -23,8 +23,7 @@ extern "C" { #import "KWBeMemberOfClassMatcher.h" #import "KWBeSubclassOfClassMatcher.h" #import "KWBeTrueMatcher.h" -#import "KWBeNilMatcher.h" -#import "KWBeNonNilMatcher.h" +#import "KWNilMatcher.h" #import "KWBeWithinMatcher.h" #import "KWBeZeroMatcher.h" #import "KWBeforeAllNode.h" @@ -41,7 +40,7 @@ extern "C" { #import "KWDeviceInfo.h" #import "KWEqualMatcher.h" #import "KWExample.h" -#import "KWExampleGroupBuilder.h" +#import "KWExampleSuiteBuilder.h" #import "KWExampleNode.h" #import "KWExampleNodeVisitor.h" #import "KWExistVerifier.h" @@ -74,7 +73,6 @@ extern "C" { #import "KWSpec.h" #import "KWStringUtilities.h" #import "KWStub.h" -#import "KWTestCase.h" #import "KWUserDefinedMatcher.h" #import "KWValue.h" #import "KWVerifying.h" diff --git a/Pods/Kiwi/Classes/KiwiBlockMacros.h b/Pods/Kiwi/Classes/Core/KiwiBlockMacros.h similarity index 100% rename from Pods/Kiwi/Classes/KiwiBlockMacros.h rename to Pods/Kiwi/Classes/Core/KiwiBlockMacros.h diff --git a/Pods/Kiwi/Classes/KiwiConfiguration.h b/Pods/Kiwi/Classes/Core/KiwiConfiguration.h similarity index 71% rename from Pods/Kiwi/Classes/KiwiConfiguration.h rename to Pods/Kiwi/Classes/Core/KiwiConfiguration.h index 9dc59ba6..1b542832 100644 --- a/Pods/Kiwi/Classes/KiwiConfiguration.h +++ b/Pods/Kiwi/Classes/Core/KiwiConfiguration.h @@ -4,16 +4,6 @@ // Copyright 2010 Allen Ding. All rights reserved. // -#import - -#define KW_VERSION 0.9001 - -// Blocks being unavailable cripples the usability of Kiwi, but is supported -// because they are not available on anything less than a device running 3.2. -#if !defined(__BLOCKS__) -#error "Kiwi requires blocks support." -#endif - // As of iPhone SDK 4 GM, exceptions thrown across an NSInvocation -invoke or // forwardInvocation: boundary in the simulator will terminate the app instead // of being caught in @catch blocks from the caller side of the -invoke. Kiwi diff --git a/Pods/Kiwi/Classes/KiwiMacros.h b/Pods/Kiwi/Classes/Core/KiwiMacros.h similarity index 94% rename from Pods/Kiwi/Classes/KiwiMacros.h rename to Pods/Kiwi/Classes/Core/KiwiMacros.h index fb1c2dc7..368bfe7a 100644 --- a/Pods/Kiwi/Classes/KiwiMacros.h +++ b/Pods/Kiwi/Classes/Core/KiwiMacros.h @@ -51,8 +51,8 @@ #define shouldAfterWaitOf(timeout) attachToVerifier:KW_ADD_ASYNC_VERIFIER(KWExpectationTypeShould, timeout, YES) #define shouldNotAfterWaitOf(timeout) attachToVerifier:KW_ADD_ASYNC_VERIFIER(KWExpectationTypeShouldNot, timeout, YES) -#define beNil beNil:[KWBeNilMatcher verifyNilSubject] -#define beNonNil beNonNil:[KWBeNonNilMatcher verifyNilSubject] +#define beNil beNil:[KWNilMatcher verifyNilSubject] +#define beNonNil beNonNil:[KWNilMatcher verifyNonNilSubject] // used to wrap a pointer to an object that will change in the future (used with shouldEventually) #define theObject(objectPtr) [KWFutureObject objectWithObjectPointer:objectPtr] // DEPRECATED @@ -60,7 +60,7 @@ #define expectFutureValue(futureValue) [KWFutureObject futureObjectWithBlock:^{ return futureValue; }] // `fail` triggers a failure report when called -#define fail(message, ...) [[[KWExampleGroupBuilder sharedExampleGroupBuilder] currentExample] reportFailure:[KWFailure failureWithCallSite:KW_THIS_CALLSITE format:message, ##__VA_ARGS__]] +#define fail(message, ...) [[[KWExampleSuiteBuilder sharedExampleSuiteBuilder] currentExample] reportFailure:[KWFailure failureWithCallSite:KW_THIS_CALLSITE format:message, ##__VA_ARGS__]] // used for message patterns to allow matching any value #define any() [KWAny any] diff --git a/Pods/Kiwi/Classes/NSInvocation+KiwiAdditions.h b/Pods/Kiwi/Classes/Core/NSInvocation+KiwiAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/NSInvocation+KiwiAdditions.h rename to Pods/Kiwi/Classes/Core/NSInvocation+KiwiAdditions.h diff --git a/Pods/Kiwi/Classes/NSInvocation+KiwiAdditions.m b/Pods/Kiwi/Classes/Core/NSInvocation+KiwiAdditions.m similarity index 100% rename from Pods/Kiwi/Classes/NSInvocation+KiwiAdditions.m rename to Pods/Kiwi/Classes/Core/NSInvocation+KiwiAdditions.m diff --git a/Pods/Kiwi/Classes/NSInvocation+OCMAdditions.h b/Pods/Kiwi/Classes/Core/NSInvocation+OCMAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/NSInvocation+OCMAdditions.h rename to Pods/Kiwi/Classes/Core/NSInvocation+OCMAdditions.h diff --git a/Pods/Kiwi/Classes/NSInvocation+OCMAdditions.m b/Pods/Kiwi/Classes/Core/NSInvocation+OCMAdditions.m similarity index 96% rename from Pods/Kiwi/Classes/NSInvocation+OCMAdditions.m rename to Pods/Kiwi/Classes/Core/NSInvocation+OCMAdditions.m index 6348396b..a53804b7 100644 --- a/Pods/Kiwi/Classes/NSInvocation+OCMAdditions.m +++ b/Pods/Kiwi/Classes/Core/NSInvocation+OCMAdditions.m @@ -24,7 +24,7 @@ - (id)getArgumentAtIndexAsObject:(int)argIndex case '#': case '@': { - id value; + __unsafe_unretained id value; [self getArgument:&value atIndex:argIndex]; return value; } @@ -119,10 +119,16 @@ - (id)getArgumentAtIndexAsObject:(int)argIndex [self getArgument:&value atIndex:argIndex]; return [NSValue valueWithPointer:value]; } + case '*': + { + char *value = NULL; + [self getArgument:&value atIndex:argIndex]; + return [NSValue valueWithPointer:value]; + } case '{': // structure { NSUInteger maxArgSize = [[self methodSignature] frameLength]; - NSMutableData *argumentData = [[[NSMutableData alloc] initWithLength:maxArgSize] autorelease]; + NSMutableData *argumentData = [[NSMutableData alloc] initWithLength:maxArgSize]; [self getArgument:[argumentData mutableBytes] atIndex:argIndex]; return [NSValue valueWithBytes:[argumentData bytes] objCType:argType]; } @@ -149,7 +155,7 @@ - (NSString *)invocationDescription [description appendString:[self argumentDescriptionAtIndex:i]]; } - return [description autorelease]; + return description; } - (NSString *)argumentDescriptionAtIndex:(int)argIndex @@ -186,7 +192,7 @@ - (NSString *)argumentDescriptionAtIndex:(int)argIndex - (NSString *)objectDescriptionAtIndex:(int)anInt { - id object; + __unsafe_unretained id object; [self getArgument:&object atIndex:anInt]; if (object == nil) diff --git a/Pods/Kiwi/Classes/NSMethodSignature+KiwiAdditions.h b/Pods/Kiwi/Classes/Core/NSMethodSignature+KiwiAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/NSMethodSignature+KiwiAdditions.h rename to Pods/Kiwi/Classes/Core/NSMethodSignature+KiwiAdditions.h diff --git a/Pods/Kiwi/Classes/NSMethodSignature+KiwiAdditions.m b/Pods/Kiwi/Classes/Core/NSMethodSignature+KiwiAdditions.m similarity index 100% rename from Pods/Kiwi/Classes/NSMethodSignature+KiwiAdditions.m rename to Pods/Kiwi/Classes/Core/NSMethodSignature+KiwiAdditions.m diff --git a/Pods/Kiwi/Classes/NSNumber+KiwiAdditions.h b/Pods/Kiwi/Classes/Core/NSNumber+KiwiAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/NSNumber+KiwiAdditions.h rename to Pods/Kiwi/Classes/Core/NSNumber+KiwiAdditions.h diff --git a/Pods/Kiwi/Classes/NSNumber+KiwiAdditions.m b/Pods/Kiwi/Classes/Core/NSNumber+KiwiAdditions.m similarity index 100% rename from Pods/Kiwi/Classes/NSNumber+KiwiAdditions.m rename to Pods/Kiwi/Classes/Core/NSNumber+KiwiAdditions.m diff --git a/Pods/Kiwi/Classes/NSObject+KiwiSpyAdditions.h b/Pods/Kiwi/Classes/Core/NSObject+KiwiSpyAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/NSObject+KiwiSpyAdditions.h rename to Pods/Kiwi/Classes/Core/NSObject+KiwiSpyAdditions.h diff --git a/Pods/Kiwi/Classes/NSObject+KiwiSpyAdditions.m b/Pods/Kiwi/Classes/Core/NSObject+KiwiSpyAdditions.m similarity index 60% rename from Pods/Kiwi/Classes/NSObject+KiwiSpyAdditions.m rename to Pods/Kiwi/Classes/Core/NSObject+KiwiSpyAdditions.m index 8730bde9..321ea8aa 100644 --- a/Pods/Kiwi/Classes/NSObject+KiwiSpyAdditions.m +++ b/Pods/Kiwi/Classes/Core/NSObject+KiwiSpyAdditions.m @@ -13,15 +13,15 @@ @implementation NSObject (KiwiSpyAdditions) - (KWCaptureSpy *)captureArgument:(SEL)selector atIndex:(NSUInteger)index { - KWCaptureSpy *spy = [[[KWCaptureSpy alloc] initWithArgumentIndex:index] autorelease]; - KWMessagePattern *pattern = [[[KWMessagePattern alloc] initWithSelector:selector] autorelease]; + KWCaptureSpy *spy = [[KWCaptureSpy alloc] initWithArgumentIndex:index]; + KWMessagePattern *pattern = [[KWMessagePattern alloc] initWithSelector:selector]; [self addMessageSpy:spy forMessagePattern:pattern]; return spy; } + (KWCaptureSpy *)captureArgument:(SEL)selector atIndex:(NSUInteger)index { - KWCaptureSpy *spy = [[[KWCaptureSpy alloc] initWithArgumentIndex:index] autorelease]; - KWMessagePattern *pattern = [[[KWMessagePattern alloc] initWithSelector:selector] autorelease]; + KWCaptureSpy *spy = [[KWCaptureSpy alloc] initWithArgumentIndex:index]; + KWMessagePattern *pattern = [[KWMessagePattern alloc] initWithSelector:selector]; [self addMessageSpy:spy forMessagePattern:pattern]; return spy; } diff --git a/Pods/Kiwi/Classes/NSObject+KiwiVerifierAdditions.h b/Pods/Kiwi/Classes/Core/NSObject+KiwiVerifierAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/NSObject+KiwiVerifierAdditions.h rename to Pods/Kiwi/Classes/Core/NSObject+KiwiVerifierAdditions.h diff --git a/Pods/Kiwi/Classes/NSObject+KiwiVerifierAdditions.m b/Pods/Kiwi/Classes/Core/NSObject+KiwiVerifierAdditions.m similarity index 100% rename from Pods/Kiwi/Classes/NSObject+KiwiVerifierAdditions.m rename to Pods/Kiwi/Classes/Core/NSObject+KiwiVerifierAdditions.m diff --git a/Pods/Kiwi/Classes/NSProxy+KiwiVerifierAdditions.h b/Pods/Kiwi/Classes/Core/NSProxy+KiwiVerifierAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/NSProxy+KiwiVerifierAdditions.h rename to Pods/Kiwi/Classes/Core/NSProxy+KiwiVerifierAdditions.h diff --git a/Pods/Kiwi/Classes/NSProxy+KiwiVerifierAdditions.m b/Pods/Kiwi/Classes/Core/NSProxy+KiwiVerifierAdditions.m similarity index 100% rename from Pods/Kiwi/Classes/NSProxy+KiwiVerifierAdditions.m rename to Pods/Kiwi/Classes/Core/NSProxy+KiwiVerifierAdditions.m diff --git a/Pods/Kiwi/Classes/NSValue+KiwiAdditions.h b/Pods/Kiwi/Classes/Core/NSValue+KiwiAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/NSValue+KiwiAdditions.h rename to Pods/Kiwi/Classes/Core/NSValue+KiwiAdditions.h diff --git a/Pods/Kiwi/Classes/NSValue+KiwiAdditions.m b/Pods/Kiwi/Classes/Core/NSValue+KiwiAdditions.m similarity index 100% rename from Pods/Kiwi/Classes/NSValue+KiwiAdditions.m rename to Pods/Kiwi/Classes/Core/NSValue+KiwiAdditions.m diff --git a/Pods/Kiwi/Classes/KWAny.m b/Pods/Kiwi/Classes/KWAny.m deleted file mode 100644 index 1ca80129..00000000 --- a/Pods/Kiwi/Classes/KWAny.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// Licensed under the terms in License.txt -// -// Copyright 2010 Allen Ding. All rights reserved. -// - -#import "KWAny.h" - -@implementation KWAny - -#pragma mark - Initializing - -static KWAny *sharedAny = nil; - -+ (id)any { - if (sharedAny == nil) { - sharedAny = [[super allocWithZone:nil] init]; - } - - return sharedAny; -} - -+ (id)allocWithZone:(NSZone *)zone { - return [[self any] retain]; -} - -- (id)copyWithZone:(NSZone *)zone { - return self; -} - -- (id)retain { - return self; -} - -- (NSUInteger)retainCount { - return NSUIntegerMax; -} - -- (oneway void)release { -} - -- (id)autorelease { - return self; -} - -@end diff --git a/Pods/Kiwi/Classes/KWAsyncVerifier.m b/Pods/Kiwi/Classes/KWAsyncVerifier.m deleted file mode 100644 index 6f881697..00000000 --- a/Pods/Kiwi/Classes/KWAsyncVerifier.m +++ /dev/null @@ -1,100 +0,0 @@ -// -// KWAsyncVerifier.m -// iOSFalconCore -// -// Created by Luke Redpath on 13/01/2011. -// Copyright 2011 LJR Software Limited. All rights reserved. -// - -#import "KWAsyncVerifier.h" -#import "KWFailure.h" -#import "KWMatching.h" -#import "KWReporting.h" -#import "KWProbePoller.h" - -@implementation KWAsyncVerifier - -+ (id)asyncVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite matcherFactory:(KWMatcherFactory *)aMatcherFactory reporter:(id)aReporter probeTimeout:(NSTimeInterval)probeTimeout shouldWait:(BOOL)shouldWait -{ - KWAsyncVerifier *verifier = [[self alloc] initWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:aMatcherFactory reporter:aReporter]; - verifier.timeout = probeTimeout; - verifier.shouldWait = shouldWait; - return [verifier autorelease]; -} - -- (id)initWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite matcherFactory:(KWMatcherFactory *)aMatcherFactory reporter:(id)aReporter { - if ((self = [super initWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:aMatcherFactory reporter:aReporter])) { - self.timeout = kKW_DEFAULT_PROBE_TIMEOUT; - } - return self; -} - -- (void)verifyWithProbe:(KWAsyncMatcherProbe *)aProbe { - @try { - KWProbePoller *poller = [[KWProbePoller alloc] initWithTimeout:self.timeout delay:kKW_DEFAULT_PROBE_DELAY shouldWait: self.shouldWait]; - - if (![poller check:aProbe]) { - if (self.expectationType == KWExpectationTypeShould) { - NSString *message = [aProbe.matcher failureMessageForShould]; - KWFailure *failure = [KWFailure failureWithCallSite:self.callSite message:message]; - [self.reporter reportFailure:failure]; - } - } else { - // poller returned YES -- fail if expectation is NOT - if (self.expectationType == KWExpectationTypeShouldNot) { - NSString *message = [aProbe.matcher failureMessageForShouldNot]; - KWFailure *failure = [KWFailure failureWithCallSite:self.callSite message:message]; - [self.reporter reportFailure:failure]; - } - } - - [poller release]; - - } @catch (NSException *exception) { - KWFailure *failure = [KWFailure failureWithCallSite:self.callSite message:[exception description]]; - [self.reporter reportFailure:failure]; - } -} - -- (void)verifyWithMatcher:(id)aMatcher { - KWAsyncMatcherProbe *probe = [[[KWAsyncMatcherProbe alloc] initWithMatcher:aMatcher] autorelease]; - [self verifyWithProbe:probe]; -} - -@end - -@implementation KWAsyncMatcherProbe - -@synthesize matcher; - -- (id)initWithMatcher:(id)aMatcher; -{ - if ((self = [super init])) { - matcher = [aMatcher retain]; - - // make sure the matcher knows we are going to evaluate it multiple times - if ([aMatcher respondsToSelector:@selector(willEvaluateMultipleTimes)]) { - [aMatcher setWillEvaluateMultipleTimes:YES]; - } - } - return self; -} - -- (void)dealloc -{ - [matcher release]; - [super dealloc]; -} - -- (BOOL)isSatisfied; -{ - return matchResult; -} - -- (void)sample; -{ - matchResult = [matcher evaluate]; -} - -@end - diff --git a/Pods/Kiwi/Classes/KWBeNilMatcher.m b/Pods/Kiwi/Classes/KWBeNilMatcher.m deleted file mode 100644 index 7cd733bc..00000000 --- a/Pods/Kiwi/Classes/KWBeNilMatcher.m +++ /dev/null @@ -1,69 +0,0 @@ -// -// KWBeNilMatcher.m -// iOSFalconCore -// -// Created by Luke Redpath on 14/01/2011. -// Copyright 2011 LJR Software Limited. All rights reserved. -// - -#import "KWBeNilMatcher.h" -#import "KWExample.h" -#import "KWFormatter.h" -#import "KWExampleGroupBuilder.h" -#import "KWMatchVerifier.h" -#import "KWVerifying.h" - -@implementation KWBeNilMatcher - -#pragma mark - -#pragma mark Getting Matcher Strings - -+ (NSArray *)matcherStrings { - return @[@"beNil", @"beNil:"]; -} - -#pragma mark - -#pragma mark Matching - -- (BOOL)evaluate { - return (BOOL)(self.subject == nil); -} - -#pragma mark - -#pragma mark Getting Failure Messages - -- (NSString *)failureMessageForShould { - return [NSString stringWithFormat:@"expected subject to be nil, got %@", - [KWFormatter formatObject:self.subject]]; -} - -- (NSString *)failureMessageForShouldNot { - return [NSString stringWithFormat:@"expected %@ not to be nil", - [KWFormatter formatObject:self.subject]]; -} - -- (BOOL)shouldBeEvaluatedAtEndOfExample { - return YES; -} - -- (NSString *)description -{ - return @"be nil"; -} - -- (void)beNil {} -- (void)beNil:(BOOL)matcherHasSubject {} - -+ (BOOL)verifyNilSubject { - KWExample *currentExample = [[KWExampleGroupBuilder sharedExampleGroupBuilder] currentExample]; - id verifier = currentExample.unassignedVerifier; - if (verifier && ![verifier subject] && [verifier isKindOfClass:[KWMatchVerifier class]]) { - KWMatchVerifier *matchVerifier = (KWMatchVerifier *)verifier; - [matchVerifier performSelector:@selector(beNil)]; - currentExample.unassignedVerifier = nil; - return NO; - } - return YES; -} - -@end diff --git a/Pods/Kiwi/Classes/KWBeNonNilMatcher.h b/Pods/Kiwi/Classes/KWBeNonNilMatcher.h deleted file mode 100644 index 7af65500..00000000 --- a/Pods/Kiwi/Classes/KWBeNonNilMatcher.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// KWBeNotNilMatcher.h -// Kiwi -// -// Created by Luke Redpath on 17/01/2011. -// Copyright 2011 Allen Ding. All rights reserved. -// - -#import -#import "KWMatcher.h" - -@interface KWBeNonNilMatcher : KWMatcher { - -} -- (void)beNonNil; - -- (void)beNonNil:(BOOL)matcherHasSubject; -+ (BOOL)verifyNilSubject; -@end diff --git a/Pods/Kiwi/Classes/KWBeNonNilMatcher.m b/Pods/Kiwi/Classes/KWBeNonNilMatcher.m deleted file mode 100644 index d151fd31..00000000 --- a/Pods/Kiwi/Classes/KWBeNonNilMatcher.m +++ /dev/null @@ -1,65 +0,0 @@ -// -// KWBeNotNilMatcher.m -// Kiwi -// -// Created by Luke Redpath on 17/01/2011. -// Copyright 2011 Allen Ding. All rights reserved. -// - -#import "KWBeNonNilMatcher.h" -#import "KWExample.h" -#import "KWExampleGroupBuilder.h" -#import "KWFormatter.h" -#import "KWMatchVerifier.h" -#import "KWVerifying.h" - -@implementation KWBeNonNilMatcher - -#pragma mark - -#pragma mark Getting Matcher Strings - -+ (NSArray *)matcherStrings { - return @[@"beNonNil", @"beNonNil:"]; -} - -#pragma mark - -#pragma mark Matching - -- (BOOL)evaluate { - return (BOOL)(self.subject != nil); -} - -#pragma mark - -#pragma mark Getting Failure Messages - -- (NSString *)failureMessageForShould { - return [NSString stringWithFormat:@"expected subject to be non-nil, got %@", - [KWFormatter formatObject:self.subject]]; -} - -- (NSString *)failureMessageForShouldNot { - return [NSString stringWithFormat:@"expected %@ not to be non-nil", - [KWFormatter formatObject:self.subject]]; -} - -- (NSString *)description -{ - return @"be non-nil"; -} - -- (void)beNonNil {} -- (void)beNonNil:(BOOL)matcherHasSubject {} - -+ (BOOL)verifyNilSubject { - KWExample *currentExample = [[KWExampleGroupBuilder sharedExampleGroupBuilder] currentExample]; - id verifier = currentExample.unassignedVerifier; - if (verifier && ![verifier subject] && [verifier isKindOfClass:[KWMatchVerifier class]]) { - KWMatchVerifier *matchVerifier = (KWMatchVerifier *)verifier; - [matchVerifier performSelector:@selector(beNonNil)]; - currentExample.unassignedVerifier = nil; - return NO; - } - return YES; -} - -@end diff --git a/Pods/Kiwi/Classes/KWBlock.m b/Pods/Kiwi/Classes/KWBlock.m deleted file mode 100644 index 75495a35..00000000 --- a/Pods/Kiwi/Classes/KWBlock.m +++ /dev/null @@ -1,58 +0,0 @@ -// -// Licensed under the terms in License.txt -// -// Copyright 2010 Allen Ding. All rights reserved. -// - -#import "KWBlock.h" - -@interface KWBlock() - -#pragma mark - Properties - -@property (nonatomic, readonly, assign) KWVoidBlock block; - -@end - -@implementation KWBlock - -#pragma mark - Initializing - -- (id)initWithBlock:(KWVoidBlock)aBlock { - if ((self = [super init])) { - block = Block_copy(aBlock); - } - - return self; -} - -+ (id)blockWithBlock:(KWVoidBlock)aBlock { - return [[[self alloc] initWithBlock:aBlock] autorelease]; -} - -- (void)dealloc { - Block_release(block); - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize block; - -#pragma mark - Calling Blocks - -- (void)call { - block(); -} - -@end - -#pragma mark - Creating Blocks - -KWBlock *theBlock(KWVoidBlock aBlock) { - return lambda(aBlock); -} - -KWBlock *lambda(KWVoidBlock aBlock) { - return [KWBlock blockWithBlock:aBlock]; -} diff --git a/Pods/Kiwi/Classes/KWBlockNode.m b/Pods/Kiwi/Classes/KWBlockNode.m deleted file mode 100644 index 11dd9e8b..00000000 --- a/Pods/Kiwi/Classes/KWBlockNode.m +++ /dev/null @@ -1,47 +0,0 @@ -// -// Licensed under the terms in License.txt -// -// Copyright 2010 Allen Ding. All rights reserved. -// - -#import "KWBlockNode.h" - -@implementation KWBlockNode - -#pragma mark - Initializing - -- (id)initWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(KWVoidBlock)aBlock { - if ((self = [super init])) { - callSite = [aCallSite retain]; - _description = [aDescription copy]; - - if (aBlock != nil) - block = Block_copy(aBlock); - } - - return self; -} - -- (void)dealloc { - [callSite release]; - [_description release]; - - if (block != nil) - Block_release(block); - - [super dealloc]; -} - -- (void)performBlock { - if (block != nil) { block(); } -} - -#pragma mark - Getting Call Sites - -@synthesize callSite; - -#pragma mark - Accepting Visitors - -@synthesize block; - -@end diff --git a/Pods/Kiwi/Classes/KWExample.m b/Pods/Kiwi/Classes/KWExample.m deleted file mode 100644 index 87fbd52f..00000000 --- a/Pods/Kiwi/Classes/KWExample.m +++ /dev/null @@ -1,392 +0,0 @@ -// -// Licensed under the terms in License.txt -// -// Copyright 2010 Allen Ding. All rights reserved. -// - -#import "KWExample.h" -#import "KWExampleGroupBuilder.h" -#import "KWContextNode.h" -#import "KWMatcherFactory.h" -#import "KWExistVerifier.h" -#import "KWMatchVerifier.h" -#import "KWAsyncVerifier.h" -#import "KWFailure.h" -#import "KWContextNode.h" -#import "KWBeforeEachNode.h" -#import "KWBeforeAllNode.h" -#import "KWItNode.h" -#import "KWAfterEachNode.h" -#import "KWAfterAllNode.h" -#import "KWPendingNode.h" -#import "KWRegisterMatchersNode.h" -#import "KWWorkarounds.h" -#import "KWIntercept.h" -#import "KWExampleNode.h" -#import "KWExampleSuite.h" -#import "KWCallSite.h" -#import "KWSymbolicator.h" - -@interface KWExample () { - id exampleNode; - BOOL passed; -} - -@property (nonatomic, readonly) NSMutableArray *verifiers; -@property (nonatomic, readonly) KWMatcherFactory *matcherFactory; -@property (nonatomic, assign) id delegate; -@property (nonatomic, assign) BOOL didNotFinish; - -- (void)reportResultForExampleNodeWithLabel:(NSString *)label; - -@end - -@implementation KWExample - -@synthesize matcherFactory; -@synthesize verifiers; -@synthesize delegate = _delegate; -@synthesize suite; -@synthesize lastInContexts; -@synthesize didNotFinish; - -- (id)initWithExampleNode:(id)node -{ - if ((self = [super init])) { - exampleNode = [node retain]; - matcherFactory = [[KWMatcherFactory alloc] init]; - verifiers = [[NSMutableArray alloc] init]; - lastInContexts = [[NSMutableArray alloc] init]; - passed = YES; - } - return self; -} - -- (void)dealloc -{ - [lastInContexts release]; - [exampleNode release]; - [matcherFactory release]; - [verifiers release]; - [super dealloc]; -} - -- (BOOL)isLastInContext:(KWContextNode *)context -{ - for (KWContextNode *contextWhereItLast in lastInContexts) { - if (context == contextWhereItLast) { - return YES; - } - } - return NO; -} - -- (NSString *)description -{ - return [NSString stringWithFormat:@"", exampleNode.description]; -} - -#pragma mark - Adding Verifiers - -- (id)addVerifier:(id)aVerifier { - if (![self.verifiers containsObject:aVerifier]) - [self.verifiers addObject:aVerifier]; - - return aVerifier; -} - -- (id)addExistVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite { - id verifier = [KWExistVerifier existVerifierWithExpectationType:anExpectationType callSite:aCallSite reporter:self]; - [self addVerifier:verifier]; - return verifier; -} - -- (id)addMatchVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite { - if (self.unassignedVerifier) { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"Trying to add another verifier without specifying a matcher for the previous one." - userInfo:nil]; - } - id verifier = [KWMatchVerifier matchVerifierWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:self.matcherFactory reporter:self]; - [self addVerifier:verifier]; - self.unassignedVerifier = verifier; - return verifier; -} - -- (id)addAsyncVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite timeout:(NSInteger)timeout shouldWait:(BOOL)shouldWait { - id verifier = [KWAsyncVerifier asyncVerifierWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:self.matcherFactory reporter:self probeTimeout:timeout shouldWait: shouldWait]; - [self addVerifier:verifier]; - return verifier; -} - -#pragma mark - Running examples - -- (void)runWithDelegate:(id)delegate; -{ - self.delegate = delegate; - [self.matcherFactory registerMatcherClassesWithNamespacePrefix:@"KW"]; - [[KWExampleGroupBuilder sharedExampleGroupBuilder] setCurrentExample:self]; - [exampleNode acceptExampleNodeVisitor:self]; -} - -#pragma mark - Reporting failure - -- (NSString *)descriptionForExampleContext { - NSMutableArray *parts = [NSMutableArray array]; - - for (KWContextNode *context in [[exampleNode contextStack] reverseObjectEnumerator]) { - if ([context description] != nil) { - [parts addObject:[[context description] stringByAppendingString:@","]]; - } - } - - return [parts componentsJoinedByString:@" "]; -} - -- (KWFailure *)outputReadyFailureWithFailure:(KWFailure *)aFailure { - NSString *annotatedFailureMessage = [NSString stringWithFormat:@"'%@ %@' [FAILED], %@", - [self descriptionForExampleContext], [exampleNode description], - aFailure.message]; - -#if TARGET_IPHONE_SIMULATOR - // \uff1a is the unicode for a fill width colon, as opposed to a regular - // colon character (':'). This escape is performed so that Xcode doesn't - // truncate the error output in the build results window, which is running - // build time specs. - annotatedFailureMessage = [annotatedFailureMessage stringByReplacingOccurrencesOfString:@":" withString:@"\uff1a"]; -#endif // #if TARGET_IPHONE_SIMULATOR - - return [KWFailure failureWithCallSite:aFailure.callSite message:annotatedFailureMessage]; -} - -- (void)reportFailure:(KWFailure *)failure -{ - passed = NO; - [self.delegate example:self didFailWithFailure:[self outputReadyFailureWithFailure:failure]]; -} - -- (void)reportResultForExampleNodeWithLabel:(NSString *)label -{ - NSLog(@"+ '%@ %@' [%@]", [self descriptionForExampleContext], [exampleNode description], label); -} - -#pragma mark - Full description with context - -/** Pending cases will be marked yellow by XCode as not finished, because their description differs for -[SenTestCaseRun start] and -[SenTestCaseRun stop] methods - */ - -- (NSString *)pendingNotFinished { - BOOL reportPending = self.didNotFinish; - self.didNotFinish = YES; - return reportPending ? @"(PENDING)" : @""; -} - -- (NSString *)descriptionWithContext { - NSString *descriptionWithContext = [NSString stringWithFormat:@"%@ %@", - [self descriptionForExampleContext], - [exampleNode description] ? [exampleNode description] : @""]; - BOOL isPending = [exampleNode isKindOfClass:[KWPendingNode class]]; - return isPending ? [descriptionWithContext stringByAppendingString:[self pendingNotFinished]] : descriptionWithContext; -} - -#pragma mark - Visiting Nodes - -- (void)visitRegisterMatchersNode:(KWRegisterMatchersNode *)aNode { - [self.matcherFactory registerMatcherClassesWithNamespacePrefix:aNode.namespacePrefix]; -} - -- (void)visitBeforeAllNode:(KWBeforeAllNode *)aNode { - if (aNode.block == nil) - return; - - aNode.block(); -} - -- (void)visitAfterAllNode:(KWAfterAllNode *)aNode { - if (aNode.block == nil) - return; - - aNode.block(); -} - -- (void)visitBeforeEachNode:(KWBeforeEachNode *)aNode { - if (aNode.block == nil) - return; - - aNode.block(); -} - -- (void)visitAfterEachNode:(KWAfterEachNode *)aNode { - if (aNode.block == nil) - return; - - aNode.block(); -} - -- (void)visitItNode:(KWItNode *)aNode { - if (aNode.block == nil || aNode != exampleNode) - return; - - aNode.example = self; - - [aNode.context performExample:self withBlock:^{ - - @try { - - aNode.block(); - -#if KW_TARGET_HAS_INVOCATION_EXCEPTION_BUG - NSException *invocationException = KWGetAndClearExceptionFromAcrossInvocationBoundary(); - [invocationException raise]; -#endif // #if KW_TARGET_HAS_INVOCATION_EXCEPTION_BUG - - // Finish verifying and clear - for (id verifier in self.verifiers) { - [verifier exampleWillEnd]; - } - - } @catch (NSException *exception) { - KWFailure *failure = [KWFailure failureWithCallSite:aNode.callSite format:@"%@ \"%@\" raised", - [exception name], - [exception reason]]; - [self reportFailure:failure]; - } - - if (passed) { - [self reportResultForExampleNodeWithLabel:@"PASSED"]; - } - - // Always clear stubs and spies at the end of it blocks - KWClearStubsAndSpies(); - }]; -} - -- (void)visitPendingNode:(KWPendingNode *)aNode { - if (aNode != exampleNode) - return; - - [self reportResultForExampleNodeWithLabel:@"PENDING"]; -} - -- (NSString *)generateDescriptionForAnonymousItNode -{ - // anonymous specify blocks should only have one verifier, but use the first in any case - return [(self.verifiers)[0] descriptionForAnonymousItNode]; -} - -@end - -#pragma mark - Looking up CallSites - -KWCallSite *callSiteWithAddress(long address); -KWCallSite *callSiteAtAddressIfNecessary(long address); - -KWCallSite *callSiteAtAddressIfNecessary(long address){ - BOOL shouldLookup = [[KWExampleGroupBuilder sharedExampleGroupBuilder] isFocused] && ![[KWExampleGroupBuilder sharedExampleGroupBuilder] foundFocus]; - return shouldLookup ? callSiteWithAddress(address) : nil; -} - -KWCallSite *callSiteWithAddress(long address){ - NSArray *args =@[@"-p", @(getpid()).stringValue, [NSString stringWithFormat:@"%lx", address]]; - NSString *callSite = [NSString stringWithShellCommand:@"/usr/bin/atos" arguments:args]; - - NSString *pattern = @".+\\((.+):([0-9]+)\\)"; - NSError *e; - NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:NSRegularExpressionCaseInsensitive error:&e]; - NSArray *res = [regex matchesInString:callSite options:0 range:NSMakeRange(0, callSite.length)]; - - NSString *fileName = nil; - NSInteger lineNumber = 0; - - for (NSTextCheckingResult *ntcr in res) { - fileName = [callSite substringWithRange:[ntcr rangeAtIndex:1]]; - NSString *lineNumberMatch = [callSite substringWithRange:[ntcr rangeAtIndex:2]]; - lineNumber = lineNumberMatch.integerValue; - } - return [KWCallSite callSiteWithFilename:fileName lineNumber:lineNumber]; -} - -#pragma mark - Building Example Groups - -void describe(NSString *aDescription, KWVoidBlock aBlock) { - KWCallSite *callSite = callSiteAtAddressIfNecessary(kwCallerAddress()); - describeWithCallSite(callSite, aDescription, aBlock); -} - -void context(NSString *aDescription, KWVoidBlock aBlock) { - KWCallSite *callSite = callSiteAtAddressIfNecessary(kwCallerAddress()); - contextWithCallSite(callSite, aDescription, aBlock); -} - -void registerMatchers(NSString *aNamespacePrefix) { - registerMatchersWithCallSite(nil, aNamespacePrefix); -} - -void beforeAll(KWVoidBlock aBlock) { - beforeAllWithCallSite(nil, aBlock); -} - -void afterAll(KWVoidBlock aBlock) { - afterAllWithCallSite(nil, aBlock); -} - -void beforeEach(KWVoidBlock aBlock) { - beforeEachWithCallSite(nil, aBlock); -} - -void afterEach(KWVoidBlock aBlock) { - afterEachWithCallSite(nil, aBlock); -} - -void it(NSString *aDescription, KWVoidBlock aBlock) { - KWCallSite *callSite = callSiteAtAddressIfNecessary(kwCallerAddress()); - itWithCallSite(callSite, aDescription, aBlock); -} - -void specify(KWVoidBlock aBlock) -{ - itWithCallSite(nil, nil, aBlock); -} - -void pending_(NSString *aDescription, KWVoidBlock ignoredBlock) { - pendingWithCallSite(nil, aDescription, ignoredBlock); -} - -void describeWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock aBlock) { - - contextWithCallSite(aCallSite, aDescription, aBlock); -} - -void contextWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock aBlock) { - [[KWExampleGroupBuilder sharedExampleGroupBuilder] pushContextNodeWithCallSite:aCallSite description:aDescription]; - aBlock(); - [[KWExampleGroupBuilder sharedExampleGroupBuilder] popContextNode]; -} - -void registerMatchersWithCallSite(KWCallSite *aCallSite, NSString *aNamespacePrefix) { - [[KWExampleGroupBuilder sharedExampleGroupBuilder] setRegisterMatchersNodeWithCallSite:aCallSite namespacePrefix:aNamespacePrefix]; -} - -void beforeAllWithCallSite(KWCallSite *aCallSite, KWVoidBlock aBlock) { - [[KWExampleGroupBuilder sharedExampleGroupBuilder] setBeforeAllNodeWithCallSite:aCallSite block:aBlock]; -} - -void afterAllWithCallSite(KWCallSite *aCallSite, KWVoidBlock aBlock) { - [[KWExampleGroupBuilder sharedExampleGroupBuilder] setAfterAllNodeWithCallSite:aCallSite block:aBlock]; -} - -void beforeEachWithCallSite(KWCallSite *aCallSite, KWVoidBlock aBlock) { - [[KWExampleGroupBuilder sharedExampleGroupBuilder] setBeforeEachNodeWithCallSite:aCallSite block:aBlock]; -} - -void afterEachWithCallSite(KWCallSite *aCallSite, KWVoidBlock aBlock) { - [[KWExampleGroupBuilder sharedExampleGroupBuilder] setAfterEachNodeWithCallSite:aCallSite block:aBlock]; -} - -void itWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock aBlock) { - [[KWExampleGroupBuilder sharedExampleGroupBuilder] addItNodeWithCallSite:aCallSite description:aDescription block:aBlock]; -} - -void pendingWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock ignoredBlock) { - [[KWExampleGroupBuilder sharedExampleGroupBuilder] addPendingNodeWithCallSite:aCallSite description:aDescription]; -} diff --git a/Pods/Kiwi/Classes/KWExampleSuite.m b/Pods/Kiwi/Classes/KWExampleSuite.m deleted file mode 100644 index 7e267237..00000000 --- a/Pods/Kiwi/Classes/KWExampleSuite.m +++ /dev/null @@ -1,93 +0,0 @@ -// -// KWExampleSuite.m -// Kiwi -// -// Created by Luke Redpath on 17/10/2011. -// Copyright (c) 2011 Allen Ding. All rights reserved. -// - -#import "KWExampleSuite.h" -#import "KWExample.h" -#import "KWStringUtilities.h" -#import "KWBeforeAllNode.h" -#import "KWAfterAllNode.h" -#import "NSMethodSignature+KiwiAdditions.h" -#import - -#define kKWINVOCATION_EXAMPLE_GROUP_KEY @"__KWExampleGroupKey" - -@interface KWExampleSuite() { - KWContextNode *rootNode; - NSMutableArray *examples; -} -@end - -@implementation KWExampleSuite - -- (id)initWithRootNode:(KWContextNode *)contextNode -{ - if ((self = [super init])) { - rootNode = [contextNode retain]; - examples = [[NSMutableArray alloc] init]; - } - return self; -} - -- (void)dealloc -{ - [examples release]; - [rootNode release]; - [super dealloc]; -} - -- (void)addExample:(KWExample *)example -{ - [examples addObject:example]; - [example setSuite:self]; -} - -- (void)markLastExampleAsLastInContext:(KWContextNode *)context -{ - if ([examples count] > 0) { - KWExample *lastExample = (KWExample *)[examples lastObject]; - [lastExample.lastInContexts addObject:context]; - } -} - -- (NSArray *)invocationsForTestCase; -{ - NSMutableArray *invocations = [NSMutableArray array]; - - // Add a single dummy invocation for each example group - - for (KWExample *exampleGroup in examples) { - NSMethodSignature *methodSignature = [NSMethodSignature signatureWithObjCTypes:[KWEncodingForVoidMethod() UTF8String]]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSignature]; - [invocations addObject:invocation]; - [invocation kw_setExample:exampleGroup]; - } - - return invocations; -} - -@end - -#pragma mark - - -// because SenTest will modify the invocation target, we'll have to store -// another reference to the example group so we can retrieve it later - -@implementation NSInvocation (KWExampleGroup) - -- (void)kw_setExample:(KWExample *)exampleGroup -{ - objc_setAssociatedObject(self, kKWINVOCATION_EXAMPLE_GROUP_KEY, exampleGroup, OBJC_ASSOCIATION_RETAIN); -} - -- (KWExample *)kw_example -{ - return objc_getAssociatedObject(self, kKWINVOCATION_EXAMPLE_GROUP_KEY); -} - -@end - diff --git a/Pods/Kiwi/Classes/KWFutureObject.m b/Pods/Kiwi/Classes/KWFutureObject.m deleted file mode 100644 index c188bf5e..00000000 --- a/Pods/Kiwi/Classes/KWFutureObject.m +++ /dev/null @@ -1,47 +0,0 @@ -// -// KWFutureObject.m -// iOSFalconCore -// -// Created by Luke Redpath on 13/01/2011. -// Copyright 2011 LJR Software Limited. All rights reserved. -// - -#import "KWFutureObject.h" - -@interface KWFutureObject() { - KWFutureObjectBlock block; -} -@end - -@implementation KWFutureObject - -+ (id)objectWithObjectPointer:(id *)pointer; -{ - return [self futureObjectWithBlock:^{ return *pointer; }]; -} - -+ (id)futureObjectWithBlock:(KWFutureObjectBlock)block; -{ - return [[[self alloc] initWithBlock:block] autorelease]; -} - -- (id)initWithBlock:(KWFutureObjectBlock)aBlock; -{ - if ((self = [super init])) { - block = [aBlock copy]; - } - return self; -} - -- (id)object; -{ - return block(); -} - -- (void)dealloc -{ - [block release]; - [super dealloc]; -} - -@end diff --git a/Pods/Kiwi/Classes/KWHaveValueMatcher.m b/Pods/Kiwi/Classes/KWHaveValueMatcher.m deleted file mode 100644 index c42cfc25..00000000 --- a/Pods/Kiwi/Classes/KWHaveValueMatcher.m +++ /dev/null @@ -1,148 +0,0 @@ -// -// KWHaveValueMatcher.m -// Kiwi -// -// Created by Luke Redpath on 24/01/2011. -// Copyright 2011 Allen Ding. All rights reserved. -// - -#import "KWHaveValueMatcher.h" -#import "KWGenericMatchingAdditions.h" -#import "KWGenericMatcher.h" -#import "KWFormatter.h" - -@interface KWHaveValueMatcher() - -#pragma mark - Properties - -@property (nonatomic, retain) NSString *expectedKey; -@property (nonatomic, retain) NSString *expectedKeyPath; -@property (nonatomic, retain) id expectedValue; - -- (id)subjectValue; - -@end - -@implementation KWHaveValueMatcher - -@synthesize expectedKey, expectedKeyPath, expectedValue; - -- (void)dealloc -{ - [expectedKeyPath release]; - [expectedKey release]; - [expectedValue release]; - [super dealloc]; -} - -#pragma mark - Getting Matcher Strings - -+ (NSArray *)matcherStrings { - return @[@"haveValue:forKey:", - @"haveValueForKey:", - @"haveValue:forKeyPath:", - @"haveValueForKeyPath:"]; -} - -#pragma mark - Matching - -- (BOOL)evaluate { - BOOL matched = NO; - - @try { - id value = [self subjectValue]; - - if (value) { - matched = YES; - - if (self.expectedValue) { - matched = [self.expectedValue isEqualOrMatches:value]; - } - } - } - @catch (NSException * e) {} // catch KVO non-existent key errors - - return matched; -} - -- (NSString *)failureMessageForShould { - if (self.expectedValue == nil) { - return [NSString stringWithFormat:@"expected subject to have a value for key %@", - [KWFormatter formatObject:self.expectedKey]]; - } - id subjectValue = [self subjectValue]; - if (subjectValue) { - return [NSString stringWithFormat:@"expected subject to have value %@ for key %@, but it had value %@ instead", - [KWFormatter formatObject:self.expectedValue], - [KWFormatter formatObject:self.expectedKey], - [KWFormatter formatObject:subjectValue]]; - } else { - return [NSString stringWithFormat:@"expected subject to have value %@ for key %@, but the key was not present", - [KWFormatter formatObject:self.expectedValue], - [KWFormatter formatObject:self.expectedKey]]; - } -} - -- (id)subjectValue -{ - id value = nil; - - if (self.expectedKey) { - value = [self.subject valueForKey:self.expectedKey]; - } else - if (self.expectedKeyPath) { - value = [self.subject valueForKeyPath:self.expectedKeyPath]; - } - return value; -} - -- (NSString *)description -{ - NSString *keyDescription = nil; - - if (self.expectedKey) { - keyDescription = [NSString stringWithFormat:@"key %@", [KWFormatter formatObject:self.expectedKey]]; - } - else { - keyDescription = [NSString stringWithFormat:@"keypath %@", [KWFormatter formatObject:self.expectedKeyPath]]; - } - - NSString *valueDescription = nil; - - if (self.expectedValue) { - valueDescription = [NSString stringWithFormat:@"value %@", [KWFormatter formatObject:self.expectedValue]]; - } - else { - valueDescription = @"value"; - } - - return [NSString stringWithFormat:@"have %@ for %@", valueDescription, keyDescription]; -} - -#pragma mark - Configuring Matchers - -- (void)haveValue:(id)value forKey:(NSString *)key; -{ - self.expectedKey = key; - self.expectedValue = value; -} - -- (void)haveValue:(id)value forKeyPath:(NSString *)key; -{ - self.expectedKeyPath = key; - self.expectedValue = value; -} - -- (void)haveValueForKey:(NSString *)key; -{ - self.expectedKey = key; - self.expectedValue = nil; -} - -- (void)haveValueForKeyPath:(NSString *)keyPath; -{ - self.expectedKeyPath = keyPath; - self.expectedValue = nil; -} - -@end diff --git a/Pods/Kiwi/Classes/KWNull.m b/Pods/Kiwi/Classes/KWNull.m deleted file mode 100644 index 2cdf204f..00000000 --- a/Pods/Kiwi/Classes/KWNull.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// Licensed under the terms in License.txt -// -// Copyright 2010 Allen Ding. All rights reserved. -// - -#import "KWNull.h" - -@implementation KWNull - -#pragma mark - Initializing - -static KWNull *sharedNull = nil; - -+ (id)null { - if (sharedNull == nil) { - sharedNull = [[super allocWithZone:nil] init]; - } - - return sharedNull; -} - -+ (id)allocWithZone:(NSZone *)zone { - return [[self null] retain]; -} - -- (id)copyWithZone:(NSZone *)zone { - return self; -} - -- (id)retain { - return self; -} - -- (NSUInteger)retainCount { - return NSUIntegerMax; -} - -- (oneway void)release { -} - -- (id)autorelease { - return self; -} - -@end diff --git a/Pods/Kiwi/Classes/KWProbePoller.m b/Pods/Kiwi/Classes/KWProbePoller.m deleted file mode 100644 index 7fc496a3..00000000 --- a/Pods/Kiwi/Classes/KWProbePoller.m +++ /dev/null @@ -1,79 +0,0 @@ -// -// KWProbePoller.m -// iOSFalconCore -// -// Created by Luke Redpath on 13/01/2011. -// Copyright 2011 LJR Software Limited. All rights reserved. -// - -#import "KWProbePoller.h" - -@interface KWTimeout : NSObject { - NSDate *timeoutDate; -} - -- (id)initWithTimeout:(NSTimeInterval)timeout; -- (BOOL)hasTimedOut; -@end - -@implementation KWTimeout - -- (id)initWithTimeout:(NSTimeInterval)timeout -{ - if ((self = [super init])) { - timeoutDate = [[NSDate alloc] initWithTimeIntervalSinceNow:timeout]; - } - return self; -} - -- (void)dealloc -{ - [timeoutDate release]; - [super dealloc]; -} - -- (BOOL)hasTimedOut -{ - return [timeoutDate timeIntervalSinceDate:[NSDate date]] < 0; -} - -@end - - -@interface KWProbePoller() { - NSTimeInterval timeoutInterval; - NSTimeInterval delayInterval; - BOOL shouldWait; -} -@end - -@implementation KWProbePoller - -- (id)initWithTimeout:(NSTimeInterval)theTimeout delay:(NSTimeInterval)theDelay shouldWait:(BOOL)wait; -{ - if ((self = [super init])) { - timeoutInterval = theTimeout; - delayInterval = theDelay; - shouldWait = wait; - } - return self; -} - -- (BOOL)check:(id)probe; -{ - KWTimeout *timeout = [[KWTimeout alloc] initWithTimeout:timeoutInterval]; - - while (shouldWait || ![probe isSatisfied]) { - if ([timeout hasTimedOut]) { - [timeout release]; - return [probe isSatisfied]; - } - [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:delayInterval]]; - [probe sample]; - } - [timeout release]; - - return YES; -} - -@end diff --git a/Pods/Kiwi/Classes/KWSpec.m b/Pods/Kiwi/Classes/KWSpec.m deleted file mode 100644 index 8bb48b16..00000000 --- a/Pods/Kiwi/Classes/KWSpec.m +++ /dev/null @@ -1,143 +0,0 @@ -// -// Licensed under the terms in License.txt -// -// Copyright 2010 Allen Ding. All rights reserved. -// - -#import "KWSpec.h" -#import -#import "KWExample.h" -#import "KWExampleGroupBuilder.h" -#import "KWIntercept.h" -#import "KWObjCUtilities.h" -#import "KWStringUtilities.h" -#import "NSMethodSignature+KiwiAdditions.h" -#import "KWFailure.h" -#import "KWExampleSuite.h" - - -@interface KWSpec() - -#pragma mark - Properties - -@property (nonatomic, retain) KWExample *example; - -@end - -@implementation KWSpec - -@synthesize example; - -- (void)dealloc -{ - [example release]; - [super dealloc]; -} - -/* Methods are only implemented by sub-classes */ - -+ (NSString *)file { return nil; } - -+ (void)buildExampleGroups {} - -/* Reported by XCode SenTestingKit Runner before and after invocation of the test - Use camel case to make method friendly names from example description - */ - -- (NSString *)description -{ - KWExample *currentExample = self.example ? self.example : [[self invocation] kw_example]; - NSString *name = [currentExample descriptionWithContext]; - - // CamelCase the string - NSArray *words = [name componentsSeparatedByString:@" "]; - name = @""; - for (NSString *word in words) { - if ([word length] < 1) - { - continue; - } - name = [name stringByAppendingString:[[word substringToIndex:1] uppercaseString]]; - name = [name stringByAppendingString:[word substringFromIndex:1]]; - } - - // Replace the commas with underscores to separate the levels of context - name = [name stringByReplacingOccurrencesOfString:@"," withString:@"_"]; - - // Strip out characters not legal in function names - NSError *error = nil; - NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[^a-zA-Z0-9_]*" options:0 error:&error]; - name = [regex stringByReplacingMatchesInString:name options:0 range:NSMakeRange(0, name.length) withTemplate:@""]; - - return [NSString stringWithFormat:@"-[%@ %@]", NSStringFromClass([self class]), name]; -} - -#pragma mark - Getting Invocations - -/* Called by the SenTestingKit test suite to get an array of invocations that - should be run on instances of test cases. */ - -+ (NSArray *)testInvocations -{ - SEL selector = @selector(buildExampleGroups); - - // Only return invocation if the receiver is a concrete spec that has overridden -buildExampleGroups. - if ([self methodForSelector:selector] == [KWSpec methodForSelector:selector]) - return nil; - - KWExampleSuite *exampleSuite = [[KWExampleGroupBuilder sharedExampleGroupBuilder] buildExampleGroups:^{ - [self buildExampleGroups]; - }]; - - return [exampleSuite invocationsForTestCase]; -} - -#pragma mark - Running Specs - -- (void)invokeTest -{ - self.example = [[self invocation] kw_example]; - - NSAutoreleasePool *subPool = [[NSAutoreleasePool alloc] init]; - - @try { - [self.example runWithDelegate:self]; - } @catch (NSException *exception) { - [self failWithException:exception]; - } - - [[self invocation] kw_setExample:nil]; - - [subPool release]; -} - -#pragma mark - KWExampleGroupDelegate methods - -- (void)example:(KWExample *)example didFailWithFailure:(KWFailure *)failure -{ - [self failWithException:[failure exceptionValue]]; -} - -#pragma mark - Verification proxies - -+ (id)addVerifier:(id)aVerifier -{ - return [[[KWExampleGroupBuilder sharedExampleGroupBuilder] currentExample] addVerifier:aVerifier]; -} - -+ (id)addExistVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite -{ - return [[[KWExampleGroupBuilder sharedExampleGroupBuilder] currentExample] addExistVerifierWithExpectationType:anExpectationType callSite:aCallSite]; -} - -+ (id)addMatchVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite -{ - return [[[KWExampleGroupBuilder sharedExampleGroupBuilder] currentExample] addMatchVerifierWithExpectationType:anExpectationType callSite:aCallSite]; -} - -+ (id)addAsyncVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite timeout:(NSInteger)timeout shouldWait:(BOOL)shouldWait -{ - return [[[KWExampleGroupBuilder sharedExampleGroupBuilder] currentExample] addAsyncVerifierWithExpectationType:anExpectationType callSite:aCallSite timeout:timeout shouldWait: shouldWait]; -} - -@end diff --git a/Pods/Kiwi/Classes/KWStringContainsMatcher.m b/Pods/Kiwi/Classes/KWStringContainsMatcher.m deleted file mode 100644 index e3eabc0e..00000000 --- a/Pods/Kiwi/Classes/KWStringContainsMatcher.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// StringContainsMatcher.m -// Kiwi -// -// Created by Stewart Gleadow on 7/06/12. -// Copyright (c) 2012 Allen Ding. All rights reserved. -// - -#import "KWStringContainsMatcher.h" - -@interface KWStringContainsMatcher(){} -@property (nonatomic, copy) NSString *substring; -@end - -@implementation KWStringContainsMatcher - -+ (id)matcherWithSubstring:(NSString *)aSubstring; -{ - return [[[self alloc] initWithSubstring:aSubstring] autorelease]; -} - -- (id)initWithSubstring:(NSString *)aSubstring; -{ - if ((self = [super init])) { - _substring = [aSubstring copy]; - } - return self; -} - -- (void)dealloc -{ - [_substring release]; - [super dealloc]; -} - -- (BOOL)matches:(id)item -{ - if (![item respondsToSelector:@selector(rangeOfString:)]) - return NO; - - return [item rangeOfString:self.substring].location != NSNotFound; -} - -- (NSString *)description -{ - return [NSString stringWithFormat:@"a string with substring '%@'", self.substring]; -} - -@end diff --git a/Pods/Kiwi/Classes/KWTestCase.h b/Pods/Kiwi/Classes/KWTestCase.h deleted file mode 100644 index 72a34603..00000000 --- a/Pods/Kiwi/Classes/KWTestCase.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Licensed under the terms in License.txt -// -// Copyright 2010 Allen Ding. All rights reserved. -// - -#import "KiwiConfiguration.h" -#import -#import "KWExpectationType.h" -#import "KWReporting.h" - -@class KWCallSite; -@class KWMatcherFactory; - -@protocol KWVerifying; - -// Deprecated. This is here just in case blocks are not enabled. -@interface KWTestCase : SenTestCase - -#pragma mark - Configuring Example Environments - -- (void)setUpExampleEnvironment; -- (void)tearDownExampleEnvironment; - -#pragma mark - Marking Pending Examples - -- (void)markPendingWithCallSite:(KWCallSite *)aCallSite; -- (void)markPendingWithCallSite:(KWCallSite *)aCallSite :(NSString *)aDescription; - -#pragma mark - Adding Verifiers - -- (id)addVerifier:(id)aVerifier; -- (id)addExistVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite; -- (id)addMatchVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite; -- (id)addAsyncVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite timeout:(NSInteger)timeout shouldWait:(BOOL)shouldWait; - -@end diff --git a/Pods/Kiwi/Classes/KWTestCase.m b/Pods/Kiwi/Classes/KWTestCase.m deleted file mode 100644 index b14ea146..00000000 --- a/Pods/Kiwi/Classes/KWTestCase.m +++ /dev/null @@ -1,182 +0,0 @@ -// -// Licensed under the terms in License.txt -// -// Copyright 2010 Allen Ding. All rights reserved. -// - -#import "KWTestCase.h" -#import -#import "KWDeviceInfo.h" -#import "KWExistVerifier.h" -#import "KWFailure.h" -#import "KWIntercept.h" -#import "KWMatcherFactory.h" -#import "KWMatchVerifier.h" -#import "KWAsyncVerifier.h" -#import "KWObjCUtilities.h" -#import "KWStringUtilities.h" -#import "KWVerifying.h" -#import "NSMethodSignature+KiwiAdditions.h" - -@interface KWTestCase() - -#pragma mark - Properties - -@property (nonatomic, readonly) KWMatcherFactory *matcherFactory; -@property (nonatomic, readonly) NSMutableArray *verifiers; -@property (nonatomic, readonly) NSMutableArray *failures; -@end - -@implementation KWTestCase - -#pragma mark - Initializing - -// Initializer used by the SenTestingKit test suite to initialize a test case -// for each test invocation returned in +testInvocations. -- (id)initWithInvocation:(NSInvocation *)anInvocation { - if ((self = [super initWithInvocation:anInvocation])) { - matcherFactory = [[KWMatcherFactory alloc] init]; - verifiers = [[NSMutableArray alloc] init]; - failures = [[NSMutableArray alloc] init]; - } - - return self; -} - -- (void)dealloc { - [matcherFactory release]; - [verifiers release]; - [failures release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize verifiers; -@synthesize matcherFactory; -@synthesize failures; - -#pragma mark - Configuring Example Environments - -- (void)setUpExampleEnvironment { - [self.matcherFactory registerMatcherClassesWithNamespacePrefix:@"KW"]; -} - -- (void)tearDownExampleEnvironment { - KWClearStubsAndSpies(); -} - -#pragma mark - Marking Pending Examples - -- (void)markPendingWithCallSite:(KWCallSite *)aCallSite { - KWFailure *failure = [KWFailure failureWithCallSite:aCallSite format:@"PENDING"]; - [self reportFailure:failure]; -} - -- (void)markPendingWithCallSite:(KWCallSite *)aCallSite :(NSString *)aDescription { - KWFailure *failure = [KWFailure failureWithCallSite:aCallSite format:@"PENDING (%@)", aDescription]; - [self reportFailure:failure]; -} - -#pragma mark - Adding Verifiers - -- (id)addVerifier:(id)aVerifier { - if (![self.verifiers containsObject:aVerifier]) - [self.verifiers addObject:aVerifier]; - - return aVerifier; -} - -- (id)addExistVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite { - id verifier = [KWExistVerifier existVerifierWithExpectationType:anExpectationType callSite:aCallSite reporter:self]; - [self.verifiers addObject:verifier]; - return verifier; -} - -- (id)addMatchVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite { - id verifier = [KWMatchVerifier matchVerifierWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:self.matcherFactory reporter:self]; - [self.verifiers addObject:verifier]; - return verifier; -} - -- (id)addAsyncVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite timeout:(NSInteger)timeout shouldWait:(BOOL)shouldWait { - id verifier = [KWAsyncVerifier asyncVerifierWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:self.matcherFactory reporter:self probeTimeout:timeout shouldWait: shouldWait]; - [self.verifiers addObject:verifier]; - return verifier; -} - -#pragma mark - Reporting Failures - -+ (KWFailure *)tidiedFailureWithFailure:(KWFailure *)aFailure { - if ([KWDeviceInfo isSimulator]) { - // \uff1a is the unicode for a fill width colon, as opposed to a - // regular :. This escape is performed so that Xcode doesn't truncate - // the error in the build results window, which is nice for build - // tests. - NSString *escapedMessage = [aFailure.message stringByReplacingOccurrencesOfString:@":" withString:@"\uff1a"]; - return [KWFailure failureWithCallSite:aFailure.callSite message:escapedMessage]; - } else { - return aFailure; - } -} - -- (void)reportFailure:(KWFailure *)aFailure; { - [self.failures addObject:aFailure]; - KWFailure *tidiedFailure = [[self class] tidiedFailureWithFailure:aFailure]; - [self failWithException:[tidiedFailure exceptionValue]]; -} - -#pragma mark - Getting Invocations - -// Called by the SenTestingKit test suite to get an array of invocations that -// should be run on instances of test cases. -+ (NSArray *)testInvocations { - // Examples are methods returning void with no parameters in the receiver - // that begin with "it" followed by an uppercase word. - NSMutableArray *exampleInvocations = [[[NSMutableArray alloc] init] autorelease]; - unsigned int methodCount = 0; - Method *methods = class_copyMethodList([self class], &methodCount); - - for (unsigned int i = 0; i < methodCount; i++) { - SEL selector = method_getName(methods[i]); - NSString *selectorString = NSStringFromSelector(selector); - - if (KWStringHasStrictWordPrefix(selectorString, @"it")) { - const char *encoding = method_getTypeEncoding(methods[i]); - NSMethodSignature *signature = [NSMethodSignature signatureWithObjCTypes:encoding]; - - if ([signature numberOfMessageArguments] > 0 || - !KWObjCTypeEqualToObjCType([signature methodReturnType], @encode(void))) - continue; - - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - [invocation setSelector:selector]; - [exampleInvocations addObject:invocation]; - } - } - - free(methods); - return exampleInvocations; -} - -#pragma mark - Running Test Cases - -// Called by the SenTestingKit test suite when it is time to run the test. -- (void)invokeTest { - NSAutoreleasePool *subPool = [[NSAutoreleasePool alloc] init]; - [self setUpExampleEnvironment]; - - @try { - [super invokeTest]; - - for (id verifier in self.verifiers) - [verifier exampleWillEnd]; - } @catch (NSException *exception) { - [self failWithException:exception]; - } - - [self tearDownExampleEnvironment]; - [subPool release]; -} - -@end diff --git a/Pods/Kiwi/Classes/KWBeBetweenMatcher.h b/Pods/Kiwi/Classes/Matchers/KWBeBetweenMatcher.h similarity index 79% rename from Pods/Kiwi/Classes/KWBeBetweenMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWBeBetweenMatcher.h index bb254771..fa08c75d 100644 --- a/Pods/Kiwi/Classes/KWBeBetweenMatcher.h +++ b/Pods/Kiwi/Classes/Matchers/KWBeBetweenMatcher.h @@ -7,11 +7,7 @@ #import "KiwiConfiguration.h" #import "KWMatcher.h" -@interface KWBeBetweenMatcher : KWMatcher { -@private - id lowerEndpoint; - id upperEndpoint; -} +@interface KWBeBetweenMatcher : KWMatcher #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWBeBetweenMatcher.m b/Pods/Kiwi/Classes/Matchers/KWBeBetweenMatcher.m similarity index 78% rename from Pods/Kiwi/Classes/KWBeBetweenMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWBeBetweenMatcher.m index 6ec2164a..b33e3a29 100644 --- a/Pods/Kiwi/Classes/KWBeBetweenMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWBeBetweenMatcher.m @@ -11,26 +11,13 @@ @interface KWBeBetweenMatcher() #pragma mark - Properties -@property (nonatomic, readwrite, retain) id lowerEndpoint; -@property (nonatomic, readwrite, retain) id upperEndpoint; +@property (nonatomic, strong) id lowerEndpoint; +@property (nonatomic, strong) id upperEndpoint; @end @implementation KWBeBetweenMatcher -#pragma mark - Initializing - -- (void)dealloc { - [lowerEndpoint release]; - [upperEndpoint release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize lowerEndpoint; -@synthesize upperEndpoint; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -58,9 +45,8 @@ - (NSString *)failureMessageForShould { [KWFormatter formatObject:self.subject]]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"be between %@ and %@", self.lowerEndpoint, self.upperEndpoint]; +- (NSString *)description { + return [NSString stringWithFormat:@"be between %@ and %@", self.lowerEndpoint, self.upperEndpoint]; } #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWBeEmptyMatcher.h b/Pods/Kiwi/Classes/Matchers/KWBeEmptyMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWBeEmptyMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWBeEmptyMatcher.h diff --git a/Pods/Kiwi/Classes/KWBeEmptyMatcher.m b/Pods/Kiwi/Classes/Matchers/KWBeEmptyMatcher.m similarity index 93% rename from Pods/Kiwi/Classes/KWBeEmptyMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWBeEmptyMatcher.m index 5963f182..8f0194d9 100644 --- a/Pods/Kiwi/Classes/KWBeEmptyMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWBeEmptyMatcher.m @@ -17,10 +17,6 @@ @interface KWBeEmptyMatcher() @implementation KWBeEmptyMatcher -#pragma mark - Properties - -@synthesize count; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -60,9 +56,8 @@ - (NSString *)failureMessageForShouldNot { return @"expected subject not to be empty"; } -- (NSString *)description -{ - return @"be empty"; +- (NSString *)description { + return @"be empty"; } #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWBeIdenticalToMatcher.h b/Pods/Kiwi/Classes/Matchers/KWBeIdenticalToMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWBeIdenticalToMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWBeIdenticalToMatcher.h diff --git a/Pods/Kiwi/Classes/KWBeIdenticalToMatcher.m b/Pods/Kiwi/Classes/Matchers/KWBeIdenticalToMatcher.m similarity index 80% rename from Pods/Kiwi/Classes/KWBeIdenticalToMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWBeIdenticalToMatcher.m index 252ded68..beb98864 100644 --- a/Pods/Kiwi/Classes/KWBeIdenticalToMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWBeIdenticalToMatcher.m @@ -11,23 +11,12 @@ @interface KWBeIdenticalToMatcher() #pragma mark - Properties -@property (nonatomic, readwrite, retain) id otherSubject; +@property (nonatomic, readwrite, strong) id otherSubject; @end @implementation KWBeIdenticalToMatcher -#pragma mark - Initializing - -- (void)dealloc { - [otherSubject release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize otherSubject; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -56,9 +45,8 @@ - (NSString *)failureMessageForShouldNot { self.otherSubject]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"be identical to %@", self.otherSubject]; +- (NSString *)description { + return [NSString stringWithFormat:@"be identical to %@", self.otherSubject]; } #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWBeKindOfClassMatcher.h b/Pods/Kiwi/Classes/Matchers/KWBeKindOfClassMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWBeKindOfClassMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWBeKindOfClassMatcher.h diff --git a/Pods/Kiwi/Classes/KWBeKindOfClassMatcher.m b/Pods/Kiwi/Classes/Matchers/KWBeKindOfClassMatcher.m similarity index 77% rename from Pods/Kiwi/Classes/KWBeKindOfClassMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWBeKindOfClassMatcher.m index b4f68457..90afc4f2 100644 --- a/Pods/Kiwi/Classes/KWBeKindOfClassMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWBeKindOfClassMatcher.m @@ -9,18 +9,12 @@ @interface KWBeKindOfClassMatcher() -#pragma mark - Properties - -@property (nonatomic, readwrite, assign) Class targetClass; +@property (nonatomic, assign) Class targetClass; @end @implementation KWBeKindOfClassMatcher -#pragma mark - Properties - -@synthesize targetClass; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -41,9 +35,8 @@ - (NSString *)failureMessageForShould { NSStringFromClass([self.subject class])]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"be kind of %@", NSStringFromClass(self.targetClass)]; +- (NSString *)description { + return [NSString stringWithFormat:@"be kind of %@", NSStringFromClass(self.targetClass)]; } #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWBeMemberOfClassMatcher.h b/Pods/Kiwi/Classes/Matchers/KWBeMemberOfClassMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWBeMemberOfClassMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWBeMemberOfClassMatcher.h diff --git a/Pods/Kiwi/Classes/KWBeMemberOfClassMatcher.m b/Pods/Kiwi/Classes/Matchers/KWBeMemberOfClassMatcher.m similarity index 81% rename from Pods/Kiwi/Classes/KWBeMemberOfClassMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWBeMemberOfClassMatcher.m index 398ceee6..20f41e91 100644 --- a/Pods/Kiwi/Classes/KWBeMemberOfClassMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWBeMemberOfClassMatcher.m @@ -9,18 +9,12 @@ @interface KWBeMemberOfClassMatcher() -#pragma mark - Properties - -@property (nonatomic, readwrite, assign) Class targetClass; +@property (nonatomic, assign) Class targetClass; @end @implementation KWBeMemberOfClassMatcher -#pragma mark - Properties - -@synthesize targetClass; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -41,9 +35,8 @@ - (NSString *)failureMessageForShould { NSStringFromClass([self.subject class])]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"be member of %@", +- (NSString *)description { + return [NSString stringWithFormat:@"be member of %@", NSStringFromClass(self.targetClass)]; } diff --git a/Pods/Kiwi/Classes/KWBeSubclassOfClassMatcher.h b/Pods/Kiwi/Classes/Matchers/KWBeSubclassOfClassMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWBeSubclassOfClassMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWBeSubclassOfClassMatcher.h diff --git a/Pods/Kiwi/Classes/KWBeSubclassOfClassMatcher.m b/Pods/Kiwi/Classes/Matchers/KWBeSubclassOfClassMatcher.m similarity index 88% rename from Pods/Kiwi/Classes/KWBeSubclassOfClassMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWBeSubclassOfClassMatcher.m index ec16871a..90740def 100644 --- a/Pods/Kiwi/Classes/KWBeSubclassOfClassMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWBeSubclassOfClassMatcher.m @@ -11,16 +11,12 @@ @interface KWBeSubclassOfClassMatcher() #pragma mark - Properties -@property (nonatomic, readwrite, assign) Class targetClass; +@property (nonatomic, assign) Class targetClass; @end @implementation KWBeSubclassOfClassMatcher -#pragma mark - Properties - -@synthesize targetClass; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -41,8 +37,7 @@ - (NSString *)failureMessageForShould { NSStringFromClass([self.subject class])]; } -- (NSString *)description -{ +- (NSString *)description { return [NSString stringWithFormat:@"be subclass of %@", NSStringFromClass(self.targetClass)]; } diff --git a/Pods/Kiwi/Classes/KWBeTrueMatcher.h b/Pods/Kiwi/Classes/Matchers/KWBeTrueMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWBeTrueMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWBeTrueMatcher.h diff --git a/Pods/Kiwi/Classes/KWBeTrueMatcher.m b/Pods/Kiwi/Classes/Matchers/KWBeTrueMatcher.m similarity index 79% rename from Pods/Kiwi/Classes/KWBeTrueMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWBeTrueMatcher.m index d8cf376e..4a9b01a4 100644 --- a/Pods/Kiwi/Classes/KWBeTrueMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWBeTrueMatcher.m @@ -8,18 +8,12 @@ @interface KWBeTrueMatcher() -#pragma mark - Properties - @property (nonatomic, readwrite) BOOL expectedValue; @end @implementation KWBeTrueMatcher -#pragma mark - Properties - -@synthesize expectedValue; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -39,15 +33,14 @@ - (BOOL)evaluate { - (NSString *)failureMessageForShould { return [NSString stringWithFormat:@"expected subject to be %@", - expectedValue ? @"true" : @"false"]; + self.expectedValue ? @"true" : @"false"]; } -- (NSString *)description -{ - if (self.expectedValue == YES) { - return @"be true"; - } - return @"be false"; +- (NSString *)description { + if (self.expectedValue == YES) { + return @"be true"; + } + return @"be false"; } #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWBeWithinMatcher.h b/Pods/Kiwi/Classes/Matchers/KWBeWithinMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWBeWithinMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWBeWithinMatcher.h diff --git a/Pods/Kiwi/Classes/KWBeWithinMatcher.m b/Pods/Kiwi/Classes/Matchers/KWBeWithinMatcher.m similarity index 85% rename from Pods/Kiwi/Classes/KWBeWithinMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWBeWithinMatcher.m index c56471c6..f05d0608 100644 --- a/Pods/Kiwi/Classes/KWBeWithinMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWBeWithinMatcher.m @@ -11,28 +11,13 @@ @interface KWBeWithinMatcher() -#pragma mark - Properties - -@property (nonatomic, readwrite, retain) id distance; -@property (nonatomic, readwrite, retain) id otherValue; +@property (nonatomic, readwrite, strong) id distance; +@property (nonatomic, readwrite, strong) id otherValue; @end @implementation KWBeWithinMatcher -#pragma mark - Initializing - -- (void)dealloc { - [distance release]; - [otherValue release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize distance; -@synthesize otherValue; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -88,9 +73,8 @@ - (NSString *)failureMessageForShould { [KWFormatter formatObject:self.subject]]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"be within %@ of %@", self.distance, self.otherValue]; +- (NSString *)description { + return [NSString stringWithFormat:@"be within %@ of %@", self.distance, self.otherValue]; } #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWBeZeroMatcher.h b/Pods/Kiwi/Classes/Matchers/KWBeZeroMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWBeZeroMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWBeZeroMatcher.h diff --git a/Pods/Kiwi/Classes/KWBeZeroMatcher.m b/Pods/Kiwi/Classes/Matchers/KWBeZeroMatcher.m similarity index 100% rename from Pods/Kiwi/Classes/KWBeZeroMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWBeZeroMatcher.m diff --git a/Pods/Kiwi/Classes/KWBlockRaiseMatcher.h b/Pods/Kiwi/Classes/Matchers/KWBlockRaiseMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWBlockRaiseMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWBlockRaiseMatcher.h diff --git a/Pods/Kiwi/Classes/KWBlockRaiseMatcher.m b/Pods/Kiwi/Classes/Matchers/KWBlockRaiseMatcher.m similarity index 83% rename from Pods/Kiwi/Classes/KWBlockRaiseMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWBlockRaiseMatcher.m index 3ca1aa9f..f4bd79e3 100644 --- a/Pods/Kiwi/Classes/KWBlockRaiseMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWBlockRaiseMatcher.m @@ -9,28 +9,13 @@ @interface KWBlockRaiseMatcher() -#pragma mark - Properties - -@property (nonatomic, readwrite, retain) NSException *exception; -@property (nonatomic, readwrite, retain) NSException *actualException; +@property (nonatomic, readwrite, strong) NSException *exception; +@property (nonatomic, readwrite, strong) NSException *actualException; @end @implementation KWBlockRaiseMatcher -#pragma mark - Initializing - -- (void)dealloc { - [exception release]; - [actualException release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize exception; -@synthesize actualException; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -111,9 +96,8 @@ - (void)raiseWithName:(NSString *)aName reason:(NSString *)aReason { self.exception = [NSException exceptionWithName:aName reason:aReason userInfo:nil]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"raise %@", [[self class] exceptionPhraseWithException:self.exception]]; +- (NSString *)description { + return [NSString stringWithFormat:@"raise %@", [[self class] exceptionPhraseWithException:self.exception]]; } @end diff --git a/Pods/Kiwi/Classes/KWChangeMatcher.h b/Pods/Kiwi/Classes/Matchers/KWChangeMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWChangeMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWChangeMatcher.h diff --git a/Pods/Kiwi/Classes/KWChangeMatcher.m b/Pods/Kiwi/Classes/Matchers/KWChangeMatcher.m similarity index 87% rename from Pods/Kiwi/Classes/KWChangeMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWChangeMatcher.m index 321735ce..fb7a3764 100644 --- a/Pods/Kiwi/Classes/KWChangeMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWChangeMatcher.m @@ -17,17 +17,6 @@ @interface KWChangeMatcher () @implementation KWChangeMatcher -@synthesize countBlock = _countBlock; -@synthesize anyChange = _anyChange; -@synthesize expectedDifference = _expectedDifference; -@synthesize expectedTotal = _expectedTotal; -@synthesize actualTotal = _actualTotal; - -- (void)dealloc { - Block_release(_countBlock); - [super dealloc]; -} - + (NSArray *)matcherStrings { return @[@"change:by:", @"change:"]; } diff --git a/Pods/Kiwi/Classes/KWConformToProtocolMatcher.h b/Pods/Kiwi/Classes/Matchers/KWConformToProtocolMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWConformToProtocolMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWConformToProtocolMatcher.h diff --git a/Pods/Kiwi/Classes/KWConformToProtocolMatcher.m b/Pods/Kiwi/Classes/Matchers/KWConformToProtocolMatcher.m similarity index 76% rename from Pods/Kiwi/Classes/KWConformToProtocolMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWConformToProtocolMatcher.m index c17c04d3..deb8e2a5 100644 --- a/Pods/Kiwi/Classes/KWConformToProtocolMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWConformToProtocolMatcher.m @@ -9,18 +9,12 @@ @interface KWConformToProtocolMatcher() -#pragma mark - Properties - -@property (nonatomic, readwrite, assign) Protocol *protocol; +@property (nonatomic, assign) Protocol *protocol; @end @implementation KWConformToProtocolMatcher -#pragma mark - Properties - -@synthesize protocol; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -40,9 +34,8 @@ - (NSString *)failureMessageForShould { NSStringFromProtocol(self.protocol)]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"conform to %@ protocol", NSStringFromProtocol(self.protocol)]; +- (NSString *)description { + return [NSString stringWithFormat:@"conform to %@ protocol", NSStringFromProtocol(self.protocol)]; } #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWContainMatcher.h b/Pods/Kiwi/Classes/Matchers/KWContainMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWContainMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWContainMatcher.h diff --git a/Pods/Kiwi/Classes/KWContainMatcher.m b/Pods/Kiwi/Classes/Matchers/KWContainMatcher.m similarity index 85% rename from Pods/Kiwi/Classes/KWContainMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWContainMatcher.m index b8b543d3..499e367f 100644 --- a/Pods/Kiwi/Classes/KWContainMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWContainMatcher.m @@ -10,25 +10,12 @@ @interface KWContainMatcher() -#pragma mark - Properties - -@property (nonatomic, readwrite, retain) id objects; +@property (nonatomic, readwrite, strong) id objects; @end @implementation KWContainMatcher -#pragma mark - Initializing - -- (void)dealloc { - [objects release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize objects; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -62,9 +49,8 @@ - (NSString *)failureMessageForShould { return [NSString stringWithFormat:@"expected subject to contain %@", [self objectsPhrase]]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"contain %@", [self objectsPhrase]]; +- (NSString *)description { + return [NSString stringWithFormat:@"contain %@", [self objectsPhrase]]; } #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWContainStringMatcher.h b/Pods/Kiwi/Classes/Matchers/KWContainStringMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWContainStringMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWContainStringMatcher.h diff --git a/Pods/Kiwi/Classes/KWContainStringMatcher.m b/Pods/Kiwi/Classes/Matchers/KWContainStringMatcher.m similarity index 100% rename from Pods/Kiwi/Classes/KWContainStringMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWContainStringMatcher.m diff --git a/Pods/Kiwi/Classes/KWEqualMatcher.h b/Pods/Kiwi/Classes/Matchers/KWEqualMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWEqualMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWEqualMatcher.h diff --git a/Pods/Kiwi/Classes/KWEqualMatcher.m b/Pods/Kiwi/Classes/Matchers/KWEqualMatcher.m similarity index 76% rename from Pods/Kiwi/Classes/KWEqualMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWEqualMatcher.m index 8a703ba0..51f30123 100644 --- a/Pods/Kiwi/Classes/KWEqualMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWEqualMatcher.m @@ -12,7 +12,7 @@ @interface KWEqualMatcher() #pragma mark - Properties -@property (nonatomic, readwrite, retain) id otherSubject; +@property (nonatomic, readwrite, strong) id otherSubject; @end @@ -20,10 +20,6 @@ @implementation KWEqualMatcher #pragma mark - Initializing -- (void)dealloc { - [otherSubject release]; - [super dealloc]; -} #pragma mark - Properties @@ -49,18 +45,18 @@ - (BOOL)evaluate { - (NSString *)failureMessageForShould { return [NSString stringWithFormat:@"expected subject to equal %@, got %@", - [KWFormatter formatObject:self.otherSubject], - [KWFormatter formatObject:self.subject]]; + [KWFormatter formatObjectIncludingClass:self.otherSubject], + [KWFormatter formatObjectIncludingClass:self.subject]]; } - (NSString *)failureMessageForShouldNot { return [NSString stringWithFormat:@"expected subject not to equal %@", - [KWFormatter formatObject:self.otherSubject]]; + [KWFormatter formatObjectIncludingClass:self.otherSubject]]; } - (NSString *)description { - return [NSString stringWithFormat:@"equal %@", [KWFormatter formatObject:self.otherSubject]]; + return [NSString stringWithFormat:@"equal %@", [KWFormatter formatObjectIncludingClass:self.otherSubject]]; } #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWGenericMatchEvaluator.h b/Pods/Kiwi/Classes/Matchers/KWGenericMatchEvaluator.h similarity index 100% rename from Pods/Kiwi/Classes/KWGenericMatchEvaluator.h rename to Pods/Kiwi/Classes/Matchers/KWGenericMatchEvaluator.h diff --git a/Pods/Kiwi/Classes/KWGenericMatchEvaluator.m b/Pods/Kiwi/Classes/Matchers/KWGenericMatchEvaluator.m similarity index 91% rename from Pods/Kiwi/Classes/KWGenericMatchEvaluator.m rename to Pods/Kiwi/Classes/Matchers/KWGenericMatchEvaluator.m index 68e57178..138a03d6 100644 --- a/Pods/Kiwi/Classes/KWGenericMatchEvaluator.m +++ b/Pods/Kiwi/Classes/Matchers/KWGenericMatchEvaluator.m @@ -10,18 +10,17 @@ #import "KWStringUtilities.h" #import "KWObjCUtilities.h" #import +#import "KWGenericMatcher.h" @implementation KWGenericMatchEvaluator -// Returns true only if the object has a method with the signature "- (void)matches:(id)object" -+ (BOOL)isGenericMatcher:(id)object -{ +// Returns true only if the object has a method with the signature "- (BOOL)matches:(id)object" ++ (BOOL)isGenericMatcher:(id)object { Class theClass = object_getClass(object); if (theClass == NULL) { return NO; } - Method method = class_getInstanceMethod(theClass, @selector(matches:)); if (method == NULL) { @@ -51,8 +50,7 @@ + (BOOL)isGenericMatcher:(id)object return YES; } -+ (BOOL)genericMatcher:(id)matcher matches:(id)object -{ ++ (BOOL)genericMatcher:(id)matcher matches:(id)object { NSString *targetEncoding = KWEncodingWithObjCTypes(@encode(BOOL), @encode(id), @encode(SEL), @encode(id), nil); NSMethodSignature *signature = [NSMethodSignature signatureWithObjCTypes:[targetEncoding UTF8String]]; NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; diff --git a/Pods/Kiwi/Classes/KWGenericMatcher.h b/Pods/Kiwi/Classes/Matchers/KWGenericMatcher.h similarity index 69% rename from Pods/Kiwi/Classes/KWGenericMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWGenericMatcher.h index b9f97954..be3c7f69 100644 --- a/Pods/Kiwi/Classes/KWGenericMatcher.h +++ b/Pods/Kiwi/Classes/Matchers/KWGenericMatcher.h @@ -9,10 +9,16 @@ #import #import "KWMatcher.h" +@protocol KWGenericMatching + +- (BOOL)matches:(id)object; + +@end + @interface KWGenericMatcher : KWMatcher #pragma mark - Configuring Matchers -- (void)match:(id)aMatcher; +- (void)match:(id)aMatcher; @end diff --git a/Pods/Kiwi/Classes/KWGenericMatcher.m b/Pods/Kiwi/Classes/Matchers/KWGenericMatcher.m similarity index 84% rename from Pods/Kiwi/Classes/KWGenericMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWGenericMatcher.m index 03874c83..81cc8889 100644 --- a/Pods/Kiwi/Classes/KWGenericMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWGenericMatcher.m @@ -11,22 +11,12 @@ @interface KWGenericMatcher () -#pragma mark - Properties - -@property (nonatomic, retain) id matcher; +@property (nonatomic, strong) id matcher; @end @implementation KWGenericMatcher -@synthesize matcher; - -- (void)dealloc -{ - [matcher release]; - [super dealloc]; -} - #pragma mark - Matching - (BOOL)evaluate { diff --git a/Pods/Kiwi/Classes/KWGenericMatchingAdditions.h b/Pods/Kiwi/Classes/Matchers/KWGenericMatchingAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/KWGenericMatchingAdditions.h rename to Pods/Kiwi/Classes/Matchers/KWGenericMatchingAdditions.h diff --git a/Pods/Kiwi/Classes/KWGenericMatchingAdditions.m b/Pods/Kiwi/Classes/Matchers/KWGenericMatchingAdditions.m similarity index 86% rename from Pods/Kiwi/Classes/KWGenericMatchingAdditions.m rename to Pods/Kiwi/Classes/Matchers/KWGenericMatchingAdditions.m index 1df81f1f..37da7ddf 100644 --- a/Pods/Kiwi/Classes/KWGenericMatchingAdditions.m +++ b/Pods/Kiwi/Classes/Matchers/KWGenericMatchingAdditions.m @@ -12,8 +12,7 @@ @implementation NSObject (KiwiGenericMatchingAdditions) -- (BOOL)isEqualOrMatches:(id)object -{ +- (BOOL)isEqualOrMatches:(id)object { if ([KWGenericMatchEvaluator isGenericMatcher:self]) { return [KWGenericMatchEvaluator genericMatcher:self matches:object]; } @@ -24,16 +23,14 @@ - (BOOL)isEqualOrMatches:(id)object @implementation NSArray (KiwiGenericMatchingAdditions) -- (BOOL)containsObjectEqualToOrMatching:(id)object -{ +- (BOOL)containsObjectEqualToOrMatching:(id)object { if ([KWGenericMatchEvaluator isGenericMatcher:object]) { return [self containsObjectMatching:object]; } return [self containsObject:object]; } -- (BOOL)containsObjectMatching:(id)matcher -{ +- (BOOL)containsObjectMatching:(id)matcher { NSIndexSet *indexSet = [self indexesOfObjectsPassingTest:^(id obj, NSUInteger idx, BOOL *stop) { BOOL matches = [KWGenericMatchEvaluator genericMatcher:matcher matches:obj]; if (matches) { @@ -49,8 +46,7 @@ - (BOOL)containsObjectMatching:(id)matcher @implementation NSSet (KiwiGenericMatchingAdditions) -- (BOOL)containsObjectEqualToOrMatching:(id)object -{ +- (BOOL)containsObjectEqualToOrMatching:(id)object { if ([KWGenericMatchEvaluator isGenericMatcher:object]) { return [[self allObjects] containsObjectMatching:object]; } @@ -61,8 +57,7 @@ - (BOOL)containsObjectEqualToOrMatching:(id)object @implementation NSOrderedSet (KiwiGenericMatchingAdditions) -- (BOOL)containsObjectEqualToOrMatching:(id)object -{ +- (BOOL)containsObjectEqualToOrMatching:(id)object { if ([KWGenericMatchEvaluator isGenericMatcher:object]) { return [[self array] containsObjectMatching:object]; } diff --git a/Pods/Kiwi/Classes/KWHaveMatcher.h b/Pods/Kiwi/Classes/Matchers/KWHaveMatcher.h similarity index 96% rename from Pods/Kiwi/Classes/KWHaveMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWHaveMatcher.h index bd3e7e2f..ae4637df 100644 --- a/Pods/Kiwi/Classes/KWHaveMatcher.h +++ b/Pods/Kiwi/Classes/Matchers/KWHaveMatcher.h @@ -35,11 +35,11 @@ @end -@interface KWMatchVerifier(KWHaveMatcherAdditions) - #pragma mark - Verifying -#pragma mark Invocation Capturing Methods +@interface KWMatchVerifier(KWHaveMatcherAdditions) + +#pragma mark - Invocation Capturing Methods - (id)have:(NSUInteger)aCount; - (id)haveAtLeast:(NSUInteger)aCount; diff --git a/Pods/Kiwi/Classes/KWHaveMatcher.m b/Pods/Kiwi/Classes/Matchers/KWHaveMatcher.m similarity index 91% rename from Pods/Kiwi/Classes/KWHaveMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWHaveMatcher.m index 80991d35..58fbec90 100644 --- a/Pods/Kiwi/Classes/KWHaveMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWHaveMatcher.m @@ -18,29 +18,15 @@ @interface KWHaveMatcher() #pragma mark - Properties -@property (nonatomic, readwrite) KWCountType countType; -@property (nonatomic, readwrite) NSUInteger count; -@property (nonatomic, readwrite, retain) NSInvocation *invocation; -@property (nonatomic, readwrite) NSUInteger actualCount; +@property (nonatomic, assign) KWCountType countType; +@property (nonatomic, assign) NSUInteger count; +@property (nonatomic, strong) NSInvocation *invocation; +@property (nonatomic, assign) NSUInteger actualCount; @end @implementation KWHaveMatcher -#pragma mark - Initializing - -- (void)dealloc { - [invocation release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize countType; -@synthesize count; -@synthesize invocation; -@synthesize actualCount; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -71,7 +57,7 @@ - (id)targetObject { if (!KWObjCTypeIsObject([signature methodReturnType])) [NSException raise:@"KWMatcherEception" format:@"a valid collection was not specified"]; - id object = nil; + __unsafe_unretained id object = nil; [self.invocation invokeWithTarget:self.subject]; [self.invocation getReturnValue:&object]; return object; @@ -152,9 +138,8 @@ - (NSString *)failureMessageForShouldNot { #pragma mark - Description -- (NSString *)description -{ - return [NSString stringWithFormat:@"%@ %u %@", [self verbPhrase], (unsigned)self.count, [self itemPhrase]]; +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %u %@", [self verbPhrase], (unsigned)self.count, [self itemPhrase]]; } #pragma mark - Configuring Matchers @@ -214,7 +199,7 @@ + (NSMethodSignature *)invocationCapturer:(KWInvocationCapturer *)anInvocationCa // Arbitrary selectors are allowed as expectation expression terminals when // the subject itself is a collection, so return a dummy method signature. - NSString *encoding = KWEncodingForVoidMethod(); + NSString *encoding = KWEncodingForDefaultMethod(); return [NSMethodSignature signatureWithObjCTypes:[encoding UTF8String]]; } @@ -239,11 +224,11 @@ + (void)invocationCapturer:(KWInvocationCapturer *)anInvocationCapturer didCaptu @end -@implementation KWMatchVerifier(KWHaveMatcherAdditions) - #pragma mark - Verifying -#pragma mark Invocation Capturing Methods +@implementation KWMatchVerifier(KWHaveMatcherAdditions) + +#pragma mark - Invocation Capturing Methods - (NSDictionary *)userInfoForHaveMatcherWithCountType:(KWCountType)aCountType count:(NSUInteger)aCount { return @{MatchVerifierKey: self, diff --git a/Pods/Kiwi/Classes/KWHaveValueMatcher.h b/Pods/Kiwi/Classes/Matchers/KWHaveValueMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWHaveValueMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWHaveValueMatcher.h diff --git a/Pods/Kiwi/Classes/Matchers/KWHaveValueMatcher.m b/Pods/Kiwi/Classes/Matchers/KWHaveValueMatcher.m new file mode 100644 index 00000000..9c6f8a69 --- /dev/null +++ b/Pods/Kiwi/Classes/Matchers/KWHaveValueMatcher.m @@ -0,0 +1,128 @@ +// +// KWHaveValueMatcher.m +// Kiwi +// +// Created by Luke Redpath on 24/01/2011. +// Copyright 2011 Allen Ding. All rights reserved. +// + +#import "KWHaveValueMatcher.h" +#import "KWGenericMatchingAdditions.h" +#import "KWGenericMatcher.h" +#import "KWFormatter.h" + +@interface KWHaveValueMatcher() + +@property (nonatomic, strong) NSString *expectedKey; +@property (nonatomic, strong) NSString *expectedKeyPath; +@property (nonatomic, strong) id expectedValue; + +@end + +@implementation KWHaveValueMatcher + +#pragma mark - Getting Matcher Strings + ++ (NSArray *)matcherStrings { + return @[@"haveValue:forKey:", + @"haveValueForKey:", + @"haveValue:forKeyPath:", + @"haveValueForKeyPath:"]; +} + +#pragma mark - Matching + +- (BOOL)evaluate { + BOOL matched = NO; + + @try { + id value = [self subjectValue]; + + if (value) { + matched = YES; + + if (self.expectedValue) { + matched = [self.expectedValue isEqualOrMatches:value]; + } + } + } + @catch (NSException * e) {} // catch KVO non-existent key errors + + return matched; +} + +- (NSString *)failureMessageForShould { + if (self.expectedValue == nil) { + return [NSString stringWithFormat:@"expected subject to have a value for key %@", + [KWFormatter formatObject:self.expectedKey]]; + } + id subjectValue = [self subjectValue]; + if (subjectValue) { + return [NSString stringWithFormat:@"expected subject to have value %@ for key %@, but it had value %@ instead", + [KWFormatter formatObject:self.expectedValue], + [KWFormatter formatObject:self.expectedKey], + [KWFormatter formatObject:subjectValue]]; + } else { + return [NSString stringWithFormat:@"expected subject to have value %@ for key %@, but the key was not present", + [KWFormatter formatObject:self.expectedValue], + [KWFormatter formatObject:self.expectedKey]]; + } +} + +- (id)subjectValue { + id value = nil; + + if (self.expectedKey) { + value = [self.subject valueForKey:self.expectedKey]; + } else + if (self.expectedKeyPath) { + value = [self.subject valueForKeyPath:self.expectedKeyPath]; + } + return value; +} + +- (NSString *)description { + NSString *keyDescription = nil; + + if (self.expectedKey) { + keyDescription = [NSString stringWithFormat:@"key %@", [KWFormatter formatObject:self.expectedKey]]; + } + else { + keyDescription = [NSString stringWithFormat:@"keypath %@", [KWFormatter formatObject:self.expectedKeyPath]]; + } + + NSString *valueDescription = nil; + + if (self.expectedValue) { + valueDescription = [NSString stringWithFormat:@"value %@", [KWFormatter formatObject:self.expectedValue]]; + } + else { + valueDescription = @"value"; + } + + return [NSString stringWithFormat:@"have %@ for %@", valueDescription, keyDescription]; +} + +#pragma mark - Configuring Matchers + +- (void)haveValue:(id)value forKey:(NSString *)key { + self.expectedKey = key; + self.expectedValue = value; +} + +- (void)haveValue:(id)value forKeyPath:(NSString *)key { + self.expectedKeyPath = key; + self.expectedValue = value; +} + +- (void)haveValueForKey:(NSString *)key { + self.expectedKey = key; + self.expectedValue = nil; +} + +- (void)haveValueForKeyPath:(NSString *)keyPath { + self.expectedKeyPath = keyPath; + self.expectedValue = nil; +} + +@end diff --git a/Pods/Kiwi/Classes/KWInequalityMatcher.h b/Pods/Kiwi/Classes/Matchers/KWInequalityMatcher.h similarity index 67% rename from Pods/Kiwi/Classes/KWInequalityMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWInequalityMatcher.h index 567a3216..003ba4b4 100644 --- a/Pods/Kiwi/Classes/KWInequalityMatcher.h +++ b/Pods/Kiwi/Classes/Matchers/KWInequalityMatcher.h @@ -7,15 +7,6 @@ #import "KiwiConfiguration.h" #import "KWMatcher.h" -enum { - KWInequalityTypeLessThan, - KWInequalityTypeLessThanOrEqualTo, - KWInequalityTypeGreaterThan, - KWInequalityTypeGreaterThanOrEqualTo -}; - -typedef NSUInteger KWInequalityType; - @interface KWInequalityMatcher : KWMatcher #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWInequalityMatcher.m b/Pods/Kiwi/Classes/Matchers/KWInequalityMatcher.m similarity index 89% rename from Pods/Kiwi/Classes/KWInequalityMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWInequalityMatcher.m index 89073bd3..573e3705 100644 --- a/Pods/Kiwi/Classes/KWInequalityMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWInequalityMatcher.m @@ -7,29 +7,24 @@ #import "KWInequalityMatcher.h" #import "KWFormatter.h" +typedef NS_ENUM(NSUInteger, KWInequalityType) { + KWInequalityTypeLessThan, + KWInequalityTypeLessThanOrEqualTo, + KWInequalityTypeGreaterThan, + KWInequalityTypeGreaterThanOrEqualTo +}; + @interface KWInequalityMatcher() #pragma mark - Properties -@property (nonatomic, readwrite) KWInequalityType inequalityType; -@property (nonatomic, readwrite, retain) id otherValue; +@property (nonatomic, assign) KWInequalityType inequalityType; +@property (nonatomic, strong) id otherValue; @end @implementation KWInequalityMatcher -#pragma mark - Initializing - -- (void)dealloc { - [otherValue release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize inequalityType; -@synthesize otherValue; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -85,8 +80,7 @@ - (NSString *)failureMessageForShould { [KWFormatter formatObject:self.subject]]; } -- (NSString *)description -{ +- (NSString *)description { return [NSString stringWithFormat:@"be %@ %@", [self comparisonPhrase], [KWFormatter formatObject:self.otherValue]]; } diff --git a/Pods/Kiwi/Classes/KWBeNilMatcher.h b/Pods/Kiwi/Classes/Matchers/KWNilMatcher.h similarity index 60% rename from Pods/Kiwi/Classes/KWBeNilMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWNilMatcher.h index 3a65f5fe..51f60572 100644 --- a/Pods/Kiwi/Classes/KWBeNilMatcher.h +++ b/Pods/Kiwi/Classes/Matchers/KWNilMatcher.h @@ -9,12 +9,15 @@ #import #import "KWMatcher.h" -@interface KWBeNilMatcher : KWMatcher { +@interface KWNilMatcher : KWMatcher -} - (void)beNil; +- (void)beNonNil; + +- (void)beNil:(BOOL)workaroundArgument; +- (void)beNonNil:(BOOL)workaroundArgument; -- (void)beNil:(BOOL)matcherHasSubject; + (BOOL)verifyNilSubject; ++ (BOOL)verifyNonNilSubject; @end diff --git a/Pods/Kiwi/Classes/Matchers/KWNilMatcher.m b/Pods/Kiwi/Classes/Matchers/KWNilMatcher.m new file mode 100644 index 00000000..70c9c317 --- /dev/null +++ b/Pods/Kiwi/Classes/Matchers/KWNilMatcher.m @@ -0,0 +1,112 @@ +// +// KWBeNilMatcher.m +// iOSFalconCore +// +// Created by Luke Redpath on 14/01/2011. +// Copyright 2011 LJR Software Limited. All rights reserved. +// + +#import "KWNilMatcher.h" +#import "KWExample.h" +#import "KWExampleSuiteBuilder.h" +#import "KWFormatter.h" +#import "KWMatchVerifier.h" +#import "KWVerifying.h" + +@interface KWNilMatcher () + +@property (nonatomic, assign) BOOL expectsNil; + +@end + +@implementation KWNilMatcher + +#pragma mark - Getting Matcher Strings + ++ (NSArray *)matcherStrings { + return @[@"beNil", @"beNil:", @"beNonNil", @"beNonNil:"]; +} + +#pragma mark - Matching + +- (BOOL)isNilMatcher { + return YES; +} + +- (BOOL)evaluate { + if (self.expectsNil) { + return (self.subject == nil); + } else { + return (self.subject != nil); + } +} + +// These two methods gets invoked by be(Non)Nil macro in case the subject is nil +// (and therefore cannot have a verifier attached). + ++ (BOOL)verifyNilSubject { + return [self verifySubjectExpectingNil:YES]; +} + ++ (BOOL)verifyNonNilSubject { + return [self verifySubjectExpectingNil:NO]; +} + +#pragma mark Getting Failure Messages + +- (NSString *)failureMessageForShould { + if (self.expectsNil) { + return [NSString stringWithFormat:@"expected subject to be nil, got %@", + [KWFormatter formatObject:self.subject]]; + } else { + return [NSString stringWithFormat:@"expected subject not to be nil"]; + } +} + +- (NSString *)failureMessageForShouldNot { + if (self.expectsNil) { + return [NSString stringWithFormat:@"expected subject not to be nil"]; + } else { + return [NSString stringWithFormat:@"expected subject to be nil, got %@", + [KWFormatter formatObject:self.subject]]; + } +} + +- (NSString *)description { + return [NSString stringWithFormat:@"be %@nil", self.expectsNil ? @"" : @"non "]; +} + +- (void)beNil { + self.expectsNil = YES; +} +- (void)beNil:(BOOL)workaroundArgument { + self.expectsNil = YES; +} + +- (void)beNonNil { + self.expectsNil = NO; +} +- (void)beNonNil:(BOOL)workaroundArgument { + self.expectsNil = NO; +} + +#pragma mark - Internal Methods + ++ (BOOL)verifySubjectExpectingNil:(BOOL)expectNil { + KWExample *currentExample = [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] currentExample]; + id verifier = currentExample.unresolvedVerifier; + + if (verifier && ![verifier subject] && [verifier isKindOfClass:[KWMatchVerifier class]]) { + KWMatchVerifier *matchVerifier = (KWMatchVerifier *)verifier; + if (expectNil) { + [matchVerifier performSelector:@selector(beNil)]; + } else { + [matchVerifier performSelector:@selector(beNonNil)]; + } + currentExample.unresolvedVerifier = nil; + return NO; + } + return YES; +} + +@end diff --git a/Pods/Kiwi/Classes/KWRaiseMatcher.h b/Pods/Kiwi/Classes/Matchers/KWRaiseMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWRaiseMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWRaiseMatcher.h diff --git a/Pods/Kiwi/Classes/KWRaiseMatcher.m b/Pods/Kiwi/Classes/Matchers/KWRaiseMatcher.m similarity index 86% rename from Pods/Kiwi/Classes/KWRaiseMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWRaiseMatcher.m index 5cde0b71..3cb9878b 100644 --- a/Pods/Kiwi/Classes/KWRaiseMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWRaiseMatcher.m @@ -11,27 +11,14 @@ @interface KWRaiseMatcher() #pragma mark - Properties -@property (nonatomic, readwrite) SEL selector; -@property (nonatomic, readwrite, retain) NSException *exception; -@property (nonatomic, readwrite, retain) NSException *actualException; +@property (nonatomic, assign) SEL selector; +@property (nonatomic, strong) NSException *exception; +@property (nonatomic, strong) NSException *actualException; @end @implementation KWRaiseMatcher -#pragma mark - Initializing - -- (void)dealloc { - [exception release]; - [actualException release]; - [super dealloc]; -} - -#pragma mark - Properties - -@synthesize selector; -@synthesize exception; -@synthesize actualException; #pragma mark - Getting Matcher Strings @@ -46,7 +33,10 @@ + (NSArray *)matcherStrings { - (BOOL)evaluate { @try { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" [self.subject performSelector:self.selector]; +#pragma clang diagnostic pop } @catch (NSException *anException) { self.actualException = anException; @@ -92,8 +82,7 @@ - (NSString *)failureMessageForShouldNot { [[self class] exceptionPhraseWithException:self.actualException]]; } -- (NSString *)description -{ +- (NSString *)description { return [NSString stringWithFormat:@"raise %@ when sent %@", [[self class] exceptionPhraseWithException:self.exception], NSStringFromSelector(self.selector)]; } diff --git a/Pods/Kiwi/Classes/KWReceiveMatcher.h b/Pods/Kiwi/Classes/Matchers/KWReceiveMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWReceiveMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWReceiveMatcher.h diff --git a/Pods/Kiwi/Classes/KWReceiveMatcher.m b/Pods/Kiwi/Classes/Matchers/KWReceiveMatcher.m similarity index 97% rename from Pods/Kiwi/Classes/KWReceiveMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWReceiveMatcher.m index 6d3a3c43..f81e033a 100644 --- a/Pods/Kiwi/Classes/KWReceiveMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWReceiveMatcher.m @@ -23,7 +23,7 @@ @interface KWReceiveMatcher() #pragma mark - Properties -@property (nonatomic, readwrite, retain) KWMessageTracker *messageTracker; +@property (nonatomic, readwrite, strong) KWMessageTracker *messageTracker; @end @@ -32,23 +32,14 @@ @implementation KWReceiveMatcher #pragma mark - Initializing - (id)initWithSubject:(id)anObject { - if ((self = [super initWithSubject:anObject])) { - self.willEvaluateMultipleTimes = NO; - } - - return self; -} - -- (void)dealloc { - [messageTracker release]; - [super dealloc]; + self = [super initWithSubject:anObject]; + if (self) { + _willEvaluateMultipleTimes = NO; + } + + return self; } -#pragma mark - Properties - -@synthesize messageTracker; -@synthesize willEvaluateMultipleTimes; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -174,7 +165,7 @@ + (NSMethodSignature *)invocationCapturer:(KWInvocationCapturer *)anInvocationCa if ([verifier.subject respondsToSelector:aSelector]) return [verifier.subject methodSignatureForSelector:aSelector]; - NSString *encoding = KWEncodingForVoidMethod(); + NSString *encoding = KWEncodingForDefaultMethod(); return [NSMethodSignature signatureWithObjCTypes:[encoding UTF8String]]; } diff --git a/Pods/Kiwi/Classes/KWRegularExpressionPatternMatcher.h b/Pods/Kiwi/Classes/Matchers/KWRegularExpressionPatternMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWRegularExpressionPatternMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWRegularExpressionPatternMatcher.h diff --git a/Pods/Kiwi/Classes/KWRegularExpressionPatternMatcher.m b/Pods/Kiwi/Classes/Matchers/KWRegularExpressionPatternMatcher.m similarity index 97% rename from Pods/Kiwi/Classes/KWRegularExpressionPatternMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWRegularExpressionPatternMatcher.m index 16388499..c5c38e3c 100644 --- a/Pods/Kiwi/Classes/KWRegularExpressionPatternMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWRegularExpressionPatternMatcher.m @@ -20,10 +20,6 @@ @interface KWRegularExpressionPatternMatcher () @implementation KWRegularExpressionPatternMatcher -- (void)dealloc { - self.pattern = nil; - [super dealloc]; -} #pragma mark - Getting Matcher Strings diff --git a/Pods/Kiwi/Classes/KWRespondToSelectorMatcher.h b/Pods/Kiwi/Classes/Matchers/KWRespondToSelectorMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWRespondToSelectorMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWRespondToSelectorMatcher.h diff --git a/Pods/Kiwi/Classes/KWRespondToSelectorMatcher.m b/Pods/Kiwi/Classes/Matchers/KWRespondToSelectorMatcher.m similarity index 79% rename from Pods/Kiwi/Classes/KWRespondToSelectorMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWRespondToSelectorMatcher.m index 30ba61fc..3920dd89 100644 --- a/Pods/Kiwi/Classes/KWRespondToSelectorMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWRespondToSelectorMatcher.m @@ -11,16 +11,12 @@ @interface KWRespondToSelectorMatcher() #pragma mark - Properties -@property (nonatomic, readwrite) SEL selector; +@property (nonatomic, assign) SEL selector; @end @implementation KWRespondToSelectorMatcher -#pragma mark - Properties - -@synthesize selector; - #pragma mark - Getting Matcher Strings + (NSArray *)matcherStrings { @@ -40,9 +36,8 @@ - (NSString *)failureMessageForShould { NSStringFromSelector(self.selector)]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"respond to -%@", NSStringFromSelector(self.selector)]; +- (NSString *)description { + return [NSString stringWithFormat:@"respond to -%@", NSStringFromSelector(self.selector)]; } #pragma mark - Configuring Matchers diff --git a/Pods/Kiwi/Classes/KWStringContainsMatcher.h b/Pods/Kiwi/Classes/Matchers/KWStringContainsMatcher.h similarity index 81% rename from Pods/Kiwi/Classes/KWStringContainsMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWStringContainsMatcher.h index 9198576b..c972629c 100644 --- a/Pods/Kiwi/Classes/KWStringContainsMatcher.h +++ b/Pods/Kiwi/Classes/Matchers/KWStringContainsMatcher.h @@ -7,8 +7,9 @@ // #import +#import "KWGenericMatcher.h" -@interface KWStringContainsMatcher : NSObject +@interface KWStringContainsMatcher : NSObject + (id)matcherWithSubstring:(NSString *)aSubstring; - (id)initWithSubstring:(NSString *)aSubstring; diff --git a/Pods/Kiwi/Classes/Matchers/KWStringContainsMatcher.m b/Pods/Kiwi/Classes/Matchers/KWStringContainsMatcher.m new file mode 100644 index 00000000..6230e81b --- /dev/null +++ b/Pods/Kiwi/Classes/Matchers/KWStringContainsMatcher.m @@ -0,0 +1,42 @@ +// +// StringContainsMatcher.m +// Kiwi +// +// Created by Stewart Gleadow on 7/06/12. +// Copyright (c) 2012 Allen Ding. All rights reserved. +// + +#import "KWStringContainsMatcher.h" + +@interface KWStringContainsMatcher(){} +@property (nonatomic, copy) NSString *substring; +@end + +@implementation KWStringContainsMatcher + ++ (id)matcherWithSubstring:(NSString *)aSubstring { + return [[self alloc] initWithSubstring:aSubstring]; +} + +- (id)initWithSubstring:(NSString *)aSubstring { + self = [super init]; + if (self) { + _substring = [aSubstring copy]; + } + return self; +} + + +- (BOOL)matches:(id)item { + if (![item respondsToSelector:@selector(rangeOfString:)]) { + return NO; + } + + return [item rangeOfString:self.substring].location != NSNotFound; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"a string with substring '%@'", self.substring]; +} + +@end diff --git a/Pods/Kiwi/Classes/KWStringPrefixMatcher.h b/Pods/Kiwi/Classes/Matchers/KWStringPrefixMatcher.h similarity index 100% rename from Pods/Kiwi/Classes/KWStringPrefixMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWStringPrefixMatcher.h diff --git a/Pods/Kiwi/Classes/KWStringPrefixMatcher.m b/Pods/Kiwi/Classes/Matchers/KWStringPrefixMatcher.m similarity index 54% rename from Pods/Kiwi/Classes/KWStringPrefixMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWStringPrefixMatcher.m index d6e59ed5..81c1f89a 100644 --- a/Pods/Kiwi/Classes/KWStringPrefixMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWStringPrefixMatcher.m @@ -15,30 +15,27 @@ @interface KWStringPrefixMatcher(){} @implementation KWStringPrefixMatcher + (id)matcherWithPrefix:(NSString *)aPrefix { - return [[[self alloc] initWithPrefix:aPrefix] autorelease]; + return [[self alloc] initWithPrefix:aPrefix]; } - (id)initWithPrefix:(NSString *)aPrefix { - if ((self = [super init])) { - _prefix = [aPrefix copy]; - } - return self; + self = [super init]; + if (self) { + _prefix = [aPrefix copy]; + } + return self; } -- (void)dealloc { - [_prefix release]; - [super dealloc]; -} - (BOOL)matches:(id)item { - if (![item respondsToSelector:@selector(hasPrefix:)]) - return NO; - - return [item hasPrefix:self.prefix]; + if (![item respondsToSelector:@selector(hasPrefix:)]) + return NO; + + return [item hasPrefix:self.prefix]; } - (NSString *)description { - return [NSString stringWithFormat:@"a string with prefix '%@'", self.prefix]; + return [NSString stringWithFormat:@"a string with prefix '%@'", self.prefix]; } @end diff --git a/Pods/Kiwi/Classes/KWUserDefinedMatcher.h b/Pods/Kiwi/Classes/Matchers/KWUserDefinedMatcher.h similarity index 90% rename from Pods/Kiwi/Classes/KWUserDefinedMatcher.h rename to Pods/Kiwi/Classes/Matchers/KWUserDefinedMatcher.h index 188f7589..d1d50c7b 100644 --- a/Pods/Kiwi/Classes/KWUserDefinedMatcher.h +++ b/Pods/Kiwi/Classes/Matchers/KWUserDefinedMatcher.h @@ -16,12 +16,11 @@ typedef BOOL (^KWUserDefinedMatcherBlock)(); @property (nonatomic, assign) SEL selector; @property (nonatomic, copy) NSString *failureMessageForShould; @property (nonatomic, copy) NSString *failureMessageForShouldNot; -@property (nonatomic, assign) KWUserDefinedMatcherBlock matcherBlock; +@property (nonatomic, copy) KWUserDefinedMatcherBlock matcherBlock; @property (nonatomic, copy) NSString *description; + (id)matcherWithSubject:(id)aSubject block:(KWUserDefinedMatcherBlock)aBlock; - (id)initWithSubject:(id)aSubject block:(KWUserDefinedMatcherBlock)aBlock; -- (void)setSubject:(id)aSubject; @end #pragma mark - @@ -35,7 +34,7 @@ typedef NSString * (^KWUserDefinedMatcherMessageBlock)(id); KWUserDefinedMatcherMessageBlock failureMessageForShouldNotBlock; NSString *description; } -@property (nonatomic, readonly) NSString *key; +@property (nonatomic, copy, readonly) NSString *key; + (id)builder; + (id)builderForSelector:(SEL)aSelector; diff --git a/Pods/Kiwi/Classes/KWUserDefinedMatcher.m b/Pods/Kiwi/Classes/Matchers/KWUserDefinedMatcher.m similarity index 77% rename from Pods/Kiwi/Classes/KWUserDefinedMatcher.m rename to Pods/Kiwi/Classes/Matchers/KWUserDefinedMatcher.m index 46bcbca7..bdb42943 100644 --- a/Pods/Kiwi/Classes/KWUserDefinedMatcher.m +++ b/Pods/Kiwi/Classes/Matchers/KWUserDefinedMatcher.m @@ -20,29 +20,21 @@ @implementation KWUserDefinedMatcher @synthesize matcherBlock; @synthesize description; -+ (id)matcherWithSubject:(id)aSubject block:(KWUserDefinedMatcherBlock)aBlock -{ - return [[[self alloc] initWithSubject:aSubject block:aBlock] autorelease]; ++ (id)matcherWithSubject:(id)aSubject block:(KWUserDefinedMatcherBlock)aBlock { + return [[self alloc] initWithSubject:aSubject block:aBlock]; } -- (id)initWithSubject:(id)aSubject block:(KWUserDefinedMatcherBlock)aBlock -{ - if ((self = [super initWithSubject:aSubject])) { +- (id)initWithSubject:(id)aSubject block:(KWUserDefinedMatcherBlock)aBlock { + self = [super initWithSubject:aSubject]; + if (self) { matcherBlock = [aBlock copy]; self.description = @"match user defined matcher"; } return self; } -- (void)dealloc -{ - [_invocation release]; - [matcherBlock release]; - [super dealloc]; -} -- (BOOL)evaluate -{ +- (BOOL)evaluate { BOOL result; if (self.invocation.methodSignature.numberOfArguments == 3) { @@ -55,31 +47,20 @@ - (BOOL)evaluate return result; } -- (void)setSubject:(id)aSubject { - if (aSubject != subject) { - [subject release]; - subject = [aSubject retain]; - } -} - #pragma mark - Message forwarding -- (BOOL)respondsToSelector:(SEL)aSelector -{ +- (BOOL)respondsToSelector:(SEL)aSelector { if (aSelector == self.selector) { return YES; } return [super respondsToSelector:aSelector]; } -- (void)forwardInvocation:(NSInvocation *)anInvocation -{ - [_invocation autorelease]; - _invocation = [anInvocation retain]; +- (void)forwardInvocation:(NSInvocation *)anInvocation { + _invocation = anInvocation; } -- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector -{ +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { if (aSelector == self.selector) { NSString *selectorString = NSStringFromSelector(self.selector); @@ -106,29 +87,23 @@ - (void)matcherMethodWithArgument:(id)argument {} @implementation KWUserDefinedMatcherBuilder -+ (id)builder -{ ++ (id)builder { return [self builderForSelector:nil]; } + (id)builderForSelector:(SEL)aSelector { - return [[[self alloc] initWithSelector:aSelector] autorelease]; + return [[self alloc] initWithSelector:aSelector]; } - (id)initWithSelector:(SEL)aSelector { - if ((self = [super init])) { + self = [super init]; + if (self) { matcher = [[KWUserDefinedMatcher alloc] init]; matcher.selector = aSelector; } return self; } -- (void)dealloc -{ - [matcher release]; - [failureMessageForShouldBlock release]; - [super dealloc]; -} - (NSString *)key { return NSStringFromSelector(matcher.selector); @@ -141,18 +116,14 @@ - (void)match:(KWUserDefinedMatcherBlock)block { } - (void)failureMessageForShould:(KWUserDefinedMatcherMessageBlock)block { - [failureMessageForShouldBlock release]; failureMessageForShouldBlock = [block copy]; } - (void)failureMessageForShouldNot:(KWUserDefinedMatcherMessageBlock)block { - [failureMessageForShouldNotBlock release]; failureMessageForShouldNotBlock = [block copy]; } -- (void)description:(NSString *)aDescription -{ - [description release]; +- (void)description:(NSString *)aDescription { description = [aDescription copy]; } diff --git a/Pods/Kiwi/Classes/KWMock.h b/Pods/Kiwi/Classes/Mocking/KWMock.h similarity index 88% rename from Pods/Kiwi/Classes/KWMock.h rename to Pods/Kiwi/Classes/Mocking/KWMock.h index abbe7f2f..81639412 100644 --- a/Pods/Kiwi/Classes/KWMock.h +++ b/Pods/Kiwi/Classes/Mocking/KWMock.h @@ -45,12 +45,12 @@ #pragma mark - Properties -@property (nonatomic, readonly) BOOL isNullMock; -@property (nonatomic, readonly) BOOL isPartialMock; -@property (nonatomic, readonly) NSString *mockName; -@property (nonatomic, readonly) Class mockedClass; -@property (nonatomic, readonly) id mockedObject; -@property (nonatomic, readonly) Protocol *mockedProtocol; +@property (nonatomic, assign, readonly) BOOL isNullMock; +@property (nonatomic, assign, readonly) BOOL isPartialMock; +@property (nonatomic, copy, readonly) NSString *mockName; +@property (nonatomic, assign, readonly) Class mockedClass; +@property (nonatomic, strong, readonly) id mockedObject; +@property (nonatomic, assign, readonly) Protocol *mockedProtocol; #pragma mark - Stubbing Methods diff --git a/Pods/Kiwi/Classes/KWMock.m b/Pods/Kiwi/Classes/Mocking/KWMock.m similarity index 89% rename from Pods/Kiwi/Classes/KWMock.m rename to Pods/Kiwi/Classes/Mocking/KWMock.m index cc87faa5..90db7b55 100644 --- a/Pods/Kiwi/Classes/KWMock.m +++ b/Pods/Kiwi/Classes/Mocking/KWMock.m @@ -24,21 +24,10 @@ @interface KWMock() -#pragma mark - Initializing - -- (id)initAsNullMock:(BOOL)nullMockFlag withName:(NSString *)aName forClass:(Class)aClass protocol:(Protocol *)aProtocol; - -#pragma mark - Properties - @property (nonatomic, readonly) NSMutableArray *stubs; @property (nonatomic, readonly) NSMutableArray *expectedMessagePatterns; @property (nonatomic, readonly) NSMutableDictionary *messageSpies; - -#pragma mark - Handling Invocations - -- (BOOL)processReceivedInvocation:(NSInvocation *)invocation; - @end @implementation KWMock @@ -53,7 +42,7 @@ - (id)init { NSInvocation *invocation = [NSInvocation invocationWithTarget:self selector:_cmd]; if ([self processReceivedInvocation:invocation]) { - id result = nil; + __unsafe_unretained id result = nil; [invocation getReturnValue:&result]; return result; } else { @@ -97,14 +86,15 @@ - (id)initAsNullMockWithName:(NSString *)aName forProtocol:(Protocol *)aProtocol } - (id)initAsNullMock:(BOOL)nullMockFlag withName:(NSString *)aName forClass:(Class)aClass protocol:(Protocol *)aProtocol { - if ((self = [super init])) { - isNullMock = nullMockFlag; - mockName = [aName copy]; - mockedClass = aClass; - mockedProtocol = aProtocol; - stubs = [[NSMutableArray alloc] init]; - expectedMessagePatterns = [[NSMutableArray alloc] init]; - messageSpies = [[NSMutableDictionary alloc] init]; + self = [super init]; + if (self) { + _isNullMock = nullMockFlag; + _mockName = [aName copy]; + _mockedClass = aClass; + _mockedProtocol = aProtocol; + _stubs = [[NSMutableArray alloc] init]; + _expectedMessagePatterns = [[NSMutableArray alloc] init]; + _messageSpies = [[NSMutableDictionary alloc] init]; } return self; @@ -115,74 +105,54 @@ - (id)initAsPartialMockForObject:(id)object { } - (id)initAsPartialMockWithName:(NSString *)aName forObject:(id)object { - if ((self = [self initAsNullMock:YES withName:aName forClass:[object class] protocol:nil])) { - isPartialMock = YES; - mockedObject = [object retain]; + self = [self initAsNullMock:YES withName:aName forClass:[object class] protocol:nil]; + if (self) { + _isPartialMock = YES; + _mockedObject = object; } return self; } + (id)mockForClass:(Class)aClass { - return [[[self alloc] initForClass:aClass] autorelease]; + return [[self alloc] initForClass:aClass]; } + (id)mockForProtocol:(Protocol *)aProtocol { - return [[[self alloc] initForProtocol:aProtocol] autorelease]; + return [[self alloc] initForProtocol:aProtocol]; } + (id)mockWithName:(NSString *)aName forClass:(Class)aClass { - return [[[self alloc] initWithName:aName forClass:aClass] autorelease]; + return [[self alloc] initWithName:aName forClass:aClass]; } + (id)mockWithName:(NSString *)aName forProtocol:(Protocol *)aProtocol { - return [[[self alloc] initWithName:aName forProtocol:aProtocol] autorelease]; + return [[self alloc] initWithName:aName forProtocol:aProtocol]; } + (id)nullMockForClass:(Class)aClass { - return [[[self alloc] initAsNullMockForClass:aClass] autorelease]; + return [[self alloc] initAsNullMockForClass:aClass]; } + (id)nullMockForProtocol:(Protocol *)aProtocol { - return [[[self alloc] initAsNullMockForProtocol:aProtocol] autorelease]; + return [[self alloc] initAsNullMockForProtocol:aProtocol]; } + (id)nullMockWithName:(NSString *)aName forClass:(Class)aClass { - return [[[self alloc] initAsNullMockWithName:aName forClass:aClass] autorelease]; + return [[self alloc] initAsNullMockWithName:aName forClass:aClass]; } + (id)nullMockWithName:(NSString *)aName forProtocol:(Protocol *)aProtocol { - return [[[self alloc] initAsNullMockWithName:aName forProtocol:aProtocol] autorelease]; + return [[self alloc] initAsNullMockWithName:aName forProtocol:aProtocol]; } + (id)partialMockWithName:(NSString *)aName forObject:(id)object { - return [[[self alloc] initAsPartialMockWithName:aName forObject:object] autorelease]; + return [[self alloc] initAsPartialMockWithName:aName forObject:object]; } + (id)partialMockForObject:(id)object { - return [[[self alloc] initAsPartialMockForObject:object] autorelease]; -} - -- (void)dealloc { - [mockedObject release]; - [mockName release]; - [stubs release]; - [expectedMessagePatterns release]; - [messageSpies release]; - [super dealloc]; + return [[self alloc] initAsPartialMockForObject:object]; } -#pragma mark - Properties - -@synthesize isPartialMock; -@synthesize isNullMock; -@synthesize mockName; -@synthesize mockedObject; -@synthesize mockedClass; -@synthesize mockedProtocol; -@synthesize stubs; -@synthesize expectedMessagePatterns; -@synthesize messageSpies; - #pragma mark - Getting Transitive Closure For Mocked Protocols - (NSSet *)mockedProtocolTransitiveClosureSet { @@ -199,7 +169,7 @@ - (NSSet *)mockedProtocolTransitiveClosureSet { [protocolQueue removeLastObject]; unsigned int count = 0; - Protocol **protocols = (Protocol **)protocol_copyProtocolList(protocol, &count); + Protocol *__unsafe_unretained*protocols = protocol_copyProtocolList(protocol, &count); if (count == 0) continue; @@ -325,7 +295,6 @@ - (void)addMessageSpy:(id)aSpy forMessagePattern:(KWMessagePatt if (messagePatternSpies == nil) { messagePatternSpies = [[NSMutableArray alloc] init]; (self.messageSpies)[aMessagePattern] = messagePatternSpies; - [messagePatternSpies release]; } NSValue *spyWrapper = [NSValue valueWithNonretainedObject:aSpy]; @@ -442,7 +411,7 @@ - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { if (methodSignature != nil) return methodSignature; - NSString *encoding = KWEncodingForVoidMethod(); + NSString *encoding = KWEncodingForDefaultMethod(); return [NSMethodSignature signatureWithObjCTypes:[encoding UTF8String]]; } @@ -454,7 +423,7 @@ - (void)forwardInvocation:(NSInvocation *)anInvocation { if ([self processReceivedInvocation:anInvocation]) return; - if (isPartialMock) + if (self.isPartialMock) [anInvocation invokeWithTarget:self.mockedObject]; if (self.isNullMock) @@ -579,7 +548,7 @@ - (NSString *)description { NSInvocation *invocation = [NSInvocation invocationWithTarget:self selector:_cmd]; if ([self processReceivedInvocation:invocation]) { - NSString *result = nil; + __unsafe_unretained NSString *result = nil; [invocation getReturnValue:&result]; return result; } else { @@ -593,7 +562,7 @@ - (id)copy { NSInvocation *invocation = [NSInvocation invocationWithTarget:self selector:_cmd]; if ([self processReceivedInvocation:invocation]) { - id result = nil; + __unsafe_unretained id result = nil; [invocation getReturnValue:&result]; return result; } else { @@ -607,7 +576,7 @@ - (id)mutableCopy { NSInvocation *invocation = [NSInvocation invocationWithTarget:self selector:_cmd]; if ([self processReceivedInvocation:invocation]) { - id result = nil; + __unsafe_unretained id result = nil; [invocation getReturnValue:&result]; return result; } else { @@ -624,7 +593,7 @@ static id valueForKeyImplementation(id self, SEL _cmd, id key) { NSInvocation *invocation = [NSInvocation invocationWithTarget:self selector:_cmd messageArguments:&key]; if ([self processReceivedInvocation:invocation]) { - id result = nil; + __unsafe_unretained id result = nil; [invocation getReturnValue:&result]; return result; } else { diff --git a/Pods/Kiwi/Classes/NSObject+KiwiMockAdditions.h b/Pods/Kiwi/Classes/Mocking/NSObject+KiwiMockAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/NSObject+KiwiMockAdditions.h rename to Pods/Kiwi/Classes/Mocking/NSObject+KiwiMockAdditions.h diff --git a/Pods/Kiwi/Classes/NSObject+KiwiMockAdditions.m b/Pods/Kiwi/Classes/Mocking/NSObject+KiwiMockAdditions.m similarity index 100% rename from Pods/Kiwi/Classes/NSObject+KiwiMockAdditions.m rename to Pods/Kiwi/Classes/Mocking/NSObject+KiwiMockAdditions.m diff --git a/Pods/Kiwi/Classes/KWAfterAllNode.h b/Pods/Kiwi/Classes/Nodes/KWAfterAllNode.h similarity index 76% rename from Pods/Kiwi/Classes/KWAfterAllNode.h rename to Pods/Kiwi/Classes/Nodes/KWAfterAllNode.h index 4b449622..421ea5a6 100644 --- a/Pods/Kiwi/Classes/KWAfterAllNode.h +++ b/Pods/Kiwi/Classes/Nodes/KWAfterAllNode.h @@ -12,6 +12,6 @@ #pragma mark - Initializing -+ (id)afterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock; ++ (id)afterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block; @end diff --git a/Pods/Kiwi/Classes/KWAfterAllNode.m b/Pods/Kiwi/Classes/Nodes/KWAfterAllNode.m similarity index 67% rename from Pods/Kiwi/Classes/KWAfterAllNode.m rename to Pods/Kiwi/Classes/Nodes/KWAfterAllNode.m index 30a4d26f..efb0a038 100644 --- a/Pods/Kiwi/Classes/KWAfterAllNode.m +++ b/Pods/Kiwi/Classes/Nodes/KWAfterAllNode.m @@ -11,8 +11,8 @@ @implementation KWAfterAllNode #pragma mark - Initializing -+ (id)afterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock { - return [[[self alloc] initWithCallSite:aCallSite description:nil block:aBlock] autorelease]; ++ (id)afterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block { + return [[self alloc] initWithCallSite:aCallSite description:nil block:block]; } #pragma mark - Accepting Visitors diff --git a/Pods/Kiwi/Classes/KWAfterEachNode.h b/Pods/Kiwi/Classes/Nodes/KWAfterEachNode.h similarity index 76% rename from Pods/Kiwi/Classes/KWAfterEachNode.h rename to Pods/Kiwi/Classes/Nodes/KWAfterEachNode.h index dc15386e..4e682796 100644 --- a/Pods/Kiwi/Classes/KWAfterEachNode.h +++ b/Pods/Kiwi/Classes/Nodes/KWAfterEachNode.h @@ -12,6 +12,6 @@ #pragma mark - Initializing -+ (id)afterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock; ++ (id)afterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block; @end diff --git a/Pods/Kiwi/Classes/KWAfterEachNode.m b/Pods/Kiwi/Classes/Nodes/KWAfterEachNode.m similarity index 67% rename from Pods/Kiwi/Classes/KWAfterEachNode.m rename to Pods/Kiwi/Classes/Nodes/KWAfterEachNode.m index 6cbdf207..e6edd3ea 100644 --- a/Pods/Kiwi/Classes/KWAfterEachNode.m +++ b/Pods/Kiwi/Classes/Nodes/KWAfterEachNode.m @@ -11,8 +11,8 @@ @implementation KWAfterEachNode #pragma mark - Initializing -+ (id)afterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock { - return [[[self alloc] initWithCallSite:aCallSite description:nil block:aBlock] autorelease]; ++ (id)afterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block { + return [[self alloc] initWithCallSite:aCallSite description:nil block:block]; } #pragma mark - Accepting Visitors diff --git a/Pods/Kiwi/Classes/KWBeforeAllNode.h b/Pods/Kiwi/Classes/Nodes/KWBeforeAllNode.h similarity index 76% rename from Pods/Kiwi/Classes/KWBeforeAllNode.h rename to Pods/Kiwi/Classes/Nodes/KWBeforeAllNode.h index ed389ce7..f5cd2e17 100644 --- a/Pods/Kiwi/Classes/KWBeforeAllNode.h +++ b/Pods/Kiwi/Classes/Nodes/KWBeforeAllNode.h @@ -12,6 +12,6 @@ #pragma mark - Initializing -+ (id)beforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock; ++ (id)beforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block; @end diff --git a/Pods/Kiwi/Classes/KWBeforeAllNode.m b/Pods/Kiwi/Classes/Nodes/KWBeforeAllNode.m similarity index 67% rename from Pods/Kiwi/Classes/KWBeforeAllNode.m rename to Pods/Kiwi/Classes/Nodes/KWBeforeAllNode.m index dbb7d65c..41b2e085 100644 --- a/Pods/Kiwi/Classes/KWBeforeAllNode.m +++ b/Pods/Kiwi/Classes/Nodes/KWBeforeAllNode.m @@ -11,8 +11,8 @@ @implementation KWBeforeAllNode #pragma mark - Initializing -+ (id)beforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock { - return [[[self alloc] initWithCallSite:aCallSite description:nil block:aBlock] autorelease]; ++ (id)beforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block { + return [[self alloc] initWithCallSite:aCallSite description:nil block:block]; } #pragma mark - Accepting Visitors diff --git a/Pods/Kiwi/Classes/KWBeforeEachNode.h b/Pods/Kiwi/Classes/Nodes/KWBeforeEachNode.h similarity index 93% rename from Pods/Kiwi/Classes/KWBeforeEachNode.h rename to Pods/Kiwi/Classes/Nodes/KWBeforeEachNode.h index 732f37e1..21c52291 100644 --- a/Pods/Kiwi/Classes/KWBeforeEachNode.h +++ b/Pods/Kiwi/Classes/Nodes/KWBeforeEachNode.h @@ -12,6 +12,6 @@ #pragma mark - Initializing -+ (id)beforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock; ++ (id)beforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block; @end diff --git a/Pods/Kiwi/Classes/KWBeforeEachNode.m b/Pods/Kiwi/Classes/Nodes/KWBeforeEachNode.m similarity index 79% rename from Pods/Kiwi/Classes/KWBeforeEachNode.m rename to Pods/Kiwi/Classes/Nodes/KWBeforeEachNode.m index e1285e2c..8c143e5c 100644 --- a/Pods/Kiwi/Classes/KWBeforeEachNode.m +++ b/Pods/Kiwi/Classes/Nodes/KWBeforeEachNode.m @@ -11,8 +11,8 @@ @implementation KWBeforeEachNode #pragma mark - Initializing -+ (id)beforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock { - return [[[self alloc] initWithCallSite:aCallSite description:nil block:aBlock] autorelease]; ++ (id)beforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block { + return [[self alloc] initWithCallSite:aCallSite description:nil block:block]; } #pragma mark - Accepting Visitors diff --git a/Pods/Kiwi/Classes/KWBlockNode.h b/Pods/Kiwi/Classes/Nodes/KWBlockNode.h similarity index 75% rename from Pods/Kiwi/Classes/KWBlockNode.h rename to Pods/Kiwi/Classes/Nodes/KWBlockNode.h index 1f4d8602..050ba5c4 100644 --- a/Pods/Kiwi/Classes/KWBlockNode.h +++ b/Pods/Kiwi/Classes/Nodes/KWBlockNode.h @@ -13,11 +13,11 @@ #pragma mark - Initializing -- (id)initWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(KWVoidBlock)aBlock; +- (id)initWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(void (^)(void))block; #pragma mark - Getting Call Sites -@property (nonatomic, readonly) KWCallSite *callSite; +@property (nonatomic, strong, readonly) KWCallSite *callSite; #pragma mark - Getting Descriptions @@ -25,7 +25,7 @@ #pragma mark - Getting Blocks -@property (nonatomic, readonly) KWVoidBlock block; +@property (nonatomic, copy, readonly) void (^block)(void); #pragma mark - Performing blocks diff --git a/Pods/Kiwi/Classes/Nodes/KWBlockNode.m b/Pods/Kiwi/Classes/Nodes/KWBlockNode.m new file mode 100644 index 00000000..69ffd1fb --- /dev/null +++ b/Pods/Kiwi/Classes/Nodes/KWBlockNode.m @@ -0,0 +1,28 @@ +// +// Licensed under the terms in License.txt +// +// Copyright 2010 Allen Ding. All rights reserved. +// + +#import "KWBlockNode.h" + +@implementation KWBlockNode + +#pragma mark - Initializing + +- (id)initWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(void (^)(void))block { + self = [super init]; + if (self) { + _callSite = aCallSite; + _description = aDescription; + _block = [block copy]; + } + + return self; +} + +- (void)performBlock { + if (self.block != nil) { self.block(); } +} + +@end diff --git a/Pods/Kiwi/Classes/KWContextNode.h b/Pods/Kiwi/Classes/Nodes/KWContextNode.h similarity index 73% rename from Pods/Kiwi/Classes/KWContextNode.h rename to Pods/Kiwi/Classes/Nodes/KWContextNode.h index 65d3c7fb..23ddf33a 100644 --- a/Pods/Kiwi/Classes/KWContextNode.h +++ b/Pods/Kiwi/Classes/Nodes/KWContextNode.h @@ -27,7 +27,7 @@ #pragma mark - Getting Call Sites -@property (nonatomic, readonly) KWCallSite *callSite; +@property (nonatomic, weak, readonly) KWCallSite *callSite; #pragma mark - Getting Descriptions @@ -35,15 +35,16 @@ #pragma mark - Managing Nodes -@property (nonatomic, readwrite, retain) KWRegisterMatchersNode *registerMatchersNode; -@property (nonatomic, readwrite, retain) KWBeforeAllNode *beforeAllNode; -@property (nonatomic, readwrite, retain) KWAfterAllNode *afterAllNode; -@property (nonatomic, readwrite, retain) KWBeforeEachNode *beforeEachNode; -@property (nonatomic, readwrite, retain) KWAfterEachNode *afterEachNode; -@property (nonatomic, readonly) KWContextNode *parentContext; +@property (nonatomic, strong) KWRegisterMatchersNode *registerMatchersNode; +@property (nonatomic, strong) KWBeforeAllNode *beforeAllNode; +@property (nonatomic, strong) KWAfterAllNode *afterAllNode; +@property (nonatomic, strong) KWBeforeEachNode *beforeEachNode; +@property (nonatomic, strong) KWAfterEachNode *afterEachNode; @property (nonatomic, readonly) NSArray *nodes; -@property (nonatomic) BOOL isFocused; +@property (nonatomic, readonly) KWContextNode *parentContext; + +@property (nonatomic, assign) BOOL isFocused; - (void)addContextNode:(KWContextNode *)aNode; - (void)addItNode:(KWItNode *)aNode; diff --git a/Pods/Kiwi/Classes/KWContextNode.m b/Pods/Kiwi/Classes/Nodes/KWContextNode.m similarity index 64% rename from Pods/Kiwi/Classes/KWContextNode.m rename to Pods/Kiwi/Classes/Nodes/KWContextNode.m index 7c30bc74..0b2c17a9 100644 --- a/Pods/Kiwi/Classes/KWContextNode.m +++ b/Pods/Kiwi/Classes/Nodes/KWContextNode.m @@ -4,70 +4,45 @@ // Copyright 2010 Allen Ding. All rights reserved. // +#import "KWAfterAllNode.h" +#import "KWAfterEachNode.h" +#import "KWBeforeAllNode.h" +#import "KWBeforeEachNode.h" +#import "KWCallSite.h" #import "KWContextNode.h" #import "KWExampleNodeVisitor.h" #import "KWExample.h" #import "KWFailure.h" +#import "KWRegisterMatchersNode.h" #import "KWSymbolicator.h" -@interface KWContextNode() { - NSUInteger performedExampleCount; -} +@interface KWContextNode() + +@property (nonatomic, assign) NSUInteger performedExampleCount; + @end @implementation KWContextNode -@synthesize parentContext; - #pragma mark - Initializing -- (id)initWithCallSite:(KWCallSite *)aCallSite parentContext:(KWContextNode *)node description:(NSString *)aDescription -{ - if ((self = [super init])) { - parentContext = [node retain]; - callSite = [aCallSite retain]; - description = [aDescription copy]; - nodes = [[NSMutableArray alloc] init]; - performedExampleCount = 0; +- (id)initWithCallSite:(KWCallSite *)aCallSite parentContext:(KWContextNode *)node description:(NSString *)aDescription { + self = [super init]; + if (self) { + _parentContext = node; + _callSite = aCallSite; + _description = [aDescription copy]; + _nodes = [[NSMutableArray alloc] init]; + _performedExampleCount = 0; } return self; } + (id)contextNodeWithCallSite:(KWCallSite *)aCallSite parentContext:(KWContextNode *)contextNode description:(NSString *)aDescription { - return [[[self alloc] initWithCallSite:aCallSite parentContext:contextNode description:aDescription] autorelease]; -} - -- (void)dealloc { - [parentContext release]; - [callSite release]; - [description release]; - [registerMatchersNode release]; - [beforeAllNode release]; - [afterAllNode release]; - [beforeEachNode release]; - [afterEachNode release]; - [nodes release]; - [super dealloc]; + return [[self alloc] initWithCallSite:aCallSite parentContext:contextNode description:aDescription]; } -#pragma mark - Getting Call Sites - -@synthesize callSite; - -#pragma mark - Getting Descriptions - -@synthesize description; - -#pragma mark - Managing Nodes - -@synthesize registerMatchersNode; -@synthesize beforeAllNode; -@synthesize afterAllNode; -@synthesize beforeEachNode; -@synthesize afterEachNode; -@synthesize nodes; - - (void)addContextNode:(KWContextNode *)aNode { [(NSMutableArray *)self.nodes addObject:aNode]; } @@ -76,21 +51,21 @@ - (void)setRegisterMatchersNode:(KWRegisterMatchersNode *)aNode { if (self.registerMatchersNode != nil) [NSException raise:@"KWContextNodeException" format:@"a register matchers node already exists"]; - registerMatchersNode = [aNode retain]; + _registerMatchersNode = aNode; } - (void)setBeforeEachNode:(KWBeforeEachNode *)aNode { if (self.beforeEachNode != nil) [NSException raise:@"KWContextNodeException" format:@"a before each node already exists"]; - beforeEachNode = [aNode retain]; + _beforeEachNode = aNode; } - (void)setAfterEachNode:(KWAfterEachNode *)aNode { if (self.afterEachNode != nil) [NSException raise:@"KWContextNodeException" format:@"an after each node already exists"]; - afterEachNode = [aNode retain]; + _afterEachNode = aNode; } - (void)addItNode:(KWItNode *)aNode { @@ -109,7 +84,7 @@ - (void)performExample:(KWExample *)example withBlock:(void (^)(void))exampleBlo @try { [self.registerMatchersNode acceptExampleNodeVisitor:example]; - if (performedExampleCount == 0) { + if (self.performedExampleCount == 0) { [self.beforeAllNode acceptExampleNodeVisitor:example]; } @@ -128,15 +103,14 @@ - (void)performExample:(KWExample *)example withBlock:(void (^)(void))exampleBlo [example reportFailure:failure]; } - performedExampleCount++; + self.performedExampleCount++; }; - if (parentContext == nil) { + if (self.parentContext == nil) { outerExampleBlock(); } else { - [parentContext performExample:example withBlock:outerExampleBlock]; + [self.parentContext performExample:example withBlock:outerExampleBlock]; } - [innerExampleBlock release]; } #pragma mark - Accepting Visitors diff --git a/Pods/Kiwi/Classes/KWExampleNode.h b/Pods/Kiwi/Classes/Nodes/KWExampleNode.h similarity index 100% rename from Pods/Kiwi/Classes/KWExampleNode.h rename to Pods/Kiwi/Classes/Nodes/KWExampleNode.h diff --git a/Pods/Kiwi/Classes/KWItNode.h b/Pods/Kiwi/Classes/Nodes/KWItNode.h similarity index 75% rename from Pods/Kiwi/Classes/KWItNode.h rename to Pods/Kiwi/Classes/Nodes/KWItNode.h index 39713c0f..11bcec0b 100644 --- a/Pods/Kiwi/Classes/KWItNode.h +++ b/Pods/Kiwi/Classes/Nodes/KWItNode.h @@ -14,14 +14,14 @@ @interface KWItNode : KWBlockNode -@property (nonatomic, assign) KWExample *example; -@property (nonatomic, retain, readonly) KWContextNode *context; +@property (nonatomic, strong) KWExample *example; +@property (nonatomic, weak, readonly) KWContextNode *context; #pragma mark - Initializing + (id)itNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription context:(KWContextNode *)context - block:(KWVoidBlock)aBlock; + block:(void (^)(void))block; @end diff --git a/Pods/Kiwi/Classes/KWItNode.m b/Pods/Kiwi/Classes/Nodes/KWItNode.m similarity index 52% rename from Pods/Kiwi/Classes/KWItNode.m rename to Pods/Kiwi/Classes/Nodes/KWItNode.m index b6a79781..5e3339d8 100644 --- a/Pods/Kiwi/Classes/KWItNode.m +++ b/Pods/Kiwi/Classes/Nodes/KWItNode.m @@ -12,25 +12,21 @@ @interface KWItNode () -@property (nonatomic, retain, readwrite) KWContextNode *context; +@property (nonatomic, weak) KWContextNode *context; @end @implementation KWItNode -@synthesize context = _context; -@synthesize example; - #pragma mark - Initializing + (id)itNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription context:(KWContextNode *)context - block:(KWVoidBlock)aBlock; -{ - KWItNode *itNode = [[self alloc] initWithCallSite:aCallSite description:aDescription block:aBlock]; + block:(void (^)(void))block { + KWItNode *itNode = [[self alloc] initWithCallSite:aCallSite description:aDescription block:block]; itNode.context = context; - return [itNode autorelease]; + return itNode; } #pragma mark - Accepting Visitors @@ -41,29 +37,26 @@ - (void)acceptExampleNodeVisitor:(id)aVisitor { #pragma mark - Runtime Description support -- (NSString *)description -{ - NSString *description = [super description]; - if (description == nil) { - description = [self.example generateDescriptionForAnonymousItNode]; - } - return description; +- (NSString *)description { + NSString *description = [super description]; + if (description == nil) { + description = [self.example generateDescriptionForAnonymousItNode]; + } + return description; } -#pragma mark - #pragma mark - Accessing the context stack -- (NSArray *)contextStack -{ - NSMutableArray *contextStack = [NSMutableArray array]; - - KWContextNode *currentContext = _context; - - while (currentContext) { - [contextStack addObject:currentContext]; - currentContext = currentContext.parentContext; - } - return contextStack; +- (NSArray *)contextStack { + NSMutableArray *contextStack = [NSMutableArray array]; + + KWContextNode *currentContext = _context; + + while (currentContext) { + [contextStack addObject:currentContext]; + currentContext = currentContext.parentContext; + } + return contextStack; } @end diff --git a/Pods/Kiwi/Classes/KWPendingNode.h b/Pods/Kiwi/Classes/Nodes/KWPendingNode.h similarity index 91% rename from Pods/Kiwi/Classes/KWPendingNode.h rename to Pods/Kiwi/Classes/Nodes/KWPendingNode.h index 7ba74730..f67876ec 100644 --- a/Pods/Kiwi/Classes/KWPendingNode.h +++ b/Pods/Kiwi/Classes/Nodes/KWPendingNode.h @@ -12,7 +12,7 @@ @interface KWPendingNode : NSObject -@property (nonatomic, readonly, retain) KWContextNode *context; +@property (nonatomic, readonly, strong) KWContextNode *context; #pragma mark - Initializing diff --git a/Pods/Kiwi/Classes/KWPendingNode.m b/Pods/Kiwi/Classes/Nodes/KWPendingNode.m similarity index 65% rename from Pods/Kiwi/Classes/KWPendingNode.m rename to Pods/Kiwi/Classes/Nodes/KWPendingNode.m index fdfc001a..097faf7a 100644 --- a/Pods/Kiwi/Classes/KWPendingNode.m +++ b/Pods/Kiwi/Classes/Nodes/KWPendingNode.m @@ -5,51 +5,36 @@ // #import "KWPendingNode.h" -#import "KWExampleNodeVisitor.h" + +#import "KWCallSite.h" #import "KWContextNode.h" +#import "KWExampleNodeVisitor.h" @implementation KWPendingNode -@synthesize context = _context; - #pragma mark - Initializing - (id)initWithCallSite:(KWCallSite *)aCallSite context:(KWContextNode *)context description:(NSString *)aDescription { - if ((self = [super init])) { - callSite = [aCallSite retain]; - description = [aDescription copy]; - _context = [context retain]; + self = [super init]; + if (self) { + _callSite = aCallSite; + _description = [aDescription copy]; + _context = context; } return self; } + (id)pendingNodeWithCallSite:(KWCallSite *)aCallSite context:(KWContextNode *)context description:(NSString *)aDescription { - return [[[self alloc] initWithCallSite:aCallSite context:context description:aDescription] autorelease]; -} - -- (void)dealloc { - [_context release]; - [callSite release]; - [description release]; - [super dealloc]; + return [[self alloc] initWithCallSite:aCallSite context:context description:aDescription]; } -#pragma mark - Getting Call Sites - -@synthesize callSite; - -#pragma mark - Getting Descriptions - -@synthesize description; - #pragma mark - Accepting Visitors - (void)acceptExampleNodeVisitor:(id)aVisitor { [aVisitor visitPendingNode:self]; } -#pragma mark - #pragma mark - Accessing the context stack - (NSArray *)contextStack diff --git a/Pods/Kiwi/Classes/KWRegisterMatchersNode.h b/Pods/Kiwi/Classes/Nodes/KWRegisterMatchersNode.h similarity index 100% rename from Pods/Kiwi/Classes/KWRegisterMatchersNode.h rename to Pods/Kiwi/Classes/Nodes/KWRegisterMatchersNode.h diff --git a/Pods/Kiwi/Classes/KWRegisterMatchersNode.m b/Pods/Kiwi/Classes/Nodes/KWRegisterMatchersNode.m similarity index 58% rename from Pods/Kiwi/Classes/KWRegisterMatchersNode.m rename to Pods/Kiwi/Classes/Nodes/KWRegisterMatchersNode.m index 6de7a360..8e6b1ccf 100644 --- a/Pods/Kiwi/Classes/KWRegisterMatchersNode.m +++ b/Pods/Kiwi/Classes/Nodes/KWRegisterMatchersNode.m @@ -5,6 +5,8 @@ // #import "KWRegisterMatchersNode.h" + +#import "KWCallSite.h" #import "KWExampleNodeVisitor.h" @implementation KWRegisterMatchersNode @@ -12,32 +14,19 @@ @implementation KWRegisterMatchersNode #pragma mark - Initializing - (id)initWithCallSite:(KWCallSite *)aCallSite namespacePrefix:(NSString *)aNamespacePrefix { - if ((self = [super init])) { - callSite = [aCallSite retain]; - namespacePrefix = [aNamespacePrefix copy]; + self = [super init]; + if (self) { + _callSite = aCallSite; + _namespacePrefix = [aNamespacePrefix copy]; } return self; } + (id)registerMatchersNodeWithCallSite:(KWCallSite *)aCallSite namespacePrefix:(NSString *)aNamespacePrefix { - return [[[self alloc] initWithCallSite:aCallSite namespacePrefix:aNamespacePrefix] autorelease]; -} - -- (void)dealloc { - [callSite release]; - [namespacePrefix release]; - [super dealloc]; + return [[self alloc] initWithCallSite:aCallSite namespacePrefix:aNamespacePrefix]; } -#pragma mark - Getting Call Sites - -@synthesize callSite; - -#pragma mark - Getting Namespace Prefixes - -@synthesize namespacePrefix; - #pragma mark - Accepting Visitors - (void)acceptExampleNodeVisitor:(id)aVisitor { diff --git a/Pods/Kiwi/Classes/NSObject+KiwiStubAdditions.h b/Pods/Kiwi/Classes/Stubbing/NSObject+KiwiStubAdditions.h similarity index 92% rename from Pods/Kiwi/Classes/NSObject+KiwiStubAdditions.h rename to Pods/Kiwi/Classes/Stubbing/NSObject+KiwiStubAdditions.h index a5e25666..8d7306be 100644 --- a/Pods/Kiwi/Classes/NSObject+KiwiStubAdditions.h +++ b/Pods/Kiwi/Classes/Stubbing/NSObject+KiwiStubAdditions.h @@ -6,6 +6,7 @@ #import "KiwiConfiguration.h" +@class KWCaptureSpy; @class KWMessagePattern; @protocol KWMessageSpying; @@ -45,8 +46,10 @@ - (void)addMessageSpy:(id)aSpy forMessagePattern:(KWMessagePattern *)aMessagePattern; - (void)removeMessageSpy:(id)aSpy forMessagePattern:(KWMessagePattern *)aMessagePattern; +- (KWCaptureSpy *)captureArgument:(SEL)selector atIndex:(NSUInteger)index; + (void)addMessageSpy:(id)aSpy forMessagePattern:(KWMessagePattern *)aMessagePattern; + (void)removeMessageSpy:(id)aSpy forMessagePattern:(KWMessagePattern *)aMessagePattern; ++ (KWCaptureSpy *)captureArgument:(SEL)selector atIndex:(NSUInteger)index; @end diff --git a/Pods/Kiwi/Classes/NSObject+KiwiStubAdditions.m b/Pods/Kiwi/Classes/Stubbing/NSObject+KiwiStubAdditions.m similarity index 94% rename from Pods/Kiwi/Classes/NSObject+KiwiStubAdditions.m rename to Pods/Kiwi/Classes/Stubbing/NSObject+KiwiStubAdditions.m index f4056fe6..0edf73a3 100644 --- a/Pods/Kiwi/Classes/NSObject+KiwiStubAdditions.m +++ b/Pods/Kiwi/Classes/Stubbing/NSObject+KiwiStubAdditions.m @@ -5,6 +5,7 @@ // #import "NSObject+KiwiStubAdditions.h" +#import "KWCaptureSpy.h" #import "KWIntercept.h" #import "KWInvocationCapturer.h" #import "KWMessagePattern.h" @@ -26,7 +27,7 @@ - (NSMethodSignature *)invocationCapturer:(KWInvocationCapturer *)anInvocationCa if (signature != nil) return signature; - NSString *encoding = KWEncodingForVoidMethod(); + NSString *encoding = KWEncodingForDefaultMethod(); return [NSMethodSignature signatureWithObjCTypes:[encoding UTF8String]]; } @@ -156,13 +157,11 @@ - (void)stubMessagePattern:(KWMessagePattern *)aMessagePattern withBlock:(id (^) KWAssociateObjectStub(self, stub, YES); } -+ (void)stubMessagePattern:(KWMessagePattern *)aMessagePattern andReturn:(id)aValue -{ ++ (void)stubMessagePattern:(KWMessagePattern *)aMessagePattern andReturn:(id)aValue { [self stubMessagePattern:aMessagePattern andReturn:aValue overrideExisting:YES]; } -+ (void)stubMessagePattern:(KWMessagePattern *)aMessagePattern andReturn:(id)aValue overrideExisting:(BOOL)override -{ ++ (void)stubMessagePattern:(KWMessagePattern *)aMessagePattern andReturn:(id)aValue overrideExisting:(BOOL)override { if ([self methodSignatureForSelector:aMessagePattern.selector] == nil) { [NSException raise:@"KWStubException" format:@"cannot stub -%@ because no such method exists", NSStringFromSelector(aMessagePattern.selector)]; @@ -227,6 +226,12 @@ - (void)removeMessageSpy:(id)aSpy forMessagePattern:(KWMessageP KWClearObjectSpy(self, aSpy, aMessagePattern); } +- (KWCaptureSpy *)captureArgument:(SEL)selector atIndex:(NSUInteger)index { + KWCaptureSpy *spy = [[KWCaptureSpy alloc] initWithArgumentIndex:index]; + [self addMessageSpy:spy forMessagePattern:[KWMessagePattern messagePatternWithSelector:selector]]; + return spy; +} + + (void)addMessageSpy:(id)aSpy forMessagePattern:(KWMessagePattern *)aMessagePattern { if ([self methodSignatureForSelector:aMessagePattern.selector] == nil) { [NSException raise:@"KWSpyException" format:@"cannot add spy for -%@ because no such method exists", @@ -242,4 +247,10 @@ + (void)removeMessageSpy:(id)aSpy forMessagePattern:(KWMessageP KWClearObjectSpy(self, aSpy, aMessagePattern); } ++ (KWCaptureSpy *)captureArgument:(SEL)selector atIndex:(NSUInteger)index { + KWCaptureSpy *spy = [[KWCaptureSpy alloc] initWithArgumentIndex:index]; + [self addMessageSpy:spy forMessagePattern:[KWMessagePattern messagePatternWithSelector:selector]]; + return spy; +} + @end diff --git a/Pods/Kiwi/Classes/KWAsyncVerifier.h b/Pods/Kiwi/Classes/Verifiers/KWAsyncVerifier.h similarity index 89% rename from Pods/Kiwi/Classes/KWAsyncVerifier.h rename to Pods/Kiwi/Classes/Verifiers/KWAsyncVerifier.h index 13bf1f17..dd407c3a 100644 --- a/Pods/Kiwi/Classes/KWAsyncVerifier.h +++ b/Pods/Kiwi/Classes/Verifiers/KWAsyncVerifier.h @@ -26,10 +26,9 @@ @end -@interface KWAsyncMatcherProbe : NSObject { - BOOL matchResult; -} +@interface KWAsyncMatcherProbe : NSObject +@property (nonatomic, assign) BOOL matchResult; @property (nonatomic, readonly) id matcher; - (id)initWithMatcher:(id)aMatcher; diff --git a/Pods/Kiwi/Classes/Verifiers/KWAsyncVerifier.m b/Pods/Kiwi/Classes/Verifiers/KWAsyncVerifier.m new file mode 100644 index 00000000..80aaf07f --- /dev/null +++ b/Pods/Kiwi/Classes/Verifiers/KWAsyncVerifier.m @@ -0,0 +1,90 @@ +// +// KWAsyncVerifier.m +// iOSFalconCore +// +// Created by Luke Redpath on 13/01/2011. +// Copyright 2011 LJR Software Limited. All rights reserved. +// + +#import "KWAsyncVerifier.h" +#import "KWFailure.h" +#import "KWMatching.h" +#import "KWReporting.h" +#import "KWProbePoller.h" + +@implementation KWAsyncVerifier + ++ (id)asyncVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite matcherFactory:(KWMatcherFactory *)aMatcherFactory reporter:(id)aReporter probeTimeout:(NSTimeInterval)probeTimeout shouldWait:(BOOL)shouldWait { + KWAsyncVerifier *verifier = [[self alloc] initWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:aMatcherFactory reporter:aReporter]; + verifier.timeout = probeTimeout; + verifier.shouldWait = shouldWait; + return verifier; +} + +- (id)initWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite matcherFactory:(KWMatcherFactory *)aMatcherFactory reporter:(id)aReporter { + self = [super initWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:aMatcherFactory reporter:aReporter]; + if (self) { + self.timeout = kKW_DEFAULT_PROBE_TIMEOUT; + } + return self; +} + +- (void)verifyWithProbe:(KWAsyncMatcherProbe *)aProbe { + @try { + KWProbePoller *poller = [[KWProbePoller alloc] initWithTimeout:self.timeout delay:kKW_DEFAULT_PROBE_DELAY shouldWait: self.shouldWait]; + + if (![poller check:aProbe]) { + if (self.expectationType == KWExpectationTypeShould) { + NSString *message = [aProbe.matcher failureMessageForShould]; + KWFailure *failure = [KWFailure failureWithCallSite:self.callSite message:message]; + [self.reporter reportFailure:failure]; + } + } else { + // poller returned YES -- fail if expectation is NOT + if (self.expectationType == KWExpectationTypeShouldNot) { + NSString *message = [aProbe.matcher failureMessageForShouldNot]; + KWFailure *failure = [KWFailure failureWithCallSite:self.callSite message:message]; + [self.reporter reportFailure:failure]; + } + } + + + } @catch (NSException *exception) { + KWFailure *failure = [KWFailure failureWithCallSite:self.callSite message:[exception description]]; + [self.reporter reportFailure:failure]; + } +} + +- (void)verifyWithMatcher:(id)aMatcher { + KWAsyncMatcherProbe *probe = [[KWAsyncMatcherProbe alloc] initWithMatcher:aMatcher]; + [self verifyWithProbe:probe]; +} + +@end + +@implementation KWAsyncMatcherProbe + +- (id)initWithMatcher:(id)aMatcher { + self = [super init]; + if (self) { + _matcher = aMatcher; + + // make sure the matcher knows we are going to evaluate it multiple times + if ([aMatcher respondsToSelector:@selector(willEvaluateMultipleTimes)]) { + [aMatcher setWillEvaluateMultipleTimes:YES]; + } + } + return self; +} + + +- (BOOL)isSatisfied { + return self.matchResult; +} + +- (void)sample { + self.matchResult = [self.matcher evaluate]; +} + +@end + diff --git a/Pods/Kiwi/Classes/KWExistVerifier.h b/Pods/Kiwi/Classes/Verifiers/KWExistVerifier.h similarity index 92% rename from Pods/Kiwi/Classes/KWExistVerifier.h rename to Pods/Kiwi/Classes/Verifiers/KWExistVerifier.h index 9a3df372..91c0c183 100644 --- a/Pods/Kiwi/Classes/KWExistVerifier.h +++ b/Pods/Kiwi/Classes/Verifiers/KWExistVerifier.h @@ -22,6 +22,6 @@ #pragma mark - Properties -@property (nonatomic, readwrite, retain) id subject; +@property (nonatomic, strong) id subject; @end diff --git a/Pods/Kiwi/Classes/KWExistVerifier.m b/Pods/Kiwi/Classes/Verifiers/KWExistVerifier.m similarity index 66% rename from Pods/Kiwi/Classes/KWExistVerifier.m rename to Pods/Kiwi/Classes/Verifiers/KWExistVerifier.m index 3d6b5f5d..9485a07e 100644 --- a/Pods/Kiwi/Classes/KWExistVerifier.m +++ b/Pods/Kiwi/Classes/Verifiers/KWExistVerifier.m @@ -5,18 +5,19 @@ // #import "KWExistVerifier.h" + +#import "KWCallSite.h" #import "KWFailure.h" #import "KWFormatter.h" #import "KWReporting.h" @interface KWExistVerifier() -#pragma mark - Properties - @property (nonatomic, readonly) KWExpectationType expectationType; -@property (nonatomic, readonly) KWCallSite *callSite; @property (nonatomic, readonly) id reporter; +@property (nonatomic, strong) KWCallSite *callSite; + @end @implementation KWExistVerifier @@ -24,40 +25,28 @@ @implementation KWExistVerifier #pragma mark - Initializing - (id)initWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite reporter:(id)aReporter { - if ((self = [super init])) { - expectationType = anExpectationType; - callSite = [aCallSite retain]; - reporter = aReporter; + self = [super init]; + if (self) { + _expectationType = anExpectationType; + _callSite = aCallSite; + _reporter = aReporter; } return self; } + (id)existVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite reporter:(id)aReporter { - return [[[self alloc] initWithExpectationType:anExpectationType callSite:aCallSite reporter:aReporter] autorelease]; + return [[self alloc] initWithExpectationType:anExpectationType callSite:aCallSite reporter:aReporter]; } -- (void)dealloc { - [callSite release]; - [subject release]; - [super dealloc]; -} -- (NSString *)descriptionForAnonymousItNode -{ - if (self.expectationType == KWExpectationTypeShould) { - return @"should exist"; - } - return @"should not exist"; +- (NSString *)descriptionForAnonymousItNode { + if (self.expectationType == KWExpectationTypeShould) { + return @"should exist"; + } + return @"should not exist"; } -#pragma mark - Properties - -@synthesize expectationType; -@synthesize callSite; -@synthesize reporter; -@synthesize subject; - #pragma mark - Ending Examples - (void)exampleWillEnd { diff --git a/Pods/Kiwi/Classes/KWMatchVerifier.h b/Pods/Kiwi/Classes/Verifiers/KWMatchVerifier.h similarity index 92% rename from Pods/Kiwi/Classes/KWMatchVerifier.h rename to Pods/Kiwi/Classes/Verifiers/KWMatchVerifier.h index 1c8d947c..0fa981a6 100644 --- a/Pods/Kiwi/Classes/KWMatchVerifier.h +++ b/Pods/Kiwi/Classes/Verifiers/KWMatchVerifier.h @@ -19,10 +19,11 @@ #pragma mark - Properties @property (nonatomic, readonly) KWExpectationType expectationType; -@property (nonatomic, readonly) KWCallSite *callSite; + @property (nonatomic, readonly) KWMatcherFactory *matcherFactory; @property (nonatomic, readonly) id reporter; -@property (nonatomic, readwrite, retain) id subject; + +@property (nonatomic, strong) id subject; #pragma mark - Initializing diff --git a/Pods/Kiwi/Classes/KWMatchVerifier.m b/Pods/Kiwi/Classes/Verifiers/KWMatchVerifier.m similarity index 67% rename from Pods/Kiwi/Classes/KWMatchVerifier.m rename to Pods/Kiwi/Classes/Verifiers/KWMatchVerifier.m index 29ef4257..95513b79 100644 --- a/Pods/Kiwi/Classes/KWMatchVerifier.m +++ b/Pods/Kiwi/Classes/Verifiers/KWMatchVerifier.m @@ -5,6 +5,9 @@ // #import "KWMatchVerifier.h" + +#import "KWCallSite.h" +#import "KWExample.h" #import "KWFailure.h" #import "KWFormatter.h" #import "KWInvocationCapturer.h" @@ -14,22 +17,21 @@ #import "KWWorkarounds.h" #import "NSInvocation+KiwiAdditions.h" #import "NSMethodSignature+KiwiAdditions.h" -#import "KWExample.h" @interface KWMatchVerifier() #pragma mark - Properties -@property (nonatomic, readwrite, retain) id endOfExampleMatcher; -@property (nonatomic, readwrite, retain) id matcher; -@property (nonatomic, readwrite, assign) KWExample *example; +@property (nonatomic, readwrite, strong) id endOfExampleMatcher; +@property (nonatomic, readwrite, strong) id matcher; +@property (nonatomic, readwrite, strong) KWExample *example; + +@property (nonatomic, strong) KWCallSite *callSite; @end @implementation KWMatchVerifier -@synthesize matcher; - #pragma mark - Initializing - (id)initForShouldWithCallSite:(KWCallSite *)aCallSite matcherFactory:(KWMatcherFactory *)aMatcherFactory reporter:(id)aReporter { @@ -41,11 +43,12 @@ - (id)initForShouldNotWithCallSite:(KWCallSite *)aCallSite matcherFactory:(KWMat } - (id)initWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite matcherFactory:(KWMatcherFactory *)aMatcherFactory reporter:(id)aReporter { - if ((self = [super init])) { - expectationType = anExpectationType; - callSite = [aCallSite retain]; - matcherFactory = aMatcherFactory; - reporter = aReporter; + self = [super init]; + if (self) { + _expectationType = anExpectationType; + _callSite = aCallSite; + _matcherFactory = aMatcherFactory; + _reporter = aReporter; _example = (KWExample *)aReporter; } @@ -53,69 +56,59 @@ - (id)initWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWC } + (id)matchVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite matcherFactory:(KWMatcherFactory *)aMatcherFactory reporter:(id)aReporter { - return [[[self alloc] initWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:aMatcherFactory reporter:aReporter] autorelease]; + return [[self alloc] initWithExpectationType:anExpectationType callSite:aCallSite matcherFactory:aMatcherFactory reporter:aReporter]; } -- (void)dealloc { - [subject release]; - [callSite release]; - [matcher release]; - [endOfExampleMatcher release]; - [super dealloc]; -} -- (NSString *)descriptionForAnonymousItNode -{ - NSString *typeString = @""; - - switch (self.expectationType) { - case KWExpectationTypeShould: - typeString = @"should"; - break; - case KWExpectationTypeShouldNot: - typeString = @"should not"; - } - id actualMatcher = (self.endOfExampleMatcher == nil) ? self.matcher : self.endOfExampleMatcher; - return [NSString stringWithFormat:@"%@ %@", typeString, actualMatcher]; +- (NSString *)descriptionForAnonymousItNode { + NSString *typeString = @""; + + switch (self.expectationType) { + case KWExpectationTypeShould: + typeString = @"should"; + break; + case KWExpectationTypeShouldNot: + typeString = @"should not"; + } + id actualMatcher = (self.endOfExampleMatcher == nil) ? self.matcher : self.endOfExampleMatcher; + return [NSString stringWithFormat:@"%@ %@", typeString, actualMatcher]; } -#pragma mark - Properties - -@synthesize expectationType; -@synthesize callSite; -@synthesize matcherFactory; -@synthesize reporter; -@synthesize subject; -@synthesize endOfExampleMatcher; - #pragma mark - Verifying - (void)verifyWithMatcher:(id)aMatcher { + BOOL specFailed = NO; + NSString *failureMessage = nil; + @try { BOOL matchResult = [aMatcher evaluate]; - + if (self.expectationType == KWExpectationTypeShould && !matchResult) { - NSString *message = [aMatcher failureMessageForShould]; - KWFailure *failure = [KWFailure failureWithCallSite:self.callSite message:message]; - [self.reporter reportFailure:failure]; + failureMessage = [aMatcher failureMessageForShould]; + specFailed = YES; + } else if (self.expectationType == KWExpectationTypeShouldNot && matchResult) { - NSString *message = [aMatcher failureMessageForShouldNot]; - KWFailure *failure = [KWFailure failureWithCallSite:self.callSite message:message]; - [self.reporter reportFailure:failure]; + failureMessage = [aMatcher failureMessageForShouldNot]; + specFailed = YES; } } @catch (NSException *exception) { - KWFailure *failure = [KWFailure failureWithCallSite:self.callSite message:[exception description]]; - [self.reporter reportFailure:failure]; + failureMessage = [exception description]; + specFailed = YES; + } + @finally { + if (specFailed) { + KWFailure *failure = [KWFailure failureWithCallSite:self.callSite message:failureMessage]; + [self.reporter reportFailure:failure]; + } } } #pragma mark - Ending Examples - (void)exampleWillEnd { - if (self.endOfExampleMatcher == nil) - return; - - [self verifyWithMatcher:self.endOfExampleMatcher]; + if (self.endOfExampleMatcher) { + [self verifyWithMatcher:self.endOfExampleMatcher]; + } } #pragma mark - Handling Invocations @@ -133,7 +126,7 @@ - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { // Return a dummy method signature so that problems can be handled in // -forwardInvocation:. - NSString *encoding = KWEncodingForVoidMethod(); + NSString *encoding = KWEncodingForDefaultMethod(); return [NSMethodSignature signatureWithObjCTypes:[encoding UTF8String]]; } @@ -150,8 +143,8 @@ - (void)forwardInvocation:(NSInvocation *)anInvocation { [self.reporter reportFailure:failure]; } - if (self.example.unassignedVerifier == self) { - self.example.unassignedVerifier = nil; + if (self.example.unresolvedVerifier == self) { + self.example.unresolvedVerifier = nil; } [anInvocation invokeWithTarget:self.matcher]; diff --git a/Pods/Kiwi/Classes/KWVerifying.h b/Pods/Kiwi/Classes/Verifiers/KWVerifying.h similarity index 72% rename from Pods/Kiwi/Classes/KWVerifying.h rename to Pods/Kiwi/Classes/Verifiers/KWVerifying.h index 021360d6..d26d3bcf 100644 --- a/Pods/Kiwi/Classes/KWVerifying.h +++ b/Pods/Kiwi/Classes/Verifiers/KWVerifying.h @@ -6,13 +6,17 @@ #import "KiwiConfiguration.h" +@class KWCallSite; + @protocol KWVerifying +@property (nonatomic, readonly) KWCallSite *callSite; + - (NSString *)descriptionForAnonymousItNode; #pragma mark - Subjects -@property (nonatomic, readwrite, retain) id subject; +@property (nonatomic, strong) id subject; #pragma mark - Ending Examples diff --git a/Pods/Kiwi/Classes/KWIntercept.h b/Pods/Kiwi/NonARC/KWIntercept.h similarity index 100% rename from Pods/Kiwi/Classes/KWIntercept.h rename to Pods/Kiwi/NonARC/KWIntercept.h diff --git a/Pods/Kiwi/Classes/KWIntercept.m b/Pods/Kiwi/NonARC/KWIntercept.m similarity index 100% rename from Pods/Kiwi/Classes/KWIntercept.m rename to Pods/Kiwi/NonARC/KWIntercept.m diff --git a/Pods/Kiwi/Classes/KWMessagePattern.h b/Pods/Kiwi/NonARC/KWMessagePattern.h similarity index 100% rename from Pods/Kiwi/Classes/KWMessagePattern.h rename to Pods/Kiwi/NonARC/KWMessagePattern.h diff --git a/Pods/Kiwi/Classes/KWMessagePattern.m b/Pods/Kiwi/NonARC/KWMessagePattern.m similarity index 92% rename from Pods/Kiwi/Classes/KWMessagePattern.m rename to Pods/Kiwi/NonARC/KWMessagePattern.m index c76849aa..f24b13ca 100644 --- a/Pods/Kiwi/Classes/KWMessagePattern.m +++ b/Pods/Kiwi/NonARC/KWMessagePattern.m @@ -23,7 +23,8 @@ - (id)initWithSelector:(SEL)aSelector { } - (id)initWithSelector:(SEL)aSelector argumentFilters:(NSArray *)anArray { - if ((self = [super init])) { + self = [super init]; + if (self) { selector = aSelector; if ([anArray count] > 0) @@ -69,19 +70,24 @@ + (id)messagePatternFromInvocation:(NSInvocation *)anInvocation { argumentFilters = [[NSMutableArray alloc] initWithCapacity:numberOfMessageArguments]; for (NSUInteger i = 0; i < numberOfMessageArguments; ++i) { - const char *type = [signature messageArgumentTypeAtIndex:i]; - id object = nil; - - if (KWObjCTypeIsObject(type)) { - [anInvocation getMessageArgument:&object atIndex:i]; - } else { + const char *type = [signature messageArgumentTypeAtIndex:i]; + void* argumentDataBuffer = malloc(KWObjCTypeLength(type)); + [anInvocation getMessageArgument:argumentDataBuffer atIndex:i]; + id object = nil; + if(*(id*)argumentDataBuffer != [KWAny any] && !KWObjCTypeIsObject(type)) { NSData *data = [anInvocation messageArgumentDataAtIndex:i]; object = [KWValue valueWithBytes:[data bytes] objCType:type]; - } + } else { + object = *(id*)argumentDataBuffer; + if (object != [KWAny any] && KWObjCTypeIsBlock(type)) { + object = [[object copy] autorelease]; // Converting NSStackBlock to NSMallocBlock + } + } - if (strcmp(type, "@?") == 0) object = [[object copy] autorelease]; // Converting NSStackBlock to NSMallocBlock [argumentFilters addObject:(object != nil) ? object : [KWNull null]]; + + free(argumentDataBuffer); } } diff --git a/Pods/Kiwi/Classes/KWStub.h b/Pods/Kiwi/NonARC/KWStub.h similarity index 100% rename from Pods/Kiwi/Classes/KWStub.h rename to Pods/Kiwi/NonARC/KWStub.h diff --git a/Pods/Kiwi/Classes/KWStub.m b/Pods/Kiwi/NonARC/KWStub.m similarity index 97% rename from Pods/Kiwi/Classes/KWStub.m rename to Pods/Kiwi/NonARC/KWStub.m index 367076f9..7a9c5f70 100644 --- a/Pods/Kiwi/Classes/KWStub.m +++ b/Pods/Kiwi/NonARC/KWStub.m @@ -25,7 +25,8 @@ - (id)initWithMessagePattern:(KWMessagePattern *)aMessagePattern { } - (id)initWithMessagePattern:(KWMessagePattern *)aMessagePattern value:(id)aValue { - if ((self = [super init])) { + self = [super init]; + if (self) { messagePattern = [aMessagePattern retain]; value = [aValue retain]; } @@ -34,7 +35,8 @@ - (id)initWithMessagePattern:(KWMessagePattern *)aMessagePattern value:(id)aValu } - (id)initWithMessagePattern:(KWMessagePattern *)aMessagePattern block:(id (^)(NSArray *params))aBlock { - if ((self = [super init])) { + self = [super init]; + if (self) { messagePattern = [aMessagePattern retain]; _block = [aBlock copy]; } @@ -43,7 +45,8 @@ - (id)initWithMessagePattern:(KWMessagePattern *)aMessagePattern block:(id (^)(N } - (id)initWithMessagePattern:(KWMessagePattern *)aMessagePattern value:(id)aValue times:(id)times afterThatReturn:(id)aSecondValue { - if ((self = [super init])) { + self = [super init]; + if (self) { messagePattern = [aMessagePattern retain]; value = [aValue retain]; returnValueTimes = [times retain]; @@ -182,7 +185,7 @@ - (BOOL)processInvocation:(NSInvocation *)anInvocation { NSUInteger numberOfArguments = [[anInvocation methodSignature] numberOfArguments]; NSMutableArray *args = [NSMutableArray arrayWithCapacity:(numberOfArguments-2)]; for (NSUInteger i = 2; i < numberOfArguments; ++i) { - id arg = [anInvocation getArgumentAtIndexAsObject:i]; + id arg = [anInvocation getArgumentAtIndexAsObject:(int)i]; const char *argType = [[anInvocation methodSignature] getArgumentTypeAtIndex:i]; if (strcmp(argType, "@?") == 0) arg = [[arg copy] autorelease]; diff --git a/Pods/Kiwi/Classes/KWSymbolicator.h b/Pods/Kiwi/NonARC/KWSymbolicator.h similarity index 100% rename from Pods/Kiwi/Classes/KWSymbolicator.h rename to Pods/Kiwi/NonARC/KWSymbolicator.h diff --git a/Pods/Kiwi/Classes/KWSymbolicator.m b/Pods/Kiwi/NonARC/KWSymbolicator.m similarity index 98% rename from Pods/Kiwi/Classes/KWSymbolicator.m rename to Pods/Kiwi/NonARC/KWSymbolicator.m index 7d2275f2..638a4c9e 100644 --- a/Pods/Kiwi/Classes/KWSymbolicator.m +++ b/Pods/Kiwi/NonARC/KWSymbolicator.m @@ -11,6 +11,7 @@ #import long kwCallerAddress (void){ +#if !__arm__ unw_cursor_t cursor; unw_context_t uc; unw_word_t ip; @@ -22,6 +23,7 @@ long kwCallerAddress (void){ unw_get_reg (&cursor, UNW_REG_IP, &ip); if(pos == 0) return (NSUInteger)(ip - 4); } +#endif return 0; } diff --git a/Pods/Kiwi/Classes/SenTestSuite+KiwiAdditions.h b/Pods/Kiwi/SenTestingKit/SenTestSuite+KiwiAdditions.h similarity index 100% rename from Pods/Kiwi/Classes/SenTestSuite+KiwiAdditions.h rename to Pods/Kiwi/SenTestingKit/SenTestSuite+KiwiAdditions.h diff --git a/Pods/Kiwi/Classes/SenTestSuite+KiwiAdditions.m b/Pods/Kiwi/SenTestingKit/SenTestSuite+KiwiAdditions.m similarity index 79% rename from Pods/Kiwi/Classes/SenTestSuite+KiwiAdditions.m rename to Pods/Kiwi/SenTestingKit/SenTestSuite+KiwiAdditions.m index a20ca63a..41b9c910 100644 --- a/Pods/Kiwi/Classes/SenTestSuite+KiwiAdditions.m +++ b/Pods/Kiwi/SenTestingKit/SenTestSuite+KiwiAdditions.m @@ -10,8 +10,9 @@ #import #import #import -#import "KWExampleGroupBuilder.h" +#import "KWExampleSuiteBuilder.h" #import "KWCallSite.h" +#import "KWSpec.h" @implementation SenTestSuite (KiwiAdditions) @@ -33,7 +34,10 @@ + (void)patchTestSuiteForTestCaseClassIMP { class_addMethod(c, newSEL, method_getImplementation(origMethod), method_getTypeEncoding(origMethod)) ; IMP focusedSuite = imp_implementationWithBlock(^(id _self, Class aClass){ - return ([[KWExampleGroupBuilder sharedExampleGroupBuilder] isFocused] && ![_self testSuiteClassHasFocus:aClass]) ? nil : (void *)[_self performSelector:@selector(__testSuiteForTestCaseClass:) withObject:aClass]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + return ([[KWExampleSuiteBuilder sharedExampleSuiteBuilder] isFocused] && ![_self testSuiteClassHasFocus:aClass]) ? nil : (__bridge void *)[_self performSelector:newSEL withObject:aClass]; +#pragma clang diagnostic pop }); method_setImplementation(origMethod, focusedSuite); } @@ -42,7 +46,7 @@ + (BOOL)testSuiteClassHasFocus:(Class)aClass { if (![aClass respondsToSelector:@selector(file)]) return NO; - KWCallSite *focusedCallSite = [[KWExampleGroupBuilder sharedExampleGroupBuilder] focusedCallSite]; + KWCallSite *focusedCallSite = [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] focusedCallSite]; NSString *fullFilePathOfClass = [aClass performSelector:@selector(file)]; NSRange rangeOfFileName = [fullFilePathOfClass rangeOfString:focusedCallSite.filename]; return rangeOfFileName.length != 0; diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index c2d3fab0..fa03d39b 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -1,19 +1,33 @@ PODS: - - Kiwi (2.2) - - OHHTTPStubs (1.0.1) - - Reachability (3.0.0) - - SocketRocket (HEAD based on 0.2.0) + - Kiwi (2.2.3): + - Kiwi/SenTestingKit + - Kiwi/ARC (2.2.3) + - Kiwi/NonARC (2.2.3) + - Kiwi/SenTestingKit (2.2.3): + - Kiwi/ARC + - Kiwi/NonARC + - OHHTTPStubs (3.0.2) + - Reachability (3.1.1) + - ReactiveCocoa (2.1.7): + - ReactiveCocoa/Core + - ReactiveCocoa/no-arc + - ReactiveCocoa/Core (2.1.7): + - ReactiveCocoa/no-arc + - ReactiveCocoa/no-arc (2.1.7) + - SocketRocket (0.3.1-beta2) DEPENDENCIES: - - Kiwi - - OHHTTPStubs - - Reachability - - SocketRocket (HEAD) + - Kiwi (~> 2.2) + - OHHTTPStubs (~> 3.0) + - Reachability (~> 3.1) + - ReactiveCocoa (~> 2.1) + - SocketRocket (= 0.3.1-beta2) SPEC CHECKSUMS: - Kiwi: db174bba4ee8068b15d7122f1b22fb64b7c1d378 - OHHTTPStubs: 25b40f0c39ce8dab25b3fc4b52d630e7a665f3fb - Reachability: 500bd76bf6cd8ff2c6fb715fc5f44ef6e4c024f2 - SocketRocket: bca43a94bd9aac3a629df42c06843402399ee67b + Kiwi: 04c51e880831d291748ec702d42c4101f7eb95c9 + OHHTTPStubs: 7be864a1c40c6a5007fe3e8679c109ca45590803 + Reachability: be4883bb93f31e38266ae3365e5600a317aae735 + ReactiveCocoa: 1117f7968c8667d2ca00b5aa47156fabcb56af75 + SocketRocket: 7ac946bcce46287a791dfff3c1f8daa692821dae -COCOAPODS: 0.22.2 +COCOAPODS: 0.28.0 diff --git a/Pods/OHHTTPStubs/LICENCE b/Pods/OHHTTPStubs/LICENCE deleted file mode 100644 index a63bf591..00000000 --- a/Pods/OHHTTPStubs/LICENCE +++ /dev/null @@ -1,29 +0,0 @@ -/*********************************************************************************** - * - * Copyright (c) 2012 Olivier Halligon - * - * 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. - * - *********************************************************************************** - * - * Any comment or suggestion welcome. Referencing this project in your AboutBox is appreciated. - * Please tell me if you use this class so we can cross-reference our projects. - * - ***********************************************************************************/ - \ No newline at end of file diff --git a/Pods/OHHTTPStubs/LICENSE b/Pods/OHHTTPStubs/LICENSE new file mode 100644 index 00000000..a83928dd --- /dev/null +++ b/Pods/OHHTTPStubs/LICENSE @@ -0,0 +1,9 @@ +- MIT LICENSE - + +Copyright (c) 2012 Olivier Halligon + +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. \ No newline at end of file diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.h b/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.h deleted file mode 100644 index bafa7758..00000000 --- a/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.h +++ /dev/null @@ -1,67 +0,0 @@ -/*********************************************************************************** - * - * Copyright (c) 2012 Olivier Halligon - * - * Original idea: https://github.com/InfiniteLoopDK/ILTesting - * - * 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. - * - ***********************************************************************************/ - - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Imports - -#import -#import "OHHTTPStubsResponse.h" - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Types - -typedef OHHTTPStubsResponse*(^OHHTTPStubsRequestHandler)(NSURLRequest* request, BOOL onlyCheck); - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Interface - -@interface OHHTTPStubs : NSObject - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Singleton methods - -+ (OHHTTPStubs*)sharedInstance; - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Class Methods - -//! Commmodity method: calls instance method on sharedInstance directly -+(id)addRequestHandler:(OHHTTPStubsRequestHandler)handler; -+(BOOL)removeRequestHandler:(id)handler; -+(void)removeLastRequestHandler; -+(void)removeAllRequestHandlers; -+(void)setEnabled:(BOOL)enabled; - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Instance Methods - --(id)addRequestHandler:(OHHTTPStubsRequestHandler)handler; --(BOOL)removeRequestHandler:(id)handler; --(void)removeLastRequestHandler; --(void)removeAllRequestHandlers; - -@end diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.m b/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.m deleted file mode 100644 index 259e38e1..00000000 --- a/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.m +++ /dev/null @@ -1,259 +0,0 @@ -/*********************************************************************************** - * - * Copyright (c) 2012 Olivier Halligon - * - * Original idea: https://github.com/InfiniteLoopDK/ILTesting - * - * 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. - * - ***********************************************************************************/ - - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Imports - -#import "OHHTTPStubs.h" - - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Types - -@interface OHHTTPStubsProtocol : NSURLProtocol @end - - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Private Interface - -@interface OHHTTPStubs() -@property(nonatomic, retain) NSMutableArray* requestHandlers; -@end - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Implementation - -@implementation OHHTTPStubs -@synthesize requestHandlers = _requestHandlers; - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Singleton methods - -+ (OHHTTPStubs*)sharedInstance -{ - static OHHTTPStubs *sharedInstance = nil; - - static dispatch_once_t predicate; - dispatch_once(&predicate, ^{ - sharedInstance = [[self alloc] init]; - }); - - return sharedInstance; -} - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Setup & Teardown - -- (id)init -{ - self = [super init]; - if (self) - { - self.requestHandlers = [NSMutableArray array]; - [[self class] setEnabled:YES]; - } - return self; -} - -- (void)dealloc -{ - [[self class] setEnabled:NO]; - self.requestHandlers = nil; -#if ! __has_feature(objc_arc) - [super dealloc]; -#endif -} - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Public class methods - -// Commodity methods -+(id)addRequestHandler:(OHHTTPStubsRequestHandler)handler -{ - return [[self sharedInstance] addRequestHandler:handler]; -} -+(BOOL)removeRequestHandler:(id)handler -{ - return [[self sharedInstance] removeRequestHandler:handler]; -} -+(void)removeLastRequestHandler -{ - [[self sharedInstance] removeLastRequestHandler]; -} -+(void)removeAllRequestHandlers -{ - [[self sharedInstance] removeAllRequestHandlers]; -} - -+(void)setEnabled:(BOOL)enabled -{ - if (enabled) - { - [NSURLProtocol registerClass:[OHHTTPStubsProtocol class]]; - } - else - { - [NSURLProtocol unregisterClass:[OHHTTPStubsProtocol class]]; - } -} - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Public instance methods - --(id)addRequestHandler:(OHHTTPStubsRequestHandler)handler -{ - OHHTTPStubsRequestHandler handlerCopy = [handler copy]; - [self.requestHandlers addObject:handlerCopy]; -#if ! __has_feature(objc_arc) - [handlerCopy autorelease]; -#endif - return handlerCopy; -} - --(BOOL)removeRequestHandler:(id)handler -{ - BOOL handlerFound = [self.requestHandlers containsObject:handler]; - [self.requestHandlers removeObject:handler]; - return handlerFound; -} --(void)removeLastRequestHandler -{ - [self.requestHandlers removeLastObject]; -} - --(void)removeAllRequestHandlers -{ - [self.requestHandlers removeAllObjects]; -} - -@end - - - - - - - - - - - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Private Protocol Class - -// Undocumented initializer obtained by class-dump -// Don't use this in production code destined for the App Store -@interface NSHTTPURLResponse(UndocumentedInitializer) -- (id)initWithURL:(NSURL*)URL - statusCode:(NSInteger)statusCode - headerFields:(NSDictionary*)headerFields - requestTime:(double)requestTime; -@end - -@implementation OHHTTPStubsProtocol - -+ (BOOL)canInitWithRequest:(NSURLRequest *)request -{ - NSArray* requestHandlers = [OHHTTPStubs sharedInstance].requestHandlers; - id response = nil; - for(OHHTTPStubsRequestHandler handler in [requestHandlers reverseObjectEnumerator]) - { - response = handler(request, YES); - if (response) break; - } - return (response != nil); -} - -+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request -{ - return request; -} - -- (NSCachedURLResponse *)cachedResponse -{ - return nil; -} - -- (void)startLoading -{ - NSURLRequest* request = [self request]; - id client = [self client]; - - OHHTTPStubsResponse* responseStub = nil; - NSArray* requestHandlers = [OHHTTPStubs sharedInstance].requestHandlers; - for(OHHTTPStubsRequestHandler handler in [requestHandlers reverseObjectEnumerator]) - { - responseStub = handler(request, NO); - if (responseStub) break; - } - - if (responseStub.error == nil) - { - // Send the fake data - - NSTimeInterval canonicalResponseTime = responseStub.responseTime; - if (canonicalResponseTime<0) - { - // Interpret it as a bandwidth in KB/s ( -2 => 2KB/s ) - double bandwidth = -canonicalResponseTime * 1000.0; // in bytes per second - canonicalResponseTime = responseStub.responseData.length / bandwidth; - } - NSTimeInterval requestTime = canonicalResponseTime * 0.1; - NSTimeInterval responseTime = canonicalResponseTime - requestTime; - - NSHTTPURLResponse* urlResponse = [[NSHTTPURLResponse alloc] initWithURL:[request URL] - statusCode:responseStub.statusCode - headerFields:responseStub.httpHeaders - requestTime:requestTime]; - - dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, requestTime*NSEC_PER_SEC); - dispatch_after(popTime, dispatch_get_main_queue(), ^(void) { - //NSLog(@"[OHHTTPStubs] Stub Response for %@ received", [request URL]); - [client URLProtocol:self didReceiveResponse:urlResponse - cacheStoragePolicy:NSURLCacheStorageNotAllowed]; - - dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, responseTime*NSEC_PER_SEC); - dispatch_after(popTime, dispatch_get_main_queue(), ^(void) { - //NSLog(@"[OHHTTPStubs] Stub Data for %@ received", [request URL]); - [client URLProtocol:self didLoadData:responseStub.responseData]; - [client URLProtocolDidFinishLoading:self]; - }); - }); -#if ! __has_feature(objc_arc) - [urlResponse autorelease]; -#endif - } else { - // Send the canned error - [client URLProtocol:self didFailWithError:responseStub.error]; - } -} - -- (void)stopLoading -{ -} - -@end \ No newline at end of file diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.h b/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.h deleted file mode 100644 index d0cbc081..00000000 --- a/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.h +++ /dev/null @@ -1,88 +0,0 @@ -/*********************************************************************************** - * - * Copyright (c) 2012 Olivier Halligon - * - * Original idea: https://github.com/InfiniteLoopDK/ILTesting - * - * 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. - * - ***********************************************************************************/ - - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Imports - -#import - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Defines & Constants - -#define OHHTTPStubsResponseUseStub (OHHTTPStubsResponse*)1 -#define OHHTTPStubsResponseDontUseStub (OHHTTPStubsResponse*)nil - -// Standard download speeds. -extern const double -OHHTTPStubsDownloadSpeedGPRS, -OHHTTPStubsDownloadSpeedEDGE, -OHHTTPStubsDownloadSpeed3G, -OHHTTPStubsDownloadSpeed3GPlus, -OHHTTPStubsDownloadSpeedWifi; - - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Interface - -@interface OHHTTPStubsResponse : NSObject - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Properties - -@property(nonatomic, retain) NSDictionary* httpHeaders; -@property(nonatomic, assign) int statusCode; -@property(nonatomic, retain) NSData* responseData; -//! @note if responseTime<0, it is interpreted as a download speed in KBps ( -200 => 200KB/s ) -@property(nonatomic, assign) NSTimeInterval responseTime; -@property(nonatomic, retain) NSError* error; - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Class Methods - -+(OHHTTPStubsResponse*)responseWithData:(NSData*)data - statusCode:(int)statusCode - responseTime:(NSTimeInterval)responseTime - headers:(NSDictionary*)httpHeaders; -+(OHHTTPStubsResponse*)responseWithFile:(NSString*)fileName - statusCode:(int)statusCode - responseTime:(NSTimeInterval)responseTime - headers:(NSDictionary*)httpHeaders; -+(OHHTTPStubsResponse*)responseWithFile:(NSString*)fileName - contentType:(NSString*)contentType - responseTime:(NSTimeInterval)responseTime; -+(OHHTTPStubsResponse*)responseWithError:(NSError*)error; - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Instance Methods - --(OHHTTPStubsResponse*)initWithData:(NSData*)data - statusCode:(int)statusCode - responseTime:(NSTimeInterval)responseTime - headers:(NSDictionary*)httpHeaders; --(OHHTTPStubsResponse*)initWithError:(NSError*)error; - -@end diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.m b/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.m deleted file mode 100644 index bd1d9d39..00000000 --- a/Pods/OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.m +++ /dev/null @@ -1,144 +0,0 @@ -/*********************************************************************************** - * - * Copyright (c) 2012 Olivier Halligon - * - * Original idea: https://github.com/InfiniteLoopDK/ILTesting - * - * 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. - * - ***********************************************************************************/ - - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Imports - -#import "OHHTTPStubsResponse.h" - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Defines & Constants - -const double OHHTTPStubsDownloadSpeedGPRS =- 56 / 8; // kbps -> Ko/s -const double OHHTTPStubsDownloadSpeedEDGE =- 128 / 8; // kbps -> Ko/s -const double OHHTTPStubsDownloadSpeed3G =- 3200 / 8; // kbps -> Ko/s -const double OHHTTPStubsDownloadSpeed3GPlus =- 7200 / 8; // kbps -> Ko/s -const double OHHTTPStubsDownloadSpeedWifi =- 12000 / 8; // kbps -> Ko/s - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Implementation - -@implementation OHHTTPStubsResponse - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Synthesize - -@synthesize httpHeaders = httpHeaders_; -@synthesize statusCode = statusCode_; -@synthesize responseData = responseData_; -@synthesize responseTime = _responseTime; -@synthesize error = error_; - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Setup & Teardown - --(OHHTTPStubsResponse*)initWithData:(NSData*)data - statusCode:(int)statusCode - responseTime:(NSTimeInterval)responseTime - headers:(NSDictionary*)httpHeaders -{ - self = [super init]; - if (self) { - self.responseData = data; - self.statusCode = statusCode; - self.httpHeaders = httpHeaders; - self.responseTime = responseTime; - } - return self; -} - --(OHHTTPStubsResponse*)initWithError:(NSError*)error -{ - self = [super init]; - if (self) { - self.error = error; - } - return self; -} - -#if ! __has_feature(objc_arc) --(void)dealloc -{ - self.httpHeaders = nil; - self.statusCode = 0; - self.responseData = nil; - self.responseTime = 0; - self.error = nil; - [super dealloc]; -} -#endif - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Class Methods - -+(OHHTTPStubsResponse*)responseWithData:(NSData*)data - statusCode:(int)statusCode - responseTime:(NSTimeInterval)responseTime - headers:(NSDictionary*)httpHeaders -{ - OHHTTPStubsResponse* response = [[self alloc] initWithData:data - statusCode:statusCode - responseTime:responseTime - headers:httpHeaders]; -#if ! __has_feature(objc_arc) - [response autorelease]; -#endif - return response; -} - -+(OHHTTPStubsResponse*)responseWithFile:(NSString*)fileName - statusCode:(int)statusCode - responseTime:(NSTimeInterval)responseTime - headers:(NSDictionary*)httpHeaders -{ - NSString* basename = [fileName stringByDeletingPathExtension]; - NSString* extension = [fileName pathExtension]; - NSString* filePath = [[NSBundle bundleForClass:[self class]] pathForResource:basename ofType:extension]; - NSData* data = [NSData dataWithContentsOfFile:filePath]; - return [self responseWithData:data statusCode:statusCode responseTime:responseTime headers:httpHeaders]; -} - -+(OHHTTPStubsResponse*)responseWithFile:(NSString*)fileName - contentType:(NSString*)contentType - responseTime:(NSTimeInterval)responseTime -{ - NSDictionary* headers = [NSDictionary dictionaryWithObject:contentType forKey:@"Content-Type"]; - return [self responseWithFile:fileName statusCode:200 responseTime:responseTime headers:headers]; -} - - -+(OHHTTPStubsResponse*)responseWithError:(NSError*)error -{ - OHHTTPStubsResponse* response = [[self alloc] initWithError:error]; -#if ! __has_feature(objc_arc) - [response release]; -#endif - return response; -} - - -@end diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs+NSURLSessionConfiguration.m b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs+NSURLSessionConfiguration.m new file mode 100644 index 00000000..87cd0ef3 --- /dev/null +++ b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs+NSURLSessionConfiguration.m @@ -0,0 +1,81 @@ +// +// NSURLSessionConfiguration+OHHTTPStubs.m +// OHHTTPStubs +// +// Created by Olivier Halligon on 06/10/13. +// Copyright (c) 2013 AliSoftware. All rights reserved. +// + +#import + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) \ + || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) + +#import +#import "OHHTTPStubs.h" + + +////////////////////////////////////////////////////////////////////////////////////////////////// + +/*! This helper is used to swizzle NSURLSessionConfiguration constructor methods + defaultSessionConfiguration and ephemeralSessionConfiguration to insert the private + OHHTTPStubsProtocol into their protocolClasses array so that OHHTTPStubs is automagically + supported when you create a new NSURLSession based on one of there configurations. + */ + +typedef NSURLSessionConfiguration*(*SessionConfigConstructor)(id,SEL); +static SessionConfigConstructor orig_defaultSessionConfiguration; +static SessionConfigConstructor orig_ephemeralSessionConfiguration; + +static SessionConfigConstructor OHHTTPStubsSwizzle(SEL selector, SessionConfigConstructor newImpl) +{ + Class cls = NSURLSessionConfiguration.class; + Class metaClass = object_getClass(cls); + + Method origMethod = class_getClassMethod(cls, selector); + SessionConfigConstructor origImpl = (SessionConfigConstructor)method_getImplementation(origMethod); + if (!class_addMethod(metaClass, selector, (IMP)newImpl, method_getTypeEncoding(origMethod))) + { + method_setImplementation(origMethod, (IMP)newImpl); + } + return origImpl; +} + +static void OHTTPStubsAddProtocolClassToNSURLSessionConfiguration(NSURLSessionConfiguration* config) +{ + NSMutableArray* protocolClasses = [NSMutableArray arrayWithArray:config.protocolClasses]; + // objc_getClass loads the class in the ObjC Runtime if not loaded at that time, so it's secure. + Class protocolClass = objc_getClass("OHHTTPStubsProtocol"); + if (![protocolClasses containsObject:protocolClass]) + [protocolClasses addObject:protocolClass]; + config.protocolClasses = protocolClasses; +} + +static NSURLSessionConfiguration* defaultSessionConfigurationWithOHHTTPStubs(id self, SEL _cmd) +{ + NSURLSessionConfiguration* config = orig_defaultSessionConfiguration(self,_cmd); // call original method + OHTTPStubsAddProtocolClassToNSURLSessionConfiguration(config); + return config; +} + +static NSURLSessionConfiguration* ephemeralSessionConfigurationWithOHHTTPStubs(id self, SEL _cmd) +{ + NSURLSessionConfiguration* config = orig_ephemeralSessionConfiguration(self,_cmd); // call original method + OHTTPStubsAddProtocolClassToNSURLSessionConfiguration(config); + return config; +} + +void _OHHTTPStubs_InstallNSURLSessionConfigurationMagicSupport() +{ + orig_defaultSessionConfiguration = OHHTTPStubsSwizzle(@selector(defaultSessionConfiguration), + defaultSessionConfigurationWithOHHTTPStubs); + orig_ephemeralSessionConfiguration = OHHTTPStubsSwizzle(@selector(ephemeralSessionConfiguration), + ephemeralSessionConfigurationWithOHHTTPStubs); +} + +#else +void _OHHTTPStubs_InstallNSURLSessionConfigurationMagicSupport() +{ + /* NO-OP for Xcode4 and pre-iOS7/pre-OSX9 SDKs that does not support NSURLSessionConfiguration */ +} +#endif diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h new file mode 100644 index 00000000..efd46be5 --- /dev/null +++ b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h @@ -0,0 +1,121 @@ +/*********************************************************************************** + * + * Copyright (c) 2012 Olivier Halligon + * + * 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. + * + ***********************************************************************************/ + + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Imports + +#import +#import "OHHTTPStubsResponse.h" + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Types + +typedef BOOL(^OHHTTPStubsTestBlock)(NSURLRequest* request); +typedef OHHTTPStubsResponse*(^OHHTTPStubsResponseBlock)(NSURLRequest* request); + +@protocol OHHTTPStubsDescriptor +/*! Arbitrary name that you can set and get to describe your stub. Use it as your own convenience. */ +@property(nonatomic, strong) NSString* name; +@end + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Interface + +/*! Stubs Manager. Use this class to add and remove stubs and stub your network requests. */ +@interface OHHTTPStubs : NSObject + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Adding & Removing stubs + +/*! Dedicated method to add a stub + @param testBlock Block that should return `YES` if the request passed as parameter should be stubbed with the response block, + and `NO` if it should hit the real world (or be managed by another stub). + @param responseBlock Block that will return the `OHHTTPStubsResponse` (response to use for stubbing) corresponding to the given request + @return a stub descriptor that uniquely identifies the stub and can be later used to remove it with `removeStub:`. + @note The returned stub descriptor is retained (`__strong` reference) by `OHHTTPStubs` until it is removed + (with one of the `removeStub:`/`removeLastStub`/`removeAllStubs` methods); it is thus recommended to + keep it in a `__weak` storage (and not `__strong`) in your app code, to let the stub descriptor be destroyed + and let the variable go back to `nil` automatically when the stub is removed. + */ ++(id)stubRequestsPassingTest:(OHHTTPStubsTestBlock)testBlock + withStubResponse:(OHHTTPStubsResponseBlock)responseBlock; + +/*! Remove a stub from the list of stubs + @param stubDesc the stub descriptor that has been returned when adding the stub using `stubRequestsPassingTest:withStubResponse:` + @return `YES` if the stub has been successfully removed, `NO` if the parameter was not a valid stub identifier + */ ++(BOOL)removeStub:(id)stubDesc; + +/*! Remove the last added stub from the stubs list */ ++(void)removeLastStub; + +/*! Remove all the stubs from the stubs list. */ ++(void)removeAllStubs; + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Disabling & Re-Enabling stubs + +/*! Enable or disable the stubs + @param enabled if `YES`, enables the stubs. If `NO`, disable all the stubs and let all the requests hit the real world. + @note OHHTTPStubs are enabled by default, so there is no need to call this method with `YES` for stubs to work, + except if you explicitely disabled the stubs before. + @note This only affects requests that are further made using `NSURLConnection` or using `[NSURLSession sharedSession]`. + This does not affect requests sent on an `NSURLSession` created using an `NSURLSessionConfiguration`. + */ ++(void)setEnabled:(BOOL)enabled; + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) \ + || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) +/*! + @param enabled If `YES`, enables the stubs for this `NSURLSessionConfiguration`. + If `NO`, disable the stubs and let all the requests hit the real world + @param sessionConfig The NSURLSessionConfiguration on which to enabled/disable the stubs + @note OHHTTPStubs are enabled by default on newly created `defaultSessionConfiguration` and `ephemeralSessionConfiguration`, + so there is no need to call this method with `YES` for stubs to work. You generally only use this if you want to + disable `OHTTPStubs` per `NSURLSession` by calling it before building the `NSURLSession` with the `NSURLSessionConfiguration`. + @note Important: As usual according to the way `NSURLSessionConfiguration` works, you must set this property + *before* creating the `NSURLSession`. Once the `NSURLSession` object is created, they use a deep copy of + the `NSURLSessionConfiguration` object used to create them, so changing the configuration later does not + affect already created sessions. + */ ++ (void)setEnabled:(BOOL)enabled forSessionConfiguration:(NSURLSessionConfiguration *)sessionConfig; +#endif + +#pragma mark - Debug Methods + +/*! List all the installed stubs + @return An array of id objects currently installed. Useful for debug. + */ ++(NSArray*)allStubs; + +/*! Setup a block to be called each time a stub is triggered. + + Useful if you want to log all your requests being stubbed for example and see which stub was used to respond to each request. + @param block The block to call each time a request is being stubbed by OHHTTPStubs. Set it to `nil` to do nothing. Defaults is `nil`. + */ ++(void)onStubActivation:( void(^)(NSURLRequest* request, id stub) )block; + +@end + diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.m b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.m new file mode 100644 index 00000000..4b298ce5 --- /dev/null +++ b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.m @@ -0,0 +1,520 @@ +/*********************************************************************************** + * + * Copyright (c) 2012 Olivier Halligon + * + * 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. + * + ***********************************************************************************/ + +#if ! __has_feature(objc_arc) +#error This file is expected to be compiled with ARC turned ON +#endif + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Imports + +#import "OHHTTPStubs.h" + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Types & Constants + +@interface OHHTTPStubsProtocol : NSURLProtocol @end + +static NSTimeInterval const kSlotTime = 0.25; // Must be >0. We will send a chunk of the data from the stream each 'slotTime' seconds + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Private Interfaces + +@interface OHHTTPStubs() ++ (instancetype)sharedInstance; +@property(atomic, copy) NSMutableArray* stubDescriptors; +@property(atomic, copy) void (^onStubActivationBlock)(NSURLRequest*, id); +@end + +@interface OHHTTPStubsDescriptor : NSObject +@property(atomic, copy) OHHTTPStubsTestBlock testBlock; +@property(atomic, copy) OHHTTPStubsResponseBlock responseBlock; +@end + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - OHHTTPStubsDescriptor Implementation + +@implementation OHHTTPStubsDescriptor + +@synthesize name = _name; + ++(instancetype)stubDescriptorWithTestBlock:(OHHTTPStubsTestBlock)testBlock + responseBlock:(OHHTTPStubsResponseBlock)responseBlock +{ + OHHTTPStubsDescriptor* stub = [OHHTTPStubsDescriptor new]; + stub.testBlock = testBlock; + stub.responseBlock = responseBlock; + return stub; +} + +-(NSString*)description +{ + return [NSString stringWithFormat:@"<%@ %p : %@>", self.class, self, self.name]; +} + +@end + + + + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - OHHTTPStubs Implementation + +@implementation OHHTTPStubs + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Singleton methods + ++ (instancetype)sharedInstance +{ + static OHHTTPStubs *sharedInstance = nil; + + static dispatch_once_t predicate; + dispatch_once(&predicate, ^{ + sharedInstance = [[self alloc] init]; + }); + + return sharedInstance; +} + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Setup & Teardown + +extern void _OHHTTPStubs_InstallNSURLSessionConfigurationMagicSupport(); + ++ (void)initialize +{ + if (self == [OHHTTPStubs class]) + { + [self setEnabled:YES]; + _OHHTTPStubs_InstallNSURLSessionConfigurationMagicSupport(); + } +} +- (id)init +{ + self = [super init]; + if (self) + { + _stubDescriptors = [NSMutableArray array]; + } + return self; +} + +- (void)dealloc +{ + [self.class setEnabled:NO]; +} + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Public class methods + +#pragma mark > Adding & Removing stubs + ++(id)stubRequestsPassingTest:(OHHTTPStubsTestBlock)testBlock + withStubResponse:(OHHTTPStubsResponseBlock)responseBlock +{ + OHHTTPStubsDescriptor* stub = [OHHTTPStubsDescriptor stubDescriptorWithTestBlock:testBlock + responseBlock:responseBlock]; + [OHHTTPStubs.sharedInstance addStub:stub]; + return stub; +} + ++(BOOL)removeStub:(id)stubDesc +{ + return [OHHTTPStubs.sharedInstance removeStub:stubDesc]; +} ++(void)removeLastStub +{ + [OHHTTPStubs.sharedInstance removeLastStub]; +} ++(void)removeAllStubs +{ + [OHHTTPStubs.sharedInstance removeAllStubs]; +} + +#pragma mark > Disabling & Re-Enabling stubs + ++(void)setEnabled:(BOOL)enable +{ + static BOOL currentEnabledState = NO; + if (enable && !currentEnabledState) + { + [NSURLProtocol registerClass:OHHTTPStubsProtocol.class]; + } + else if (!enable && currentEnabledState) + { + [NSURLProtocol unregisterClass:OHHTTPStubsProtocol.class]; + } + currentEnabledState = enable; +} + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) \ + || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) ++ (void)setEnabled:(BOOL)enable forSessionConfiguration:(NSURLSessionConfiguration*)sessionConfig +{ + // Runtime check to make sure the API is available on this version + if ( [sessionConfig respondsToSelector:@selector(protocolClasses)] + && [sessionConfig respondsToSelector:@selector(setProtocolClasses:)]) + { + NSMutableArray * urlProtocolClasses = [NSMutableArray arrayWithArray:sessionConfig.protocolClasses]; + Class protoCls = OHHTTPStubsProtocol.class; + if (enable && ![urlProtocolClasses containsObject:protoCls]) + { + [urlProtocolClasses addObject:protoCls]; + } + else if (!enable && [urlProtocolClasses containsObject:protoCls]) + { + [urlProtocolClasses removeObject:protoCls]; + } + sessionConfig.protocolClasses = urlProtocolClasses; + } + else + { + NSLog(@"[OHHTTPStubs] %@ is only available when running on iOS7+. Use conditions like 'if ([NSURLSessionConfiguration class])' to only call this method if the user is running iOS7+.", NSStringFromSelector(_cmd)); + } +} +#endif + +#pragma mark > Debug Methods + ++(NSArray*)allStubs +{ + return [OHHTTPStubs.sharedInstance stubDescriptors]; +} + ++(void)onStubActivation:( void(^)(NSURLRequest* request, id stub) )block +{ + [OHHTTPStubs.sharedInstance setOnStubActivationBlock:block]; +} + + + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Private instance methods + +-(void)addStub:(OHHTTPStubsDescriptor*)stubDesc +{ + @synchronized(_stubDescriptors) + { + [_stubDescriptors addObject:stubDesc]; + } +} + +-(BOOL)removeStub:(id)stubDesc +{ + BOOL handlerFound = NO; + @synchronized(_stubDescriptors) + { + handlerFound = [_stubDescriptors containsObject:stubDesc]; + [_stubDescriptors removeObject:stubDesc]; + } + return handlerFound; +} + +-(void)removeLastStub +{ + @synchronized(_stubDescriptors) + { + [_stubDescriptors removeLastObject]; + } +} + +-(void)removeAllStubs +{ + @synchronized(_stubDescriptors) + { + [_stubDescriptors removeAllObjects]; + } +} + +- (OHHTTPStubsDescriptor*)firstStubPassingTestForRequest:(NSURLRequest*)request +{ + OHHTTPStubsDescriptor* foundStub = nil; + @synchronized(_stubDescriptors) + { + for(OHHTTPStubsDescriptor* stub in _stubDescriptors.reverseObjectEnumerator) + { + if (stub.testBlock(request)) + { + foundStub = stub; + break; + } + } + } + return foundStub; +} + +@end + + + + + + + + + + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Private Protocol Class + +@interface OHHTTPStubsProtocol() +@property(nonatomic, assign) BOOL stopped; +@end + +@implementation OHHTTPStubsProtocol + ++ (BOOL)canInitWithRequest:(NSURLRequest *)request +{ + return ([OHHTTPStubs.sharedInstance firstStubPassingTestForRequest:request] != nil); +} + +- (id)initWithRequest:(NSURLRequest *)request cachedResponse:(NSCachedURLResponse *)response client:(id)client +{ + // Make super sure that we never use a cached response. + return [super initWithRequest:request cachedResponse:nil client:client]; +} + ++ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request +{ + return request; +} + +- (NSCachedURLResponse *)cachedResponse +{ + return nil; +} + +- (void)startLoading +{ + NSURLRequest* request = self.request; + id client = self.client; + + OHHTTPStubsDescriptor* stub = [OHHTTPStubs.sharedInstance firstStubPassingTestForRequest:request]; + NSAssert(stub, @"At the time startLoading is called, canInitRequest should have assured that stub is != nil beforehand"); + OHHTTPStubsResponse* responseStub = stub.responseBlock(request); + + if (OHHTTPStubs.sharedInstance.onStubActivationBlock) + { + OHHTTPStubs.sharedInstance.onStubActivationBlock(request, stub); + } + + if (responseStub.error == nil) + { + NSHTTPURLResponse* urlResponse = [[NSHTTPURLResponse alloc] initWithURL:request.URL + statusCode:responseStub.statusCode + HTTPVersion:@"HTTP/1.1" + headerFields:responseStub.httpHeaders]; + + // Cookies handling + if (request.HTTPShouldHandleCookies && request.URL) + { + NSArray* cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:responseStub.httpHeaders forURL:request.URL]; + if (cookies) + { + [NSHTTPCookieStorage.sharedHTTPCookieStorage setCookies:cookies forURL:request.URL mainDocumentURL:request.mainDocumentURL]; + } + } + + + NSString* redirectLocation = (responseStub.httpHeaders)[@"Location"]; + NSURL* redirectLocationURL; + if (redirectLocation) + { + redirectLocationURL = [NSURL URLWithString:redirectLocation]; + } + else + { + redirectLocationURL = nil; + } + if (((responseStub.statusCode >= 300) && (responseStub.statusCode < 400)) && redirectLocationURL) + { + NSURLRequest* redirectRequest = [NSURLRequest requestWithURL:redirectLocationURL]; + execute_after(responseStub.requestTime, ^{ + if (!self.stopped) + { + [client URLProtocol:self wasRedirectedToRequest:redirectRequest redirectResponse:urlResponse]; + } + }); + } + else + { + execute_after(responseStub.requestTime,^{ + if (!self.stopped) + { + [client URLProtocol:self didReceiveResponse:urlResponse cacheStoragePolicy:NSURLCacheStorageNotAllowed]; + if(responseStub.inputStream.streamStatus == NSStreamStatusNotOpen) + { + [responseStub.inputStream open]; + } + [self streamDataForClient:client + withStubResponse:responseStub + completion:^(NSError * error) + { + [responseStub.inputStream close]; + if (error==nil) + { + [client URLProtocolDidFinishLoading:self]; + } + else + { + [client URLProtocol:self didFailWithError:responseStub.error]; + } + }]; + } + }); + } + } else { + // Send the canned error + execute_after(responseStub.responseTime, ^{ + if (!self.stopped) + { + [client URLProtocol:self didFailWithError:responseStub.error]; + } + }); + } +} + +- (void)stopLoading +{ + self.stopped = YES; +} + +typedef struct { + NSTimeInterval slotTime; + double chunkSizePerSlot; + double cumulativeChunkSize; +} OHHTTPStubsStreamTimingInfo; + +- (void)streamDataForClient:(id)client + withStubResponse:(OHHTTPStubsResponse*)stubResponse + completion:(void(^)(NSError * error))completion +{ + if (stubResponse.inputStream.hasBytesAvailable && !self.stopped) + { + // Compute timing data once and for all for this stub + + OHHTTPStubsStreamTimingInfo timingInfo = { + .slotTime = kSlotTime, // Must be >0. We will send a chunk of data from the stream each 'slotTime' seconds + .cumulativeChunkSize = 0 + }; + + if(stubResponse.responseTime < 0) + { + // Bytes send each 'slotTime' seconds = Speed in KB/s * 1000 * slotTime in seconds + timingInfo.chunkSizePerSlot = (fabs(stubResponse.responseTime) * 1000) * timingInfo.slotTime; + } + else if (stubResponse.responseTime < kSlotTime) // includes case when responseTime == 0 + { + // We want to send the whole data quicker than the slotTime, so send it all in one chunk. + timingInfo.chunkSizePerSlot = stubResponse.dataSize; + timingInfo.slotTime = stubResponse.responseTime; + } + else + { + // Bytes send each 'slotTime' seconds = (Whole size in bytes / response time) * slotTime = speed in bps * slotTime in seconds + timingInfo.chunkSizePerSlot = ((stubResponse.dataSize/stubResponse.responseTime) * timingInfo.slotTime); + } + + [self streamDataForClient:client + fromStream:stubResponse.inputStream + timingInfo:timingInfo + completion:completion]; + } + else + { + if (completion) + { + completion(nil); + } + } +} + +- (void) streamDataForClient:(id)client + fromStream:(NSInputStream*)inputStream + timingInfo:(OHHTTPStubsStreamTimingInfo)timingInfo + completion:(void(^)(NSError * error))completion +{ + NSParameterAssert(timingInfo.chunkSizePerSlot > 0); + + if (inputStream.hasBytesAvailable && !self.stopped) + { + // This is needed in case we computed a non-integer chunkSizePerSlot, to avoid cumulative errors + double cumulativeChunkSizeAfterRead = timingInfo.cumulativeChunkSize + timingInfo.chunkSizePerSlot; + NSUInteger chunkSizeToRead = floor(cumulativeChunkSizeAfterRead) - floor(timingInfo.cumulativeChunkSize); + timingInfo.cumulativeChunkSize = cumulativeChunkSizeAfterRead; + + if (chunkSizeToRead == 0) + { + // Nothing to read at this pass, but probably later + execute_after(timingInfo.slotTime, ^{ + [self streamDataForClient:client fromStream:inputStream + timingInfo:timingInfo completion:completion]; + }); + } else { + uint8_t buffer[chunkSizeToRead]; + NSInteger bytesRead = [inputStream read:buffer maxLength:chunkSizeToRead]; + if (bytesRead > 0) + { + NSData * data = [NSData dataWithBytes:buffer length:bytesRead]; + // Wait for 'slotTime' seconds before sending the chunk. + // If bytesRead < chunkSizePerSlot (because we are near the EOF), adjust slotTime proportionally to the bytes remaining + execute_after(((double)bytesRead / (double)chunkSizeToRead) * timingInfo.slotTime, ^{ + [client URLProtocol:self didLoadData:data]; + [self streamDataForClient:client fromStream:inputStream + timingInfo:timingInfo completion:completion]; + }); + } + else + { + if (completion) + { + // Note: We may also arrive here with no error if we were just at the end of the stream (EOF) + // In that case, hasBytesAvailable did return YES (because at the limit of OEF) but nothing were read (because EOF) + // But then in that case inputStream.streamError will be nil so that's cool, we won't return an error anyway + completion(inputStream.streamError); + } + } + } + } + else + { + if (completion) + { + completion(nil); + } + } +} + +///////////////////////////////////////////// +// Delayed execution utility methods +///////////////////////////////////////////// + +static void execute_after(NSTimeInterval delayInSeconds, dispatch_block_t block) +{ + dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); + dispatch_after(popTime, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block); +} + +@end diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+HTTPMessage.h b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+HTTPMessage.h new file mode 100644 index 00000000..40c01a45 --- /dev/null +++ b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+HTTPMessage.h @@ -0,0 +1,35 @@ +// +// OHHTTPStubsResponse+HTTPMessage.h +// OHHTTPStubs +// +// Created by Olivier Halligon on 01/09/13. +// Copyright (c) 2013 AliSoftware. All rights reserved. +// + +#import "OHHTTPStubsResponse.h" + +@interface OHHTTPStubsResponse (HTTPMessage) + +/*! @name Building a response from HTTP Message data */ + +// TODO: Try to implement it using NSInputStream someday? + +/*! Builds a response given a message data as returned by `curl -is [url]`, that is containing both the headers and the body. + This method will split the headers and the body and build a OHHTTPStubsReponse accordingly + @param responseData The NSData containing the whole HTTP response, including the headers and the body + @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + */ ++(instancetype)responseWithHTTPMessageData:(NSData*)responseData; + +/*! Builds a response given the name of a `"*.response"` file containing both the headers and the body. + The response file is expected to be in the specified bundle (or the application bundle if nil). + This method will split the headers and the body and build a OHHTTPStubsReponse accordingly + @param responseName The name of the `"*.response"` file (without extension) containing the whole HTTP response (including the headers and the body) + @param bundleOrNil The bundle in which the `"*.response"` file is located. If `nil`, the `[NSBundle bundleForClass:self.class]` will be used. + @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + */ ++(instancetype)responseNamed:(NSString*)responseName + inBundle:(NSBundle*)bundleOrNil; + + +@end diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+HTTPMessage.m b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+HTTPMessage.m new file mode 100644 index 00000000..03d0e7a6 --- /dev/null +++ b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+HTTPMessage.m @@ -0,0 +1,54 @@ +// +// OHHTTPStubsResponse+HTTPMessage.m +// OHHTTPStubs +// +// Created by Olivier Halligon on 01/09/13. +// Copyright (c) 2013 AliSoftware. All rights reserved. +// + +#import "OHHTTPStubsResponse+HTTPMessage.h" + +@implementation OHHTTPStubsResponse (HTTPMessage) + +#pragma mark Building response from HTTP Message Data (dump from "curl -is") + ++(instancetype)responseWithHTTPMessageData:(NSData*)responseData; +{ + NSData *data = [NSData data]; + NSInteger statusCode = 200; + NSDictionary *headers = @{}; + + CFHTTPMessageRef httpMessage = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, FALSE); + if (httpMessage) + { + CFHTTPMessageAppendBytes(httpMessage, responseData.bytes, responseData.length); + + data = responseData; // By default + + if (CFHTTPMessageIsHeaderComplete(httpMessage)) + { + statusCode = (NSInteger)CFHTTPMessageGetResponseStatusCode(httpMessage); + headers = (__bridge_transfer NSDictionary *)CFHTTPMessageCopyAllHeaderFields(httpMessage); + data = (__bridge_transfer NSData *)CFHTTPMessageCopyBody(httpMessage); + } + CFRelease(httpMessage); + } + + return [self responseWithData:data + statusCode:(int)statusCode + headers:headers]; +} + ++(instancetype)responseNamed:(NSString*)responseName + inBundle:(NSBundle*)responsesBundle +{ + NSURL *responseURL = [responsesBundle?:[NSBundle bundleForClass:self.class] URLForResource:responseName + withExtension:@"response"]; + + NSData *responseData = [NSData dataWithContentsOfURL:responseURL]; + NSAssert(responseData, @"Could not find HTTP response named '%@' in bundle '%@'", responseName, responsesBundle); + + return [self responseWithHTTPMessageData:responseData]; +} + +@end diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.h b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.h new file mode 100644 index 00000000..1934c102 --- /dev/null +++ b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.h @@ -0,0 +1,27 @@ +// +// OHHTTPStubsResponse+JSON.h +// OHHTTPStubs +// +// Created by Olivier Halligon on 01/09/13. +// Copyright (c) 2013 AliSoftware. All rights reserved. +// + +#import "OHHTTPStubsResponse.h" + +@interface OHHTTPStubsResponse (JSON) + +/*! Builds a response given a JSON object for the response body, status code, and headers. + @param jsonObject Object representing the response body. + Typically a `NSDictionary`; may be any object accepted by `+[NSJSONSerialization dataWithJSONObject:options:error:]` + @param statusCode The HTTP Status Code to use in the response + @param httpHeaders The HTTP Headers to return in the response + If a "Content-Type" header is not included, "Content-Type: application/json" will be added. + @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + + @note This method typically calls responseWithData:statusCode:headers: passing the serialized JSON object as the data parameter and adding the Content-Type header if necessary. + */ ++ (instancetype)responseWithJSONObject:(id)jsonObject + statusCode:(int)statusCode + headers:(NSDictionary *)httpHeaders; + +@end diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.m b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.m new file mode 100644 index 00000000..aebcb990 --- /dev/null +++ b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.m @@ -0,0 +1,31 @@ +// +// OHHTTPStubsResponse+JSON.m +// OHHTTPStubs +// +// Created by Olivier Halligon on 01/09/13. +// Copyright (c) 2013 AliSoftware. All rights reserved. +// + +#import "OHHTTPStubsResponse+JSON.h" + +@implementation OHHTTPStubsResponse (JSON) + +/*! @name Building a response from JSON objects */ + ++ (instancetype)responseWithJSONObject:(id)jsonObject + statusCode:(int)statusCode + headers:(NSDictionary *)httpHeaders +{ + if (!httpHeaders[@"Content-Type"]) + { + NSMutableDictionary* mutableHeaders = [NSMutableDictionary dictionaryWithDictionary:httpHeaders]; + mutableHeaders[@"Content-Type"] = @"application/json"; + httpHeaders = [NSDictionary dictionaryWithDictionary:mutableHeaders]; // make immutable again + } + + return [self responseWithData:[NSJSONSerialization dataWithJSONObject:jsonObject options:0 error:nil] + statusCode:statusCode + headers:httpHeaders]; +} + +@end diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.h b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.h new file mode 100644 index 00000000..95c85f88 --- /dev/null +++ b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.h @@ -0,0 +1,219 @@ +/*********************************************************************************** + * + * Copyright (c) 2012 Olivier Halligon + * + * 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. + * + ***********************************************************************************/ + + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Imports + +#import + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Defines & Constants + +// Standard download speeds. +extern const double +OHHTTPStubsDownloadSpeedGPRS, +OHHTTPStubsDownloadSpeedEDGE, +OHHTTPStubsDownloadSpeed3G, +OHHTTPStubsDownloadSpeed3GPlus, +OHHTTPStubsDownloadSpeedWifi; + + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Interface + +/*! Stubs Response. This describes a stubbed response to be returned by the URL Loading System, including its + HTTP headers, body, statusCode and response time. */ +@interface OHHTTPStubsResponse : NSObject + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Properties + +@property(nonatomic, strong) NSDictionary* httpHeaders; +@property(nonatomic, assign) int statusCode; +@property(nonatomic, strong) NSInputStream* inputStream; +@property(nonatomic, assign) unsigned long long dataSize; +@property(nonatomic, assign) NSTimeInterval requestTime; //!< Defaults to 0.0 +//! @note if responseTime<0, it is interpreted as a download speed in KBps ( -200 => 200KB/s ) +@property(nonatomic, assign) NSTimeInterval responseTime; +@property(nonatomic, strong) NSError* error; + + + + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Commodity Constructors +/*! @name Commodity */ + +/* -------------------------------------------------------------------------- */ +#pragma mark > Building response from NSData + +/*! Builds a response given raw data. + @note Internally calls `-initWithInputStream:dataSize:statusCode:headers:` with and inputStream build from the NSData. + + @param data The raw data to return in the response + @param statusCode The HTTP Status Code to use in the response + @param httpHeaders The HTTP Headers to return in the response + @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + */ ++(instancetype)responseWithData:(NSData*)data + statusCode:(int)statusCode + headers:(NSDictionary*)httpHeaders; + + +/* -------------------------------------------------------------------------- */ +#pragma mark > Building response from a file + +/*! Useful macro to build a path given a file name and a bundle. + @param fileName The name of the file to get the path to, including file extension + @param bundleOrNil The bundle in which the file is located. If nil, the application bundle (`[NSBundle bundleForClass:self.class]`) is used + @return The path of the given file in the given bundle + */ +#define OHPathForFileInBundle(fileName,bundleOrNil) ({ \ + [(bundleOrNil?:[NSBundle bundleForClass:self.class]) pathForResource:[fileName stringByDeletingPathExtension] ofType:[fileName pathExtension]]; \ +}) + +/*! Useful macro to build a path to a file in the Documents's directory in the app sandbox, used by iTunes File Sharing for example. + @param fileName The name of the file to get the path to, including file extension + @return The path of the file in the Documents directory in your App Sandbox + */ +#define OHPathForFileInDocumentsDir(fileName) ({ \ + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); \ + NSString *basePath = (paths.count > 0) ? [paths objectAtIndex:0] : nil; \ + [basePath stringByAppendingPathComponent:fileName]; \ +}) + +/*! Useful macro to build an NSBundle located in the application's resources simply from its name + @param bundleBasename The base name, without extension (extension is assumed to be ".bundle"). + @return The NSBundle object representing the bundle with the given basename located in your application's resources. + */ +#define OHResourceBundle(bundleBasename) ({ \ + [NSBundle bundleWithPath:[[NSBundle bundleForClass:self.class] pathForResource:bundleBasename ofType:@"bundle"]]; \ +}) + + +/*! Builds a response given a file path, the status code and headers. + @param filePath The file path that contains the response body to return. + @param statusCode The HTTP Status Code to use in the response + @param httpHeaders The HTTP Headers to return in the response + @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + @note It is encouraged to use the `OHPathForFileInBundle(fileName, bundleOrNil)` and `OHResourceBundle(bundleBasename)` macros + to easily build a path to a file located in the app bundle or any arbitrary bundle. + Likewise, you may use the `OHPathForFileInDocumentsDir(fileName)` macro to build a path to a file located in + the Documents directory of your application' sandbox. + */ ++(instancetype)responseWithFileAtPath:(NSString *)filePath + statusCode:(int)statusCode + headers:(NSDictionary*)httpHeaders; + +/* -------------------------------------------------------------------------- */ +#pragma mark > Building an error response + +/*! Builds a response that corresponds to the given error + @param error The error to use in the stubbed response. + @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + @note For example you could use an error like `[NSError errorWithDomain:NSURLErrorDomain code:kCFURLErrorNotConnectedToInternet userInfo:nil]` + */ ++(instancetype)responseWithError:(NSError*)error; + + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Commotidy Setters + +/*! Set the `responseTime` of the `OHHTTPStubsResponse` and return `self`. Useful for chaining method calls. + + _Usage example:_ +
return [[OHHTTPStubsReponse responseWithData:data statusCode:200 headers:nil] responseTime:5.0];
+ + @param responseTime If positive, the amount of time used to send the entire response. + If negative, the rate in KB/s at which to send the response data. + Useful to simulate slow networks for example. You may use the OHHTTPStubsDownloadSpeed* constants here. + @return `self` (= the same `OHHTTPStubsResponse` that was the target of this method). Useful for chaining method calls. + */ +-(instancetype)responseTime:(NSTimeInterval)responseTime; + +/*! Set both the `requestTime` and the `responseTime` of the `OHHTTPStubsResponse` at once. Useful for chaining method calls. + + _Usage example:_ +
return [[OHHTTPStubsReponse responseWithData:data statusCode:200 headers:nil]
+               requestTime:1.0 responseTime:5.0];
+ + @param requestTime The time to wait before the response begins to send. This value must be greater than or equal to zero. + @param responseTime If positive, the amount of time used to send the entire response. + If negative, the rate in KB/s at which to send the response data. + Useful to simulate slow networks for example. You may use the OHHTTPStubsDownloadSpeed* constants here. + @return `self` (= the same `OHHTTPStubsResponse` that was the target of this method). Useful for chaining method calls. + */ +-(instancetype)requestTime:(NSTimeInterval)requestTime responseTime:(NSTimeInterval)responseTime; + + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Initializers +/*! @name Initializers */ + +/*! Designed initializer. Initialize a response with the given input stream, dataSize, statusCode and headers. + @param inputStream The input stream that will provide the data to return in the response + @param dataSize The size of the data in the stream. + @param statusCode The HTTP Status Code to use in the response + @param httpHeaders The HTTP Headers to return in the response + @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + @note You will probably never need to call this method yourself. Prefer the other initializers (that will call this method eventually) + */ +-(instancetype)initWithInputStream:(NSInputStream*)inputStream + dataSize:(unsigned long long)dataSize + statusCode:(int)statusCode + headers:(NSDictionary*)httpHeaders; + + +/*! Initialize a response with a given file path, statusCode and headers. + @param filePath The file path of the data to return in the response + @param statusCode The HTTP Status Code to use in the response + @param httpHeaders The HTTP Headers to return in the response + @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + @note This method simply builds the NSInputStream, compute the file size, and then call `-initWithInputStream:dataSize:statusCode:headers:` + */ +-(instancetype)initWithFileAtPath:(NSString*)filePath + statusCode:(int)statusCode + headers:(NSDictionary*)httpHeaders; + + +/*! Initialize a response with the given data, statusCode and headers. + @param data The raw data to return in the response + @param statusCode The HTTP Status Code to use in the response + @param httpHeaders The HTTP Headers to return in the response + @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + */ +-(instancetype)initWithData:(NSData*)data + statusCode:(int)statusCode + headers:(NSDictionary*)httpHeaders; + + +/*! Designed initializer. Initialize a response with the given error. + @param error The error to use in the stubbed response. + @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + @note For example you could use an error like `[NSError errorWithDomain:NSURLErrorDomain code:kCFURLErrorNotConnectedToInternet userInfo:nil]` + */ +-(instancetype)initWithError:(NSError*)error; + +@end diff --git a/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.m b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.m new file mode 100644 index 00000000..22c8cc7f --- /dev/null +++ b/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.m @@ -0,0 +1,173 @@ +/*********************************************************************************** + * + * Copyright (c) 2012 Olivier Halligon + * + * 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. + * + ***********************************************************************************/ + +#if ! __has_feature(objc_arc) +#error This file is expected to be compiled with ARC turned ON +#endif + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Imports + +#import "OHHTTPStubsResponse.h" + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Defines & Constants + +const double OHHTTPStubsDownloadSpeedGPRS =- 56 / 8; // kbps -> KB/s +const double OHHTTPStubsDownloadSpeedEDGE =- 128 / 8; // kbps -> KB/s +const double OHHTTPStubsDownloadSpeed3G =- 3200 / 8; // kbps -> KB/s +const double OHHTTPStubsDownloadSpeed3GPlus =- 7200 / 8; // kbps -> KB/s +const double OHHTTPStubsDownloadSpeedWifi =- 12000 / 8; // kbps -> KB/s + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Implementation + +@implementation OHHTTPStubsResponse + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Commodity Constructors + + +#pragma mark > Building response from NSData + ++(instancetype)responseWithData:(NSData*)data + statusCode:(int)statusCode + headers:(NSDictionary*)httpHeaders +{ + OHHTTPStubsResponse* response = [[self alloc] initWithData:data + statusCode:statusCode + headers:httpHeaders]; + return response; +} + + +#pragma mark > Building response from a file + ++(instancetype)responseWithFileAtPath:(NSString *)filePath + statusCode:(int)statusCode + headers:(NSDictionary *)httpHeaders +{ + OHHTTPStubsResponse* response = [[self alloc] initWithFileAtPath:filePath + statusCode:statusCode + headers:httpHeaders]; + return response; +} + + +#pragma mark > Building an error response + ++(instancetype)responseWithError:(NSError*)error +{ + OHHTTPStubsResponse* response = [[self alloc] initWithError:error]; + return response; +} + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Commotidy Setters + +-(instancetype)responseTime:(NSTimeInterval)responseTime +{ + self.responseTime = responseTime; + return self; +} + +-(instancetype)requestTime:(NSTimeInterval)requestTime responseTime:(NSTimeInterval)responseTime +{ + self.requestTime = requestTime; + self.responseTime = responseTime; + return self; +} + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Initializers + +-(instancetype)initWithInputStream:(NSInputStream*)inputStream + dataSize:(unsigned long long)dataSize + statusCode:(int)statusCode + headers:(NSDictionary*)httpHeaders +{ + self = [super init]; + if (self) + { + self.inputStream = inputStream; + self.dataSize = dataSize; + self.statusCode = statusCode; + NSMutableDictionary * headers = [NSMutableDictionary dictionaryWithDictionary:httpHeaders]; + headers[@"Content-Length"] = [NSString stringWithFormat:@"%llu",self.dataSize]; + self.httpHeaders = [NSDictionary dictionaryWithDictionary:headers]; + } + return self; +} + +-(instancetype)initWithFileAtPath:(NSString*)filePath + statusCode:(int)statusCode + headers:(NSDictionary*)httpHeaders +{ + NSInputStream* inputStream = [NSInputStream inputStreamWithFileAtPath:filePath]; + NSDictionary* attributes = [NSFileManager.defaultManager attributesOfItemAtPath:filePath error:nil]; + unsigned long long fileSize = [[attributes valueForKey:NSFileSize] unsignedLongLongValue]; + self = [self initWithInputStream:inputStream + dataSize:fileSize + statusCode:statusCode + headers:httpHeaders]; + return self; +} + +-(instancetype)initWithData:(NSData*)data + statusCode:(int)statusCode + headers:(NSDictionary*)httpHeaders +{ + NSInputStream* inputStream = [NSInputStream inputStreamWithData:data?:[NSData data]]; + self = [self initWithInputStream:inputStream + dataSize:data.length + statusCode:statusCode + headers:httpHeaders]; + return self; +} + +-(instancetype)initWithError:(NSError*)error +{ + self = [super init]; + if (self) { + self.error = error; + } + return self; +} + +-(NSString*)debugDescription +{ + return [NSString stringWithFormat:@"<%@ %p requestTime:%f responseTime:%f status:%d dataSize:%llu>", + self.class, self, self.requestTime, self.responseTime, self.statusCode, self.dataSize]; +} + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Accessors + +-(void)setRequestTime:(NSTimeInterval)requestTime +{ + NSAssert(requestTime >= 0, @"Invalid Request Time (%f) for OHHTTPStubResponse. Request time must be greater than or equal to zero",requestTime); + _requestTime = requestTime; +} + +@end diff --git a/Pods/OHHTTPStubs/README.md b/Pods/OHHTTPStubs/README.md index a6b8b61f..57710546 100644 --- a/Pods/OHHTTPStubs/README.md +++ b/Pods/OHHTTPStubs/README.md @@ -1,189 +1,238 @@ OHHTTPStubs =========== -A class to stub network requests easily: test your apps with fake network data (stubbed from file) and custom response time +A class to stub network requests easily: test your apps with **fake network data** (stubbed from file) and **custom response times**. -* [Basic Usage](#basic-usage) -* [The OHHTTPStubsResponse object](#the-ohhttpstubsresponse-object) +`OHHTTPStubs` is very useful to write **Unit Tests** and return fake network data from your fixtures, or to **simulate slow networks** in order to check your application behavior in bad network conditions. +It works with `NSURLConnection`, `AFNetworking`, or any networking framework you chose to use. + +[![Build Status](https://travis-ci.org/AliSoftware/OHHTTPStubs.png?branch=master)](https://travis-ci.org/AliSoftware/OHHTTPStubs) + +---- + +* [How it works](#how-it-works) +* [Documentation](#documentation) +* [Usage examples](#usage-examples) + * [Stub all requests with some given NSData](#stub-all-requests-with-some-given-nsdata) + * [Stub only requests to your WebService](#stub-only-requests-to-your-webservice) + * [Set request and response time](#set-request-and-response-time) + * [Simulate a down network](#simulate-a-down-network) * [Advanced Usage](#advanced-usage) - * [Return a response depending on the request](#return-a-response-depending-on-the-request) - * [Using download speed instead of responseTime](#using-download-speed-instead-of-responsetime) - * [Return quickly when `onlyCheck=YES`](#return-quickly-when-onlycheckyes) - * [Stack multiple requestHandlers](#stack-multiple-requesthandlers) -* [Complete Example](#complete-example) + * [Use macros to build your fixtures path](#use-macros-to-build-your-fixtures-path) + * [Using download speed instead of responseTime](#using-download-speed-instead-of-responsetime) + * [Stack multiple stubs and remove installed stubs](#stack-multiple-stubs-and-remove-installed-stubs) + * [Name your stubs and log their activation](#name-your-stubs-and-log-their-activation) + * [OHHTTPStubs and NSURLSession](#ohhttpstubs-and-nsurlsession) +* [Installing in your projects](#installing-in-your-projects) +* [About OHHTTPStubs Unit Tests](#about-ohhttpstubs-unit-tests) * [Change Log](#change-log) -* [ARC Support](#arc-support) * [License and Credits](#license-and-credits) ---- -## Basic Usage +## How it works -This is aimed to be very simple to use. It uses block to intercept outgoing requests and allow you to -return data from a file instead. +Using `OHHTTPStubs` is as simple as calling `stubRequestsPassingTest:withStubResponse:` to tell which requests you want to stub and what data you want to respond with. -This is the most simple way to use it: +For every request sent to the network, whatever the framework used (`NSURLConnection`, +[`AFNetworking`](https://github.com/AFNetworking/AFNetworking/), …): - [OHHTTPStubs addRequestHandler:^OHHTTPStubsResponse*(NSURLRequest *request, BOOL onlyCheck) - { - return [OHHTTPStubsResponse responseWithFile:@"response.json" contentType:@"text/json" responseTime:2.0]; - }]; +* The block passed as first argument of `stubRequestsPassingTest:withStubResponse:` will be called to check if we need to stub this request. +* If the return value of this block is YES, the block passed as second argument will be called to let you return an `OHHTTPStubsResponse` object, describing the fake response to return. -This will return the `NSData` corresponding to the content of the "`response.json`" file (that must be in your bundle) -with a "`Content-Type`" header of "`text/json`" in the HTTP response, after 2 seconds. +_(In practice, it uses the URL Loading System of Cocoa and a custom `NSURLProtocol` to intercept the requests and stub them)_ -## The OHHTTPStubsResponse object -Each time a network request is done by your application - (whatever the framework used, `NSURLConnection`, [AFNetworking](https://github.com/AFNetworking/AFNetworking/), or anything else) -this requestHandler block will be called, allowing you to return an `OHHTTPStubsResponse` object -describing the response to return. If you return a non-nil `OHHTTPStubsResponse`, it will automatically -build a NSURLResponse and behave exactly like if you received the response from the network. -_If your return `nil`, the normal request will be sent._ +## Documentation -The `OHHTTPStubsResponse` class exposes multiple initializers: +`OHHTTPStubs` headers are fully documented using Appledoc-like / Headerdoc-like comments in the header files. +When you [install it using CocoaPods](#installing-in-your-projects), you will get a docset for free installed in your Xcode Organizer. -##### The designed intializer - +(id)responseWithData:(NSData*)data - statusCode:(int)statusCode - responseTime:(NSTimeInterval)responseTime - headers:(NSDictionary*)httpHeaders; +Don't hesitate to take a look into `OHHTTPStubsResponse.h`, `OHHTTPStubsResponse+JSON.h` and `OHHTTPStubsResponse.HTTPMessage.h` to see all the commodity constructors, constants and macros available. -##### Commodity initializer to load data from a file in your bundle - +(id)responseWithFile:(NSString*)fileName - statusCode:(int)statusCode - responseTime:(NSTimeInterval)responseTime - headers:(NSDictionary*)httpHeaders; -##### Useful short-form initializer to load data from a file in your bundle, using the specified "Content-Type" header - +(id)responseWithFile:(NSString*)fileName - contentType:(NSString*)contentType - responseTime:(NSTimeInterval)responseTime; - -##### To respond with an error instead of a success - +(id)responseWithError:(NSError*)error; -_(e.g. you could use an error like `[NSError errorWithDomain:NSURLErrorDomain code:404 userInfo:nil]`)_ +## Usage examples -## Advanced Usage +### Stub all requests with some given NSData -### Return a response depending on the request +With the code below, every network request (because you returned YES in the first block) will return a stubbed response containing the data `"Hello World!"`: -Of course, and that's the main reason this is implemented with blocks, -you can do whatever you need in the block implementation. This includes -checking the request URL to see if you want to return a stub or not, -and pick the right file according to the requested URL. + [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + return YES; // Stub ALL requests without any condition + } withStubResponse:^OHHTTPStubsResponse*(NSURLRequest *request) { + // Stub all those requests with "Hello World!" string + NSData* stubData = [@"Hello World!" dataUsingEncoding:NSUTF8StringEncoding]; + return [OHHTTPStubsResponse responseWithData:stubData statusCode:200 headers:nil]; + }]; + -Example: +### Stub only requests to your WebService + +This is typically useful in your Unit Tests to only stub specific requests targeted to a given host or WebService, for example. + +With the code below, only requests to the `mywebservice.com` host will be stubbed. Requests to any other host will hit the real world: + + [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + return [request.URL.host isEqualToString:@"mywebservice.com"]; + } withStubResponse:^OHHTTPStubsResponse*(NSURLRequest *request) { + // Stub it with our "wsresponse.json" stub file + return [OHHTTPStubsResponse responseWithFileAtPath:OHPathForFileInBundle(@"wsresponse.json",nil) + statusCode:200 headers:@{@"Content-Type":@"text/json"}]; + }]; + +This example also demonstrate how to **easily return the content of a given file in your application bundle**. +This is useful if you have all your fixtures (stubbed responses for your Unit Tests) in your Xcode project linked with your Unit Test target. + +> Note: You may even put all your fixtures in a custom bundle (let's call it Fixtures.bundle) and then use the helper macros to get it with `OHPathForFileInBundle(@"wsresponse.json",OHResourceBundle(@"Fixtures"))`. + +### Set request and response time + +You can simulate a slow network by setting the `requestTime` and `responseTime` of your `OHHTTPStubsResponse`. +_This is useful to check that your user interface does not freeze and that you have all your activity indicators working while waiting for responses in bad network conditions._ - [OHHTTPStubs addRequestHandler:^OHHTTPStubsResponse*(NSURLRequest *request, BOOL onlyCheck) - { - if ([request.URL.absoluteString hasPrefix:@".json"]) { - NSString* basename = [request.URL.absoluteString lastPathComponent] - return [OHHTTPStubsResponse responseWithFile:basename contentType:@"text/json" responseTime:2.0]; - } else { - return nil; // Don't stub - } - }]; +You may use the commoidty chainable setters `responseTime:` and `requestTime:responseTime:` to set those values and easily chain method calls: + [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + return [request.URL.host isEqualToString:@"mywebservice.com"]; + } withStubResponse:^OHHTTPStubsResponse*(NSURLRequest *request) { + return [[OHHTTPStubsResponse responseWithJSONObject:someDict statusCode:200 headers:nil] + requestTime:1.0 responseTime:3.0]; + }]; + +`OHHTTPStubs` will wait `requestTime` before sending the `NSHTTPURLResponse`, and then start sending chunks of the stub data regularly during the period of `responseTime`, to simulate the slow network. + +At the end, you will only have the full content of your stub data after `requestTime+responseTime`, time after which the `completion` block or `connectionDidFinishLoading:` delegate method will be called. + +> You can specify a **network speed** instead of a `responseTime` by using a negative value. [See below](#using-download-speed-instead-of-responsetime). + +### Simulate a down network + +You may also return a network error for your stub. For example, you can easily simulate an absence of network connection like this: + + [OHHTTPStubsResponse responseWithError:[NSError errorWithDomain:NSURLErrorDomain code:kCFURLErrorNotConnectedToInternet userInfo:nil]]; + + +## Advanced Usage + +### Use macros to build your fixtures path + +`OHHTTPStubsResponse.h` includes a useful set of macros to build a path to your fixtures easily, like `OHPathForFileInBundle`, `OHPathForFileInDocumentsDir` and `OHResourceBundle`. You are encouraged to use them to build your path more easily. + +> Especially, they use `[NSBundle bundleForClass:self.class]` to reference your app bundle (and not `[NSBundle mainBundle]` as one may think), so that they still work with OCUnit and XCTestKit when unit-testing your app in the Simulator. ### Using download speed instead of responseTime -When building the `OHHTTPStubsResponse` object, you can specify a response time (in seconds) so -that the sending of the fake response will be postponed (using GCD's `dispatch_after function`). -This allows you to simulate a slow network for example. +When building the `OHHTTPStubsResponse` object, you can specify a response time (in seconds) so that the sending of the fake response will be spread over time. This allows you to simulate a slow network for example. ([see "Set request and response time"](#set-request-and-response-time)) -If you specify a negative value for the responseTime parameter, instead of being interpreted as -a time in seconds, it will be interpreted as a download speed in KBytes/s. -In that case, the response time will be computed using the size of the response's data to simulate -the indicated download speed. +If you specify a negative value for the responseTime parameter, instead of being interpreted as a time in seconds, it will be interpreted as a download speed in KBytes/s. In that case, the response time will be computed using the size of the response's data to simulate the indicated download speed. The `OHHTTPStubsResponse` header defines some constants for standard download speeds: -* `OHHTTPStubsDownloadSpeedGPRS` : 56 kbps (7 KB/s) -* `OHHTTPStubsDownloadSpeedEDGE` : 128 kbps (16 KB/s) -* `OHHTTPStubsDownloadSpeed3G` : 3200 kbps (400 KB/s) -* `OHHTTPStubsDownloadSpeed3GPlus` : 7200 kbps (900 KB/s) -* `OHHTTPStubsDownloadSpeedWifi` : 12000 kbps (1500 KB/s) - -### Return quickly when `onlyCheck=YES` - -If the `onlyCheck` parameter of the requestHandler block is `YES`, then it means that the handler is called - only to check if you will be able to return a stubbed response or if it has to do the standard request. -In this scenario, the response will not actually be used but will only be compared to `nil` to check if it has to be stubbed later. - _The handler will be called later again (with `onlyCheck=NO`) to fetch the actual OHHTTPStubsResponse object._ + +``` +OHHTTPStubsDownloadSpeedGPRS = -7 = 7 KB/s = 56 kbps +OHHTTPStubsDownloadSpeedEDGE = -16 = 16 KB/s = 128 kbps +OHHTTPStubsDownloadSpeed3G = -400 = 400 KB/s = 3200 kbps +OHHTTPStubsDownloadSpeed3GPlus = -900 = 900 KB/s = 7200 kbps +OHHTTPStubsDownloadSpeedWifi = -1500 = 1500 KB/s = 12000 kbps +``` + +Example: + + return [[OHHTTPStubsResponse responseWithData:nil statusCode:400 headers:nil] + responseTime:OHHTTPStubsDownloadSpeed3G]; + + + +### Stack multiple stubs and remove installed stubs + +* You can call `stubRequestsPassingTest:withStubResponse:` multiple times. It will just add the stubs in an internal list of stubs. + +_This may be useful to install different stubs in various places in your code, or to separate different stubbing conditions more easily. See the `OHHTTPStubsDemo` project for a typical example._ + +When a network request is performed by the system, the **stubs are called in the reverse order that they have been added**, the last added stub having priority over the first added ones. +The first stub that returns YES for the first parameter of `stubRequestsPassingTest:withStubResponse:` is then used to reply to the request. + +* You can remove any given stub with the `removeStub:` method. This method takes as a parameter the `id` object returned by `stubRequestsPassingTest:withStubResponse:` _(Note: this returned object is already retained by `OHHTTPStubs` while the stub is installed, so there is no need to keep a `__strong` reference to it)_. +* You can remove the latest added stub with the `removeLastStub` method. +* You can also remove all stubs at once with the `removeAllStubs` method. + +This last one is useful when using `OHHTTPStubs` in your Unit Tests, to remove all installed stubs at the end of each of your test case to avoid stubs installed in one test case to be still installed for the next test case. + + - (void)tearDown + { + [OHHTTPStubs removeAllStubs]; + } + +### Name your stubs and log their activation + +You can add a name of your choice to your stubs. The only purpose of this is to easily identify your stubs for debugging, like when displaying them in your console. + + id stub = [OHHTTPStubs stubRequestsPassingTest:... withStubResponse:...]; + stub.name = @"Stub for text files"; -So in such cases (`onlyCheck==YES`), you can simply return `nil` if you don't want to provide a stubbed response, - and **_any_ non-nil value** to indicate that you will provide a stubbed response later. +You can even imagine applying the `.name = ...` affectation directly if you don't need to use the returned `id` otherwise: -This may be useful if you intend to do some no-so-fast work to build your real `OHHTTPStubsResponse` - (like reading some large file for example): in that case you can quickly return a dummy value when `onlyCheck==YES` - without the burden of building the actual `OHHTTPStubsResponse` object. -You will obviously return the real `OHHTTPStubsResponse` in the later call when `onlyCheck==NO`. + [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + ... + } withStubResponse:^OHHTTPStubsResponse*(NSURLRequest *request) { + ... + }].name = @"Stub for text files"; -There is a macro `OHHTTPStubsResponseUseStub` provided in the header that you can use as a dummy return value - for that purpose _(it actually evaluates to `(OHHTTPStubsReponse*)1`)_ +You can then list all the installed stubs using `[OHHTTPStubs allStubs]`, which return an array of `id` objects so you can display their `name` on the console. This is useful to check that you didn't forget to remove some previous stubs that are still installed for example. +You can also setup a block to execute each time a request has been stubbed, using `onStubActivation:` method, typically to log the stub being used for each request: -### Stack multiple requestHandlers + [OHHTTPStubs onStubActivation:^(NSURLRequest *request, id stub) { + NSLog(@"%@ stubbed by %@", request.URL, stub.name); + }]; -You can call `+addRequestHandler:` multiple times. -It will just add the response handlers in an internal list of handler. +### OHHTTPStubs and NSURLSession -When a network request is performed by the system, the response handlers are called in the reverse - order that they have been added, the last added handler having priority over the first added ones. - The first non-nil OHHTTPStubsResponse returned is used to reply to the request. +`OHHTTPStubs` use a custom private `NSURLProtocol` to intercept its requests. -_This may be useful to install different stubs in different classes (say different UIViewControllers) and various places in your application._ +`OHHTTPStubs` is automatically enabled by default, both for: -You can remove the latest added handler with the `removeLastRequestHandler` method. +* requests made using `NSURLConnection` or `[NSURLSession sharedSession]` _(that are based on `[NSURLProtocol registerProtocol:]` to look for custom protocols for every requests)_, because this protocol is installed as soon as you use the `OHHTTPStubs` class _(installed in the `+initialize` method)_ +* requests made using a `NSURLSession` created with a `NSURLSessionConfiguration` and `[NSURLSession sessionWithConfiguration:]` _(thanks to method swizzling that insert the private protocol used by `OHHTTPStubs` into the `protocolClasses` of `[NSURLSessionConfiguration defaultSessionConfiguration]` and `[NSURLSessionConfiguration ephemeralSessionConfiguration]` automagically)_ -You can also remove any given handler with the `removeRequestHandler:` method. This method takes as a parameter the object returned by `addRequestHandler:`. _Note that this returned object is already retained by OHHTTPStubs, so you may keep it in a `__weak` variable._ +> Note however that `OHHTTPStubs` **can't work on background sessions** (sessions created using `[NSURLSessionConfiguration backgroundSessionConfiguration]`) because background sessions don't allow the use of custom `NSURLProtocols`. There's nothing we can do about it, sorry. -## Complete example +If you need to disable (and re-enable) `OHHTTPStubs` globally or per session, you can use: - NSArray* stubs = [NSArray arrayWithObjects:@"file1", @"file2", nil]; - - [OHHTTPStubs addRequestHandler:^OHHTTPStubsResponse*(NSURLRequest *request, BOOL onlyCheck) - { - NSString* basename = [request.URL.absoluteString lastPathComponent]; - if (onlyCheck) { - return ([stubs containsObject:basename] ? OHHTTPStubsResponseUseStub : nil); - } - - NSString* file = [basename stringByAppendingPathExtension:@"json"]; - return [OHHTTPStubsResponse responseWithFile:file contentType:@"text/json" - responseTime:OHHTTPStubsDownloadSpeedEDGE]; - }]; - - ... - - // Then this call (sending a request using the AFNetworking framework) will actually - // receive a fake response issued from the file "file1.json" - NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.example.com/file1"]]; - AFJSONRequestOperation* req = - [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) - { - ... - } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) - { - ... - }]; - [req start]; +* `[OHHTTPStubs setEnabled:]` for `NSURLConnection`/`[NSURLSession sharedSession]`-based requests +* `[OHHTTPStubs setEnabled:forSessionConfiguration:]` for requests sent on a session created using `[NSURLSession sessionWithConfiguration:...]` + +_There is generally no need to explicitly call `setEnabled:` or `setEnabled:forSessionConfiguration:` using `YES` as this is the default._ + +---- + +## Installing in your projects + +[CocoaPods](http://cocoapods.org/) is the easiest way to add third-party libraries like `OHHTTPStubs` in your projects. Simply add `pod 'OHHTTPStubs'` to your `Podfile` and you are done. +_Note: `OHHTTPStubs` needs iOS5 minimum._ +> **Warning: Be careful anyway to include `OHHTTPStubs` only in your test targets, or only use it in `#if DEBUG` portions, so that its code is not included in your release for the AppStore !** + +In case you don't want to use CocoaPods (but you should!!!), the `OHHTTPStubs` project is provided as a Xcode project that generates a static library, so simply add its xcodeproj to your workspace and link your app against the `libOHHTTPStubs.a` library. See [here](https://github.com/AliSoftware/OHHTTPStubs/wiki/Detailed-Integration-Instruction) for detailed instructions. + +_PS: If you get an "unrecognised selector sent to instance" runtime error, make sure that the project you want to link with `OHHTTPStubs` has the `-ObjC` flag in its "Other Linker Flags" (`OTHER_LDFLAGS`) build setting (this is normally the default in projects created in latest versions of Xcode). [See the Apple doc for more details](https://developer.apple.com/library/mac/qa/qa1490/_index.html)._ + +## About `OHHTTPStubs` Unit Tests + +If you want to be able to run `OHHTTPStubs`' Unit Tests, be sure you cloned the [`AFNetworking`](https://github.com/AFNetworking/AFNetworking/) submodule (by using the `--recursive` option when cloning your repo, or using `git submodule init` and `git submodule update`) as it is used by some of `OHHTTPStubs` unit tests. + +Every contribution to add more unit tests is welcome. ## Change Log The changelog is available [here in the dedicated wiki page](https://github.com/AliSoftware/OHHTTPStubs/wiki/ChangeLog). -## ARC Support - -This classes now support both ARC and non-ARC projects :) ## License and Credits -This project is brought to you by Olivier Halligon and is under MIT License - -It has been inspired by [this article from InfiniteLoop.dk](http://www.infinite-loop.dk/blog/2011/09/using-nsurlprotocol-for-injecting-test-data/) -_(See also his [GitHub repository](https://github.com/InfiniteLoopDK/ILTesting))_ +This project and library has been created by Olivier Halligon (@AliSoftware) and is under the MIT License. +It has been inspired by [this article from InfiniteLoop.dk](http://www.infinite-loop.dk/blog/2011/09/using-nsurlprotocol-for-injecting-test-data/). +I would also like to thank to @kcharwood for its contribution, and everyone who contributed to this project on GitHub. diff --git a/Pods/Pods-Acknowledgements.markdown b/Pods/Pods-Acknowledgements.markdown index d0194594..de6bb8bb 100644 --- a/Pods/Pods-Acknowledgements.markdown +++ b/Pods/Pods-Acknowledgements.markdown @@ -15,6 +15,29 @@ Redistribution and use in source and binary forms, with or without modification, THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +## ReactiveCocoa + +**Copyright (c) 2012 - 2013, GitHub, 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. + + ## SocketRocket diff --git a/Pods/Pods-Acknowledgements.plist b/Pods/Pods-Acknowledgements.plist index a1798f90..61e2a823 100644 --- a/Pods/Pods-Acknowledgements.plist +++ b/Pods/Pods-Acknowledgements.plist @@ -30,6 +30,33 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND Type PSGroupSpecifier + + FooterText + **Copyright (c) 2012 - 2013, GitHub, 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. + + Title + ReactiveCocoa + Type + PSGroupSpecifier + FooterText diff --git a/Pods/Pods-Reachability-Private.xcconfig b/Pods/Pods-Reachability-Private.xcconfig index 4cf70798..22021a26 100644 --- a/Pods/Pods-Reachability-Private.xcconfig +++ b/Pods/Pods-Reachability-Private.xcconfig @@ -1,5 +1,5 @@ #include "Pods-Reachability.xcconfig" GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/Reachability" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/SocketRocket" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/Reachability" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/ReactiveCocoa" "${PODS_ROOT}/Headers/ReactiveCocoa/ReactiveCocoa" "${PODS_ROOT}/Headers/SocketRocket" OTHER_LDFLAGS = -ObjC ${PODS_REACHABILITY_OTHER_LDFLAGS} PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/Pods/Pods-ReactiveCocoa-Private.xcconfig b/Pods/Pods-ReactiveCocoa-Private.xcconfig new file mode 100644 index 00000000..d3890997 --- /dev/null +++ b/Pods/Pods-ReactiveCocoa-Private.xcconfig @@ -0,0 +1,5 @@ +#include "Pods-ReactiveCocoa.xcconfig" +GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/ReactiveCocoa" "${PODS_ROOT}/BuildHeaders/ReactiveCocoa/ReactiveCocoa" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/ReactiveCocoa" "${PODS_ROOT}/Headers/ReactiveCocoa/ReactiveCocoa" "${PODS_ROOT}/Headers/SocketRocket" +OTHER_LDFLAGS = -ObjC +PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/Pods/Pods-ReactiveCocoa-dummy.m b/Pods/Pods-ReactiveCocoa-dummy.m new file mode 100644 index 00000000..3fd1bfdd --- /dev/null +++ b/Pods/Pods-ReactiveCocoa-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_ReactiveCocoa : NSObject +@end +@implementation PodsDummy_Pods_ReactiveCocoa +@end diff --git a/Pods/Pods-ReactiveCocoa-prefix.pch b/Pods/Pods-ReactiveCocoa-prefix.pch new file mode 100644 index 00000000..b522c18d --- /dev/null +++ b/Pods/Pods-ReactiveCocoa-prefix.pch @@ -0,0 +1,7 @@ +#ifdef __OBJC__ +#import +#endif + +#import "Pods-environment.h" + + diff --git a/Pods/Pods-ReactiveCocoa.xcconfig b/Pods/Pods-ReactiveCocoa.xcconfig new file mode 100644 index 00000000..e69de29b diff --git a/Pods/Pods-SocketRocket-Private.xcconfig b/Pods/Pods-SocketRocket-Private.xcconfig index 3e7a6658..794584af 100644 --- a/Pods/Pods-SocketRocket-Private.xcconfig +++ b/Pods/Pods-SocketRocket-Private.xcconfig @@ -1,5 +1,5 @@ #include "Pods-SocketRocket.xcconfig" GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/SocketRocket" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/SocketRocket" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/SocketRocket" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/ReactiveCocoa" "${PODS_ROOT}/Headers/ReactiveCocoa/ReactiveCocoa" "${PODS_ROOT}/Headers/SocketRocket" OTHER_LDFLAGS = -ObjC ${PODS_SOCKETROCKET_OTHER_LDFLAGS} PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/Pods/Pods-environment.h b/Pods/Pods-environment.h index fcbaac85..680a8091 100644 --- a/Pods/Pods-environment.h +++ b/Pods/Pods-environment.h @@ -9,12 +9,30 @@ // Reachability #define COCOAPODS_POD_AVAILABLE_Reachability #define COCOAPODS_VERSION_MAJOR_Reachability 3 -#define COCOAPODS_VERSION_MINOR_Reachability 0 -#define COCOAPODS_VERSION_PATCH_Reachability 0 +#define COCOAPODS_VERSION_MINOR_Reachability 1 +#define COCOAPODS_VERSION_PATCH_Reachability 1 + +// ReactiveCocoa +#define COCOAPODS_POD_AVAILABLE_ReactiveCocoa +#define COCOAPODS_VERSION_MAJOR_ReactiveCocoa 2 +#define COCOAPODS_VERSION_MINOR_ReactiveCocoa 1 +#define COCOAPODS_VERSION_PATCH_ReactiveCocoa 7 + +// ReactiveCocoa/Core +#define COCOAPODS_POD_AVAILABLE_ReactiveCocoa_Core +#define COCOAPODS_VERSION_MAJOR_ReactiveCocoa_Core 2 +#define COCOAPODS_VERSION_MINOR_ReactiveCocoa_Core 1 +#define COCOAPODS_VERSION_PATCH_ReactiveCocoa_Core 7 + +// ReactiveCocoa/no-arc +#define COCOAPODS_POD_AVAILABLE_ReactiveCocoa_no_arc +#define COCOAPODS_VERSION_MAJOR_ReactiveCocoa_no_arc 2 +#define COCOAPODS_VERSION_MINOR_ReactiveCocoa_no_arc 1 +#define COCOAPODS_VERSION_PATCH_ReactiveCocoa_no_arc 7 // SocketRocket #define COCOAPODS_POD_AVAILABLE_SocketRocket #define COCOAPODS_VERSION_MAJOR_SocketRocket 0 -#define COCOAPODS_VERSION_MINOR_SocketRocket 2 -#define COCOAPODS_VERSION_PATCH_SocketRocket 0 +#define COCOAPODS_VERSION_MINOR_SocketRocket 3 +#define COCOAPODS_VERSION_PATCH_SocketRocket 1 diff --git a/Pods/Pods-resources.sh b/Pods/Pods-resources.sh index aea76a61..6fff7a09 100755 --- a/Pods/Pods-resources.sh +++ b/Pods/Pods-resources.sh @@ -18,12 +18,22 @@ install_resource() *.framework) echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd" - xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd" + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcassets) + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" ;; *) echo "${PODS_ROOT}/$1" @@ -32,5 +42,27 @@ install_resource() esac } -rsync -avr --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rm "$RESOURCES_TO_COPY" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]]; then + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ `xcrun --find actool` ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Pods/Pods-specs-Acknowledgements.markdown b/Pods/Pods-specs-Acknowledgements.markdown index 3fa72ee0..ecd87cce 100644 --- a/Pods/Pods-specs-Acknowledgements.markdown +++ b/Pods/Pods-specs-Acknowledgements.markdown @@ -34,33 +34,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## OHHTTPStubs -/*********************************************************************************** - * - * Copyright (c) 2012 Olivier Halligon - * - * 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. - * - *********************************************************************************** - * - * Any comment or suggestion welcome. Referencing this project in your AboutBox is appreciated. - * Please tell me if you use this class so we can cross-reference our projects. - * - ***********************************************************************************/ - +- MIT LICENSE - + +Copyright (c) 2012 Olivier Halligon + +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. Generated by CocoaPods - http://cocoapods.org diff --git a/Pods/Pods-specs-Acknowledgements.plist b/Pods/Pods-specs-Acknowledgements.plist index 9eed1cd2..7f0294c1 100644 --- a/Pods/Pods-specs-Acknowledgements.plist +++ b/Pods/Pods-specs-Acknowledgements.plist @@ -49,35 +49,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. FooterText - /*********************************************************************************** - * - * Copyright (c) 2012 Olivier Halligon - * - * 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. - * - *********************************************************************************** - * - * Any comment or suggestion welcome. Referencing this project in your AboutBox is appreciated. - * Please tell me if you use this class so we can cross-reference our projects. - * - ***********************************************************************************/ - + - MIT LICENSE - + +Copyright (c) 2012 Olivier Halligon + +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. Title OHHTTPStubs Type diff --git a/Pods/Pods-specs-Kiwi-Private.xcconfig b/Pods/Pods-specs-Kiwi-Private.xcconfig index 8b7694ac..e80d6b8f 100644 --- a/Pods/Pods-specs-Kiwi-Private.xcconfig +++ b/Pods/Pods-specs-Kiwi-Private.xcconfig @@ -1,6 +1,6 @@ #include "Pods-specs-Kiwi.xcconfig" FRAMEWORK_SEARCH_PATHS = ${PODS_SPECS_KIWI_FRAMEWORK_SEARCH_PATHS} GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/Kiwi" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/SocketRocket" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/Kiwi" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/ReactiveCocoa" "${PODS_ROOT}/Headers/ReactiveCocoa/ReactiveCocoa" "${PODS_ROOT}/Headers/SocketRocket" OTHER_LDFLAGS = -ObjC ${PODS_SPECS_KIWI_OTHER_LDFLAGS} PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/Pods/Pods-specs-Kiwi-prefix.pch b/Pods/Pods-specs-Kiwi-prefix.pch index 86e1f1d0..48315b30 100644 --- a/Pods/Pods-specs-Kiwi-prefix.pch +++ b/Pods/Pods-specs-Kiwi-prefix.pch @@ -3,3 +3,8 @@ #endif #import "Pods-specs-environment.h" + + + +#import + diff --git a/Pods/Pods-specs-Kiwi.xcconfig b/Pods/Pods-specs-Kiwi.xcconfig index 21bb2b2d..072c0453 100644 --- a/Pods/Pods-specs-Kiwi.xcconfig +++ b/Pods/Pods-specs-Kiwi.xcconfig @@ -1,2 +1,2 @@ -PODS_SPECS_KIWI_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" +PODS_SPECS_KIWI_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" PODS_SPECS_KIWI_OTHER_LDFLAGS = -framework SenTestingKit \ No newline at end of file diff --git a/Pods/Pods-specs-OHHTTPStubs-Private.xcconfig b/Pods/Pods-specs-OHHTTPStubs-Private.xcconfig index d4e4f1c1..5918aa9b 100644 --- a/Pods/Pods-specs-OHHTTPStubs-Private.xcconfig +++ b/Pods/Pods-specs-OHHTTPStubs-Private.xcconfig @@ -1,5 +1,5 @@ #include "Pods-specs-OHHTTPStubs.xcconfig" GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/OHHTTPStubs" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/SocketRocket" -OTHER_LDFLAGS = -ObjC +HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/OHHTTPStubs" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/ReactiveCocoa" "${PODS_ROOT}/Headers/ReactiveCocoa/ReactiveCocoa" "${PODS_ROOT}/Headers/SocketRocket" +OTHER_LDFLAGS = -ObjC ${PODS_SPECS_OHHTTPSTUBS_OTHER_LDFLAGS} PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/Pods/Pods-specs-OHHTTPStubs.xcconfig b/Pods/Pods-specs-OHHTTPStubs.xcconfig index e69de29b..c33aafcf 100644 --- a/Pods/Pods-specs-OHHTTPStubs.xcconfig +++ b/Pods/Pods-specs-OHHTTPStubs.xcconfig @@ -0,0 +1 @@ +PODS_SPECS_OHHTTPSTUBS_OTHER_LDFLAGS = -framework CFNetwork -framework Foundation \ No newline at end of file diff --git a/Pods/Pods-specs-environment.h b/Pods/Pods-specs-environment.h index a9b47163..24a50a74 100644 --- a/Pods/Pods-specs-environment.h +++ b/Pods/Pods-specs-environment.h @@ -10,11 +10,29 @@ #define COCOAPODS_POD_AVAILABLE_Kiwi #define COCOAPODS_VERSION_MAJOR_Kiwi 2 #define COCOAPODS_VERSION_MINOR_Kiwi 2 -#define COCOAPODS_VERSION_PATCH_Kiwi 0 +#define COCOAPODS_VERSION_PATCH_Kiwi 3 + +// Kiwi/ARC +#define COCOAPODS_POD_AVAILABLE_Kiwi_ARC +#define COCOAPODS_VERSION_MAJOR_Kiwi_ARC 2 +#define COCOAPODS_VERSION_MINOR_Kiwi_ARC 2 +#define COCOAPODS_VERSION_PATCH_Kiwi_ARC 3 + +// Kiwi/NonARC +#define COCOAPODS_POD_AVAILABLE_Kiwi_NonARC +#define COCOAPODS_VERSION_MAJOR_Kiwi_NonARC 2 +#define COCOAPODS_VERSION_MINOR_Kiwi_NonARC 2 +#define COCOAPODS_VERSION_PATCH_Kiwi_NonARC 3 + +// Kiwi/SenTestingKit +#define COCOAPODS_POD_AVAILABLE_Kiwi_SenTestingKit +#define COCOAPODS_VERSION_MAJOR_Kiwi_SenTestingKit 2 +#define COCOAPODS_VERSION_MINOR_Kiwi_SenTestingKit 2 +#define COCOAPODS_VERSION_PATCH_Kiwi_SenTestingKit 3 // OHHTTPStubs #define COCOAPODS_POD_AVAILABLE_OHHTTPStubs -#define COCOAPODS_VERSION_MAJOR_OHHTTPStubs 1 +#define COCOAPODS_VERSION_MAJOR_OHHTTPStubs 3 #define COCOAPODS_VERSION_MINOR_OHHTTPStubs 0 -#define COCOAPODS_VERSION_PATCH_OHHTTPStubs 1 +#define COCOAPODS_VERSION_PATCH_OHHTTPStubs 2 diff --git a/Pods/Pods-specs-resources.sh b/Pods/Pods-specs-resources.sh index aea76a61..6fff7a09 100755 --- a/Pods/Pods-specs-resources.sh +++ b/Pods/Pods-specs-resources.sh @@ -18,12 +18,22 @@ install_resource() *.framework) echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd" - xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd" + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcassets) + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" ;; *) echo "${PODS_ROOT}/$1" @@ -32,5 +42,27 @@ install_resource() esac } -rsync -avr --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rm "$RESOURCES_TO_COPY" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]]; then + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ `xcrun --find actool` ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Pods/Pods-specs.xcconfig b/Pods/Pods-specs.xcconfig index c0de6fd6..24b3cb1d 100644 --- a/Pods/Pods-specs.xcconfig +++ b/Pods/Pods-specs.xcconfig @@ -1,5 +1,5 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/SocketRocket" -OTHER_LDFLAGS = -ObjC -framework SenTestingKit +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/ReactiveCocoa" "${PODS_ROOT}/Headers/ReactiveCocoa/ReactiveCocoa" "${PODS_ROOT}/Headers/SocketRocket" +OTHER_LDFLAGS = -ObjC -framework CFNetwork -framework Foundation -framework SenTestingKit PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Pods/Pods.xcconfig b/Pods/Pods.xcconfig index bf86a1f2..f9451faf 100644 --- a/Pods/Pods.xcconfig +++ b/Pods/Pods.xcconfig @@ -1,4 +1,4 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/SocketRocket" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Kiwi" "${PODS_ROOT}/Headers/OHHTTPStubs" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/ReactiveCocoa" "${PODS_ROOT}/Headers/ReactiveCocoa/ReactiveCocoa" "${PODS_ROOT}/Headers/SocketRocket" OTHER_LDFLAGS = -ObjC -framework CFNetwork -framework Security -framework SystemConfiguration PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 6db96425..9b90e65b 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -10,77 +10,68 @@ 46 objects - 000DDA3F36E84183865E25F4 + 001110B074434775B84ED439 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWChangeMatcher.h + KWMatchVerifier.m path - Kiwi/Classes/KWChangeMatcher.h + Classes/Verifiers/KWMatchVerifier.m sourceTree - SOURCE_ROOT - - 007D6A8BFFE2401D99D28963 - - fileRef - AA639AD4F034426E9C6EE8B1 - isa - PBXBuildFile + <group> - 009B87A4517C4E49B32C3249 + 0055A83E07D14041AE45B2BB fileRef - 9668979FBD5541529C3EBFA2 + 21E7417DB8F143F7A1006EE5 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 015E5FADC4864E31ACA24197 + 00671B4BAA674E28B3C8BEFD fileRef - 625877F642B546C98332C80B + 4202A025FB504B2080FDB200 isa PBXBuildFile - 01B51F5183B044EE9026444D + 00764906F5F64FCEA97D8F3F - children - - A172D07E069B4F009901DD4C - 3B78E950BD1846148855AF6A - 216AD05FC2104E778C169485 - CE244AEA34B74D4DA111CDDA - + includeInIndex + 1 isa - PBXGroup + PBXFileReference + lastKnownFileType + sourcecode.c.objc name - Pods-specs-OHHTTPStubs + RACSubscriptingAssignmentTrampoline.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.m sourceTree <group> - 0201529585604419A1AE4E4D + 0108B389FC3A496EAB339512 - children - - 3662B2F395594173B059E575 - A11D0D681B3E408E8D609BAC - 30F560384FFF4C8D8F3D33A1 - 01B51F5183B044EE9026444D - 721DBBD9444D490682A6BABB - F27CFE22D0F54FA0957FC054 - + fileRef + 117E34432E834A7A9B6BE929 isa - PBXGroup - name - Targets Support Files - sourceTree - <group> + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 0225821FFE7D4E9EA2258D18 + 013387781B774D4A8F8A3830 includeInIndex 1 @@ -89,42 +80,52 @@ lastKnownFileType sourcecode.c.h name - KWStringUtilities.h + KWExampleSuiteBuilder.h path - Kiwi/Classes/KWStringUtilities.h + Classes/Core/KWExampleSuiteBuilder.h sourceTree - SOURCE_ROOT + <group> - 022EE64F38224E26B5DC5F1E + 017F2DA54A454F92A2FFE32C - fileRef - 35207C7EBAC74DBCA4BC4B3B + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACBlockTrampoline.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACBlockTrampoline.m + sourceTree + <group> - 03BA55ECD1FB466E9E987E1E + 01A6CF0BE9CE4225B0BCE8E7 fileRef - A3FA974DD32E44B7A9F4E41A + 54FB59A210304509AF38DFD2 isa PBXBuildFile - 047C16E20F244D8AB1266662 + 01B1BCADA8044C8D9BA96B10 - includeInIndex - 1 + children + + 9B7761DB44FC48D78719A426 + 5EFCC5EDB86B44A480BEFA00 + 70E5A1D5748146308E5E61B5 + 545DAC4C99624D208096CD6A + DF370EF81F814D8194EBC387 + isa - PBXFileReference - lastKnownFileType - sourcecode.c.h + PBXGroup name - KWRaiseMatcher.h - path - Kiwi/Classes/KWRaiseMatcher.h + iOS sourceTree - SOURCE_ROOT + <group> - 055FC09FA8354B4B8F426304 + 0231221FB2D2451DB84605B0 includeInIndex 1 @@ -133,20 +134,71 @@ lastKnownFileType sourcecode.c.objc name - OHHTTPStubsResponse.m + KWInvocationCapturer.m path - OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.m + Classes/Core/KWInvocationCapturer.m sourceTree - SOURCE_ROOT + <group> - 072AA58ED0364347AC68B566 + 02EF24FACE5B4682BD42A8C2 - fileRef - C4261EBEA1EC4D45B866B139 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + NO + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES_ERROR + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES_ERROR + COPY_PHASE_STRIP + NO + ENABLE_NS_ASSERTIONS + NO + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES_ERROR + GCC_WARN_UNDECLARED_SELECTOR + YES + GCC_WARN_UNINITIALIZED_AUTOS + YES + GCC_WARN_UNUSED_FUNCTION + YES + GCC_WARN_UNUSED_VARIABLE + YES + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + STRIP_INSTALLED_PRODUCT + NO + VALIDATE_PRODUCT + YES + isa - PBXBuildFile + XCBuildConfiguration + name + Release - 072ADA10D5A04A799A4785E8 + 03B46DD9773C40AAA1E2FB11 includeInIndex 1 @@ -155,198 +207,167 @@ lastKnownFileType sourcecode.c.objc name - KWExampleSuite.m + RACEXTRuntimeExtensions.m path - Kiwi/Classes/KWExampleSuite.m + ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTRuntimeExtensions.m sourceTree - SOURCE_ROOT + <group> - 07473608A64F4403B0C0A66F + 03F0A3EA98BA4F0BB6C14D50 includeInIndex 1 isa PBXFileReference lastKnownFileType - text + sourcecode.c.h + name + KWExampleSuite.h path - Pods-specs-acknowledgements.markdown + Classes/Core/KWExampleSuite.h sourceTree - SOURCE_ROOT + <group> - 07475DD20A27462DB72313F2 + 044D8A6FDF734B5BADAA66F1 fileRef - DA6C7EF21E1147E496C92DFE + 505E201B15B3426787D333E1 isa PBXBuildFile - 07758B687044417B88378C7A + 047F781532644D2690D1D276 includeInIndex 1 isa PBXFileReference lastKnownFileType - text + sourcecode.c.h name - Podfile + UIActionSheet+RACSignalSupport.h path - ../Podfile + ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.h sourceTree - SOURCE_ROOT - xcLanguageSpecificationIdentifier - xcode.lang.ruby + <group> - 0777BA3BB9584122ACE4EE63 + 04F529DF36314AD3BA6D7EC2 - attributes - - LastUpgradeCheck - 0450 - - buildConfigurationList - 1DE8CF6EAF6E4A38984CF003 - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 - isa - PBXProject - knownRegions - - en - - mainGroup - E05A1DAF02EC4B9694DF2D74 - productRefGroup - 9F597748B21C42CEBCD46279 - projectDirPath - - projectReferences - - projectRoot - - targets + buildActionMask + 2147483647 + files - 81CAD16CBB3143C8A5F918C4 - 99E902D1C70F44B3920567BD - F0531BAE563D403FBDFF4C89 - EF4179F378294E3EB69819FE - 7328A4F9C6374686A27D248B - 72A00082A6D7484B918AFF7E + CEA8B212853A4BFDBF8FF737 - - 082CB756DEA34ABD8D511FD6 - - fileRef - 372F2CC1B1924FBFAA93CAA4 isa - PBXBuildFile - - 08841FEE42C14F07A9BFC795 - - fileRef - BB621ACD7F9B4D88BD0A527C - isa - PBXBuildFile + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 - 093B6E83497241BAA4703A0F + 04FFF191057D4BEAB06D51C9 - fileRef - 17E42ACDDB8A4492A9261BB9 + containerPortal + EFBB6CF77B5E4364844354C4 isa - PBXBuildFile + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + EE9D25436D914DA8A870DEF3 + remoteInfo + Pods-Reachability - 093D16518B924407BD3133F0 + 050907F549CB446B9BFD60C8 - fileRef - 1551310F7A704937B885F16F + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-specs-OHHTTPStubs-dummy.m + sourceTree + <group> - 0953C0DFE8EF41078ADEEF85 + 05A6E6823E154437A53EA6FC includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - KWMessageSpying.h + text.xcconfig path - Kiwi/Classes/KWMessageSpying.h + Pods-ReactiveCocoa.xcconfig sourceTree - SOURCE_ROOT + <group> - 09665D148E40438094738FF5 + 061C02F2CDBB455F8ECC6BFC fileRef - 2AC39C6B7E8641359DA97E9D + 3B9947D8C69D4671A48508EA isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 0993C03064C746EBB66DBB7F + 068ECD2563AE44D683417EE9 fileRef - 0A368F1853344363A10993F6 + 0A5038F72EA747EE87C2940F isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 0A283EFDEC2647D3BD04048E + 06A91B5C38E64907B50FEDB0 - includeInIndex - 1 + fileRef + 2F0E6C9C1BC4436492B6497B isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - Pods-acknowledgements.plist - sourceTree - SOURCE_ROOT + PBXBuildFile - 0A368F1853344363A10993F6 + 06FD32D8A8BE4A37BDE37DF0 - includeInIndex - 1 + fileRef + D173B55A211A49DCBE731092 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - KWTestCase.h - path - Kiwi/Classes/KWTestCase.h - sourceTree - SOURCE_ROOT + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 0BE63869164546C3BF6343DA + 0707DBE7F2DC45B4AB298CC4 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWStub.m + RACDynamicSignal.h path - Kiwi/Classes/KWStub.m + ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSignal.h sourceTree - SOURCE_ROOT + <group> - 0C3B4B22FAB643B78F0FAD99 + 073CD62202854060BC700F3B fileRef - 6DFD3697CDB14D9D9E3F54F2 + 52919260BB304A3BAFEBA71B isa PBXBuildFile - 0E80DAE469F348FCB7949B7D + 07A8C0F20FDE44DD9FB880D4 includeInIndex 1 @@ -355,13 +376,13 @@ lastKnownFileType sourcecode.c.h name - KWConformToProtocolMatcher.h + RACStream+Private.h path - Kiwi/Classes/KWConformToProtocolMatcher.h + ReactiveCocoaFramework/ReactiveCocoa/RACStream+Private.h sourceTree - SOURCE_ROOT + <group> - 0F79CA43B2F94A46A6805A04 + 07C46633DE374EBE9CFB823B includeInIndex 1 @@ -370,88 +391,140 @@ lastKnownFileType sourcecode.c.h name - KWVerifying.h + KWAfterAllNode.h path - Kiwi/Classes/KWVerifying.h + Classes/Nodes/KWAfterAllNode.h sourceTree - SOURCE_ROOT + <group> - 0FE5CCFA975C4BCBA37997AC + 0819430E4ACE487894D72178 fileRef - 41FE594754274C6089C37232 + 7C2BF410800D4277894EEDE4 isa PBXBuildFile - 10AD640DF35848B3BCEE71B2 + 084C4B4425614D649A7A448A - explicitFileType - archive.ar includeInIndex - 0 + 1 isa PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWBeMemberOfClassMatcher.m path - libPods-SocketRocket.a + Classes/Matchers/KWBeMemberOfClassMatcher.m sourceTree - BUILT_PRODUCTS_DIR + <group> - 116B26F2EEED45BA80995927 + 085F765FFA054737AA7B9B45 + baseConfigurationReference + 6054647399BA48F6AAEF24D1 buildSettings - IPHONEOS_DEPLOYMENT_TARGET - 4.0 - - isa - XCBuildConfiguration - name - Debug - - 11F5DCEBEBB740B6A69A0315 - - containerPortal - 0777BA3BB9584122ACE4EE63 - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - EF4179F378294E3EB69819FE - remoteInfo - Pods-specs-OHHTTPStubs + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-SocketRocket-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 09C48A7D56C24E0D98F8A6ED + + fileRef + A59DD3EDED7D42AF85B0463A + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 09D3CE6DDCE44C8FADDA812B + + fileRef + 89764E4D684246AA884CB820 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 1261D92AF3944E9AA65E74D1 + 0A5038F72EA747EE87C2940F includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWMatching.h + NSObject+RACKVOWrapper.m path - Kiwi/Classes/KWMatching.h + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACKVOWrapper.m sourceTree - SOURCE_ROOT + <group> - 131420174C014CC0A4B8AED3 + 0A57737D13F54EABBFE70131 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWBeEmptyMatcher.h + RACKVOTrampoline.m path - Kiwi/Classes/KWBeEmptyMatcher.h + ReactiveCocoaFramework/ReactiveCocoa/RACKVOTrampoline.m sourceTree - SOURCE_ROOT + <group> - 1330BF11130A4651A84CC162 + 0AE6530FB0B249739CA58D7F includeInIndex 1 @@ -459,63 +532,57 @@ PBXFileReference lastKnownFileType sourcecode.c.h - name - NSObject+KiwiVerifierAdditions.h path - Kiwi/Classes/NSObject+KiwiVerifierAdditions.h + Pods-specs-environment.h sourceTree - SOURCE_ROOT + <group> - 13BD9A952DCD468F8FB57F37 + 0AF66032E901412499D5F669 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.script.sh + sourcecode.c.h + name + KWBlock.h path - Pods-specs-resources.sh + Classes/Core/KWBlock.h sourceTree - SOURCE_ROOT - - 142FA58830D64CE39FEF40B2 - - fileRef - A8E1F029C40A4982AACF3060 - isa - PBXBuildFile - - 1443E13311B7461DA5208F46 - - fileRef - B7EA61D0925D4F0C832E4BF5 - isa - PBXBuildFile + <group> - 14727A6326874E8DB1C4C3F9 + 0B80E39001B44E839ADB0AE4 - fileRef - 5299D1CAD5EA4887A25CBABD + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACValueTransformer.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACValueTransformer.m + sourceTree + <group> - 150431BFC8FB4FFB98309725 + 0BA5C0513D034723A8DE6BCB includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWStringPrefixMatcher.h + KWBeTrueMatcher.m path - Kiwi/Classes/KWStringPrefixMatcher.h + Classes/Matchers/KWBeTrueMatcher.m sourceTree - SOURCE_ROOT + <group> - 154A27ABE58A45078F4BA286 + 0C0A99E528204471BD353A24 includeInIndex 1 @@ -524,13 +591,32 @@ lastKnownFileType sourcecode.c.objc name - KWFormatter.m + RACSignal.m path - Kiwi/Classes/KWFormatter.m + ReactiveCocoaFramework/ReactiveCocoa/RACSignal.m sourceTree - SOURCE_ROOT + <group> + + 0CC01CF9DAA648DB9F26D902 + + fileRef + 18606E42CCD34267BDE377A6 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 0D7274B3B43D4B298A4CEF8F + + fileRef + 9EC7492FE9004747A9D407CD + isa + PBXBuildFile - 1551310F7A704937B885F16F + 0D80D1BC092C484499F83E81 includeInIndex 1 @@ -539,241 +625,66 @@ lastKnownFileType sourcecode.c.h name - KWBeMemberOfClassMatcher.h + KWStub.h path - Kiwi/Classes/KWBeMemberOfClassMatcher.h + NonARC/KWStub.h sourceTree - SOURCE_ROOT + <group> - 157DAB4FD18342D4A25B8319 + 0DDB21898E294DA385BFB66F + fileRef + 4778B249EB2C4F2E94CFC1A2 isa - PBXTargetDependency - target - F0531BAE563D403FBDFF4C89 - targetProxy - 627008D0168B424291561EEC + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 1581FACD930B4176B4F756A6 + 0DF689F3CACB405E9CE08987 fileRef - E9ADDCFD2F8241DEAE01C976 + A5E248EB379E40439351ECBB isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 15CD267206AF4CF192761CCD + 0E0BA6EEA3444DB197EC51D7 - children - - 5EF065DD59E74924B9AB2E12 - 9C646E20509B411E8D96AEF8 - 756B1D81A44742FFB148E500 - DF8B54EC0E37483AA313BA61 - BD068C43ED654803B8C71995 - A956CB0270644E06904CEBEA - 9811CCF5FA8F4E8C8521EF3F - BB472D7A2DAF4FADAF4FF338 - BC26577D7F904EEF82B048FF - E1BE3EA864234FCC8E7A943E - 6DFD3697CDB14D9D9E3F54F2 - 28376C62F15841FC890EF7F5 - 7A6D92B774934142B6B52E4D - 41FE594754274C6089C37232 - 131420174C014CC0A4B8AED3 - A0C10AE3E81641F28D8FD401 - F05F8DD51A4049A5A374D3E4 - B84A670C25984F7E84EACE3E - 9201585E06B3403C9088447C - F373E1A09E4D4380AA2F5299 - CC5D0C2202FF42BA946660A4 - 8BFB505CDDE24299A1CDBB9F - 6D6C57593C5D437180DC9761 - 939578CAFC8942C2929F3F8C - 1551310F7A704937B885F16F - 5CC394709A934094B0826155 - 8D775504D1CB4769B5F08C04 - 340DF864C1BA4D1EABD936C6 - 8135B9B2F08041FA895A4ED7 - 8E8263928C3B4EBFB09597A6 - DE961CA58FD34E38BD574C33 - 8704BD946CE240C6ACE9CA77 - FC28FBB6542E431491C4A04A - CCAE54C648E04C549E1C1A25 - BE00DE7B32B243A682DDC187 - 42C41A69205E4B2287F16A35 - D17EA38DAB1A4F5098CC2DB0 - 348FFF89C3804BFF98B8640F - 4C70122DFE714497B15FA06F - 7DB4003828D5461B9567DED4 - FB99E112F42B4458A7428CE1 - B5DCCFEA33B048EE8D8816F7 - FEEF61ADDFA143C1A495C880 - 2AC39C6B7E8641359DA97E9D - 88929517815B43D49DFF4362 - 54A6AA3195DF44A9A3DF84FD - 8DBB0F91D01B43AD8C733B2B - 76708E4DABB948E7AD41EC5F - 000DDA3F36E84183865E25F4 - 7A1B44FC71AB4D22A19B6261 - 0E80DAE469F348FCB7949B7D - 9668979FBD5541529C3EBFA2 - C61546A3B30A49959059B7D1 - 8BDE2EBCCBF2417B964841D2 - ABB202FBAD074E109CF71566 - C4331BC551114FD2A5514EB1 - A8E1F029C40A4982AACF3060 - B47BA84054CC4E8C8029DD6F - E9F4040FDC9D40A8B360155D - 75D28F5682DA477796457451 - 52FF9AB870254C3A93AFDFDE - D669F81889054783B93FF400 - C587E4E28E77450E8D32A39A - E638C7BCD02B42149D574241 - 5B8BFCFE37B34B1A884613DF - 6CD7AD6A46CD42A3971E8F97 - A1530E7E8B9040B1B0EFE966 - C3AB70CB973646BAA866BADA - E9ADDCFD2F8241DEAE01C976 - 35207C7EBAC74DBCA4BC4B3B - 7C5886BA6BAA43AD96409043 - 072ADA10D5A04A799A4785E8 - C4261EBEA1EC4D45B866B139 - DEE08E213E904196BEBF63D7 - 5AD0D48F3789483095D5B16B - A1005BAE4B444499834A84BC - 7D9BFDB69EE049EAA02857C8 - 8B753A6C511E40CE84466C07 - 154A27ABE58A45078F4BA286 - EF292CE4724A422BA82C59B0 - 689219963D094039A58E4F7D - 972144E67837407D8240156C - BB621ACD7F9B4D88BD0A527C - 585EB411E8D14F08845B7C34 - 1836A8E7BB3340D1BEC5A659 - 437DAE2ADC694F249B4A818D - 223A1477DF814A05BB730288 - 41F87030F0624DC0B6A732E0 - 6F110B5114A54AA18DBA1F34 - D2140D56BD334E97B6829FC2 - F8BA36D5DCA14B05B8A62544 - 7E25B55285944F2E851E5827 - 2F60E112C3054655B705B2B7 - 575696B34CB24CE999EC340B - 51F0BE639B794FCE8FD932D8 - 47A030E9480940B7896ACBF8 - 1807592351294E42A94014DC - CC3A4C06B2B34AA58BCD8A6A - E7C504DF53524583AA9E8BEF - A3FA974DD32E44B7A9F4E41A - 5299D1CAD5EA4887A25CBABD - B9FE69D9E11C46998AC60AD7 - ED0883BBB05E49E0B2A79C2A - DC2FB9B0E1464FFCAE04D560 - E5918B17FBEF460AADB6F368 - 1261D92AF3944E9AA65E74D1 - EC732E0F175643EE9CCF1ED0 - 33AB4314EB6649A5884333EE - 7CE16008961B46459A91E027 - 59B54FF0DA71484C8F6ACB63 - 0953C0DFE8EF41078ADEEF85 - 5F04555A9DD54A4BA34EDCA6 - 4EC3CD1D81334E07A8A80982 - 17E42ACDDB8A4492A9261BB9 - 16A37C918B734529B369D4C6 - 7922598B24B74704B7EA958E - 27FA6CEB9CD243698A4145AC - 99F76629663940968AF23B8A - 800EFA74AB034A05A5B1AFCC - 53741485212040759799F234 - 491F3A30336742C09363FFFB - C37C48B8EA1E4F679BD0D967 - F30C2226942540408C5925FF - 3B9AECF466C745E7BB285457 - 047C16E20F244D8AB1266662 - DE3AF2C0ECE74478AE372972 - AA639AD4F034426E9C6EE8B1 - F5E81EADB49145A3AE70159D - 240B65CBB16B437FB2024905 - 65AF4B9115714C2AA5CF7DEF - 5E6FAEC9EA9442EAB40239E2 - BF113F4C8D274B2BADE3D699 - BF4F4E14A843446C85BAA992 - F0E2D6994CE748838FE6E07C - 81D313EE3E944E37B3AB3788 - 28D2C822EA74468D9FBF05CA - D7A606855D71448889BA62E8 - 5C9D83F9D8F140EA8B5C47DC - 310BE70F66F64D9DA731F0E3 - 150431BFC8FB4FFB98309725 - D0C72B06C9244DA9931D5344 - 0225821FFE7D4E9EA2258D18 - 9444A72A6A6041E8B70A9767 - AEDA40E015A94B7F9048ED5D - 0BE63869164546C3BF6343DA - 3080884C6C994C5B8835C3ED - 8ED87155D0E546AD8A384DC0 - 0A368F1853344363A10993F6 - 64DB77C0D1CD4367A08FCDDF - E12AE8C526574ECB927D3427 - 3BAE8CEA85634EB6B263A2B8 - 3AFF981E900D47C1B5E326A5 - 7D552DF2DCE5463CADE3D029 - 0F79CA43B2F94A46A6805A04 - 372F2CC1B1924FBFAA93CAA4 - 9676AEE801844D989D68B708 - ABA4519A10C240A992DFF2DE - D4824E5076DD49D6BB3D0985 - 1966C10EA41E45A383BF2968 - 388E29A4E8A248779E285A6F - 5B62C400020A49C0A3A9C3BC - 291CE5E8A70B4984B3F12934 - 845055AF292B45CC8337AD2C - 184561A9A12749ADB6FB96D3 - 2F2F660DFD54463BA9D9A7BF - D6BE811CAAA440A3842014B6 - 9FE5A4C83F224D4AB067DB45 - 2D8DF795D01E4B14B9B183D8 - DE4AAF571A1D40AD82280B3C - 42D8482887C2468FB2456054 - 1330BF11130A4651A84CC162 - 3FB98F70960B4B55A1C528C1 - 7E6D4807392D4006BEF41075 - 7E20F49EDDA34EF48787B3F1 - CBD79DD7CAB9404F836550E6 - 1606192A39B44155BE8B14AA - B7EA61D0925D4F0C832E4BF5 - DA6C7EF21E1147E496C92DFE - + fileRef + A241D33728AD4094907B1422 isa - PBXGroup - name - Kiwi - sourceTree - <group> + PBXBuildFile + + 0F2996306F364EDD8EF9E93B + + fileRef + E0374AB84A8742499DE195F6 + isa + PBXBuildFile - 1606192A39B44155BE8B14AA + 0F731461CA5D4CBF834C5BB0 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - NSValue+KiwiAdditions.m + KWExpectationType.h path - Kiwi/Classes/NSValue+KiwiAdditions.m + Classes/Core/KWExpectationType.h sourceTree - SOURCE_ROOT - - 166F039443B2431AAFEFBEB4 - - fileRef - 99F76629663940968AF23B8A - isa - PBXBuildFile + <group> - 16A37C918B734529B369D4C6 + 0F7A0FE389D1420B9AEEC1AC includeInIndex 1 @@ -782,13 +693,13 @@ lastKnownFileType sourcecode.c.objc name - KWMock.m + RACDisposable.m path - Kiwi/Classes/KWMock.m + ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.m sourceTree - SOURCE_ROOT + <group> - 17E42ACDDB8A4492A9261BB9 + 1026BF25FBA9440489696ACC includeInIndex 1 @@ -797,57 +708,43 @@ lastKnownFileType sourcecode.c.h name - KWMock.h + NSObject+RACDeallocating.h path - Kiwi/Classes/KWMock.h + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDeallocating.h sourceTree - SOURCE_ROOT - - 17EBC0A278B84C06972CEC86 - - fileRef - 6CD7AD6A46CD42A3971E8F97 - isa - PBXBuildFile + <group> - 1807592351294E42A94014DC + 105E2373D3964737A3A4A9D2 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWInvocationCapturer.m + RACEXTScope.h path - Kiwi/Classes/KWInvocationCapturer.m + ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTScope.h sourceTree - SOURCE_ROOT - - 18155CF64FBB467C8B0B7A77 - - fileRef - 5AD0D48F3789483095D5B16B - isa - PBXBuildFile + <group> - 1836A8E7BB3340D1BEC5A659 + 10658E9212EC49EE9541292E includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWGenericMatchEvaluator.m + KWStringPrefixMatcher.h path - Kiwi/Classes/KWGenericMatchEvaluator.m + Classes/Matchers/KWStringPrefixMatcher.h sourceTree - SOURCE_ROOT + <group> - 184561A9A12749ADB6FB96D3 + 10A312D8D3D24F9194782966 includeInIndex 1 @@ -856,222 +753,4633 @@ lastKnownFileType sourcecode.c.objc name - NSNumber+KiwiAdditions.m + OHHTTPStubs.m path - Kiwi/Classes/NSNumber+KiwiAdditions.m + OHHTTPStubs/Sources/OHHTTPStubs.m sourceTree - SOURCE_ROOT + <group> - 1875CF990A3D4041BB0F8CCA + 115F6BCA46A147928C3A5A3B fileRef - DE961CA58FD34E38BD574C33 + 659A889723E143CB846D3260 isa PBXBuildFile - 190D54C881E449CD89D8261A + 11619C2C7EE442FDAAB31CE3 - fileRef - 291CE5E8A70B4984B3F12934 + buildConfigurations + + 3A95202EFC6A42A994F762AC + BDBB0685D96F45E48003E3D2 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release isa - PBXBuildFile + XCConfigurationList - 1966C10EA41E45A383BF2968 + 117E34432E834A7A9B6BE929 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - NSInvocation+OCMAdditions.h + NSString+RACSequenceAdditions.m path - Kiwi/Classes/NSInvocation+OCMAdditions.h + ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSequenceAdditions.m sourceTree - SOURCE_ROOT + <group> - 19A74633E98849F8B7BEA7FC + 1196D82E7B67427AAAF2ACAE - explicitFileType - archive.ar includeInIndex - 0 + 1 isa PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWExistVerifier.m path - libPods-specs.a + Classes/Verifiers/KWExistVerifier.m sourceTree - BUILT_PRODUCTS_DIR + <group> - 1ACE630F671D49D3BAE64306 + 11F49CCB2D4C46F1ADF832F9 fileRef - F05F8DD51A4049A5A374D3E4 + 6A3FC4F985AD48E5AC6033A9 isa PBXBuildFile - 1B204C7016914DAB98C1018A + 120F641F4A6D4A21A66FE422 - includeInIndex - 1 + children + + BB8D8567FB584B2EABEEE291 + 3B1DDD364B68465A8D6BEB08 + 9BDE5E0F5477446D88E0A92C + 939A66B594494711AC59AF99 + 1B1E2BE0D9C142F8A0EDC3C9 + 6AB2D511606C49749280946E + 8096CEE89625406A987BAFA2 + isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods-Reachability-Private.xcconfig + PBXGroup + name + Products sourceTree - SOURCE_ROOT + <group> - 1B5653014A834720B72E3B9B + 122F059AD9DA4D848CA50B7B fileRef - 585EB411E8D14F08845B7C34 + 1BF788A36B514856915126FC isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 1BCA763A0617449EAFD95D51 + 125D69B38DD84DD6B8A96218 fileRef - 969FDD6021AA4DB8B4BBFDFA + 8BE6140DD8444485BA6359E9 isa PBXBuildFile settings COMPILER_FLAGS - -fobjc-arc -DOS_OBJECT_USE_OBJC=0 + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker - 1BF533EDF5034020B7603334 + 129782B5D2AF45FB800DCBD9 - includeInIndex - 1 + fileRef + 617E3068F2BA46B98A64CFAC isa - PBXFileReference - lastKnownFileType - wrapper.framework + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 12DD7C8DAAEA4A07A6F4510F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc name - Security.framework + KWChangeMatcher.m path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/Security.framework + Classes/Matchers/KWChangeMatcher.m sourceTree - DEVELOPER_DIR + <group> + + 133B0B4DFD2D4EAB8E99AF59 + + fileRef + C5CC7B53FA4C4FC387AD5C03 + isa + PBXBuildFile + + 1410D58BDF2C4E81ACD4DD26 + + fileRef + 084C4B4425614D649A7A448A + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 1C99083A2B7B43B09B7F8D97 + 146C2411FD1940109B8FCFBD includeInIndex 1 isa PBXFileReference lastKnownFileType - wrapper.framework + sourcecode.c.objc name - SenTestingKit.framework + RACScopedDisposable.m path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/SenTestingKit.framework + ReactiveCocoaFramework/ReactiveCocoa/RACScopedDisposable.m sourceTree - DEVELOPER_DIR + <group> - 1D987852AAF1403CBE5A315B + 147BA0232404429BB09484EF fileRef - 9811CCF5FA8F4E8C8521EF3F + 4C7AC52E435844C9BCE60AB7 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 1DE8CF6EAF6E4A38984CF003 + 1480529E3E834DD3AD07EB7E - buildConfigurations + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWGenericMatchEvaluator.m + path + Classes/Matchers/KWGenericMatchEvaluator.m + sourceTree + <group> + + 14B065C3C34343EFB82B5D0A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UITableViewCell+RACSignalSupport.m + path + ReactiveCocoaFramework/ReactiveCocoa/UITableViewCell+RACSignalSupport.m + sourceTree + <group> + + 14D9E65BFEEE42C7B9FE4FC5 + + fileRef + 332822F707CA42149E05002B + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 155E58D0958249FFB7C4630B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACEmptySignal.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACEmptySignal.m + sourceTree + <group> + + 15A359E7D4AF402D99E6EC37 + + buildConfigurationList + 11619C2C7EE442FDAAB31CE3 + buildPhases - DA2BB1A3C062453A9E7BF2A3 - 116B26F2EEED45BA80995927 + D10517F73BDB4548879E0310 + E4A86397D2274FAAA505C7B2 + CF8E3EAADFE142B1841283C7 - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release + buildRules + + dependencies + isa - XCConfigurationList + PBXNativeTarget + name + Pods-specs-OHHTTPStubs + productName + Pods-specs-OHHTTPStubs + productReference + 8096CEE89625406A987BAFA2 + productType + com.apple.product-type.library.static - 1DFB09B3CD914E0DA2B145B5 + 15C7D5AD0F934960A85BF5C3 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWMessageTracker.m + path + Classes/Core/KWMessageTracker.m + sourceTree + <group> + + 16025CDB86A743E0BFF80B49 + + fileRef + C1BEF9F7291847B887252E58 + isa + PBXBuildFile + + 164128EE9F234876B3B78C37 + + fileRef + 5C79F2D07B8849018C2F72D2 + isa + PBXBuildFile + + 165BC2F4DAEE491AB3A77F83 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWChangeMatcher.h + path + Classes/Matchers/KWChangeMatcher.h + sourceTree + <group> + + 1669929DFE114010B523AA40 - baseConfigurationReference - 65971647E977429D9AA5A4AE buildSettings ALWAYS_SEARCH_USER_PATHS NO - ARCHS - armv6 armv7 + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + NO + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES_ERROR + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES_ERROR COPY_PHASE_STRIP YES - DSTROOT - /tmp/xcodeproj.dst GCC_C_LANGUAGE_STANDARD gnu99 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 4.0 - OTHER_CFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_CPLUSPLUSFLAGS + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PREPROCESSOR_DEFINITIONS - -DNS_BLOCK_ASSERTIONS=1 + DEBUG=1 $(inherited) - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_WARN_64_TO_32_BIT_CONVERSION YES - VALIDATE_PRODUCT + GCC_WARN_ABOUT_RETURN_TYPE + YES_ERROR + GCC_WARN_UNDECLARED_SELECTOR + YES + GCC_WARN_UNINITIALIZED_AUTOS + YES + GCC_WARN_UNUSED_FUNCTION + YES + GCC_WARN_UNUSED_VARIABLE YES + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + ONLY_ACTIVE_ARCH + YES + STRIP_INSTALLED_PRODUCT + NO isa XCBuildConfiguration name - Release + Debug - 1E8713996E3F49BAB251B7EB + 16EFACA5F7FA4B478D979016 - baseConfigurationReference - 1B204C7016914DAB98C1018A - buildSettings + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACEmptySequence.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACEmptySequence.h + sourceTree + <group> + + 1767930D256148A8B1775896 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSObject+KiwiVerifierAdditions.h + path + Classes/Core/NSObject+KiwiVerifierAdditions.h + sourceTree + <group> + + 1780457D3EDC481893BD104B + + fileRef + 801AF02213014B5D8E697C8E + isa + PBXBuildFile + + 17AE2CDEB5D14F01B28F6CD1 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWBeIdenticalToMatcher.m + path + Classes/Matchers/KWBeIdenticalToMatcher.m + sourceTree + <group> + + 184D1615921B491EAF8EF5D3 + + fileRef + 8234BFB6775B47D192155B21 + isa + PBXBuildFile + settings - ALWAYS_SEARCH_USER_PATHS - NO - ARCHS - armv6 armv7 - COPY_PHASE_STRIP - YES - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Pods-Reachability-prefix.pch - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 18606E42CCD34267BDE377A6 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACTargetQueueScheduler.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACTargetQueueScheduler.m + sourceTree + <group> + + 18BA1B72619641C095E91267 + + fileRef + 32205A7EFB6D4338B651931A + isa + PBXBuildFile + + 197AACB8A8B0454AB8B11DE9 + + fileRef + A8AFC5AAC7014EBD848740A3 + isa + PBXBuildFile + + 199065E210E443F391703123 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + NSObject+RACSelectorSignal.m + path + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACSelectorSignal.m + sourceTree + <group> + + 19BC924239444687BE654CC8 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACSequence.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACSequence.h + sourceTree + <group> + + 19FBF81B18814045B64DB457 + + fileRef + 199065E210E443F391703123 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 1A829B29E2274914BB604225 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UIGestureRecognizer+RACSignalSupport.m + path + ReactiveCocoaFramework/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.m + sourceTree + <group> + + 1A9662EFC7CB4AC997E96AD3 + + fileRef + 607B91A49C0B48C6AE0E2D2D + isa + PBXBuildFile + + 1A9CE61DD2BE4C6AA39295E0 + + fileRef + E53FA948F2044A4FA2A89C5F + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 1AE7D8C1F1C24412A995A44E + + fileRef + 1E031442C0CF49F7A0317B08 + isa + PBXBuildFile + + 1B1E2BE0D9C142F8A0EDC3C9 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-specs.a + sourceTree + BUILT_PRODUCTS_DIR + + 1B4721906E994BAE80545326 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWFutureObject.m + path + Classes/Core/KWFutureObject.m + sourceTree + <group> + + 1B4D64BF8BF144D9A8CC8342 + + fileRef + 99BC9B80037545E9A1312F4A + isa + PBXBuildFile + + 1B92445928534D8581F3E477 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSObject+RACPropertySubscribing.h + path + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACPropertySubscribing.h + sourceTree + <group> + + 1B9B67AA7E474742A860B3A4 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + path + Pods-acknowledgements.markdown + sourceTree + <group> + + 1B9F5738B8E841A7B3109410 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWGenericMatchEvaluator.h + path + Classes/Matchers/KWGenericMatchEvaluator.h + sourceTree + <group> + + 1BDB732D39DE4A9286F4C16C + + fileRef + 84E5FE2698834E8FA3752E89 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 1BF788A36B514856915126FC + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWGenericMatchingAdditions.m + path + Classes/Matchers/KWGenericMatchingAdditions.m + sourceTree + <group> + + 1C67FDC5DF604739AAC9DB2A + + fileRef + A1A046911046476BB2F635FE + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 1C7B9BBC033D4DECBC4A1578 + + fileRef + 0B80E39001B44E839ADB0AE4 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 1CBB6A843BD94536B21CD89E + + fileRef + 71973AE77AC2407FB876EA15 + isa + PBXBuildFile + + 1CBD6837552743EAB762FA89 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWMessageSpying.h + path + Classes/Core/KWMessageSpying.h + sourceTree + <group> + + 1CE1022CABFC45EF8DA11D0C + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSProxy+KiwiVerifierAdditions.h + path + Classes/Core/NSProxy+KiwiVerifierAdditions.h + sourceTree + <group> + + 1D11356F5796438AAC9644C0 + + fileRef + 742EDE81BB8246DFADEB0EF1 + isa + PBXBuildFile + + 1D67518734F548749C24FC18 + + fileRef + 59818CB985A64CB5A5CAE8ED + isa + PBXBuildFile + + 1D7E4CCBC34B411C9B0F1949 + + fileRef + 3EFE064F699A4835A301F339 + isa + PBXBuildFile + + 1DBB08E46F4645D2B91D8C5A + + fileRef + 0707DBE7F2DC45B4AB298CC4 + isa + PBXBuildFile + + 1DD80B58659C4FC895B7DE83 + + fileRef + E13324B6331F4BF892ED0310 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 1E031442C0CF49F7A0317B08 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWInequalityMatcher.h + path + Classes/Matchers/KWInequalityMatcher.h + sourceTree + <group> + + 1E09996162E244058B4D3D62 + + fileRef + 6AC217EF0A27440F9C444017 + isa + PBXBuildFile + + 1E4953BD4CE64B818F6690A3 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSString+RACKeyPathUtilities.h + path + ReactiveCocoaFramework/ReactiveCocoa/NSString+RACKeyPathUtilities.h + sourceTree + <group> + + 1E517FE453AB48E8B10D55C4 + + fileRef + A2368088F9A64C368F2CC7F6 + isa + PBXBuildFile + + 1E8AB76B5699442590151CF0 + + buildConfigurationList + 5BA53EFB48DC4E7E848B013B + buildPhases + + D3E6517AB59247C38DAB1185 + 6FACB030D86D48028E31A6CA + D51F55D15E5A4B09A174AD9E + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Pods-ReactiveCocoa + productName + Pods-ReactiveCocoa + productReference + 9BDE5E0F5477446D88E0A92C + productType + com.apple.product-type.library.static + + 1EBEBBE90AF545D5A806A69D + + fileRef + 81523A0DA42B453E9CFF5D5F + isa + PBXBuildFile + + 2046235E49C148ADBE036915 + + fileRef + CD7B98960DE6400C83B61669 + isa + PBXBuildFile + + 207E6C579EA54355A351D575 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACKVOChannel.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACKVOChannel.h + sourceTree + <group> + + 2087DAA3BD854501A01FD3B5 + + fileRef + 1767930D256148A8B1775896 + isa + PBXBuildFile + + 20A1D77AE9BF4322903D65B6 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KiwiConfiguration.h + path + Classes/Core/KiwiConfiguration.h + sourceTree + <group> + + 21070075F6714B26A03BFA57 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACDynamicSequence.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSequence.h + sourceTree + <group> + + 215D40D5FCF846B48930057A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Pods-acknowledgements.plist + sourceTree + <group> + + 21E7417DB8F143F7A1006EE5 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWHaveValueMatcher.m + path + Classes/Matchers/KWHaveValueMatcher.m + sourceTree + <group> + + 21EBDA1695F44BE3ABA7DE15 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWAfterEachNode.m + path + Classes/Nodes/KWAfterEachNode.m + sourceTree + <group> + + 225387514E7C4DA58B9CF959 + + fileRef + 63DAD54396A34701AF8BB6DB + isa + PBXBuildFile + + 22752797AB454404AD2B8FA3 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UIStepper+RACSignalSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/UIStepper+RACSignalSupport.h + sourceTree + <group> + + 22A57ECD7733431F9BE869E9 + + buildConfigurations + + C98F48784B734152B6FDC852 + 5E086B1CED234816B9B3EF01 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 22AC7179260147C2A7172264 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UIButton+RACCommandSupport.m + path + ReactiveCocoaFramework/ReactiveCocoa/UIButton+RACCommandSupport.m + sourceTree + <group> + + 22C3B4D28E024CDCA44EF7E9 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWRegularExpressionPatternMatcher.h + path + Classes/Matchers/KWRegularExpressionPatternMatcher.h + sourceTree + <group> + + 23107D078833429B9B39622C + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWExampleSuiteBuilder.m + path + Classes/Core/KWExampleSuiteBuilder.m + sourceTree + <group> + + 235B0BBB65AC4C4CA7EB31DD + + fileRef + 146C2411FD1940109B8FCFBD + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 238148EC249D47DAB3BB9D5A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSEnumerator+RACSequenceAdditions.h + path + ReactiveCocoaFramework/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h + sourceTree + <group> + + 239AFEA6D67C416888554D6A + + fileRef + F00F8B0FECEF4E1096B7DB3B + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 23FA7C3F289845AC84B59A01 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWBeMemberOfClassMatcher.h + path + Classes/Matchers/KWBeMemberOfClassMatcher.h + sourceTree + <group> + + 2422D4BC3E6F4A3A9CFD3EBF + + fileRef + 5EAEB85C75CC40359A53E1A7 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 2468208932F441689ED91E33 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWFailure.h + path + Classes/Core/KWFailure.h + sourceTree + <group> + + 24831DDF4BD24A7DB06C149F + + fileRef + C618D768A4654232BD2EC2B4 + isa + PBXBuildFile + + 2499B82C686E4657954DD994 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACEmptySequence.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACEmptySequence.m + sourceTree + <group> + + 25CE9BB4E5B840B1901F051F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWContainMatcher.h + path + Classes/Matchers/KWContainMatcher.h + sourceTree + <group> + + 25E012BA1E6242979545A0A4 + + fileRef + 4148E10D466E4EFFADF8E65B + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 269797A168A34570AF061E01 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACDynamicSignal.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSignal.m + sourceTree + <group> + + 26980E5004664BFB9EC72017 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACObjCRuntime.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.m + sourceTree + <group> + + 26A7941399134F12B72BC377 + + fileRef + A535A398C3024591A1917ACD + isa + PBXBuildFile + + 2820B6B2A6424E40852AC3CA + + buildConfigurationList + 2C7E55C1C1C3439FB10CD646 + buildPhases + + 52E346DD663744848DF23AD1 + E8251025E3BE4A1DAB113F0E + 5AB363249B6340818A33ABE3 + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Pods-SocketRocket + productName + Pods-SocketRocket + productReference + 939A66B594494711AC59AF99 + productType + com.apple.product-type.library.static + + 28669439F60543F78D0A46FC + + containerPortal + EFBB6CF77B5E4364844354C4 + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 15A359E7D4AF402D99E6EC37 + remoteInfo + Pods-specs-OHHTTPStubs + + 287FA4F176AD41DEA2765D3A + + fileRef + 782D1CA7F52D4675B3435C0F + isa + PBXBuildFile + + 28C017E1EDB3426AB9758958 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACScopedDisposable.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACScopedDisposable.h + sourceTree + <group> + + 28F4DD4F041948FB927A48DF + + fileRef + 99B4DB69908C4933B654DB2A + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 28F6EF33E792451A9981ECBA + + fileRef + E3E071BE40D44EEBB95ECD4F + isa + PBXBuildFile + + 2976892B65FC46F58D7D910A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWValue.h + path + Classes/Core/KWValue.h + sourceTree + <group> + + 29809852FD4D460FB0003AE9 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWBeWithinMatcher.m + path + Classes/Matchers/KWBeWithinMatcher.m + sourceTree + <group> + + 2A003E02B3E047B18BBB5353 + + fileRef + D940BE83D1CF4388BDB4B0B3 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 2A4BA59C2A5A4C228C4B9921 + + fileRef + 25CE9BB4E5B840B1901F051F + isa + PBXBuildFile + + 2A96F1182407483DB2DE3801 + + fileRef + 9BDE5E0F5477446D88E0A92C + isa + PBXBuildFile + + 2AB618B9CAF44070894B4672 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSObject+RACLifting.h + path + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.h + sourceTree + <group> + + 2B014875656842DFBDC4CB01 + + fileRef + BBD883249CF0443298902DC6 + isa + PBXBuildFile + + 2BE54AB79DF647CF8F2369C4 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWStringUtilities.h + path + Classes/Core/KWStringUtilities.h + sourceTree + <group> + + 2BF7538737344C91A6463296 + + fileRef + 8C78ABEA1400469A8103385B + isa + PBXBuildFile + + 2BFC74F3A877468EA67CB913 + + fileRef + 70657A11F88243A2A3594B84 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 2BFDBCE6F4AD4709A86BA5EE + + fileRef + 7517C13C70C846A3A4C687E0 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 2C5A81DD73BB498D98D802EC + + fileRef + F3F43C7F5F194793A7D509D9 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 2C7E55C1C1C3439FB10CD646 + + buildConfigurations + + 085F765FFA054737AA7B9B45 + C870941F4C8345EFB33944FE + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 2D0A8349F6184F9385D2EEA7 + + children + + 05A6E6823E154437A53EA6FC + C115AB70479944B484379700 + 40F49F6098C84FC2BC65B9ED + E32CC4A0CFF8435894223875 + + isa + PBXGroup + name + Support Files + sourceTree + SOURCE_ROOT + + 2D5F9D58B5C04D0384A613D4 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UICollectionViewCell+RACSignalSupport.m + path + ReactiveCocoaFramework/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.m + sourceTree + <group> + + 2D6FDF81DADD464EB5518615 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACEagerSequence.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACEagerSequence.h + sourceTree + <group> + + 2DFDA3FBCFCB4A3089357C7A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWPendingNode.h + path + Classes/Nodes/KWPendingNode.h + sourceTree + <group> + + 2E5DAB690DC345999748CD56 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACSubscriptionScheduler.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptionScheduler.h + sourceTree + <group> + + 2EC784CEF9434F9D8DCA9559 + + children + + B1D5E3566D18488D8666A7B6 + 26980E5004664BFB9EC72017 + + isa + PBXGroup + name + no-arc + sourceTree + <group> + + 2F0E6C9C1BC4436492B6497B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWBeSubclassOfClassMatcher.h + path + Classes/Matchers/KWBeSubclassOfClassMatcher.h + sourceTree + <group> + + 2F171CE3F80144C3B65DF41E + + fileRef + EDFFBD49908C43EF9C147529 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 2F28F2CC744A4E2699100FB5 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-SocketRocket.xcconfig + sourceTree + <group> + + 2F8C8774421348369AF55001 + + fileRef + E6E8BDB4AA7C4F88921BD822 + isa + PBXBuildFile + + 2FE6D7B0AAC44E73AF85DF0B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACQueueScheduler+Subclass.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler+Subclass.h + sourceTree + <group> + + 308EBCB54E6F4711B00EB2CD + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSValue+KiwiAdditions.h + path + Classes/Core/NSValue+KiwiAdditions.h + sourceTree + <group> + + 308F81D102F742F7A8BE9CFB + + fileRef + 77EF22B0C303493BB94EAAB2 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 30A89854BDE04B849C915658 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWNull.m + path + Classes/Core/KWNull.m + sourceTree + <group> + + 30F4A1DBA7FB429F9C6DFF8C + + fileRef + 165BC2F4DAEE491AB3A77F83 + isa + PBXBuildFile + + 3121C12B2EFD4872844EAAEA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWRespondToSelectorMatcher.m + path + Classes/Matchers/KWRespondToSelectorMatcher.m + sourceTree + <group> + + 31B4CE909D344DB9B424E77E + + fileRef + 4F0935D8A2A1499EA6D85198 + isa + PBXBuildFile + + 31C79F6E270C4E75B90D6366 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACSubscriptionScheduler.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptionScheduler.m + sourceTree + <group> + + 31DC8BEEF4994929A8BC8E1B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UIBarButtonItem+RACCommandSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h + sourceTree + <group> + + 32205A7EFB6D4338B651931A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWUserDefinedMatcher.h + path + Classes/Matchers/KWUserDefinedMatcher.h + sourceTree + <group> + + 32CD0EE8388E48FFBFA0DE33 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWIntercept.m + path + NonARC/KWIntercept.m + sourceTree + <group> + + 32E059818FB34D1A86B86298 + + fileRef + C7052C3F6BBC4350BCBC5FFF + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 332822F707CA42149E05002B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UIAlertView+RACSignalSupport.m + path + ReactiveCocoaFramework/ReactiveCocoa/UIAlertView+RACSignalSupport.m + sourceTree + <group> + + 333B94E03902440E83486673 + + fileRef + C2A11F03D15E41839028AF2B + isa + PBXBuildFile + + 335243A08FD2430FBC4F2F1F + + fileRef + 516F17C987404C4385BC689D + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 33CC11796F674FF5BC461831 + + fileRef + FB4CDE8EDA5D4296BBC9A542 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 33D5D82C87E24A8788CB6476 + + children + + 816BEBCA51AD4D2FA8F8254A + A32E5C12141144BCB3FD2C1F + 91C22DC7028740F7AA3BF5A2 + 3A02F52E49FB451189515B05 + + isa + PBXGroup + name + Kiwi + path + Kiwi + sourceTree + <group> + + 34E8FA22E9C14E7B9D1ADE81 + + fileRef + 29809852FD4D460FB0003AE9 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 3507694354CB4545BE6DBF2D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-specs-OHHTTPStubs-prefix.pch + sourceTree + <group> + + 3580466BDE14473489F2DB75 + + fileRef + 00764906F5F64FCEA97D8F3F + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 35DDBADA009F4399AAC85375 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACMulticastConnection.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.h + sourceTree + <group> + + 35E5F38B18F54844A96375A3 + + baseConfigurationReference + C6E0DD264A3547CF9737B6B3 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 361074B0E5BB4333896BC568 + + fileRef + 6D92AB5E2D024ADC8DFDB91A + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 36368A734173428991FCE787 + + fileRef + CFC31C442B3E42B2910FF7CD + isa + PBXBuildFile + + 363E8B74669A495BA73A6FB9 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWCountType.h + path + Classes/Core/KWCountType.h + sourceTree + <group> + + 371E33B070CA48FFB0431694 + + fileRef + 3DF90F2EEFC0490780E1ADBB + isa + PBXBuildFile + + 3759C8C0E3FC4187BDBA5A93 + + fileRef + ED9A729660EA4FC298DC6DD2 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 38176EE406194B4E928DDAC8 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWContextNode.h + path + Classes/Nodes/KWContextNode.h + sourceTree + <group> + + 3851BDE43ACC4EF3B742F231 + + fileRef + 75AEFA62831B4DC7A92E7006 + isa + PBXBuildFile + + 38BD222F9B9547418293F9AA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + NSValue+KiwiAdditions.m + path + Classes/Core/NSValue+KiwiAdditions.m + sourceTree + <group> + + 38CC0CEAF0FE4B2786FFA619 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWContextNode.m + path + Classes/Nodes/KWContextNode.m + sourceTree + <group> + + 38E2F1AB87714FEC9BC6B11B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWBeforeAllNode.h + path + Classes/Nodes/KWBeforeAllNode.h + sourceTree + <group> + + 3981DDE2DDAA4C36B93654B6 + + fileRef + 5EFCC5EDB86B44A480BEFA00 + isa + PBXBuildFile + + 39FE046FEDD741BCB9075BBF + + fileRef + 3C7BFB3F1C014147873E5F56 + isa + PBXBuildFile + + 3A02F52E49FB451189515B05 + + children + + E9BFD00B6FCE4E618B0ABD40 + A4BDADB3C94F43D8B0BB5EC2 + 40D261812DE34679AA920DA7 + 57D29871617A47DF87411161 + + isa + PBXGroup + name + Support Files + sourceTree + SOURCE_ROOT + + 3A6D2B7073604E8CB7C613FE + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWMatcher.h + path + Classes/Core/KWMatcher.h + sourceTree + <group> + + 3A8D1F3252D747508543C86D + + fileRef + 41F67AC863514AA6962459CB + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 3A8E1F0C94C54B0DB625497B + + fileRef + 9B7761DB44FC48D78719A426 + isa + PBXBuildFile + + 3A95202EFC6A42A994F762AC + + baseConfigurationReference + FFB46B3833F545E1B16E27A8 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-specs-OHHTTPStubs-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 3B0CB89D5D2545ACAE2D0836 + + fileRef + 4833F08DA1B4451494E74E9D + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 3B1DDD364B68465A8D6BEB08 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-Reachability.a + sourceTree + BUILT_PRODUCTS_DIR + + 3B7F625018894E19A62DF6ED + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWSpec.m + path + Classes/Core/KWSpec.m + sourceTree + <group> + + 3B95A93DD4C74BE0B1C7E770 + + fileRef + 52C4F189091E43EEA9DE1F72 + isa + PBXBuildFile + + 3B9947D8C69D4671A48508EA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACImmediateScheduler.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACImmediateScheduler.m + sourceTree + <group> + + 3C397594913246EFB9B82270 + + fileRef + 5A0CF3C41E364004B08DBD37 + isa + PBXBuildFile + + 3C3E3F29E94443A280E69C69 + + buildConfigurations + + 4F6AA5149F414EB3A9C9D958 + D7EFA267D14C4BC094E55DE7 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 3C6583EEBC334E95AE3C360C + + fileRef + 42505EEC636D4FFFA862FF4B + isa + PBXBuildFile + + 3C7BFB3F1C014147873E5F56 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACScheduler.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.h + sourceTree + <group> + + 3D8619485F2E45F7A70AFF61 + + isa + PBXTargetDependency + target + 15A359E7D4AF402D99E6EC37 + targetProxy + 28669439F60543F78D0A46FC + + 3DDB8D2BD114419487E26EBD + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UISegmentedControl+RACSignalSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h + sourceTree + <group> + + 3DF90F2EEFC0490780E1ADBB + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACChannel.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACChannel.h + sourceTree + <group> + + 3E2C3A50DA55437BACE31F65 + + buildConfigurations + + 35E5F38B18F54844A96375A3 + 640685A410C24EA6A4A4C50C + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 3EA14A54C58D48CF9F7C86DF + + fileRef + 6058B66709014A13A1BBBDED + isa + PBXBuildFile + + 3EF0290174634ADCA00BB160 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWUserDefinedMatcher.m + path + Classes/Matchers/KWUserDefinedMatcher.m + sourceTree + <group> + + 3EFE064F699A4835A301F339 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSOrderedSet+RACSequenceAdditions.h + path + ReactiveCocoaFramework/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h + sourceTree + <group> + + 3F37C960F13543B6852E0C52 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSNotificationCenter+RACSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/NSNotificationCenter+RACSupport.h + sourceTree + <group> + + 3F4AEEB0220845A28944E3D0 + + fileRef + 32CD0EE8388E48FFBFA0DE33 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fno-objc-arc -w -Xanalyzer -analyzer-disable-checker + + + 3F564A90536A40ADA567B5F6 + + fileRef + 9B04C7774DBD4540813332C3 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 3F5EB2FD744444A0A97149A1 + + fileRef + 843D6BB84306443EB9DFB285 + isa + PBXBuildFile + + 3F76663340B94B2984CA7A40 + + fileRef + 14B065C3C34343EFB82B5D0A + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 3F8B674411B74682A9FDE31F + + baseConfigurationReference + C115AB70479944B484379700 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-ReactiveCocoa-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 3FAEF0E513B34E67BD3CFC17 + + fileRef + 10658E9212EC49EE9541292E + isa + PBXBuildFile + + 400CBD545F9A4EFE81A17037 + + fileRef + C8FB0466CAA346009167A0ED + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 409A3005FA504A7A8960A1F1 + + fileRef + 4FE38A490BDF4DE5852D6501 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 40D261812DE34679AA920DA7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-specs-Kiwi-dummy.m + sourceTree + <group> + + 40F49F6098C84FC2BC65B9ED + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-ReactiveCocoa-dummy.m + sourceTree + <group> + + 41255049A621436585AFC5DE + + fileRef + 8C008D29EEA34A128D3A646B + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 4148E10D466E4EFFADF8E65B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACBehaviorSubject.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACBehaviorSubject.m + sourceTree + <group> + + 41EAD6B539404ECF99BAC14E + + fileRef + 459334429F61429EA2EC4BE8 + isa + PBXBuildFile + + 41F67AC863514AA6962459CB + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACGroupedSignal.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACGroupedSignal.m + sourceTree + <group> + + 4201C7EF822443D1A99525C2 + + fileRef + 60BC9F5CADA44D59958A8BF2 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 4202A025FB504B2080FDB200 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACSubscriber.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.h + sourceTree + <group> + + 42505EEC636D4FFFA862FF4B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSMethodSignature+KiwiAdditions.h + path + Classes/Core/NSMethodSignature+KiwiAdditions.h + sourceTree + <group> + + 4289D64B356A4CF683A33737 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWExampleNodeVisitor.h + path + Classes/Core/KWExampleNodeVisitor.h + sourceTree + <group> + + 428A9C0BFD1B4B6C9AE0F9EF + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + OHHTTPStubsResponse+JSON.m + path + OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.m + sourceTree + <group> + + 42A329F4AFF348BCA1187F18 + + fileRef + 545DAC4C99624D208096CD6A + isa + PBXBuildFile + + 42D5700E210445D7B0A9FB02 + + fileRef + 1CBD6837552743EAB762FA89 + isa + PBXBuildFile + + 42DA59E50BB244F7855B93D8 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UITextField+RACSignalSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/UITextField+RACSignalSupport.h + sourceTree + <group> + + 43910BDD16C74C1D8F2F7012 + + fileRef + 22AC7179260147C2A7172264 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 43C0394CAC8A4DE18BED770E + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UIControl+RACSignalSupportPrivate.m + path + ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupportPrivate.m + sourceTree + <group> + + 44038B7FB3BE4AE5AE12B9C8 + + buildConfigurationList + 5EB6A7CA99C346F2860E2A0F + buildPhases + + FA6B5205BDCF4BF4B88B1063 + E4922F20065846E187A6D160 + + buildRules + + dependencies + + A01E22736732438D87C15779 + FBCC1AA0592648DD9FDCBCD0 + B6DA91A48E454D29AD579FC6 + + isa + PBXNativeTarget + name + Pods + productName + Pods + productReference + BB8D8567FB584B2EABEEE291 + productType + com.apple.product-type.library.static + + 4408BB0681CE46C1B56C1045 + + fileRef + 46519CFC00714072A487B269 + isa + PBXBuildFile + + 443A329B372444D08438D4DA + + fileRef + 22752797AB454404AD2B8FA3 + isa + PBXBuildFile + + 44CDF3618F3C49D4A9FBD7CA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWGenericMatcher.m + path + Classes/Matchers/KWGenericMatcher.m + sourceTree + <group> + + 450C846012C943D9B9E51F38 + + children + + 99BC9B80037545E9A1312F4A + A4EF9447DA45453ABBD910F3 + BBFFA61182654C73B25A5C5A + A11EE38E8A114B91BE61B5E4 + 99B4DB69908C4933B654DB2A + B0243DD4BDE44188A97DC26D + A76607B208E24E1081266706 + + isa + PBXGroup + name + SocketRocket + path + SocketRocket + sourceTree + <group> + + 45183855128142DEA48627EA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWRaiseMatcher.h + path + Classes/Matchers/KWRaiseMatcher.h + sourceTree + <group> + + 4582A273CC384CDC8EBFBEA1 + + fileRef + 6845B673E8E64A34BF0E39E2 + isa + PBXBuildFile + + 459334429F61429EA2EC4BE8 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSInvocation+RACTypeParsing.h + path + ReactiveCocoaFramework/ReactiveCocoa/NSInvocation+RACTypeParsing.h + sourceTree + <group> + + 45FD57861A1D4FFFAFA7F648 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWBlockNode.m + path + Classes/Nodes/KWBlockNode.m + sourceTree + <group> + + 4629D1B6613048D5BBD5D5E9 + + fileRef + 9413B4EEECD94BEABED8F225 + isa + PBXBuildFile + + 4639BB1EC512411689D79891 + + fileRef + D62503EA2BD94415A9EC1240 + isa + PBXBuildFile + + 46519CFC00714072A487B269 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACSubject.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACSubject.h + sourceTree + <group> + + 46766D4BA2A14ED782229CA8 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACSignalSequence.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACSignalSequence.h + sourceTree + <group> + + 4711C209A0F04A33BEF461EB + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWSymbolicator.h + path + NonARC/KWSymbolicator.h + sourceTree + <group> + + 473771FE215245E78A13822A + + children + + CD52ED41EF5D448384BA54BE + 1B9B67AA7E474742A860B3A4 + 215D40D5FCF846B48930057A + 87383DFA27664E4D9B5A3ECD + 6EC813028C9941CB859CC9E5 + EAB5C84B189A4B79A998B17C + + isa + PBXGroup + name + Pods + sourceTree + <group> + + 4778B249EB2C4F2E94CFC1A2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACCommand.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACCommand.m + sourceTree + <group> + + 47A9AFC873764952B3F144D1 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + Kiwi.h + path + Classes/Core/Kiwi.h + sourceTree + <group> + + 47B9BE113A684A0AAA5035B2 + + fileRef + FB1F773527E9460CAF4BD5B1 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -w -Xanalyzer -analyzer-disable-checker + + + 4833F08DA1B4451494E74E9D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACSignalSequence.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACSignalSequence.m + sourceTree + <group> + + 48DC5DDF5C464AB6ADF4E764 + + fileRef + C80D0DB4017F4CBDA0AB52E1 + isa + PBXBuildFile + + 48E932E8026449F68CE98968 + + buildActionMask + 2147483647 + files + + A9D0071DB50645A081CA9EB0 + D28E24D6A07A427E9292348D + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 48F56E5C8A6A4FB38038A85B + + fileRef + 78E9687B8FE442D49A830D0A + isa + PBXBuildFile + + 496CE7BA14E14DB19356B524 + + fileRef + 6A97D5CFA7A844B5ACA388B5 + isa + PBXBuildFile + + 49C1B2C4CB8C4307B8B542AB + + fileRef + 8F135A7D903546928291CC4C + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 49EDB7634E9040C989D900A7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWBlockRaiseMatcher.h + path + Classes/Matchers/KWBlockRaiseMatcher.h + sourceTree + <group> + + 49F7DE07BB3B4DA5AFCDF02B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWRegularExpressionPatternMatcher.m + path + Classes/Matchers/KWRegularExpressionPatternMatcher.m + sourceTree + <group> + + 4A54E15C582F4D19A04A2C2A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UISwitch+RACSignalSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/UISwitch+RACSignalSupport.h + sourceTree + <group> + + 4AAB9CF4A49F4B9EB29B88F3 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWContainMatcher.m + path + Classes/Matchers/KWContainMatcher.m + sourceTree + <group> + + 4AC732E78D3E47E98CE7680B + + fileRef + B39C8C1C628242DD90796CCA + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 4AE1A61BC0DD4C9E9CD2604F + + fileRef + E1B0DD643D5B44E99DFF8B8C + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 4B28C413090B46CA9A83B802 + + fileRef + 995144A8C6B8455883581300 + isa + PBXBuildFile + + 4BC2F6766CEE40A595AD02EA + + fileRef + 2AB618B9CAF44070894B4672 + isa + PBXBuildFile + + 4BCDCD22BB28414E88E04794 + + fileRef + B63DEE63C0E4441B80B8A7D5 + isa + PBXBuildFile + + 4BE1491F73B242EAAFBFAA55 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSNumber+KiwiAdditions.h + path + Classes/Core/NSNumber+KiwiAdditions.h + sourceTree + <group> + + 4C54D194C53543D8BE1112AA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + OHHTTPStubsResponse.h + path + OHHTTPStubs/Sources/OHHTTPStubsResponse.h + sourceTree + <group> + + 4C79BBFC024F450EB35AE11B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + NSString+RACKeyPathUtilities.m + path + ReactiveCocoaFramework/ReactiveCocoa/NSString+RACKeyPathUtilities.m + sourceTree + <group> + + 4C7AC52E435844C9BCE60AB7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UIStepper+RACSignalSupport.m + path + ReactiveCocoaFramework/ReactiveCocoa/UIStepper+RACSignalSupport.m + sourceTree + <group> + + 4C90C4B7C78D40BFB79F39C1 + + fileRef + D52CE39566D94A66B5471987 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 4C90FAFC119B40C78051F0AB + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UIRefreshControl+RACCommandSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h + sourceTree + <group> + + 4DADE293366B4247A59A44F9 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWInequalityMatcher.m + path + Classes/Matchers/KWInequalityMatcher.m + sourceTree + <group> + + 4E0C6EAC0CF44A7C8EAB9833 + + fileRef + 56400FDC5DB443A2885B3444 + isa + PBXBuildFile + + 4ED048C5A87C497CA38A128D + + children + + 01B1BCADA8044C8D9BA96B10 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + 4EDC2E1BD8804A66BF6942A5 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWBeforeEachNode.m + path + Classes/Nodes/KWBeforeEachNode.m + sourceTree + <group> + + 4F0935D8A2A1499EA6D85198 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACGroupedSignal.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACGroupedSignal.h + sourceTree + <group> + + 4F44B9DC66AA4313932687B0 + + fileRef + 001110B074434775B84ED439 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 4F506B5B0E7C47709FA44452 + + fileRef + 2FE6D7B0AAC44E73AF85DF0B + isa + PBXBuildFile + + 4F6AA5149F414EB3A9C9D958 + + baseConfigurationReference + A4BDADB3C94F43D8B0BB5EC2 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-specs-Kiwi-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 4FE38A490BDF4DE5852D6501 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWStringPrefixMatcher.m + path + Classes/Matchers/KWStringPrefixMatcher.m + sourceTree + <group> + + 4FF3B55A62E24AAF8CE79A80 + + fileRef + 6A5FD350B4224D3EB9A89962 + isa + PBXBuildFile + + 5043D891C6764D2287EE74A0 + + fileRef + 428A9C0BFD1B4B6C9AE0F9EF + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 505E201B15B3426787D333E1 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWCaptureSpy.h + path + Classes/Core/KWCaptureSpy.h + sourceTree + <group> + + 50BA4DB05ADC41F89BBD2938 + + fileRef + 5B6E6EF1DCC347AB98491E12 + isa + PBXBuildFile + + 516F17C987404C4385BC689D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACReplaySubject.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACReplaySubject.m + sourceTree + <group> + + 5175D4FCB5124320B8C29426 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWReceiveMatcher.m + path + Classes/Matchers/KWReceiveMatcher.m + sourceTree + <group> + + 526923A419144AEF930312AB + + fileRef + 9F3BF90077ED4DD1825C66B0 + isa + PBXBuildFile + + 52919260BB304A3BAFEBA71B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWDeviceInfo.h + path + Classes/Core/KWDeviceInfo.h + sourceTree + <group> + + 52B4E7FA7F614E1A830B0591 + + fileRef + 050907F549CB446B9BFD60C8 + isa + PBXBuildFile + + 52C4F189091E43EEA9DE1F72 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWCallSite.h + path + Classes/Core/KWCallSite.h + sourceTree + <group> + + 52E346DD663744848DF23AD1 + + buildActionMask + 2147483647 + files + + CB5464819282478585CE81BC + F6F4D352F4984CFD80C7E75A + 544C627A7EC74982BE24E15B + 28F4DD4F041948FB927A48DF + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 53C2E057EBA14ED7B1C7B18B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWContainStringMatcher.m + path + Classes/Matchers/KWContainStringMatcher.m + sourceTree + <group> + + 53F078F2C50E444682C31E84 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWItNode.m + path + Classes/Nodes/KWItNode.m + sourceTree + <group> + + 544C627A7EC74982BE24E15B + + fileRef + A11EE38E8A114B91BE61B5E4 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 545DAC4C99624D208096CD6A + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + SenTestingKit.framework + path + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/SenTestingKit.framework + sourceTree + DEVELOPER_DIR + + 5460193ADC744573AC670EFC + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWMatchVerifier.h + path + Classes/Verifiers/KWMatchVerifier.h + sourceTree + <group> + + 546E0752E7B74342904B3808 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACStream.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACStream.h + sourceTree + <group> + + 54AA229EC0174CF7B1C0E463 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + path + Pods-specs-acknowledgements.markdown + sourceTree + <group> + + 54C7DB02FA3843B4AD94C3A9 + + fileRef + 38BD222F9B9547418293F9AA + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 54FB59A210304509AF38DFD2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSObject+RACDescription.h + path + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDescription.h + sourceTree + <group> + + 5552B3CABD8C4A8384DE9E60 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + NSOrderedSet+RACSequenceAdditions.m + path + ReactiveCocoaFramework/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.m + sourceTree + <group> + + 558A878FB07742F48B479AD2 + + buildConfigurations + + 1669929DFE114010B523AA40 + 02EF24FACE5B4682BD42A8C2 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 55B77F5EEC94416D92A4150C + + fileRef + 8096CEE89625406A987BAFA2 + isa + PBXBuildFile + + 55DB72C014924CFDBBACCF47 + + fileRef + 03F0A3EA98BA4F0BB6C14D50 + isa + PBXBuildFile + + 56400FDC5DB443A2885B3444 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + SenTestSuite+KiwiAdditions.h + path + SenTestingKit/SenTestSuite+KiwiAdditions.h + sourceTree + <group> + + 569352254EE6463B970A3278 + + fileRef + AE481CC5C97D41F38D2C1C40 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 56D4D307DC4A4AF09DAF94EE + + fileRef + D2A109B78A2E4B5FBA7DBF4B + isa + PBXBuildFile + + 571A1AE8705C422686933D75 + + fileRef + D8A16659E3D5480DB06353D3 + isa + PBXBuildFile + + 573121D7EC914417A495863E + + fileRef + ABCF6FE3076B48F685D25B8E + isa + PBXBuildFile + + 577D44E25E3E48748C565F66 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACDisposable.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.h + sourceTree + <group> + + 578314DDCFF7405BBB7F28F5 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + OHHTTPStubs.h + path + OHHTTPStubs/Sources/OHHTTPStubs.h + sourceTree + <group> + + 57A55F8AA7334085B6DAC3DA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWMatcher.m + path + Classes/Core/KWMatcher.m + sourceTree + <group> + + 57D29871617A47DF87411161 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-specs-Kiwi-prefix.pch + sourceTree + <group> + + 57FE9761852747DCAB5CD34C + + fileRef + F8E4EF9644DA4628A96BED31 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 584DFECE0CB6426E83E7DFA2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWSymbolicator.m + path + NonARC/KWSymbolicator.m + sourceTree + <group> + + 586E6F10DCC342528FA9DB0A + + containerPortal + EFBB6CF77B5E4364844354C4 + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 7A17300E4D674CC0B2A68C8C + remoteInfo + Pods-specs-Kiwi + + 58B2D2DD28B94897A9CBFD7A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACSerialDisposable.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACSerialDisposable.h + sourceTree + <group> + + 59037336E5044D918F361EE9 + + fileRef + 5E35D464EA2546EBA885DB5D + isa + PBXBuildFile + + 593063C939C744AEA2C5074E + + fileRef + 70E5A1D5748146308E5E61B5 + isa + PBXBuildFile + + 59818CB985A64CB5A5CAE8ED + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWInvocationCapturer.h + path + Classes/Core/KWInvocationCapturer.h + sourceTree + <group> + + 59C6EF44CE7D4799BD6AB4CA + + fileRef + CF9D8F2C2ECD45EA87BA15B7 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fno-objc-arc -w -Xanalyzer -analyzer-disable-checker + + + 59EB47950FFF4BAF90D91F8C + + fileRef + F4668E959E7D4143A1F38D69 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 59EC35BED192477BA9EFA2B2 + + children + + B44017F3EF194FF58094AD51 + FFB46B3833F545E1B16E27A8 + 050907F549CB446B9BFD60C8 + 3507694354CB4545BE6DBF2D + + isa + PBXGroup + name + Support Files + sourceTree + SOURCE_ROOT + + 5A0CF3C41E364004B08DBD37 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWBeTrueMatcher.h + path + Classes/Matchers/KWBeTrueMatcher.h + sourceTree + <group> + + 5A5E79B952814CEAB63D5048 + + fileRef + AC60781D486C4E398A6ABC19 + isa + PBXBuildFile + + 5A9416F3CA1F4117A6041968 + + fileRef + 7171822821BF420EA847F90D + isa + PBXBuildFile + + 5AB363249B6340818A33ABE3 + + buildActionMask + 2147483647 + files + + 1B4D64BF8BF144D9A8CC8342 + 64589C4B2C1B474FBB542126 + FBB062F93FE2425C8699524F + + isa + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 5AE46EF325E94B3EA880A389 + + fileRef + B8F1E671C0874842B6D9CCFC + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 5AFA2F7CE70544D5839018EF + + fileRef + 0D80D1BC092C484499F83E81 + isa + PBXBuildFile + + 5B07A602B87949DD954D2B68 + + fileRef + DEFD2EC3A4784EE98B7D5C36 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 5B10FF0A2E39458BA5CCF066 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + NSObject+RACDescription.m + path + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDescription.m + sourceTree + <group> + + 5B6E6EF1DCC347AB98491E12 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSFileHandle+RACSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/NSFileHandle+RACSupport.h + sourceTree + <group> + + 5B89CEDDA19444AB8DF06696 + + fileRef + F5547ED532444DF189741848 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 5B9842D33DCA42E1BB58BCD1 + + fileRef + 4C90FAFC119B40C78051F0AB + isa + PBXBuildFile + + 5BA1F4F90AFA44A9858B8DB0 + + fileRef + B2AE69DBA4B4438097753F68 + isa + PBXBuildFile + + 5BA53EFB48DC4E7E848B013B + + buildConfigurations + + 3F8B674411B74682A9FDE31F + 6965E140102C4616B217079B + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 5C07F742C7354FCB92A8E98D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACErrorSignal.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACErrorSignal.h + sourceTree + <group> + + 5C5E27C9B60643FC8D80ACEA + + fileRef + 6FBC08E5F2524698991953EE + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 5C79F2D07B8849018C2F72D2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWItNode.h + path + Classes/Nodes/KWItNode.h + sourceTree + <group> + + 5C8BF678F2844E47899FBA5F + + fileRef + 5EFCC5EDB86B44A480BEFA00 + isa + PBXBuildFile + + 5CFB4B0219E64DC498B5064A + + fileRef + B2B3144B35D3418584F92348 + isa + PBXBuildFile + + 5D4889F4156D417396193073 + + fileRef + 5F634A62DCCC4DEC93CFE6F4 + isa + PBXBuildFile + + 5D9AC4410D294D8E8C1EF711 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACMulticastConnection.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.m + sourceTree + <group> + + 5E086B1CED234816B9B3EF01 + + baseConfigurationReference + 7F87E11829654238834014A2 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-Reachability-prefix.pch + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 5E35D464EA2546EBA885DB5D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + OHHTTPStubsResponse+JSON.h + path + OHHTTPStubs/Sources/OHHTTPStubsResponse+JSON.h + sourceTree + <group> + + 5EAEB85C75CC40359A53E1A7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACUnarySequence.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACUnarySequence.m + sourceTree + <group> + + 5EB6A7CA99C346F2860E2A0F + + buildConfigurations + + F4D5820985CF4B43A43C65B1 + F8F895A8DFB24606B8F999B1 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 5EC873A3B67F494B84B5302E + + fileRef + 1026BF25FBA9440489696ACC + isa + PBXBuildFile + + 5EDA4809ECA7419196883CB7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACCompoundDisposable.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposable.m + sourceTree + <group> + + 5EFCC5EDB86B44A480BEFA00 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Foundation.framework + path + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework + sourceTree + DEVELOPER_DIR + + 5EFF7570AB80460182B3714A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWCaptureSpy.m + path + Classes/Core/KWCaptureSpy.m + sourceTree + <group> + + 5F2E20CF5D294912B2437B48 + + fileRef + 85DFB2EE60734DD68FAC92E0 + isa + PBXBuildFile + + 5F632A630A474B70B1A8B265 + + fileRef + EF1606F8CFE14DE4BFE1F59F + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 5F634A62DCCC4DEC93CFE6F4 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWProbe.h + path + Classes/Core/KWProbe.h + sourceTree + <group> + + 5F8967E5B03049BBA2A0A412 + + fileRef + 2BE54AB79DF647CF8F2369C4 + isa + PBXBuildFile + + 5FA8245E18A9468BBFE498DE + + fileRef + C4F920B1A1E14D409AEF124B + isa + PBXBuildFile + + 5FC0861360E447F5B11BB972 + + fileRef + 4C79BBFC024F450EB35AE11B + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 6054647399BA48F6AAEF24D1 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-SocketRocket-Private.xcconfig + sourceTree + <group> + + 6058B66709014A13A1BBBDED + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KiwiBlockMacros.h + path + Classes/Core/KiwiBlockMacros.h + sourceTree + <group> + + 607B91A49C0B48C6AE0E2D2D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWGenericMatcher.h + path + Classes/Matchers/KWGenericMatcher.h + sourceTree + <group> + + 607CB1E9991D4707B16708B9 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACEXTRuntimeExtensions.h + path + ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTRuntimeExtensions.h + sourceTree + <group> + + 60BC9F5CADA44D59958A8BF2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACTuple.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACTuple.m + sourceTree + <group> + + 611A49FF440E477F915695AE + + fileRef + 53C2E057EBA14ED7B1C7B18B + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 617BD75024BD44ACBBE13DF9 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACBehaviorSubject.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACBehaviorSubject.h + sourceTree + <group> + + 617E3068F2BA46B98A64CFAC + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWMatchers.m + path + Classes/Core/KWMatchers.m + sourceTree + <group> + + 61F7055EA57F45E8A114A2D7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWObjCUtilities.m + path + Classes/Core/KWObjCUtilities.m + sourceTree + <group> + + 6323E4164CB2407191E76A9C + + fileRef + 49EDB7634E9040C989D900A7 + isa + PBXBuildFile + + 6390F5D1845E4A878F00C345 + + fileRef + 817ADFDDDC8A4693A281B001 + isa + PBXBuildFile + + 63B6DE27271D4674874EF924 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACKVOChannel.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACKVOChannel.m + sourceTree + <group> + + 63C547355CCA41148D5A8502 + + fileRef + CD004A91FC114DC281425414 + isa + PBXBuildFile + + 63DAD54396A34701AF8BB6DB + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWMock.h + path + Classes/Mocking/KWMock.h + sourceTree + <group> + + 63F8D9ED12FF471195F8C383 + + fileRef + C567C4CE76AC459F9D146506 + isa + PBXBuildFile + + 640685A410C24EA6A4A4C50C + + baseConfigurationReference + C6E0DD264A3547CF9737B6B3 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 643C1FD148B343CEA8B94770 + + fileRef + 9862B06AB13C4156A7AF9D37 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 64589C4B2C1B474FBB542126 + + fileRef + BBFFA61182654C73B25A5C5A + isa + PBXBuildFile + + 659A889723E143CB846D3260 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACEXTKeyPathCoding.h + path + ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTKeyPathCoding.h + sourceTree + <group> + + 65A19347A2174FAF9BBE6A5F + + fileRef + C74189FD041A49B8A68287AF + isa + PBXBuildFile + + 65DC9B41182D4A509A5D67F7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + NSObject+KiwiMockAdditions.m + path + Classes/Mocking/NSObject+KiwiMockAdditions.m + sourceTree + <group> + + 66D3DA459A3249B7A08EB5CA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-Reachability.xcconfig + sourceTree + <group> + + 670875371A8241D7A19B76AF + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWRegisterMatchersNode.h + path + Classes/Nodes/KWRegisterMatchersNode.h + sourceTree + <group> + + 6845B673E8E64A34BF0E39E2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWSpec.h + path + Classes/Core/KWSpec.h + sourceTree + <group> + + 68F0E177914F4F458963DF83 + + fileRef + 10A312D8D3D24F9194782966 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 6965E140102C4616B217079B + + baseConfigurationReference + C115AB70479944B484379700 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-ReactiveCocoa-prefix.pch + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 INSTALL_PATH $(BUILT_PRODUCTS_DIR) IPHONEOS_DEPLOYMENT_TARGET - 4.0 + 5.0 OTHER_CFLAGS -DNS_BLOCK_ASSERTIONS=1 @@ -1096,65 +5404,738 @@ YES isa - XCBuildConfiguration - name - Release + XCBuildConfiguration + name + Release + + 697895346EF74BD9BB437025 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACBacktrace.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACBacktrace.m + sourceTree + <group> + + 6986AB011AF0416FAEB384B7 + + fileRef + 57A55F8AA7334085B6DAC3DA + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 6A1FF88A04ED4CA083982641 + + fileRef + CE80F2807A6542D2AD8FAB5E + isa + PBXBuildFile + + 6A3FC4F985AD48E5AC6033A9 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UIAlertView+RACSignalSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/UIAlertView+RACSignalSupport.h + sourceTree + <group> + + 6A5E1D21C62643BF88837F80 + + fileRef + 697895346EF74BD9BB437025 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 6A5FD350B4224D3EB9A89962 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWConformToProtocolMatcher.h + path + Classes/Matchers/KWConformToProtocolMatcher.h + sourceTree + <group> + + 6A97D5CFA7A844B5ACA388B5 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWFormatter.h + path + Classes/Core/KWFormatter.h + sourceTree + <group> + + 6A9AD2CC0B2F44D9A506AD4F + + children + + F5B24F66923045159B7F0081 + FDCCF2F66E12437C9C08B3E7 + FEE67F238D7442EE9087A55F + B8F1E671C0874842B6D9CCFC + 817ADFDDDC8A4693A281B001 + 8BE6140DD8444485BA6359E9 + 238148EC249D47DAB3BB9D5A + 95A40515E5484DA5A98324ED + 5B6E6EF1DCC347AB98491E12 + 7ECB4A91B62B403080B42618 + 459334429F61429EA2EC4BE8 + EF1606F8CFE14DE4BFE1F59F + 3F37C960F13543B6852E0C52 + 88D96CE6C389411DBFCE9E12 + 1026BF25FBA9440489696ACC + 964F5432DA6C4FEBBA264F70 + 54FB59A210304509AF38DFD2 + 5B10FF0A2E39458BA5CCF066 + E65DD95C4B8440E28F3C54B5 + 0A5038F72EA747EE87C2940F + 2AB618B9CAF44070894B4672 + F4668E959E7D4143A1F38D69 + 1B92445928534D8581F3E477 + 825E6B4BC785485BAE460FD1 + B70EE89F247549078D1C4B8F + 199065E210E443F391703123 + 3EFE064F699A4835A301F339 + 5552B3CABD8C4A8384DE9E60 + 827BB873FD4A49E9A586391B + FB83D2CDF8FC455BB6C5B2F3 + 1E4953BD4CE64B818F6690A3 + 4C79BBFC024F450EB35AE11B + 8C78ABEA1400469A8103385B + 117E34432E834A7A9B6BE929 + 75AEFA62831B4DC7A92E7006 + 9B04C7774DBD4540813332C3 + 80EC8030A61D4D3E84DB3C5A + ED9A729660EA4FC298DC6DD2 + B2B3144B35D3418584F92348 + C72B1B3324B2445290D92990 + AC60781D486C4E398A6ABC19 + 697895346EF74BD9BB437025 + 617BD75024BD44ACBBE13DF9 + 4148E10D466E4EFFADF8E65B + E0C0BFDD55FF43C08BE8A9F7 + 017F2DA54A454F92A2FFE32C + 3DF90F2EEFC0490780E1ADBB + F7EC1BDAB34D4B4098D90757 + 898C98415C554D62A2228E38 + 4778B249EB2C4F2E94CFC1A2 + A8AFC5AAC7014EBD848740A3 + 5EDA4809ECA7419196883CB7 + B503B78C35084A12827138E4 + CD004A91FC114DC281425414 + A59DD3EDED7D42AF85B0463A + 577D44E25E3E48748C565F66 + 0F7A0FE389D1420B9AEEC1AC + 21070075F6714B26A03BFA57 + EDFFBD49908C43EF9C147529 + 0707DBE7F2DC45B4AB298CC4 + 269797A168A34570AF061E01 + 659A889723E143CB846D3260 + 607CB1E9991D4707B16708B9 + 03B46DD9773C40AAA1E2FB11 + 105E2373D3964737A3A4A9D2 + 2D6FDF81DADD464EB5518615 + 7517C13C70C846A3A4C687E0 + 16EFACA5F7FA4B478D979016 + 2499B82C686E4657954DD994 + A5155DDD6B6641BB815A68B5 + 155E58D0958249FFB7C4630B + 5C07F742C7354FCB92A8E98D + B5B48925C6CF438CA6216530 + E36EC84B9FBD4FF2993081DF + E22ED4747E634035B960D8DE + 4F0935D8A2A1499EA6D85198 + 41F67AC863514AA6962459CB + C567C4CE76AC459F9D146506 + 3B9947D8C69D4671A48508EA + 207E6C579EA54355A351D575 + 63B6DE27271D4674874EF924 + C8AA860DA638408AA6B8F197 + 0A57737D13F54EABBFE70131 + 35DDBADA009F4399AAC85375 + 5D9AC4410D294D8E8C1EF711 + B2AE69DBA4B4438097753F68 + 71973AE77AC2407FB876EA15 + DC26CAA1039A4F1D8E34AF90 + D2A109B78A2E4B5FBA7DBF4B + E13324B6331F4BF892ED0310 + 2FE6D7B0AAC44E73AF85DF0B + D8A16659E3D5480DB06353D3 + 516F17C987404C4385BC689D + C4F920B1A1E14D409AEF124B + 7351CBBEA4DB4962890A72A6 + 3C7BFB3F1C014147873E5F56 + F8D1FF8E6F304C6C888A1DE5 + B6CCF07FD899411882A93980 + 28C017E1EDB3426AB9758958 + 146C2411FD1940109B8FCFBD + 19BC924239444687BE654CC8 + 77EF22B0C303493BB94EAAB2 + 58B2D2DD28B94897A9CBFD7A + 9E0192D66CAA4C4E8112E83C + CD7B98960DE6400C83B61669 + 0C0A99E528204471BD353A24 + ABF248B913A64842945283E9 + 86E8FC92294145DD9425354B + 6DE0CB95058D4BEDAA405C71 + 46766D4BA2A14ED782229CA8 + 4833F08DA1B4451494E74E9D + 546E0752E7B74342904B3808 + 8A56347717AD4EE68AA2D4E7 + 07A8C0F20FDE44DD9FB880D4 + E4B0000F87A746CDB2C825FA + DD50E099DD2944809FA55A39 + 46519CFC00714072A487B269 + 8C008D29EEA34A128D3A646B + 4202A025FB504B2080FDB200 + BD0B7CE4EBFD416199CF8778 + FCA85E9368B04F16ACD7685C + D646D9F7C09C4E05AB3E233F + 00764906F5F64FCEA97D8F3F + 2E5DAB690DC345999748CD56 + 31C79F6E270C4E75B90D6366 + ABF83780E4F54B9A8CB69598 + 18606E42CCD34267BDE377A6 + 742EDE81BB8246DFADEB0EF1 + D1EE5FE4D66E4C6BAE0B8370 + C5CC7B53FA4C4FC387AD5C03 + 60BC9F5CADA44D59958A8BF2 + BBD883249CF0443298902DC6 + D20C6FEB12E641E0BF3897A8 + C74189FD041A49B8A68287AF + 5EAEB85C75CC40359A53E1A7 + 80AB88B3625A472AAC21165E + F8E4EF9644DA4628A96BED31 + D62503EA2BD94415A9EC1240 + 0B80E39001B44E839ADB0AE4 + CE80F2807A6542D2AD8FAB5E + 782D1CA7F52D4675B3435C0F + 047F781532644D2690D1D276 + 8F135A7D903546928291CC4C + 6A3FC4F985AD48E5AC6033A9 + 332822F707CA42149E05002B + 31DC8BEEF4994929A8BC8E1B + 79D933CCD0034897930AB598 + A384ABADAFC7474BBEE9E44D + 22AC7179260147C2A7172264 + CFC31C442B3E42B2910FF7CD + 2D5F9D58B5C04D0384A613D4 + 8A29DFF597DC4A6CA2751F1E + F00F8B0FECEF4E1096B7DB3B + 7171822821BF420EA847F90D + 43C0394CAC8A4DE18BED770E + 8324546C8B5549F2AEC52A7D + 9862B06AB13C4156A7AF9D37 + 7E41DB51032F433889882C47 + 1A829B29E2274914BB604225 + 4C90FAFC119B40C78051F0AB + DE7B0AA0F15748D6A4EC515F + 3DDB8D2BD114419487E26EBD + D173B55A211A49DCBE731092 + 7C2BF410800D4277894EEDE4 + 8234BFB6775B47D192155B21 + 22752797AB454404AD2B8FA3 + 4C7AC52E435844C9BCE60AB7 + 4A54E15C582F4D19A04A2C2A + CB1489830CA9446DAA1C4721 + 9592740120A1493E93E8BC1F + 14B065C3C34343EFB82B5D0A + 42DA59E50BB244F7855B93D8 + F59B6C8ED9B94518A403C6C3 + 72F658883B7F4799A7557C6F + 6D92AB5E2D024ADC8DFDB91A + + isa + PBXGroup + name + Core + sourceTree + <group> + + 6AB2D511606C49749280946E + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-specs-Kiwi.a + sourceTree + BUILT_PRODUCTS_DIR + + 6AC217EF0A27440F9C444017 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWBeEmptyMatcher.h + path + Classes/Matchers/KWBeEmptyMatcher.h + sourceTree + <group> + + 6C486994E5034CBCA313AABA + + buildActionMask + 2147483647 + files + + 0E0BA6EEA3444DB197EC51D7 + 978E7EAFA0F5430B85E4BB67 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6C619947D2E64727A33CAAB3 + + fileRef + 1B92445928534D8581F3E477 + isa + PBXBuildFile + + 6D710363D73F418E8FC175E0 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWNull.h + path + Classes/Core/KWNull.h + sourceTree + <group> + + 6D92AB5E2D024ADC8DFDB91A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UITextView+RACSignalSupport.m + path + ReactiveCocoaFramework/ReactiveCocoa/UITextView+RACSignalSupport.m + sourceTree + <group> + + 6DE0CB95058D4BEDAA405C71 + + includeInIndex + 1 + isa + PBXFileReference + name + RACSignalProvider.d + path + ReactiveCocoaFramework/ReactiveCocoa/RACSignalProvider.d + sourceTree + <group> + + 6DFCE05B95A54C5C958DE858 + + fileRef + 6AB2D511606C49749280946E + isa + PBXBuildFile + + 6E6D9E89568A4500AA50B380 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSInvocation+OCMAdditions.h + path + Classes/Core/NSInvocation+OCMAdditions.h + sourceTree + <group> + + 6E86F9F3A1564E63B7B7A411 + + fileRef + 908385FAB56C46D0A389EBA5 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 6EC813028C9941CB859CC9E5 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-environment.h + sourceTree + <group> + + 6F354EFDB9344A8DAD14E869 + + fileRef + 07A8C0F20FDE44DD9FB880D4 + isa + PBXBuildFile + + 6FACB030D86D48028E31A6CA + + buildActionMask + 2147483647 + files + + EF9A8F427E544ABDAA811273 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 6FBC08E5F2524698991953EE + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWAsyncVerifier.m + path + Classes/Verifiers/KWAsyncVerifier.m + sourceTree + <group> + + 6FEEEFDF86BE4F2CB552D965 + + fileRef + 5EFF7570AB80460182B3714A + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 70657A11F88243A2A3594B84 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + NSProxy+KiwiVerifierAdditions.m + path + Classes/Core/NSProxy+KiwiVerifierAdditions.m + sourceTree + <group> + + 70851DE42D9C4C9593C99484 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWExample.h + path + Classes/Core/KWExample.h + sourceTree + <group> + + 70E5A1D5748146308E5E61B5 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Security.framework + path + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Security.framework + sourceTree + DEVELOPER_DIR + + 7171822821BF420EA847F90D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UIControl+RACSignalSupportPrivate.h + path + ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h + sourceTree + <group> + + 71973AE77AC2407FB876EA15 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACPassthroughSubscriber.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACPassthroughSubscriber.h + sourceTree + <group> + + 72F658883B7F4799A7557C6F + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UITextView+RACSignalSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/UITextView+RACSignalSupport.h + sourceTree + <group> + + 7351CBBEA4DB4962890A72A6 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACReturnSignal.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACReturnSignal.m + sourceTree + <group> + + 742B1A4A1AC04937A2640C1E + + fileRef + B5B48925C6CF438CA6216530 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 742EDE81BB8246DFADEB0EF1 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACTestScheduler.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACTestScheduler.h + sourceTree + <group> + + 74F1BF00B1E14863A4FB758C + + fileRef + 3EF0290174634ADCA00BB160 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 74F673EA5CA441ACBB95834B + + fileRef + 80AB88B3625A472AAC21165E + isa + PBXBuildFile + + 7517C13C70C846A3A4C687E0 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACEagerSequence.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACEagerSequence.m + sourceTree + <group> + + 753EF9BDBE2D488784BDC473 + + fileRef + 0C0A99E528204471BD353A24 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 1E88DB2C638C45869220B46C + 75AEFA62831B4DC7A92E7006 - explicitFileType - archive.ar includeInIndex - 0 + 1 isa PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSString+RACSupport.h path - libPods-specs-OHHTTPStubs.a + ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSupport.h sourceTree - BUILT_PRODUCTS_DIR + <group> - 1EB8ECB08E9140D59F618D7F + 760905BFB0BD43C49CA8530F - buildConfigurations - - 50B703F9D41E4C719C7D943A - E952D13F467343DD8D1A3302 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release + fileRef + 4BE1491F73B242EAAFBFAA55 isa - XCConfigurationList + PBXBuildFile - 202A037C6FBB44BABF42125A + 764AFEF289FF4E1C9EC30290 - fileRef - 9444A72A6A6041E8B70A9767 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWDeviceInfo.m + path + Classes/Core/KWDeviceInfo.m + sourceTree + <group> - 20EBAD06F679446B9038C1F6 + 775B7615ED0A468B956BDBD9 fileRef - C4331BC551114FD2A5514EB1 + 2E5DAB690DC345999748CD56 isa PBXBuildFile - 213298167DAC47C090CF05BD + 775F5B04E33F48E589B7B129 - buildActionMask - 2147483647 - files - - A4CDE869765E42D0A1F4C040 - + includeInIndex + 1 isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Reachability.m + sourceTree + <group> + + 77CD60CC95334DF88158CE24 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWCallSite.m + path + Classes/Core/KWCallSite.m + sourceTree + <group> + + 77EF22B0C303493BB94EAAB2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACSequence.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACSequence.m + sourceTree + <group> - 216AD05FC2104E778C169485 + 782D1CA7F52D4675B3435C0F includeInIndex 1 @@ -1162,12 +6143,41 @@ PBXFileReference lastKnownFileType sourcecode.c.h + name + ReactiveCocoa.h path - Pods-specs-OHHTTPStubs-prefix.pch + ReactiveCocoaFramework/ReactiveCocoa/ReactiveCocoa.h sourceTree - SOURCE_ROOT + <group> + + 782EE19232114AF985074197 + + fileRef + 0231221FB2D2451DB84605B0 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 78E9687B8FE442D49A830D0A + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWBeBetweenMatcher.h + path + Classes/Matchers/KWBeBetweenMatcher.h + sourceTree + <group> - 223A1477DF814A05BB730288 + 79D933CCD0034897930AB598 includeInIndex 1 @@ -1176,40 +6186,82 @@ lastKnownFileType sourcecode.c.objc name - KWGenericMatchingAdditions.m + UIBarButtonItem+RACCommandSupport.m path - Kiwi/Classes/KWGenericMatchingAdditions.m + ReactiveCocoaFramework/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.m sourceTree - SOURCE_ROOT + <group> - 226F7DA97B5B4D399E0C1B37 + 7A02756C69AD4047B0D693F3 fileRef - B9FE69D9E11C46998AC60AD7 + A5155DDD6B6641BB815A68B5 isa PBXBuildFile - 229A240168A445D580878E21 + 7A17300E4D674CC0B2A68C8C + + buildConfigurationList + 3C3E3F29E94443A280E69C69 + buildPhases + + 9B4A5F637F9049D39061F3A5 + DA98C7D92BEB412BBEDA7B0E + 94FA736471CA4097B15F5460 + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Pods-specs-Kiwi + productName + Pods-specs-Kiwi + productReference + 6AB2D511606C49749280946E + productType + com.apple.product-type.library.static + + 7AFB8754ABC2473ABF4AC408 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.script.sh + sourcecode.c.objc + name + KWExample.m path - Pods-resources.sh + Classes/Core/KWExample.m sourceTree - SOURCE_ROOT + <group> - 238E720EAB654D9D969FC9D7 + 7B0D7C240C934B1697476414 fileRef - 7D552DF2DCE5463CADE3D029 + 939A66B594494711AC59AF99 isa PBXBuildFile - 240B65CBB16B437FB2024905 + 7BA7F275E33D4A7EB5BE4BFD + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWRegisterMatchersNode.m + path + Classes/Nodes/KWRegisterMatchersNode.m + sourceTree + <group> + + 7C2BF410800D4277894EEDE4 includeInIndex 1 @@ -1218,75 +6270,94 @@ lastKnownFileType sourcecode.c.h name - KWRegisterMatchersNode.h + UISlider+RACSignalSupport.h path - Kiwi/Classes/KWRegisterMatchersNode.h + ReactiveCocoaFramework/ReactiveCocoa/UISlider+RACSignalSupport.h sourceTree - SOURCE_ROOT + <group> - 2438A481705B47BF871A4F0F + 7C8E67E919E147ECAF9B955A fileRef - 7CE16008961B46459A91E027 + 8A29DFF597DC4A6CA2751F1E isa PBXBuildFile - 245FF8F6735E4CCBA4CC749F + 7CF29AB1C9DD42C28C77E661 fileRef - F30C2226942540408C5925FF + C3FDF3D294E44861BAF65C16 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 24A18E88F0354422BD3DCCE4 + 7D70C0B790D74EEE959F8F7C includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.h path - Pods-Reachability.xcconfig + Reachability.h sourceTree - SOURCE_ROOT + <group> - 25C53005B0614893BA1445E9 + 7E41DB51032F433889882C47 - buildActionMask - 2147483647 - files - - 340143260ABF4E6994CB3252 - + includeInIndex + 1 isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UIGestureRecognizer+RACSignalSupport.h + path + ReactiveCocoaFramework/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h + sourceTree + <group> - 25D35DB0053540EBAC39E78A + 7ECB4A91B62B403080B42618 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - base64.h + NSFileHandle+RACSupport.m path - SocketRocket/SocketRocket/base64.h + ReactiveCocoaFramework/ReactiveCocoa/NSFileHandle+RACSupport.m sourceTree - SOURCE_ROOT + <group> + + 7EEBA25E56A64EA5A9C6855F + + fileRef + E86EDC8701714880873A623F + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 26997F9AF54445F186B33E81 + 7EF35086A7AB41868771C713 fileRef - CCAE54C648E04C549E1C1A25 + 2976892B65FC46F58D7D910A isa PBXBuildFile - 27FA6CEB9CD243698A4145AC + 7F58C63B37154AA09E33212B includeInIndex 1 @@ -1295,28 +6366,88 @@ lastKnownFileType sourcecode.c.objc name - KWNull.m + NSObject+KiwiStubAdditions.m path - Kiwi/Classes/KWNull.m + Classes/Stubbing/NSObject+KiwiStubAdditions.m sourceTree - SOURCE_ROOT + <group> - 28376C62F15841FC890EF7F5 + 7F87E11829654238834014A2 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + text.xcconfig + path + Pods-Reachability-Private.xcconfig + sourceTree + <group> + + 7FFB8912F68C4C55B69DD2FC + + fileRef + 94A446E926AF45C3A395FFD9 + isa + PBXBuildFile + + 801AF02213014B5D8E697C8E + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h name - KWAsyncVerifier.m + OHHTTPStubsResponse+HTTPMessage.h path - Kiwi/Classes/KWAsyncVerifier.m + OHHTTPStubs/Sources/OHHTTPStubsResponse+HTTPMessage.h sourceTree - SOURCE_ROOT + <group> + + 8096CEE89625406A987BAFA2 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-specs-OHHTTPStubs.a + sourceTree + BUILT_PRODUCTS_DIR + + 80AB88B3625A472AAC21165E + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACUnit.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACUnit.h + sourceTree + <group> + + 80EC3D987E4B478883634DA4 + + fileRef + 5B10FF0A2E39458BA5CCF066 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 28D2C822EA74468D9FBF05CA + 80EC8030A61D4D3E84DB3C5A includeInIndex 1 @@ -1325,64 +6456,243 @@ lastKnownFileType sourcecode.c.h name - KWSpec.h + NSURLConnection+RACSupport.h path - Kiwi/Classes/KWSpec.h + ReactiveCocoaFramework/ReactiveCocoa/NSURLConnection+RACSupport.h sourceTree - SOURCE_ROOT + <group> - 291CE5E8A70B4984B3F12934 + 81523A0DA42B453E9CFF5D5F includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - NSMethodSignature+KiwiAdditions.m + KWHaveMatcher.h path - Kiwi/Classes/NSMethodSignature+KiwiAdditions.m + Classes/Matchers/KWHaveMatcher.h sourceTree - SOURCE_ROOT + <group> - 2A1CE86002FC46128B0EC7F1 + 8167F9FB3A3B4622B847CEB6 fileRef - 8D775504D1CB4769B5F08C04 + 26980E5004664BFB9EC72017 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 2A545C2E7E134D1D87B6F30B + 816BEBCA51AD4D2FA8F8254A - fileRef - 28D2C822EA74468D9FBF05CA + children + + 07C46633DE374EBE9CFB823B + FB4CDE8EDA5D4296BBC9A542 + E6685215037849B0910C5876 + 21EBDA1695F44BE3ABA7DE15 + B63DEE63C0E4441B80B8A7D5 + 91C6F3955D674210A0669CD2 + A535A398C3024591A1917ACD + 6FBC08E5F2524698991953EE + 78E9687B8FE442D49A830D0A + F6F2C166D865440486566456 + 6AC217EF0A27440F9C444017 + A710B3900E1B45989DA077C7 + E0374AB84A8742499DE195F6 + 17AE2CDEB5D14F01B28F6CD1 + FB10ACB930CF4319B07FDE17 + E53FA948F2044A4FA2A89C5F + 23FA7C3F289845AC84B59A01 + 084C4B4425614D649A7A448A + 2F0E6C9C1BC4436492B6497B + CF73D0F1A8AB473B934CBBF3 + 5A0CF3C41E364004B08DBD37 + 0BA5C0513D034723A8DE6BCB + 9413B4EEECD94BEABED8F225 + 29809852FD4D460FB0003AE9 + C80D0DB4017F4CBDA0AB52E1 + CF79F5BF931545EEAF40E94E + 38E2F1AB87714FEC9BC6B11B + F5547ED532444DF189741848 + 9B94DBA390254216B6E8C468 + 4EDC2E1BD8804A66BF6942A5 + 0AF66032E901412499D5F669 + E1B0DD643D5B44E99DFF8B8C + 9F3BF90077ED4DD1825C66B0 + 45FD57861A1D4FFFAFA7F648 + 49EDB7634E9040C989D900A7 + C3FDF3D294E44861BAF65C16 + 52C4F189091E43EEA9DE1F72 + 77CD60CC95334DF88158CE24 + 505E201B15B3426787D333E1 + 5EFF7570AB80460182B3714A + 165BC2F4DAEE491AB3A77F83 + 12DD7C8DAAEA4A07A6F4510F + 6A5FD350B4224D3EB9A89962 + C7052C3F6BBC4350BCBC5FFF + 25CE9BB4E5B840B1901F051F + 4AAB9CF4A49F4B9EB29B88F3 + A2368088F9A64C368F2CC7F6 + 53C2E057EBA14ED7B1C7B18B + 38176EE406194B4E928DDAC8 + 38CC0CEAF0FE4B2786FFA619 + 363E8B74669A495BA73A6FB9 + 52919260BB304A3BAFEBA71B + 764AFEF289FF4E1C9EC30290 + A56725419FD64D229D7BF1EF + E86EDC8701714880873A623F + 70851DE42D9C4C9593C99484 + 7AFB8754ABC2473ABF4AC408 + C618D768A4654232BD2EC2B4 + C67D555AA53848B9B581BD4D + 4289D64B356A4CF683A33737 + 03F0A3EA98BA4F0BB6C14D50 + 8A0FB4395F314B35B1721789 + 013387781B774D4A8F8A3830 + 23107D078833429B9B39622C + DFE20A0FB24F4FA49398D470 + 1196D82E7B67427AAAF2ACAE + 0F731461CA5D4CBF834C5BB0 + 2468208932F441689ED91E33 + A1A046911046476BB2F635FE + 6A97D5CFA7A844B5ACA388B5 + E43A1A3CDF0E4FF3A2CB6AB6 + D5FB67F6BC1B4D2084E07E1D + 1B4721906E994BAE80545326 + 1B9F5738B8E841A7B3109410 + 1480529E3E834DD3AD07EB7E + 607B91A49C0B48C6AE0E2D2D + 44CDF3618F3C49D4A9FBD7CA + AB723769ADCF4B089F36EEB7 + 1BF788A36B514856915126FC + 81523A0DA42B453E9CFF5D5F + 84E5FE2698834E8FA3752E89 + A3D9DC691BA74169AFE26DFE + 21E7417DB8F143F7A1006EE5 + 1E031442C0CF49F7A0317B08 + 4DADE293366B4247A59A44F9 + 59818CB985A64CB5A5CAE8ED + 0231221FB2D2451DB84605B0 + 5C79F2D07B8849018C2F72D2 + 53F078F2C50E444682C31E84 + 5460193ADC744573AC670EFC + 001110B074434775B84ED439 + 3A6D2B7073604E8CB7C613FE + 57A55F8AA7334085B6DAC3DA + C2A11F03D15E41839028AF2B + FCED67C1F64340509884414E + D9D205F28BE24561B04614C4 + 617E3068F2BA46B98A64CFAC + 94A446E926AF45C3A395FFD9 + 1CBD6837552743EAB762FA89 + 85DFB2EE60734DD68FAC92E0 + 15C7D5AD0F934960A85BF5C3 + 63DAD54396A34701AF8BB6DB + D940BE83D1CF4388BDB4B0B3 + A38B7D1010274172B0062C1C + 8B16B51651334BFD9EE12EDE + 6D710363D73F418E8FC175E0 + 30A89854BDE04B849C915658 + DB7764BA57594BAEB5A8AFA8 + 61F7055EA57F45E8A114A2D7 + 2DFDA3FBCFCB4A3089357C7A + 89764E4D684246AA884CB820 + 5F634A62DCCC4DEC93CFE6F4 + 9E6E58262EA34A27A4BCFE8A + EAC662D4BF854D2F954B65CB + 45183855128142DEA48627EA + B39C8C1C628242DD90796CCA + 995144A8C6B8455883581300 + 5175D4FCB5124320B8C29426 + 670875371A8241D7A19B76AF + 7BA7F275E33D4A7EB5BE4BFD + 22C3B4D28E024CDCA44EF7E9 + 49F7DE07BB3B4DA5AFCDF02B + E6E8BDB4AA7C4F88921BD822 + ABCF6FE3076B48F685D25B8E + 3121C12B2EFD4872844EAAEA + 6845B673E8E64A34BF0E39E2 + 3B7F625018894E19A62DF6ED + 9EC7492FE9004747A9D407CD + FE740EBC0CA442FBA9454205 + 10658E9212EC49EE9541292E + 4FE38A490BDF4DE5852D6501 + 2BE54AB79DF647CF8F2369C4 + DEFD2EC3A4784EE98B7D5C36 + 32205A7EFB6D4338B651931A + 3EF0290174634ADCA00BB160 + 2976892B65FC46F58D7D910A + F3F43C7F5F194793A7D509D9 + 9B237D44F19A4043A2D48413 + FFE487E02A694212837E112A + AE481CC5C97D41F38D2C1C40 + 47A9AFC873764952B3F144D1 + 6058B66709014A13A1BBBDED + 20A1D77AE9BF4322903D65B6 + B2991BB941724AAFB030DCC6 + E3E071BE40D44EEBB95ECD4F + A46109F5B40A4EB69B80EA44 + 6E6D9E89568A4500AA50B380 + 972C108F34174B9D9D911332 + 42505EEC636D4FFFA862FF4B + FDEF44EA44D543DD9E9B5050 + 4BE1491F73B242EAAFBFAA55 + D52CE39566D94A66B5471987 + 843D6BB84306443EB9DFB285 + 65DC9B41182D4A509A5D67F7 + B6B7AEA943D74EC8A86E1A4A + C8FB0466CAA346009167A0ED + D7B403F602CB407E86591FDE + 7F58C63B37154AA09E33212B + 1767930D256148A8B1775896 + 908385FAB56C46D0A389EBA5 + 1CE1022CABFC45EF8DA11D0C + 70657A11F88243A2A3594B84 + 308EBCB54E6F4711B00EB2CD + 38BD222F9B9547418293F9AA + isa - PBXBuildFile + PBXGroup + name + ARC + sourceTree + <group> - 2AC39C6B7E8641359DA97E9D + 817ADFDDDC8A4693A281B001 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWBlockRaiseMatcher.m + NSDictionary+RACSequenceAdditions.h path - Kiwi/Classes/KWBlockRaiseMatcher.m + ReactiveCocoaFramework/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h sourceTree - SOURCE_ROOT + <group> - 2BC0148E6B2447809713C40D + 81F1ACD71C4B408A94634DDF fileRef - 3FB98F70960B4B55A1C528C1 + C72B1B3324B2445290D92990 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 2D8DF795D01E4B14B9B183D8 + 8234BFB6775B47D192155B21 includeInIndex 1 @@ -1391,70 +6701,70 @@ lastKnownFileType sourcecode.c.objc name - NSObject+KiwiSpyAdditions.m + UISlider+RACSignalSupport.m path - Kiwi/Classes/NSObject+KiwiSpyAdditions.m + ReactiveCocoaFramework/ReactiveCocoa/UISlider+RACSignalSupport.m sourceTree - SOURCE_ROOT - - 2DAFDBBA45734E62A17E83F0 - - fileRef - D6BE811CAAA440A3842014B6 - isa - PBXBuildFile - - 2DC346E40D444B149107F158 - - fileRef - B84A670C25984F7E84EACE3E - isa - PBXBuildFile - - 2DDA3EC479904DC487F80E2D - - fileRef - E9F4040FDC9D40A8B360155D - isa - PBXBuildFile + <group> - 2E3D3786DF1548D0902F607E + 825E6B4BC785485BAE460FD1 - fileRef - E12AE8C526574ECB927D3427 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + NSObject+RACPropertySubscribing.m + path + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACPropertySubscribing.m + sourceTree + <group> - 2E428323E50E43A58AB779C8 + 827BB873FD4A49E9A586391B - fileRef - 54A6AA3195DF44A9A3DF84FD + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSSet+RACSequenceAdditions.h + path + ReactiveCocoaFramework/ReactiveCocoa/NSSet+RACSequenceAdditions.h + sourceTree + <group> - 2EEE501CF58448619D929D2E + 8324546C8B5549F2AEC52A7D includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - NSData+SRB64Additions.m + UIDatePicker+RACSignalSupport.h path - SocketRocket/SocketRocket/NSData+SRB64Additions.m + ReactiveCocoaFramework/ReactiveCocoa/UIDatePicker+RACSignalSupport.h sourceTree - SOURCE_ROOT + <group> - 2F1B3CB422A347D4B7360CAA + 832E30BC52F844C580299D6F fileRef - 53741485212040759799F234 + 30A89854BDE04B849C915658 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 2F2F660DFD54463BA9D9A7BF + 843D6BB84306443EB9DFB285 includeInIndex 1 @@ -1465,11 +6775,18 @@ name NSObject+KiwiMockAdditions.h path - Kiwi/Classes/NSObject+KiwiMockAdditions.h + Classes/Mocking/NSObject+KiwiMockAdditions.h sourceTree - SOURCE_ROOT + <group> + + 847687C1885545589F4F7474 + + fileRef + 16EFACA5F7FA4B478D979016 + isa + PBXBuildFile - 2F60E112C3054655B705B2B7 + 84E5FE2698834E8FA3752E89 includeInIndex 1 @@ -1478,27 +6795,32 @@ lastKnownFileType sourcecode.c.objc name - KWInequalityMatcher.m + KWHaveMatcher.m path - Kiwi/Classes/KWInequalityMatcher.m + Classes/Matchers/KWHaveMatcher.m sourceTree - SOURCE_ROOT + <group> - 2F90A978A5FF4521A6E4A2D6 + 855153BF458B49F5A337A0B8 fileRef - 625877F642B546C98332C80B + F6F2C166D865440486566456 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 306D7AB6D9F8435781B83714 + 85B672297B174380A590C302 fileRef - C39ECDF8F3524523B71BEF0B + 1E4953BD4CE64B818F6690A3 isa PBXBuildFile - 3080884C6C994C5B8835C3ED + 85DFB2EE60734DD68FAC92E0 includeInIndex 1 @@ -1507,125 +6829,80 @@ lastKnownFileType sourcecode.c.h name - KWSymbolicator.h + KWMessageTracker.h path - Kiwi/Classes/KWSymbolicator.h + Classes/Core/KWMessageTracker.h sourceTree - SOURCE_ROOT + <group> - 30C889CB89914BC68C422D9D + 85EE0992B6864452A081CF12 - baseConfigurationReference - 9DBAD86B19EC41D49402D8F5 - buildSettings + fileRef + FDCCF2F66E12437C9C08B3E7 + isa + PBXBuildFile + settings - ALWAYS_SEARCH_USER_PATHS - NO - ARCHS - armv6 armv7 - COPY_PHASE_STRIP - NO - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Pods-SocketRocket-prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 4.0 - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker - isa - XCBuildConfiguration - name - Debug - 30E5C49E00D54F69B8E48149 + 867BBCC9DDFA45E4A821CD35 fileRef - ED0883BBB05E49E0B2A79C2A + FFE487E02A694212837E112A isa PBXBuildFile - 30F560384FFF4C8D8F3D33A1 + 86981932B47E4AD0AE318933 children - 57D595545632404B8FCFEEF1 - C16216BA42174DE598332FD8 - 97118765DBCE41E1ABED0461 - CF1E2BCA58BB464BAC4A479A + 33D5D82C87E24A8788CB6476 + B83F6A514F0D4F2893E350E4 + 96F942D43EB7434F97306CCE + D5804D9293BA4C5FA83AB3D7 + 450C846012C943D9B9E51F38 isa PBXGroup name - Pods-specs-Kiwi + Pods sourceTree <group> - 310BE70F66F64D9DA731F0E3 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWStringContainsMatcher.m - path - Kiwi/Classes/KWStringContainsMatcher.m - sourceTree - SOURCE_ROOT - - 319638578ECD461392837CCB + 86A29040DAA345B78AF60551 fileRef - 8E8263928C3B4EBFB09597A6 + D1EE5FE4D66E4C6BAE0B8370 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 31A5C113F4F44D96A063C878 + 86C36F6652704BD6AD9EDE25 fileRef - 42C41A69205E4B2287F16A35 + 40D261812DE34679AA920DA7 isa PBXBuildFile - 31D78A7450F348EEB07D1044 + 86D4966088424658BE9580E9 fileRef - 5E15AB3896BE4E7287F8A8C0 + 7BA7F275E33D4A7EB5BE4BFD isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 33AB4314EB6649A5884333EE + 86E8FC92294145DD9425354B includeInIndex 1 @@ -1634,20 +6911,26 @@ lastKnownFileType sourcecode.c.objc name - KWMatchVerifier.m + RACSignal+Operations.m path - Kiwi/Classes/KWMatchVerifier.m + ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.m sourceTree - SOURCE_ROOT + <group> - 340143260ABF4E6994CB3252 + 87383DFA27664E4D9B5A3ECD - fileRef - 95207EAC5C8E42379B8E46F4 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-dummy.m + sourceTree + <group> - 340DF864C1BA4D1EABD936C6 + 88D96CE6C389411DBFCE9E12 includeInIndex 1 @@ -1656,20 +6939,13 @@ lastKnownFileType sourcecode.c.objc name - KWBeNilMatcher.m + NSNotificationCenter+RACSupport.m path - Kiwi/Classes/KWBeNilMatcher.m + ReactiveCocoaFramework/ReactiveCocoa/NSNotificationCenter+RACSupport.m sourceTree - SOURCE_ROOT - - 341A31ECC2E84639856C9C23 - - fileRef - A1005BAE4B444499834A84BC - isa - PBXBuildFile + <group> - 348FFF89C3804BFF98B8640F + 89764E4D684246AA884CB820 includeInIndex 1 @@ -1678,13 +6954,13 @@ lastKnownFileType sourcecode.c.objc name - KWBeZeroMatcher.m + KWPendingNode.m path - Kiwi/Classes/KWBeZeroMatcher.m + Classes/Nodes/KWPendingNode.m sourceTree - SOURCE_ROOT + <group> - 35207C7EBAC74DBCA4BC4B3B + 898C98415C554D62A2228E38 includeInIndex 1 @@ -1693,56 +6969,42 @@ lastKnownFileType sourcecode.c.h name - KWExampleNodeVisitor.h + RACCommand.h path - Kiwi/Classes/KWExampleNodeVisitor.h + ReactiveCocoaFramework/ReactiveCocoa/RACCommand.h sourceTree - SOURCE_ROOT + <group> - 356153393B744B82BB4136C0 + 89EA8FF6E6A041849A5BFE0E fileRef - 76708E4DABB948E7AD41EC5F + 827BB873FD4A49E9A586391B isa PBXBuildFile - 3627A09A59E04E4BBE9D3DA9 + 8A022697C14B40AEB11590C2 fileRef - 9201585E06B3403C9088447C + B503B78C35084A12827138E4 isa PBXBuildFile - 3662B2F395594173B059E575 - - children - - 24A18E88F0354422BD3DCCE4 - 1B204C7016914DAB98C1018A - F6233DE6A65040D38900D8BF - E9C914CC13514473A8D69DE4 - - isa - PBXGroup - name - Pods-Reachability - sourceTree - <group> - - 370967D45A33478F8707D998 + 8A0FB4395F314B35B1721789 includeInIndex 1 isa PBXFileReference + lastKnownFileType + sourcecode.c.objc name - base64.c + KWExampleSuite.m path - SocketRocket/SocketRocket/base64.c + Classes/Core/KWExampleSuite.m sourceTree - SOURCE_ROOT + <group> - 372F2CC1B1924FBFAA93CAA4 + 8A29DFF597DC4A6CA2751F1E includeInIndex 1 @@ -1751,33 +7013,13 @@ lastKnownFileType sourcecode.c.h name - KWWorkarounds.h - path - Kiwi/Classes/KWWorkarounds.h - sourceTree - SOURCE_ROOT - - 374CD74F777F4A0A94E05CB1 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text + UIControl+RACSignalSupport.h path - Pods-acknowledgements.markdown + ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupport.h sourceTree - SOURCE_ROOT - - 376D5CBD49574D7C8B102AE0 - - fileRef - 8DBB0F91D01B43AD8C733B2B - isa - PBXBuildFile + <group> - 388E29A4E8A248779E285A6F + 8A56347717AD4EE68AA2D4E7 includeInIndex 1 @@ -1786,60 +7028,70 @@ lastKnownFileType sourcecode.c.objc name - NSInvocation+OCMAdditions.m + RACStream.m path - Kiwi/Classes/NSInvocation+OCMAdditions.m + ReactiveCocoaFramework/ReactiveCocoa/RACStream.m sourceTree - SOURCE_ROOT + <group> - 39447B95C5DB426295DE2531 + 8B1121BCEBF64618878879F9 - fileRef - 88A88235D0A649B7BFC46CCE + containerPortal + EFBB6CF77B5E4364844354C4 isa - PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc -DOS_OBJECT_USE_OBJC=0 - + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 2820B6B2A6424E40852AC3CA + remoteInfo + Pods-SocketRocket - 3AFF981E900D47C1B5E326A5 + 8B16B51651334BFD9EE12EDE includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWValue.h + KWNilMatcher.m path - Kiwi/Classes/KWValue.h + Classes/Matchers/KWNilMatcher.m sourceTree - SOURCE_ROOT + <group> + + 8B7888C7B1FA415C85F81C5D + + fileRef + 4289D64B356A4CF683A33737 + isa + PBXBuildFile - 3B56C057F37A45C4BE40A902 + 8B7D157368574B0680C410D6 fileRef - 955B29E488F444B8BC4126EE + 31DC8BEEF4994929A8BC8E1B isa PBXBuildFile - 3B78E950BD1846148855AF6A + 8BE6140DD8444485BA6359E9 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.objc + name + NSDictionary+RACSequenceAdditions.m path - Pods-specs-OHHTTPStubs-Private.xcconfig + ReactiveCocoaFramework/ReactiveCocoa/NSDictionary+RACSequenceAdditions.m sourceTree - SOURCE_ROOT + <group> - 3B9AECF466C745E7BB285457 + 8C008D29EEA34A128D3A646B includeInIndex 1 @@ -1848,58 +7100,87 @@ lastKnownFileType sourcecode.c.objc name - KWProbePoller.m + RACSubject.m path - Kiwi/Classes/KWProbePoller.m + ReactiveCocoaFramework/ReactiveCocoa/RACSubject.m sourceTree - SOURCE_ROOT + <group> - 3BAE8CEA85634EB6B263A2B8 + 8C78ABEA1400469A8103385B includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWUserDefinedMatcher.m + NSString+RACSequenceAdditions.h path - Kiwi/Classes/KWUserDefinedMatcher.m + ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSequenceAdditions.h sourceTree - SOURCE_ROOT + <group> - 3C228FEF3ACE4BB192AB3F46 + 8CEAEE5A048148D58E2C3B5F fileRef - 1606192A39B44155BE8B14AA + A710B3900E1B45989DA077C7 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 3DEC7F57668B418B9377DDCF + 8DD0458DB3C94CFA9943D290 fileRef - 5B62C400020A49C0A3A9C3BC + 23FA7C3F289845AC84B59A01 isa PBXBuildFile - 3E17716F92994A4791682356 + 8F135A7D903546928291CC4C - buildActionMask - 2147483647 - files + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UIActionSheet+RACSignalSupport.m + path + ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.m + sourceTree + <group> + + 8F2DBD471CD04FA295E40937 + + fileRef + 1CE1022CABFC45EF8DA11D0C + isa + PBXBuildFile + + 8FEA51186DE8489A9D03538F + + children - 9ED5A2C1C0B0445E9B4C326D - 5E062E8C0BA142A0982B5962 - 821DAA9BE35445D7AC272F14 - 7109FF14CE324EE989283665 + C6E0DD264A3547CF9737B6B3 + 54AA229EC0174CF7B1C0E463 + FDEB858833114BF59D388AB4 + E10C6851AA0F4002A89EB05A + 0AE6530FB0B249739CA58D7F + B4B3D28FF3F448DBB11AE6F6 isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXGroup + name + Pods-specs + sourceTree + <group> - 3FB98F70960B4B55A1C528C1 + 908385FAB56C46D0A389EBA5 includeInIndex 1 @@ -1910,92 +7191,94 @@ name NSObject+KiwiVerifierAdditions.m path - Kiwi/Classes/NSObject+KiwiVerifierAdditions.m + Classes/Core/NSObject+KiwiVerifierAdditions.m sourceTree - SOURCE_ROOT + <group> - 3FBDDA7B081C4662BFB5DD01 + 90AD0B7216834F119753C12D fileRef - 56580F1050924428A2F84270 + 4C54D194C53543D8BE1112AA isa PBXBuildFile - 40B80186D0084BCF9C84BA60 + 90B8739644574CF0AB00197E fileRef - 4EC3CD1D81334E07A8A80982 + 31C79F6E270C4E75B90D6366 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 40D7030FE86145B38E4CF7EB + 90ED73B499DE43279E2F836F fileRef - D669F81889054783B93FF400 + 49F7DE07BB3B4DA5AFCDF02B isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 41F47E5C4F8548AD9A4205A1 + 9101A6EBD2D44F088893E383 fileRef - 28376C62F15841FC890EF7F5 + DB7764BA57594BAEB5A8AFA8 isa PBXBuildFile - 41F87030F0624DC0B6A732E0 + 914CFE406A1A49C1A13886DE - includeInIndex - 1 + fileRef + 4AAB9CF4A49F4B9EB29B88F3 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - KWHaveMatcher.h - path - Kiwi/Classes/KWHaveMatcher.h - sourceTree - SOURCE_ROOT + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 41FE594754274C6089C37232 + 917201561142444EBE1D38B3 - includeInIndex - 1 + fileRef + ABF248B913A64842945283E9 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWBeBetweenMatcher.m - path - Kiwi/Classes/KWBeBetweenMatcher.m - sourceTree - SOURCE_ROOT + PBXBuildFile - 4289EC38FDB34B3FAD4713D2 + 919827833CEB49379E7F1B4C fileRef - 41F87030F0624DC0B6A732E0 + 2D5F9D58B5C04D0384A613D4 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 428A8EB78BC9465BB54D8B36 + 91C22DC7028740F7AA3BF5A2 children - 85C0BC2D26F7457991F02565 - 7813868A8AC4428FB5763DB3 - 15CD267206AF4CF192761CCD - CCD666EBDE1D47BDB32A14E9 + 56400FDC5DB443A2885B3444 + FB1F773527E9460CAF4BD5B1 isa PBXGroup name - Pods + SenTestingKit sourceTree <group> - 42C41A69205E4B2287F16A35 + 91C6F3955D674210A0669CD2 includeInIndex 1 @@ -2004,64 +7287,91 @@ lastKnownFileType sourcecode.c.objc name - KWBeWithinMatcher.m + KWAny.m path - Kiwi/Classes/KWBeWithinMatcher.m + Classes/Core/KWAny.m sourceTree - SOURCE_ROOT + <group> - 42D8482887C2468FB2456054 + 91D6A91614E84DC1B2DE8628 - includeInIndex - 1 + buildConfigurationList + 3E2C3A50DA55437BACE31F65 + buildPhases + + CBE476986BED46B2AE234228 + CC5234A14FA5450CBA84E068 + + buildRules + + dependencies + + FEE159CDFAC845BCB30D4255 + 3D8619485F2E45F7A70AFF61 + isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc + PBXNativeTarget name - NSObject+KiwiStubAdditions.m - path - Kiwi/Classes/NSObject+KiwiStubAdditions.m - sourceTree - SOURCE_ROOT + Pods-specs + productName + Pods-specs + productReference + 1B1E2BE0D9C142F8A0EDC3C9 + productType + com.apple.product-type.library.static - 4373A6E2D1974C71856CD952 + 920241BDA6E640BD80591303 fileRef - 072ADA10D5A04A799A4785E8 + 3DDB8D2BD114419487E26EBD isa PBXBuildFile - 437DAE2ADC694F249B4A818D + 9243727EA53046C088EA7D29 - includeInIndex - 1 + fileRef + 607CB1E9991D4707B16708B9 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - KWGenericMatchingAdditions.h - path - Kiwi/Classes/KWGenericMatchingAdditions.h - sourceTree - SOURCE_ROOT + PBXBuildFile - 44BCC544D3B94617AC91D08E + 929EAC1E07E74B26A0708C35 fileRef - 0E80DAE469F348FCB7949B7D + FDEF44EA44D543DD9E9B5050 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 45707E12EE0641979AF86AEF + 92DAA3788893482284B3B4A8 fileRef - 7A1B44FC71AB4D22A19B6261 + 825E6B4BC785485BAE460FD1 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 939A66B594494711AC59AF99 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-SocketRocket.a + sourceTree + BUILT_PRODUCTS_DIR - 458BA5E50EDE46CB88EFEF52 + 9413B4EEECD94BEABED8F225 includeInIndex 1 @@ -2070,20 +7380,20 @@ lastKnownFileType sourcecode.c.h name - SRWebSocket.h + KWBeWithinMatcher.h path - SocketRocket/SocketRocket/SRWebSocket.h + Classes/Matchers/KWBeWithinMatcher.h sourceTree - SOURCE_ROOT + <group> - 475FD2E941CB4679AC3B85F3 + 9477E77017CD4E81862DF9C4 fileRef - 939578CAFC8942C2929F3F8C + 70851DE42D9C4C9593C99484 isa PBXBuildFile - 47A030E9480940B7896ACBF8 + 94A446E926AF45C3A395FFD9 includeInIndex 1 @@ -2092,80 +7402,170 @@ lastKnownFileType sourcecode.c.h name - KWInvocationCapturer.h + KWMatching.h path - Kiwi/Classes/KWInvocationCapturer.h + Classes/Core/KWMatching.h sourceTree - SOURCE_ROOT + <group> - 487796028E004CAFA462F59D + 94D2937F2F0843879A5AD800 + fileRef + 5EFCC5EDB86B44A480BEFA00 isa - PBXTargetDependency - target - EF4179F378294E3EB69819FE - targetProxy - 11F5DCEBEBB740B6A69A0315 + PBXBuildFile - 487988ED33ED45F481A15E07 + 94FA736471CA4097B15F5460 - fileRef - 27FA6CEB9CD243698A4145AC + buildActionMask + 2147483647 + files + + E1213643460642958D649FCE + C039367F642440AC85DFA655 + 4BCDCD22BB28414E88E04794 + 26A7941399134F12B72BC377 + 48F56E5C8A6A4FB38038A85B + 1E09996162E244058B4D3D62 + 0F2996306F364EDD8EF9E93B + F886DE7E8676427F87D42043 + 8DD0458DB3C94CFA9943D290 + 06A91B5C38E64907B50FEDB0 + 3C397594913246EFB9B82270 + 4629D1B6613048D5BBD5D5E9 + 48DC5DDF5C464AB6ADF4E764 + 9D6AE74FAA1B4DB9BA067A2C + E0027BB097AD4C6EA45A3611 + 94FB7053D8E34310A40850BE + 526923A419144AEF930312AB + 6323E4164CB2407191E76A9C + 3B95A93DD4C74BE0B1C7E770 + 044D8A6FDF734B5BADAA66F1 + 30F4A1DBA7FB429F9C6DFF8C + 4FF3B55A62E24AAF8CE79A80 + 2A4BA59C2A5A4C228C4B9921 + 1E517FE453AB48E8B10D55C4 + A99ED12B5CC242AEA41D9A62 + D0D7EAF4E1BB441AB64A686C + 073CD62202854060BC700F3B + C0000FA4AC614F85A6AAEC73 + 9477E77017CD4E81862DF9C4 + 24831DDF4BD24A7DB06C149F + F88005335C06425D9D887177 + 8B7888C7B1FA415C85F81C5D + 55DB72C014924CFDBBACCF47 + 997E11BEE2B64104A99C07D3 + B1912D8D293D42CFA7202233 + FF11E920904B443C8846264E + BB9CF27990F249D2B9EAF744 + 496CE7BA14E14DB19356B524 + 9A59DE5568F14D2093755C78 + E7CE9A40476E4DC88D10A08D + 1A9662EFC7CB4AC997E96AD3 + A6DDDACAF30640F3A4C4FCBE + 1EBEBBE90AF545D5A806A69D + C79A32E9E6E64222BA12FFD8 + 1AE7D8C1F1C24412A995A44E + 16025CDB86A743E0BFF80B49 + 1D67518734F548749C24FC18 + 164128EE9F234876B3B78C37 + C0F0AE0B8E374069808D86F2 + CE86F5A65304442ABA904D29 + 333B94E03902440E83486673 + BF6782ECD2B74669A3DAF779 + 7FFB8912F68C4C55B69DD2FC + EFD97812582444EBACF12D38 + 42D5700E210445D7B0A9FB02 + 5F2E20CF5D294912B2437B48 + 225387514E7C4DA58B9CF959 + D3A776CF462540D7A43A9271 + FEE820893D6B4E35AE687AC4 + 9101A6EBD2D44F088893E383 + EDC1B6A7D15C456293C5E20A + 5D4889F4156D417396193073 + FBED7EFDFEA44D2D8ED0A8CA + F829D6F0AA3A42258E849D38 + 4B28C413090B46CA9A83B802 + CEE530B8D6304A47BBCE9CA9 + DD79B55ADFC6408D845C2B4D + 2F8C8774421348369AF55001 + 573121D7EC914417A495863E + 4582A273CC384CDC8EBFBEA1 + 0D7274B3B43D4B298A4CEF8F + 3FAEF0E513B34E67BD3CFC17 + 5F8967E5B03049BBA2A0A412 + 5AFA2F7CE70544D5839018EF + 9760F8F4CE9E418EBC8D3DB4 + 18BA1B72619641C095E91267 + 7EF35086A7AB41868771C713 + D767F3D5A55F44E48F72FD5E + 867BBCC9DDFA45E4A821CD35 + B0C15D7E92EF44F7925704A8 + 3EA14A54C58D48CF9F7C86DF + AF845FC61A6F41CA992D3B53 + E7447CE4280F4724B2C81E43 + 28F6EF33E792451A9981ECBA + CF561A215F16423CB137145D + 3C6583EEBC334E95AE3C360C + 760905BFB0BD43C49CA8530F + 3F5EB2FD744444A0A97149A1 + BD15B7DA684943C880B74049 + CF8C0F038A2C469C870EC539 + 2087DAA3BD854501A01FD3B5 + 8F2DBD471CD04FA295E40937 + BCD21096616044C58CF399DA + 4E0C6EAC0CF44A7C8EAB9833 + isa - PBXBuildFile + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 - 48AE566003704B51BAEBF699 + 94FB7053D8E34310A40850BE fileRef - A1530E7E8B9040B1B0EFE966 + 0AF66032E901412499D5F669 isa PBXBuildFile - 491F3A30336742C09363FFFB + 9592740120A1493E93E8BC1F includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWPendingNode.m + UITableViewCell+RACSignalSupport.h path - Kiwi/Classes/KWPendingNode.m + ReactiveCocoaFramework/ReactiveCocoa/UITableViewCell+RACSignalSupport.h sourceTree - SOURCE_ROOT + <group> - 4C63A4539E65495786B6A65E + 9599F28F596F444A95E5AC5A fileRef - E5918B17FBEF460AADB6F368 + 42DA59E50BB244F7855B93D8 isa PBXBuildFile - 4C70122DFE714497B15FA06F + 95A40515E5484DA5A98324ED includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWBlock.h + NSEnumerator+RACSequenceAdditions.m path - Kiwi/Classes/KWBlock.h + ReactiveCocoaFramework/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.m sourceTree - SOURCE_ROOT - - 4C71C2970B4D4955979294B7 - - fileRef - 8BFB505CDDE24299A1CDBB9F - isa - PBXBuildFile + <group> - 4EC3CD1D81334E07A8A80982 + 964F5432DA6C4FEBBA264F70 includeInIndex 1 @@ -2174,96 +7574,37 @@ lastKnownFileType sourcecode.c.objc name - KWMessageTracker.m + NSObject+RACDeallocating.m path - Kiwi/Classes/KWMessageTracker.m + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDeallocating.m sourceTree - SOURCE_ROOT - - 5096A63C0CBD49DA96E42B59 - - fileRef - CE244AEA34B74D4DA111CDDA - isa - PBXBuildFile - - 50B703F9D41E4C719C7D943A - - baseConfigurationReference - C16216BA42174DE598332FD8 - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - ARCHS - armv6 armv7 - COPY_PHASE_STRIP - YES - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Pods-specs-Kiwi-prefix.pch - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 4.0 - OTHER_CFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_CPLUSPLUSFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration - name - Release + <group> - 50DC1D914ADE432CAF534667 + 96B7F329909D453C86941695 fileRef - 59B54FF0DA71484C8F6ACB63 + 3B1DDD364B68465A8D6BEB08 isa PBXBuildFile - 51F0BE639B794FCE8FD932D8 - - includeInIndex - 1 + 96F942D43EB7434F97306CCE + + children + + 7D70C0B790D74EEE959F8F7C + 775F5B04E33F48E589B7B129 + EB4322D0994449B8BC841731 + isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc + PBXGroup name - KWIntercept.m + Reachability path - Kiwi/Classes/KWIntercept.m + Reachability sourceTree - SOURCE_ROOT + <group> - 5299D1CAD5EA4887A25CBABD + 972C108F34174B9D9D911332 includeInIndex 1 @@ -2272,13 +7613,32 @@ lastKnownFileType sourcecode.c.objc name - KWMatcher.m + NSInvocation+OCMAdditions.m path - Kiwi/Classes/KWMatcher.m + Classes/Core/NSInvocation+OCMAdditions.m sourceTree - SOURCE_ROOT + <group> + + 9760F8F4CE9E418EBC8D3DB4 + + fileRef + 4711C209A0F04A33BEF461EB + isa + PBXBuildFile + + 978E7EAFA0F5430B85E4BB67 + + fileRef + 775F5B04E33F48E589B7B129 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 52FF9AB870254C3A93AFDFDE + 9862B06AB13C4156A7AF9D37 includeInIndex 1 @@ -2287,27 +7647,32 @@ lastKnownFileType sourcecode.c.objc name - KWDeviceInfo.m + UIDatePicker+RACSignalSupport.m path - Kiwi/Classes/KWDeviceInfo.m + ReactiveCocoaFramework/ReactiveCocoa/UIDatePicker+RACSignalSupport.m sourceTree - SOURCE_ROOT + <group> - 532C2C753A844FEDA2F4EB4B + 9877AA2093B14BB4B8926E2D fileRef - 33AB4314EB6649A5884333EE + C8AA860DA638408AA6B8F197 isa PBXBuildFile - 5340B9BB33D3456F918D2503 + 994427BAA136404593F2AE81 fileRef - 7E25B55285944F2E851E5827 + E43A1A3CDF0E4FF3A2CB6AB6 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 53741485212040759799F234 + 995144A8C6B8455883581300 includeInIndex 1 @@ -2316,43 +7681,33 @@ lastKnownFileType sourcecode.c.h name - KWPendingNode.h + KWReceiveMatcher.h path - Kiwi/Classes/KWPendingNode.h + Classes/Matchers/KWReceiveMatcher.h sourceTree - SOURCE_ROOT + <group> - 54A6AA3195DF44A9A3DF84FD + 997E11BEE2B64104A99C07D3 - includeInIndex - 1 + fileRef + 013387781B774D4A8F8A3830 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWCallSite.m - path - Kiwi/Classes/KWCallSite.m - sourceTree - SOURCE_ROOT + PBXBuildFile - 56580F1050924428A2F84270 + 99B4DB69908C4933B654DB2A includeInIndex 1 isa PBXFileReference - lastKnownFileType - sourcecode.c.h name - Reachability.h + base64.c path - Reachability/Reachability.h + SocketRocket/base64.c sourceTree - SOURCE_ROOT + <group> - 575696B34CB24CE999EC340B + 99BC9B80037545E9A1312F4A includeInIndex 1 @@ -2361,143 +7716,168 @@ lastKnownFileType sourcecode.c.h name - KWIntercept.h + NSData+SRB64Additions.h path - Kiwi/Classes/KWIntercept.h + SocketRocket/NSData+SRB64Additions.h sourceTree - SOURCE_ROOT + <group> - 57D595545632404B8FCFEEF1 + 9A101226EA804D41A1A9426F - includeInIndex - 1 + fileRef + EAC662D4BF854D2F954B65CB isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods-specs-Kiwi.xcconfig - sourceTree - SOURCE_ROOT - - 57F80BE3EF744F31803D3EC3 - - baseConfigurationReference - 65971647E977429D9AA5A4AE - buildSettings + PBXBuildFile + settings - ALWAYS_SEARCH_USER_PATHS - NO - ARCHS - armv6 armv7 - COPY_PHASE_STRIP - NO - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 4.0 - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker - isa - XCBuildConfiguration - name - Debug - 580EA428BAB346B5A621EDFE + 9A59DE5568F14D2093755C78 fileRef - 5C9D83F9D8F140EA8B5C47DC + D5FB67F6BC1B4D2084E07E1D isa PBXBuildFile - 585EB411E8D14F08845B7C34 + 9B04C7774DBD4540813332C3 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWGenericMatchEvaluator.h + NSString+RACSupport.m path - Kiwi/Classes/KWGenericMatchEvaluator.h + ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSupport.m sourceTree - SOURCE_ROOT - - 59587E7B09B54B78BF6B686B - - fileRef - 1807592351294E42A94014DC - isa - PBXBuildFile + <group> - 59B54FF0DA71484C8F6ACB63 + 9B237D44F19A4043A2D48413 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWMessagePattern.m + KWVerifying.h path - Kiwi/Classes/KWMessagePattern.m + Classes/Verifiers/KWVerifying.h sourceTree - SOURCE_ROOT + <group> - 5A6CD3A6B6614990947BAD10 + 9B4A5F637F9049D39061F3A5 - fileRef - 348FFF89C3804BFF98B8640F + buildActionMask + 2147483647 + files + + 33CC11796F674FF5BC461831 + EB5EFEE7325A4C29A2E98183 + E29BF73DA68F4C66BFAC1C5F + 5C5E27C9B60643FC8D80ACEA + 855153BF458B49F5A337A0B8 + 8CEAEE5A048148D58E2C3B5F + A1AB133D091B4F67A690AF66 + 1A9CE61DD2BE4C6AA39295E0 + 1410D58BDF2C4E81ACD4DD26 + FDCE235CDDC04F3783A057DE + A9ACA64456C3403ABAE0C796 + 34E8FA22E9C14E7B9D1ADE81 + A9432E4B7A1F4135A7FFEF0D + 5B89CEDDA19444AB8DF06696 + C1FC9493B8AB43719A87C911 + 4AE1A61BC0DD4C9E9CD2604F + AD3845B06CDD4D89B453A04D + 7CF29AB1C9DD42C28C77E661 + E22C450A2C054F14B5297477 + 6FEEEFDF86BE4F2CB552D965 + CC77A9FFF8614303909D25FC + 32E059818FB34D1A86B86298 + 914CFE406A1A49C1A13886DE + 611A49FF440E477F915695AE + F3D5A9B0E0864B92BED4B19C + ED0EA16EAD3246F5B066B049 + 7EEBA25E56A64EA5A9C6855F + B4F95EDAECFD4A7495DB5C24 + CCD44C07EF80467D8A1AF412 + E690EBEB17DD479ABC21280F + A1F7986C2BFD40FF8428B72D + 1C67FDC5DF604739AAC9DB2A + 994427BAA136404593F2AE81 + E049144009BE4DC4BE9E95E7 + E3A158ADB28F42C5ADA82BF1 + A3CE471C0E3A454A9ED549AC + 122F059AD9DA4D848CA50B7B + 1BDB732D39DE4A9286F4C16C + 0055A83E07D14041AE45B2BB + BFD8D238C4AD491EA0C85821 + 3F4AEEB0220845A28944E3D0 + 782EE19232114AF985074197 + BBBB2287045E498BA0E387AC + 4F44B9DC66AA4313932687B0 + 6986AB011AF0416FAEB384B7 + C8237553F2534857B63B86A6 + 129782B5D2AF45FB800DCBD9 + 9D1AAB1334D14BC8B1564BFC + C555614B3F294324AA222557 + 2A003E02B3E047B18BBB5353 + 9BF91DF2813C41D5B8D95275 + 832E30BC52F844C580299D6F + CA81E6D024644DC79F22EB49 + 09D3CE6DDCE44C8FADDA812B + 9A101226EA804D41A1A9426F + 4AC732E78D3E47E98CE7680B + C2B8138217AE475A9A243C0C + 86D4966088424658BE9580E9 + 90ED73B499DE43279E2F836F + F5B33270D3F74A39AD0B5823 + CFFBE6D8631D4C73AC139225 + B662762AD67D4C2A8FA211D3 + 409A3005FA504A7A8960A1F1 + 5B07A602B87949DD954D2B68 + 59C6EF44CE7D4799BD6AB4CA + 9F3C449CECC74377AF1FEDBA + 74F1BF00B1E14863A4FB758C + 2C5A81DD73BB498D98D802EC + 569352254EE6463B970A3278 + C3F4ED960DF447C999E09CCE + A042A54A38574B0BA27CE105 + 929EAC1E07E74B26A0708C35 + 4C90C4B7C78D40BFB79F39C1 + C015FC1DFEDF4EFABD6A29AB + 400CBD545F9A4EFE81A17037 + AC6FDCAB782347F3AE81CD6F + 6E86F9F3A1564E63B7B7A411 + 2BFC74F3A877468EA67CB913 + 54C7DB02FA3843B4AD94C3A9 + 86C36F6652704BD6AD9EDE25 + 47B9BE113A684A0AAA5035B2 + isa - PBXBuildFile + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 - 5AD0D48F3789483095D5B16B + 9B7761DB44FC48D78719A426 - includeInIndex - 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + wrapper.framework name - KWExpectationType.h + CFNetwork.framework path - Kiwi/Classes/KWExpectationType.h + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CFNetwork.framework sourceTree - SOURCE_ROOT + DEVELOPER_DIR - 5B62C400020A49C0A3A9C3BC + 9B94DBA390254216B6E8C468 includeInIndex 1 @@ -2506,35 +7886,64 @@ lastKnownFileType sourcecode.c.h name - NSMethodSignature+KiwiAdditions.h + KWBeforeEachNode.h path - Kiwi/Classes/NSMethodSignature+KiwiAdditions.h + Classes/Nodes/KWBeforeEachNode.h sourceTree - SOURCE_ROOT + <group> - 5B8BFCFE37B34B1A884613DF + 9BDE5E0F5477446D88E0A92C + explicitFileType + archive.ar includeInIndex - 1 + 0 isa PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWExample.m path - Kiwi/Classes/KWExample.m + libPods-ReactiveCocoa.a sourceTree - SOURCE_ROOT + BUILT_PRODUCTS_DIR + + 9BF91DF2813C41D5B8D95275 + + fileRef + 8B16B51651334BFD9EE12EDE + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + 9D1AAB1334D14BC8B1564BFC + + fileRef + AD9682A8A51B44FC99A05641 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fno-objc-arc -w -Xanalyzer -analyzer-disable-checker + + + 9D6AE74FAA1B4DB9BA067A2C + + fileRef + 38E2F1AB87714FEC9BC6B11B + isa + PBXBuildFile - 5BC48A8E9BDF43209E6FD932 + 9DFE77C7BF6241E7AF27A92E fileRef - CF1E2BCA58BB464BAC4A479A + A384ABADAFC7474BBEE9E44D isa PBXBuildFile - 5C4FD44BB8A74AED9CBD3267 + 9E0192D66CAA4C4E8112E83C includeInIndex 1 @@ -2543,13 +7952,20 @@ lastKnownFileType sourcecode.c.objc name - SRWebSocket.m + RACSerialDisposable.m path - SocketRocket/SocketRocket/SRWebSocket.m + ReactiveCocoaFramework/ReactiveCocoa/RACSerialDisposable.m sourceTree - SOURCE_ROOT + <group> + + 9E1DDA5F84BF4EDA871491BA + + fileRef + FEE67F238D7442EE9087A55F + isa + PBXBuildFile - 5C9D83F9D8F140EA8B5C47DC + 9E6E58262EA34A27A4BCFE8A includeInIndex 1 @@ -2558,60 +7974,59 @@ lastKnownFileType sourcecode.c.h name - KWStringContainsMatcher.h + KWProbePoller.h path - Kiwi/Classes/KWStringContainsMatcher.h + Classes/Core/KWProbePoller.h sourceTree - SOURCE_ROOT + <group> - 5CC394709A934094B0826155 + 9E7E79157A1846489300183A - includeInIndex - 1 + fileRef + 0A57737D13F54EABBFE70131 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWBeMemberOfClassMatcher.m - path - Kiwi/Classes/KWBeMemberOfClassMatcher.m - sourceTree - SOURCE_ROOT + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 5E062E8C0BA142A0982B5962 + 9E951A53251D49D98C70AE39 fileRef - 2EEE501CF58448619D929D2E + 5D9AC4410D294D8E8C1EF711 isa PBXBuildFile settings COMPILER_FLAGS - -fobjc-arc -DOS_OBJECT_USE_OBJC=0 + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker - 5E15AB3896BE4E7287F8A8C0 + 9EC7492FE9004747A9D407CD - explicitFileType - archive.ar includeInIndex - 0 + 1 isa PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWStringContainsMatcher.h path - libPods-specs-Kiwi.a + Classes/Matchers/KWStringContainsMatcher.h sourceTree - BUILT_PRODUCTS_DIR + <group> - 5E36E1F290EB4D94A815BE1C + 9F0422510B99491F85DFB101 fileRef - 689219963D094039A58E4F7D + 4A54E15C582F4D19A04A2C2A isa PBXBuildFile - 5E6FAEC9EA9442EAB40239E2 + 9F3BF90077ED4DD1825C66B0 includeInIndex 1 @@ -2620,108 +8035,115 @@ lastKnownFileType sourcecode.c.h name - KWRegularExpressionPatternMatcher.h + KWBlockNode.h path - Kiwi/Classes/KWRegularExpressionPatternMatcher.h + Classes/Nodes/KWBlockNode.h sourceTree - SOURCE_ROOT + <group> + + 9F3C449CECC74377AF1FEDBA + + fileRef + 584DFECE0CB6426E83E7DFA2 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fno-objc-arc -w -Xanalyzer -analyzer-disable-checker + + + A01E22736732438D87C15779 + + isa + PBXTargetDependency + target + EE9D25436D914DA8A870DEF3 + targetProxy + 04FFF191057D4BEAB06D51C9 + + A042A54A38574B0BA27CE105 + + fileRef + 972C108F34174B9D9D911332 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 5EF065DD59E74924B9AB2E12 + A11EE38E8A114B91BE61B5E4 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - Kiwi.h + SRWebSocket.m path - Kiwi/Classes/Kiwi.h + SocketRocket/SRWebSocket.m sourceTree - SOURCE_ROOT + <group> - 5F04555A9DD54A4BA34EDCA6 + A1A046911046476BB2F635FE includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWMessageTracker.h + KWFailure.m path - Kiwi/Classes/KWMessageTracker.h + Classes/Core/KWFailure.m sourceTree - SOURCE_ROOT - - 5F49EA6A860E46F0B96B2386 - - fileRef - BD068C43ED654803B8C71995 - isa - PBXBuildFile - - 5FE55B0238E24108BE1069DD - - fileRef - 8135B9B2F08041FA895A4ED7 - isa - PBXBuildFile + <group> - 60283588392E4FB892430642 + A1AB133D091B4F67A690AF66 fileRef - E9C914CC13514473A8D69DE4 + 17AE2CDEB5D14F01B28F6CD1 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 61DE25026F864EF0B63B3971 + A1F7986C2BFD40FF8428B72D fileRef - DEE08E213E904196BEBF63D7 + 1196D82E7B67427AAAF2ACAE isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 625877F642B546C98332C80B + A2368088F9A64C368F2CC7F6 includeInIndex 1 isa PBXFileReference lastKnownFileType - wrapper.framework + sourcecode.c.h name - Foundation.framework + KWContainStringMatcher.h path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/Foundation.framework + Classes/Matchers/KWContainStringMatcher.h sourceTree - DEVELOPER_DIR - - 627008D0168B424291561EEC - - containerPortal - 0777BA3BB9584122ACE4EE63 - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - F0531BAE563D403FBDFF4C89 - remoteInfo - Pods-specs-Kiwi - - 63A342EB93BE4A2C91FCE3BB - - isa - PBXTargetDependency - target - 99E902D1C70F44B3920567BD - targetProxy - F2A66714D0CA4948A6B8C157 + <group> - 64DB77C0D1CD4367A08FCDDF + A241D33728AD4094907B1422 includeInIndex 1 @@ -2729,84 +8151,88 @@ PBXFileReference lastKnownFileType sourcecode.c.objc - name - KWTestCase.m path - Kiwi/Classes/KWTestCase.m + Pods-Reachability-dummy.m sourceTree - SOURCE_ROOT + <group> - 65485A64A4D24C6D8039328A + A2B3F7BABBF246B0AB9BCB1B fileRef - 9676AEE801844D989D68B708 + E0C0BFDD55FF43C08BE8A9F7 isa PBXBuildFile - 657A9DDD284B4AE6AE5D289B + A32E5C12141144BCB3FD2C1F - fileRef - C37C48B8EA1E4F679BD0D967 + children + + C1BEF9F7291847B887252E58 + 32CD0EE8388E48FFBFA0DE33 + DF09A068E7064655ABD39DAF + AD9682A8A51B44FC99A05641 + 0D80D1BC092C484499F83E81 + CF9D8F2C2ECD45EA87BA15B7 + 4711C209A0F04A33BEF461EB + 584DFECE0CB6426E83E7DFA2 + isa - PBXBuildFile + PBXGroup + name + NonARC + sourceTree + <group> - 6596C90DF3734B2B9868C438 + A33605D89E534B8E964325E0 fileRef - ABA4519A10C240A992DFF2DE + 898C98415C554D62A2228E38 isa PBXBuildFile - 65971647E977429D9AA5A4AE + A384ABADAFC7474BBEE9E44D includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.h + name + UIButton+RACCommandSupport.h path - Pods.xcconfig + ReactiveCocoaFramework/ReactiveCocoa/UIButton+RACCommandSupport.h sourceTree - SOURCE_ROOT + <group> - 65AF4B9115714C2AA5CF7DEF + A38B7D1010274172B0062C1C includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWRegisterMatchersNode.m + KWNilMatcher.h path - Kiwi/Classes/KWRegisterMatchersNode.m + Classes/Matchers/KWNilMatcher.h sourceTree - SOURCE_ROOT + <group> - 65C0E3C67CEA4691863B66FA + A3CE471C0E3A454A9ED549AC fileRef - 52FF9AB870254C3A93AFDFDE + 44CDF3618F3C49D4A9FBD7CA isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 66D5F70B92834CDF8FEC9773 - - buildConfigurations - - C3A414A611E34C02B419C3AF - EF36D6613CF148BCB339F4FD - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 6760A93D5B2548379F37B686 + A3D9DC691BA74169AFE26DFE includeInIndex 1 @@ -2814,19 +8240,14 @@ PBXFileReference lastKnownFileType sourcecode.c.h + name + KWHaveValueMatcher.h path - Pods-SocketRocket-prefix.pch + Classes/Matchers/KWHaveValueMatcher.h sourceTree - SOURCE_ROOT - - 6783E85750AE4C4F8B415652 - - fileRef - BB472D7A2DAF4FADAF4FF338 - isa - PBXBuildFile + <group> - 689219963D094039A58E4F7D + A46109F5B40A4EB69B80EA44 includeInIndex 1 @@ -2835,41 +8256,55 @@ lastKnownFileType sourcecode.c.objc name - KWFutureObject.m + NSInvocation+KiwiAdditions.m path - Kiwi/Classes/KWFutureObject.m + Classes/Core/NSInvocation+KiwiAdditions.m sourceTree - SOURCE_ROOT + <group> - 689D623D0E8E4729974FCEDF + A46599BA6FEA4E468F972481 fileRef - D7A606855D71448889BA62E8 + 46766D4BA2A14ED782229CA8 isa PBXBuildFile - 6984341C394F41288905E2CC + A4BDADB3C94F43D8B0BB5EC2 - fileRef - F759DFB278F64E7282870585 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-specs-Kiwi-Private.xcconfig + sourceTree + <group> - 69ECFB438B2C4BDFBB603B4F + A4EF9447DA45453ABBD910F3 - fileRef - F373E1A09E4D4380AA2F5299 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + NSData+SRB64Additions.m + path + SocketRocket/NSData+SRB64Additions.m + sourceTree + <group> - 6A4109E7DDA34915A329FE1C + A506B30B4ACE48F5B85D7F31 fileRef - C587E4E28E77450E8D32A39A + 207E6C579EA54355A351D575 isa PBXBuildFile - 6CD7AD6A46CD42A3971E8F97 + A5155DDD6B6641BB815A68B5 includeInIndex 1 @@ -2878,13 +8313,13 @@ lastKnownFileType sourcecode.c.h name - KWExampleGroupBuilder.h + RACEmptySignal.h path - Kiwi/Classes/KWExampleGroupBuilder.h + ReactiveCocoaFramework/ReactiveCocoa/RACEmptySignal.h sourceTree - SOURCE_ROOT + <group> - 6D6C57593C5D437180DC9761 + A535A398C3024591A1917ACD includeInIndex 1 @@ -2893,13 +8328,13 @@ lastKnownFileType sourcecode.c.h name - KWBeKindOfClassMatcher.h + KWAsyncVerifier.h path - Kiwi/Classes/KWBeKindOfClassMatcher.h + Classes/Verifiers/KWAsyncVerifier.h sourceTree - SOURCE_ROOT + <group> - 6DFD3697CDB14D9D9E3F54F2 + A56725419FD64D229D7BF1EF includeInIndex 1 @@ -2908,20 +8343,28 @@ lastKnownFileType sourcecode.c.h name - KWAsyncVerifier.h + KWEqualMatcher.h path - Kiwi/Classes/KWAsyncVerifier.h + Classes/Matchers/KWEqualMatcher.h sourceTree - SOURCE_ROOT + <group> - 6EEEAE37E68C4BE48D4D1832 + A59DD3EDED7D42AF85B0463A - fileRef - 3B9AECF466C745E7BB285457 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACDelegateProxy.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACDelegateProxy.m + sourceTree + <group> - 6F110B5114A54AA18DBA1F34 + A5E248EB379E40439351ECBB includeInIndex 1 @@ -2930,126 +8373,167 @@ lastKnownFileType sourcecode.c.objc name - KWHaveMatcher.m + OHHTTPStubs+NSURLSessionConfiguration.m path - Kiwi/Classes/KWHaveMatcher.m + OHHTTPStubs/Sources/OHHTTPStubs+NSURLSessionConfiguration.m sourceTree - SOURCE_ROOT + <group> + + A6DDDACAF30640F3A4C4FCBE + + fileRef + AB723769ADCF4B089F36EEB7 + isa + PBXBuildFile - 6FFE29E80EBF4AEA90B19FD7 + A710B3900E1B45989DA077C7 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.objc + name + KWBeEmptyMatcher.m path - Pods-specs.xcconfig + Classes/Matchers/KWBeEmptyMatcher.m + sourceTree + <group> + + A76607B208E24E1081266706 + + children + + 2F28F2CC744A4E2699100FB5 + 6054647399BA48F6AAEF24D1 + DC30647BD4D54B64BE1526B7 + E55D9B19E4AB4084B7C4A744 + + isa + PBXGroup + name + Support Files sourceTree SOURCE_ROOT - 7109FF14CE324EE989283665 + A7C8CAB033C24BF3B41BC5AE fileRef - EFFB43BEB94748098A56A500 + 2499B82C686E4657954DD994 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 716AF9D7BFB3401C9AB5F9B6 + A7D5B16A900D433C8CC3CCA9 fileRef - 7DB4003828D5461B9567DED4 + F8D1FF8E6F304C6C888A1DE5 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 721DBBD9444D490682A6BABB + A8AFC5AAC7014EBD848740A3 - children - - 65971647E977429D9AA5A4AE - AEDCB01F8A1046B4BDAA0A1A - 229A240168A445D580878E21 - 0A283EFDEC2647D3BD04048E - 374CD74F777F4A0A94E05CB1 - B1035189597D4AB486B15922 - + includeInIndex + 1 isa - PBXGroup + PBXFileReference + lastKnownFileType + sourcecode.c.h name - Pods + RACCompoundDisposable.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposable.h sourceTree <group> - 727250DF6E2A4596A3E018FD + A9432E4B7A1F4135A7FFEF0D fileRef - FEEF61ADDFA143C1A495C880 + CF79F5BF931545EEAF40E94E isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 72A00082A6D7484B918AFF7E + A99ED12B5CC242AEA41D9A62 - buildConfigurationList - EF41A75BFE7243CAA9FF1DD3 - buildPhases - - 25C53005B0614893BA1445E9 - 7F8290E861A9450187505904 - - buildRules - - dependencies - - 157DAB4FD18342D4A25B8319 - 487796028E004CAFA462F59D - + fileRef + 38176EE406194B4E928DDAC8 isa - PBXNativeTarget - name - Pods-specs - productName - Pods-specs - productReference - 19A74633E98849F8B7BEA7FC - productType - com.apple.product-type.library.static + PBXBuildFile - 72A6CB98E8354E50AB0F1D43 + A9ACA64456C3403ABAE0C796 fileRef - 5EF065DD59E74924B9AB2E12 + 0BA5C0513D034723A8DE6BCB isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 7328A4F9C6374686A27D248B + A9D0071DB50645A081CA9EB0 - buildConfigurationList - 7E0F5E4306F3443CAA5F404E - buildPhases - - 7B6356F48E504E47B77073BC - F074520187D1417789088DDA - - buildRules - - dependencies - - 8A50B544D20246FE88E98E44 - 63A342EB93BE4A2C91FCE3BB - + fileRef + 5EFCC5EDB86B44A480BEFA00 isa - PBXNativeTarget + PBXBuildFile + + A9DE2335F9394AECB5CB6972 + + fileRef + FB83D2CDF8FC455BB6C5B2F3 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + AB6C7874D0DD4BB7B53CE5FF + + fileRef + D237B699419E4A7B93F91134 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + AB723769ADCF4B089F36EEB7 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h name - Pods - productName - Pods - productReference - BC83F1CD8DE64E8EA6B250B6 - productType - com.apple.product-type.library.static + KWGenericMatchingAdditions.h + path + Classes/Matchers/KWGenericMatchingAdditions.h + sourceTree + <group> - 756B1D81A44742FFB148E500 + ABCF6FE3076B48F685D25B8E includeInIndex 1 @@ -3058,13 +8542,13 @@ lastKnownFileType sourcecode.c.h name - KiwiConfiguration.h + KWRespondToSelectorMatcher.h path - Kiwi/Classes/KiwiConfiguration.h + Classes/Matchers/KWRespondToSelectorMatcher.h sourceTree - SOURCE_ROOT + <group> - 75D28F5682DA477796457451 + ABF248B913A64842945283E9 includeInIndex 1 @@ -3073,89 +8557,113 @@ lastKnownFileType sourcecode.c.h name - KWDeviceInfo.h + RACSignal+Operations.h path - Kiwi/Classes/KWDeviceInfo.h + ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.h sourceTree - SOURCE_ROOT + <group> - 75EAC65B1E264D9183BDD767 + ABF83780E4F54B9A8CB69598 - fileRef - 1330BF11130A4651A84CC162 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACTargetQueueScheduler.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACTargetQueueScheduler.h + sourceTree + <group> - 75EE950458C94FC7A5E4DD47 + ABFD359A50744FCFA0AB5BA0 fileRef - 972144E67837407D8240156C + 5EDA4809ECA7419196883CB7 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 76708E4DABB948E7AD41EC5F + AC60781D486C4E398A6ABC19 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWCaptureSpy.m + RACBacktrace.h path - Kiwi/Classes/KWCaptureSpy.m + ReactiveCocoaFramework/ReactiveCocoa/RACBacktrace.h sourceTree - SOURCE_ROOT + <group> - 7813868A8AC4428FB5763DB3 + AC6FDCAB782347F3AE81CD6F - children - - 370967D45A33478F8707D998 - 25D35DB0053540EBAC39E78A - 955B29E488F444B8BC4126EE - 2EEE501CF58448619D929D2E - 458BA5E50EDE46CB88EFEF52 - 5C4FD44BB8A74AED9CBD3267 - + fileRef + 7F58C63B37154AA09E33212B isa - PBXGroup - name - SocketRocket - sourceTree - <group> + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 78F2FD7527F04C68897580D6 + AD3845B06CDD4D89B453A04D fileRef - 88929517815B43D49DFF4362 + 45FD57861A1D4FFFAFA7F648 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 791BE870AB3443A791EB4141 + AD6972D11FAB425A869D7102 fileRef - DF8B54EC0E37483AA313BA61 + 5C07F742C7354FCB92A8E98D isa PBXBuildFile - 7922598B24B74704B7EA958E + AD9682A8A51B44FC99A05641 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWNull.h + KWMessagePattern.m path - Kiwi/Classes/KWNull.h + NonARC/KWMessagePattern.m sourceTree - SOURCE_ROOT + <group> - 7A1B44FC71AB4D22A19B6261 + ADE8713A173C43159EF6A4B3 + + fileRef + 7ECB4A91B62B403080B42618 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + AE481CC5C97D41F38D2C1C40 includeInIndex 1 @@ -3164,13 +8672,51 @@ lastKnownFileType sourcecode.c.objc name - KWChangeMatcher.m + KWWorkarounds.m path - Kiwi/Classes/KWChangeMatcher.m + Classes/Core/KWWorkarounds.m sourceTree - SOURCE_ROOT + <group> + + AE6753C9775D43E7B564A5E5 + + fileRef + 964F5432DA6C4FEBBA264F70 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + AF37B7E746704725BBE6AEB9 + + fileRef + 6DE0CB95058D4BEDAA405C71 + isa + PBXBuildFile + + AF4F992E0B704103858D4F6E + + fileRef + 1A829B29E2274914BB604225 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + AF845FC61A6F41CA992D3B53 + + fileRef + 20A1D77AE9BF4322903D65B6 + isa + PBXBuildFile - 7A6D92B774934142B6B52E4D + B0243DD4BDE44188A97DC26D includeInIndex 1 @@ -3179,40 +8725,34 @@ lastKnownFileType sourcecode.c.h name - KWBeBetweenMatcher.h + base64.h path - Kiwi/Classes/KWBeBetweenMatcher.h + SocketRocket/base64.h sourceTree - SOURCE_ROOT + <group> - 7B49607B802643E2B5A1AEE0 + B0C15D7E92EF44F7925704A8 fileRef - 150431BFC8FB4FFB98309725 + 47A9AFC873764952B3F144D1 isa PBXBuildFile - 7B6356F48E504E47B77073BC + B17C00321EBE4181A5DF6C90 - buildActionMask - 2147483647 - files - - D18F69C55B684CC6A8757B0F - + fileRef + E36EC84B9FBD4FF2993081DF isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXBuildFile - 7B70632E9CF943D09CB064CF + B1912D8D293D42CFA7202233 fileRef - 047C16E20F244D8AB1266662 + DFE20A0FB24F4FA49398D470 isa PBXBuildFile - 7C5886BA6BAA43AD96409043 + B1D5E3566D18488D8666A7B6 includeInIndex 1 @@ -3221,13 +8761,27 @@ lastKnownFileType sourcecode.c.h name - KWExampleSuite.h + RACObjCRuntime.h path - Kiwi/Classes/KWExampleSuite.h + ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.h sourceTree - SOURCE_ROOT + <group> + + B2315D281CFA4208A69CDB94 + + children + + 473771FE215245E78A13822A + 8FEA51186DE8489A9D03538F + + isa + PBXGroup + name + Targets Support Files + sourceTree + <group> - 7CE16008961B46459A91E027 + B2991BB941724AAFB030DCC6 includeInIndex 1 @@ -3236,50 +8790,43 @@ lastKnownFileType sourcecode.c.h name - KWMessagePattern.h + KiwiMacros.h path - Kiwi/Classes/KWMessagePattern.h + Classes/Core/KiwiMacros.h sourceTree - SOURCE_ROOT - - 7D4351A35EC141DD83D1F45E - - fileRef - E7C504DF53524583AA9E8BEF - isa - PBXBuildFile + <group> - 7D552DF2DCE5463CADE3D029 + B2AE69DBA4B4438097753F68 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWValue.m + RACMulticastConnection+Private.h path - Kiwi/Classes/KWValue.m + ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection+Private.h sourceTree - SOURCE_ROOT + <group> - 7D9BFDB69EE049EAA02857C8 + B2B3144B35D3418584F92348 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWFailure.m + RACArraySequence.h path - Kiwi/Classes/KWFailure.m + ReactiveCocoaFramework/ReactiveCocoa/RACArraySequence.h sourceTree - SOURCE_ROOT + <group> - 7DB4003828D5461B9567DED4 + B39C8C1C628242DD90796CCA includeInIndex 1 @@ -3288,130 +8835,159 @@ lastKnownFileType sourcecode.c.objc name - KWBlock.m + KWRaiseMatcher.m path - Kiwi/Classes/KWBlock.m + Classes/Matchers/KWRaiseMatcher.m sourceTree - SOURCE_ROOT + <group> - 7E0F5E4306F3443CAA5F404E + B403BC9842914A829A32BEC7 - buildConfigurations - - 1DFB09B3CD914E0DA2B145B5 - 57F80BE3EF744F31803D3EC3 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release + fileRef + 21070075F6714B26A03BFA57 isa - XCConfigurationList + PBXBuildFile - 7E20F49EDDA34EF48787B3F1 + B44017F3EF194FF58094AD51 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc - name - NSProxy+KiwiVerifierAdditions.m + text.xcconfig path - Kiwi/Classes/NSProxy+KiwiVerifierAdditions.m + Pods-specs-OHHTTPStubs.xcconfig sourceTree - SOURCE_ROOT + <group> - 7E25B55285944F2E851E5827 + B4B3D28FF3F448DBB11AE6F6 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - KWInequalityMatcher.h + text.script.sh path - Kiwi/Classes/KWInequalityMatcher.h + Pods-specs-resources.sh sourceTree - SOURCE_ROOT + <group> + + B4F95EDAECFD4A7495DB5C24 + + fileRef + 7AFB8754ABC2473ABF4AC408 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 7E6D4807392D4006BEF41075 + B503B78C35084A12827138E4 includeInIndex 1 isa PBXFileReference - lastKnownFileType - sourcecode.c.h name - NSProxy+KiwiVerifierAdditions.h + RACCompoundDisposableProvider.d path - Kiwi/Classes/NSProxy+KiwiVerifierAdditions.h + ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposableProvider.d sourceTree - SOURCE_ROOT + <group> - 7F8290E861A9450187505904 + B5B48925C6CF438CA6216530 - buildActionMask - 2147483647 - files - - 9012B820DB964FB8852FF805 - 31D78A7450F348EEB07D1044 - 9DA583BBE71745B4871CE9E0 - + includeInIndex + 1 isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACErrorSignal.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACErrorSignal.m + sourceTree + <group> - 7FC3B368CE2C4ED592CAE9F9 + B5DE488B148F4FEF8B755708 fileRef - BF113F4C8D274B2BADE3D699 + B70EE89F247549078D1C4B8F isa PBXBuildFile - 800EFA74AB034A05A5B1AFCC + B63DEE63C0E4441B80B8A7D5 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWObjCUtilities.m + KWAny.h path - Kiwi/Classes/KWObjCUtilities.m + Classes/Core/KWAny.h sourceTree - SOURCE_ROOT + <group> - 80FF6F855710472F80BD059D + B662762AD67D4C2A8FA211D3 fileRef - 75D28F5682DA477796457451 + FE740EBC0CA442FBA9454205 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 81196C039F0B4ADAA307E877 + B6B7AEA943D74EC8A86E1A4A - buildActionMask - 2147483647 - files - - 1BCA763A0617449EAFD95D51 - 60283588392E4FB892430642 - + includeInIndex + 1 isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + NSObject+KiwiSpyAdditions.h + path + Classes/Core/NSObject+KiwiSpyAdditions.h + sourceTree + <group> + + B6CCF07FD899411882A93980 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACScheduler+Private.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACScheduler+Private.h + sourceTree + <group> + + B6DA91A48E454D29AD579FC6 + + isa + PBXTargetDependency + target + 2820B6B2A6424E40852AC3CA + targetProxy + 8B1121BCEBF64618878879F9 - 8135B9B2F08041FA895A4ED7 + B70EE89F247549078D1C4B8F includeInIndex 1 @@ -3420,38 +8996,61 @@ lastKnownFileType sourcecode.c.h name - KWBeNonNilMatcher.h + NSObject+RACSelectorSignal.h path - Kiwi/Classes/KWBeNonNilMatcher.h + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACSelectorSignal.h sourceTree - SOURCE_ROOT + <group> - 81CAD16CBB3143C8A5F918C4 + B723B10817464D2A964BD7AE - buildConfigurationList - F7D806C834AC4C99832D49CE - buildPhases + fileRef + E22ED4747E634035B960D8DE + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + B83F6A514F0D4F2893E350E4 + + children - 81196C039F0B4ADAA307E877 - C64029208A4F4D3BA01157BB - A15B22EEE9BA4329B5CB4AB8 + 578314DDCFF7405BBB7F28F5 + 10A312D8D3D24F9194782966 + A5E248EB379E40439351ECBB + 4C54D194C53543D8BE1112AA + D237B699419E4A7B93F91134 + 801AF02213014B5D8E697C8E + D2D9B3C3D2E741509E3AA3D3 + 5E35D464EA2546EBA885DB5D + 428A9C0BFD1B4B6C9AE0F9EF + 59EC35BED192477BA9EFA2B2 - buildRules - - dependencies - isa - PBXNativeTarget + PBXGroup name - Pods-Reachability - productName - Pods-Reachability - productReference - F759DFB278F64E7282870585 - productType - com.apple.product-type.library.static + OHHTTPStubs + path + OHHTTPStubs + sourceTree + <group> - 81D313EE3E944E37B3AB3788 + B883E2CB56A04C8FA9D018C0 + + fileRef + 155E58D0958249FFB7C4630B + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + B8F1E671C0874842B6D9CCFC includeInIndex 1 @@ -3460,160 +9059,114 @@ lastKnownFileType sourcecode.c.objc name - KWRespondToSelectorMatcher.m + NSData+RACSupport.m path - Kiwi/Classes/KWRespondToSelectorMatcher.m + ReactiveCocoaFramework/ReactiveCocoa/NSData+RACSupport.m sourceTree - SOURCE_ROOT + <group> - 821DAA9BE35445D7AC272F14 + B90890E891F74362AD009A85 fileRef - 5C4FD44BB8A74AED9CBD3267 + 017F2DA54A454F92A2FFE32C isa PBXBuildFile settings COMPILER_FLAGS - -fobjc-arc -DOS_OBJECT_USE_OBJC=0 + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker - 82ABDE6BA47F48DB9B2E83B1 + B963FA1A7B2C45DB9EA07312 - baseConfigurationReference - 1B204C7016914DAB98C1018A - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - ARCHS - armv6 armv7 - COPY_PHASE_STRIP - NO - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Pods-Reachability-prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 4.0 - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - + fileRef + E65DD95C4B8440E28F3C54B5 isa - XCBuildConfiguration - name - Debug + PBXBuildFile - 845055AF292B45CC8337AD2C + B9E08D16607646DFAAE4E636 - includeInIndex - 1 + fileRef + 03B46DD9773C40AAA1E2FB11 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - NSNumber+KiwiAdditions.h - path - Kiwi/Classes/NSNumber+KiwiAdditions.h - sourceTree - SOURCE_ROOT + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 85C0BC2D26F7457991F02565 + BA3027B35C234132B737E6CC - children - - 56580F1050924428A2F84270 - 969FDD6021AA4DB8B4BBFDFA - + fileRef + 19BC924239444687BE654CC8 isa - PBXGroup - name - Reachability - sourceTree - <group> + PBXBuildFile - 8704BD946CE240C6ACE9CA77 + BA4A1632B20D434784074C5B - includeInIndex - 1 + fileRef + 5EFCC5EDB86B44A480BEFA00 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWBeSubclassOfClassMatcher.m - path - Kiwi/Classes/KWBeSubclassOfClassMatcher.m - sourceTree - SOURCE_ROOT + PBXBuildFile - 8745F2EC1BA44654AB91AC78 + BAF503EB7B7947729F33E812 fileRef - C3AB70CB973646BAA866BADA + 0F7A0FE389D1420B9AEEC1AC isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 8761C020C58243AD98814BA8 + BB625867288B489C9DE092A0 fileRef - D4824E5076DD49D6BB3D0985 + 79D933CCD0034897930AB598 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 8777FF45154A42B2948CA353 + BB8D8567FB584B2EABEEE291 - children - - DBFEC935A2714BFB905BB101 - 625877F642B546C98332C80B - 1BF533EDF5034020B7603334 - 1C99083A2B7B43B09B7F8D97 - 988C85883392444EBA3E160F - + explicitFileType + archive.ar + includeInIndex + 0 isa - PBXGroup - name - Frameworks + PBXFileReference + path + libPods.a sourceTree - <group> + BUILT_PRODUCTS_DIR - 87F89C2E24194A10961BC3DF + BB9CF27990F249D2B9EAF744 fileRef - 3BAE8CEA85634EB6B263A2B8 + 2468208932F441689ED91E33 isa PBXBuildFile - 88929517815B43D49DFF4362 + BBBB2287045E498BA0E387AC + + fileRef + 53F078F2C50E444682C31E84 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + BBD883249CF0443298902DC6 includeInIndex 1 @@ -3622,73 +9175,83 @@ lastKnownFileType sourcecode.c.h name - KWCallSite.h + RACTupleSequence.h path - Kiwi/Classes/KWCallSite.h + ReactiveCocoaFramework/ReactiveCocoa/RACTupleSequence.h sourceTree - SOURCE_ROOT + <group> - 88A88235D0A649B7BFC46CCE + BBFFA61182654C73B25A5C5A includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - OHHTTPStubs.m + SRWebSocket.h path - OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.m + SocketRocket/SRWebSocket.h sourceTree - SOURCE_ROOT + <group> - 88CC7FCF02D74A678E5711B1 + BCD21096616044C58CF399DA fileRef - B47BA84054CC4E8C8029DD6F + 308EBCB54E6F4711B00EB2CD isa PBXBuildFile - 88D6E240FA724802BE9499A3 + BD0B7CE4EBFD416199CF8778 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.plist.xml + sourcecode.c.objc + name + RACSubscriber.m path - Pods-specs-acknowledgements.plist + ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.m sourceTree - SOURCE_ROOT + <group> - 897C1BEF548F4A859B79E392 + BD15B7DA684943C880B74049 fileRef - 184561A9A12749ADB6FB96D3 + B6B7AEA943D74EC8A86E1A4A isa PBXBuildFile - 8A50B544D20246FE88E98E44 + BD82729312A54010B5793712 + fileRef + 80EC8030A61D4D3E84DB3C5A isa - PBXTargetDependency - target - 81CAD16CBB3143C8A5F918C4 - targetProxy - ED71BFBB36B54EF1B9A1B824 + PBXBuildFile + + BD8676B3D72E4345A1F19073 + + fileRef + F59B6C8ED9B94518A403C6C3 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 8A6E1B25C2534CBCADA35722 + BDBB0685D96F45E48003E3D2 baseConfigurationReference - 9DBAD86B19EC41D49402D8F5 + FFB46B3833F545E1B16E27A8 buildSettings ALWAYS_SEARCH_USER_PATHS NO - ARCHS - armv6 armv7 COPY_PHASE_STRIP YES DSTROOT @@ -3698,13 +9261,13 @@ GCC_PRECOMPILE_PREFIX_HEADER YES GCC_PREFIX_HEADER - Pods-SocketRocket-prefix.pch + Pods-specs-OHHTTPStubs-prefix.pch GCC_VERSION com.apple.compilers.llvm.clang.1_0 INSTALL_PATH $(BUILT_PRODUCTS_DIR) IPHONEOS_DEPLOYMENT_TARGET - 4.0 + 5.0 OTHER_CFLAGS -DNS_BLOCK_ASSERTIONS=1 @@ -3733,80 +9296,86 @@ name Release - 8B753A6C511E40CE84466C07 + BE2B55FFA8B5473AA408CB8D - includeInIndex - 1 + fileRef + D646D9F7C09C4E05AB3E233F isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - KWFormatter.h - path - Kiwi/Classes/KWFormatter.h - sourceTree - SOURCE_ROOT + PBXBuildFile - 8BDE2EBCCBF2417B964841D2 + BF412519750245B8A1586F15 - includeInIndex - 1 + fileRef + 7E41DB51032F433889882C47 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWContainMatcher.m - path - Kiwi/Classes/KWContainMatcher.m - sourceTree - SOURCE_ROOT + PBXBuildFile - 8BFB505CDDE24299A1CDBB9F + BF6782ECD2B74669A3DAF779 - includeInIndex - 1 + fileRef + D9D205F28BE24561B04614C4 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWBeIdenticalToMatcher.m - path - Kiwi/Classes/KWBeIdenticalToMatcher.m - sourceTree - SOURCE_ROOT + PBXBuildFile + + BFD8D238C4AD491EA0C85821 + + fileRef + 4DADE293366B4247A59A44F9 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + C0000FA4AC614F85A6AAEC73 + + fileRef + A56725419FD64D229D7BF1EF + isa + PBXBuildFile + + C015FC1DFEDF4EFABD6A29AB + + fileRef + 65DC9B41182D4A509A5D67F7 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + C039367F642440AC85DFA655 + + fileRef + E6685215037849B0910C5876 + isa + PBXBuildFile - 8D0836541C014EC7BEB46CD0 + C0F0AE0B8E374069808D86F2 - buildActionMask - 2147483647 - files - - 015E5FADC4864E31ACA24197 - + fileRef + 5460193ADC744573AC670EFC isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXBuildFile - 8D775504D1CB4769B5F08C04 + C115AB70479944B484379700 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - KWBeNilMatcher.h + text.xcconfig path - Kiwi/Classes/KWBeNilMatcher.h + Pods-ReactiveCocoa-Private.xcconfig sourceTree - SOURCE_ROOT + <group> - 8DBB0F91D01B43AD8C733B2B + C1BEF9F7291847B887252E58 includeInIndex 1 @@ -3815,35 +9384,64 @@ lastKnownFileType sourcecode.c.h name - KWCaptureSpy.h + KWIntercept.h path - Kiwi/Classes/KWCaptureSpy.h + NonARC/KWIntercept.h sourceTree - SOURCE_ROOT + <group> - 8E34AA0DB2E440C28FDA4EA7 + C1FC9493B8AB43719A87C911 fileRef - ABB202FBAD074E109CF71566 + 4EDC2E1BD8804A66BF6942A5 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 8E8263928C3B4EBFB09597A6 + C2A11F03D15E41839028AF2B includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWBeNonNilMatcher.m + KWMatcherFactory.h path - Kiwi/Classes/KWBeNonNilMatcher.m + Classes/Core/KWMatcherFactory.h sourceTree - SOURCE_ROOT + <group> + + C2B8138217AE475A9A243C0C + + fileRef + 5175D4FCB5124320B8C29426 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + C3F4ED960DF447C999E09CCE + + fileRef + A46109F5B40A4EB69B80EA44 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 8ED87155D0E546AD8A384DC0 + C3FDF3D294E44861BAF65C16 includeInIndex 1 @@ -3852,34 +9450,47 @@ lastKnownFileType sourcecode.c.objc name - KWSymbolicator.m + KWBlockRaiseMatcher.m path - Kiwi/Classes/KWSymbolicator.m + Classes/Matchers/KWBlockRaiseMatcher.m sourceTree - SOURCE_ROOT + <group> - 9012B820DB964FB8852FF805 + C433D9E617114EA98BCE33DB fileRef - 625877F642B546C98332C80B + 35DDBADA009F4399AAC85375 isa PBXBuildFile - 9041F24FC7F643F6947217EC + C4F920B1A1E14D409AEF124B - fileRef - 7922598B24B74704B7EA958E + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACReturnSignal.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACReturnSignal.h + sourceTree + <group> - 91406FB0E85A4BAABA435D5A + C555614B3F294324AA222557 fileRef - EC732E0F175643EE9CCF1ED0 + 15C7D5AD0F934960A85BF5C3 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 9201585E06B3403C9088447C + C567C4CE76AC459F9D146506 includeInIndex 1 @@ -3888,92 +9499,98 @@ lastKnownFileType sourcecode.c.h name - KWBeforeEachNode.h + RACImmediateScheduler.h path - Kiwi/Classes/KWBeforeEachNode.h + ReactiveCocoaFramework/ReactiveCocoa/RACImmediateScheduler.h sourceTree - SOURCE_ROOT + <group> - 939578CAFC8942C2929F3F8C + C5CC7B53FA4C4FC387AD5C03 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWBeKindOfClassMatcher.m + RACTuple.h path - Kiwi/Classes/KWBeKindOfClassMatcher.m + ReactiveCocoaFramework/ReactiveCocoa/RACTuple.h sourceTree - SOURCE_ROOT + <group> - 93C0C92AA3924FA5B89F18A2 + C618D768A4654232BD2EC2B4 - fileRef - 2F60E112C3054655B705B2B7 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + KWExampleDelegate.h + path + Classes/Core/KWExampleDelegate.h + sourceTree + <group> - 93DC1D2DE66D47B6838B9A88 + C62CDA7DF28548A094E14892 fileRef - D2140D56BD334E97B6829FC2 + D2D9B3C3D2E741509E3AA3D3 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 9444A72A6A6041E8B70A9767 + C67D555AA53848B9B581BD4D includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWStringUtilities.m + KWExampleNode.h path - Kiwi/Classes/KWStringUtilities.m + Classes/Nodes/KWExampleNode.h sourceTree - SOURCE_ROOT + <group> - 95207EAC5C8E42379B8E46F4 + C6E0DD264A3547CF9737B6B3 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + text.xcconfig path - Pods-specs-dummy.m + Pods-specs.xcconfig sourceTree - SOURCE_ROOT + <group> - 955B29E488F444B8BC4126EE + C7052C3F6BBC4350BCBC5FFF includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - NSData+SRB64Additions.h + KWConformToProtocolMatcher.m path - SocketRocket/SocketRocket/NSData+SRB64Additions.h + Classes/Matchers/KWConformToProtocolMatcher.m sourceTree - SOURCE_ROOT - - 95A0C3C0193742BB854E9BED - - fileRef - 42D8482887C2468FB2456054 - isa - PBXBuildFile + <group> - 9668979FBD5541529C3EBFA2 + C72B1B3324B2445290D92990 includeInIndex 1 @@ -3982,50 +9599,133 @@ lastKnownFileType sourcecode.c.objc name - KWConformToProtocolMatcher.m + RACArraySequence.m path - Kiwi/Classes/KWConformToProtocolMatcher.m + ReactiveCocoaFramework/ReactiveCocoa/RACArraySequence.m sourceTree - SOURCE_ROOT + <group> - 9676AEE801844D989D68B708 + C74189FD041A49B8A68287AF includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWWorkarounds.m + RACUnarySequence.h path - Kiwi/Classes/KWWorkarounds.m + ReactiveCocoaFramework/ReactiveCocoa/RACUnarySequence.h sourceTree - SOURCE_ROOT + <group> + + C75BAB45243B4576BD253903 + + fileRef + 58B2D2DD28B94897A9CBFD7A + isa + PBXBuildFile + + C772F452D23A47FC90906757 + + fileRef + 86E8FC92294145DD9425354B + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 9681EC415AF94E328E756293 + C79A32E9E6E64222BA12FFD8 fileRef - C61546A3B30A49959059B7D1 + A3D9DC691BA74169AFE26DFE isa PBXBuildFile - 969FDD6021AA4DB8B4BBFDFA + C80D0DB4017F4CBDA0AB52E1 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - Reachability.m + KWBeZeroMatcher.h path - Reachability/Reachability.m + Classes/Matchers/KWBeZeroMatcher.h sourceTree - SOURCE_ROOT + <group> + + C8237553F2534857B63B86A6 + + fileRef + FCED67C1F64340509884414E + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + C870941F4C8345EFB33944FE + + baseConfigurationReference + 6054647399BA48F6AAEF24D1 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-SocketRocket-prefix.pch + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release - 97118765DBCE41E1ABED0461 + C8AA860DA638408AA6B8F197 includeInIndex 1 @@ -4033,102 +9733,207 @@ PBXFileReference lastKnownFileType sourcecode.c.h + name + RACKVOTrampoline.h path - Pods-specs-Kiwi-prefix.pch + ReactiveCocoaFramework/ReactiveCocoa/RACKVOTrampoline.h sourceTree - SOURCE_ROOT + <group> + + C8F48D0F1EF341AFAD5BC875 + + fileRef + 047F781532644D2690D1D276 + isa + PBXBuildFile - 972144E67837407D8240156C + C8FB0466CAA346009167A0ED includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWGenericMatcher.h + NSObject+KiwiSpyAdditions.m path - Kiwi/Classes/KWGenericMatcher.h + Classes/Core/NSObject+KiwiSpyAdditions.m sourceTree - SOURCE_ROOT + <group> + + C98F48784B734152B6FDC852 + + baseConfigurationReference + 7F87E11829654238834014A2 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-Reachability-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug - 9811CCF5FA8F4E8C8521EF3F + CA1E02D6E1BE4055B926FDAD includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + text name - KWAfterEachNode.h + Podfile path - Kiwi/Classes/KWAfterEachNode.h + ../Podfile sourceTree SOURCE_ROOT + xcLanguageSpecificationIdentifier + xcode.lang.ruby - 985FE19A737244EA9B00C491 + CA81E6D024644DC79F22EB49 - includeInIndex - 1 + fileRef + 61F7055EA57F45E8A114A2D7 isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods-SocketRocket.xcconfig - sourceTree - SOURCE_ROOT + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + CAD6358D1B9645F9AC25084F + + fileRef + 43C0394CAC8A4DE18BED770E + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 988C85883392444EBA3E160F + CB1489830CA9446DAA1C4721 includeInIndex 1 isa PBXFileReference lastKnownFileType - wrapper.framework + sourcecode.c.objc name - SystemConfiguration.framework + UISwitch+RACSignalSupport.m path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/SystemConfiguration.framework + ReactiveCocoaFramework/ReactiveCocoa/UISwitch+RACSignalSupport.m sourceTree - DEVELOPER_DIR + <group> - 99A4213D4B0F40A79555B429 + CB5464819282478585CE81BC fileRef - 437DAE2ADC694F249B4A818D + A4EF9447DA45453ABBD910F3 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - 99E902D1C70F44B3920567BD + CBE476986BED46B2AE234228 - buildConfigurationList - B088098A6FCF4526B706EBEF - buildPhases + buildActionMask + 2147483647 + files - 3E17716F92994A4791682356 - F9311DCCAB1549B2A2BE6191 - 9E9B49441F6947E898F6A9B7 + FF184FDFD0EC4DAF8AFC86EE - buildRules - - dependencies - isa - PBXNativeTarget - name - Pods-SocketRocket - productName - Pods-SocketRocket - productReference - 10AD640DF35848B3BCEE71B2 - productType - com.apple.product-type.library.static + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 - 99F76629663940968AF23B8A + CC5234A14FA5450CBA84E068 + + buildActionMask + 2147483647 + files + + BA4A1632B20D434784074C5B + 6DFCE05B95A54C5C958DE858 + 55B77F5EEC94416D92A4150C + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + CC77A9FFF8614303909D25FC + + fileRef + 12DD7C8DAAEA4A07A6F4510F + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + CCD44C07EF80467D8A1AF412 + + fileRef + 8A0FB4395F314B35B1721789 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + CD004A91FC114DC281425414 includeInIndex 1 @@ -4137,28 +9942,26 @@ lastKnownFileType sourcecode.c.h name - KWObjCUtilities.h + RACDelegateProxy.h path - Kiwi/Classes/KWObjCUtilities.h + ReactiveCocoaFramework/ReactiveCocoa/RACDelegateProxy.h sourceTree - SOURCE_ROOT + <group> - 9C646E20509B411E8D96AEF8 + CD52ED41EF5D448384BA54BE includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - KiwiBlockMacros.h + text.xcconfig path - Kiwi/Classes/KiwiBlockMacros.h + Pods.xcconfig sourceTree - SOURCE_ROOT + <group> - 9DA1B56D915548479AAB3AA0 + CD7B98960DE6400C83B61669 includeInIndex 1 @@ -4167,173 +9970,123 @@ lastKnownFileType sourcecode.c.h name - OHHTTPStubs.h + RACSignal.h path - OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.h + ReactiveCocoaFramework/ReactiveCocoa/RACSignal.h sourceTree - SOURCE_ROOT - - 9DA583BBE71745B4871CE9E0 - - fileRef - 1E88DB2C638C45869220B46C - isa - PBXBuildFile + <group> - 9DAF92FDE4954B6ABCB9CA46 + CE51F80B1D0C4BC6B53AFF0D fileRef - 5F04555A9DD54A4BA34EDCA6 + 3F37C960F13543B6852E0C52 isa PBXBuildFile - 9DBAD86B19EC41D49402D8F5 + CE80F2807A6542D2AD8FAB5E includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.h + name + RACmetamacros.h path - Pods-SocketRocket-Private.xcconfig + ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACmetamacros.h sourceTree - SOURCE_ROOT + <group> - 9E57E24A0FB44DDDB0B43C58 + CE86F5A65304442ABA904D29 fileRef - 7E6D4807392D4006BEF41075 + 3A6D2B7073604E8CB7C613FE isa PBXBuildFile - 9E95F1093E64439FAF91A903 - - baseConfigurationReference - 6FFE29E80EBF4AEA90B19FD7 - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - ARCHS - armv6 armv7 - COPY_PHASE_STRIP - YES - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 4.0 - OTHER_CFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_CPLUSPLUSFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration - name - Release - - 9E9B49441F6947E898F6A9B7 + CEA1B34AA5014EB2A30A6451 - buildActionMask - 2147483647 - files - - A30872460FBB482F9C99E9E6 - 3B56C057F37A45C4BE40A902 - D81529FB1A9544BB9E204B79 - + fileRef + 617BD75024BD44ACBBE13DF9 isa - PBXHeadersBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXBuildFile - 9EAA82DA07914D83BD3D0C94 + CEA8B212853A4BFDBF8FF737 fileRef - 65AF4B9115714C2AA5CF7DEF + 7D70C0B790D74EEE959F8F7C isa PBXBuildFile - 9EB757B2697E46C89EBC62D0 + CEE530B8D6304A47BBCE9CA9 fileRef - BE00DE7B32B243A682DDC187 + 670875371A8241D7A19B76AF isa PBXBuildFile - 9ED5A2C1C0B0445E9B4C326D + CF561A215F16423CB137145D fileRef - 370967D45A33478F8707D998 + 6E6D9E89568A4500AA50B380 isa PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc -DOS_OBJECT_USE_OBJC=0 - - 9F597748B21C42CEBCD46279 + CF73D0F1A8AB473B934CBBF3 - children - - F759DFB278F64E7282870585 - 10AD640DF35848B3BCEE71B2 - 5E15AB3896BE4E7287F8A8C0 - 1E88DB2C638C45869220B46C - BC83F1CD8DE64E8EA6B250B6 - 19A74633E98849F8B7BEA7FC - + includeInIndex + 1 isa - PBXGroup + PBXFileReference + lastKnownFileType + sourcecode.c.objc name - Products + KWBeSubclassOfClassMatcher.m + path + Classes/Matchers/KWBeSubclassOfClassMatcher.m sourceTree <group> - 9FE5A4C83F224D4AB067DB45 + CF79F5BF931545EEAF40E94E includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - NSObject+KiwiSpyAdditions.h + KWBeZeroMatcher.m path - Kiwi/Classes/NSObject+KiwiSpyAdditions.h + Classes/Matchers/KWBeZeroMatcher.m sourceTree - SOURCE_ROOT + <group> + + CF8C0F038A2C469C870EC539 + + fileRef + D7B403F602CB407E86591FDE + isa + PBXBuildFile + + CF8E3EAADFE142B1841283C7 + + buildActionMask + 2147483647 + files + + EA6D166F2B874B77BD4ED2B3 + 1780457D3EDC481893BD104B + 59037336E5044D918F361EE9 + 90AD0B7216834F119753C12D + + isa + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 - A0C10AE3E81641F28D8FD401 + CF9D8F2C2ECD45EA87BA15B7 includeInIndex 1 @@ -4342,13 +10095,20 @@ lastKnownFileType sourcecode.c.objc name - KWBeEmptyMatcher.m + KWStub.m path - Kiwi/Classes/KWBeEmptyMatcher.m + NonARC/KWStub.m sourceTree - SOURCE_ROOT + <group> - A1005BAE4B444499834A84BC + CFC01F88AC544C9A92275DA4 + + fileRef + FCA85E9368B04F16ACD7685C + isa + PBXBuildFile + + CFC31C442B3E42B2910FF7CD includeInIndex 1 @@ -4357,43 +10117,72 @@ lastKnownFileType sourcecode.c.h name - KWFailure.h + UICollectionViewCell+RACSignalSupport.h path - Kiwi/Classes/KWFailure.h + ReactiveCocoaFramework/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h sourceTree - SOURCE_ROOT + <group> - A11D0D681B3E408E8D609BAC + CFFBE6D8631D4C73AC139225 - children - - 985FE19A737244EA9B00C491 - 9DBAD86B19EC41D49402D8F5 - 6760A93D5B2548379F37B686 - EFFB43BEB94748098A56A500 - + fileRef + 3B7F625018894E19A62DF6ED isa - PBXGroup - name - Pods-SocketRocket - sourceTree - <group> + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - A1223FACF3914D50B676FF4E + D0A38184670C4A14910675D5 fileRef - 10AD640DF35848B3BCEE71B2 + 9B7761DB44FC48D78719A426 isa PBXBuildFile - A1285EB3DE794B289CD97CC5 + D0D7EAF4E1BB441AB64A686C fileRef - 8BDE2EBCCBF2417B964841D2 + 363E8B74669A495BA73A6FB9 isa PBXBuildFile - A1530E7E8B9040B1B0EFE966 + D10517F73BDB4548879E0310 + + buildActionMask + 2147483647 + files + + 0DF689F3CACB405E9CE08987 + 68F0E177914F4F458963DF83 + C62CDA7DF28548A094E14892 + 5043D891C6764D2287EE74A0 + AB6C7874D0DD4BB7B53CE5FF + 52B4E7FA7F614E1A830B0591 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + D173B55A211A49DCBE731092 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UISegmentedControl+RACSignalSupport.m + path + ReactiveCocoaFramework/ReactiveCocoa/UISegmentedControl+RACSignalSupport.m + sourceTree + <group> + + D1EE5FE4D66E4C6BAE0B8370 includeInIndex 1 @@ -4402,147 +10191,355 @@ lastKnownFileType sourcecode.c.objc name - KWExampleGroupBuilder.m + RACTestScheduler.m path - Kiwi/Classes/KWExampleGroupBuilder.m + ReactiveCocoaFramework/ReactiveCocoa/RACTestScheduler.m sourceTree - SOURCE_ROOT + <group> - A15B22EEE9BA4329B5CB4AB8 + D1FCA9B3A7B84C629D8ED870 - buildActionMask - 2147483647 - files + children - 3FBDDA7B081C4662BFB5DD01 + CA1E02D6E1BE4055B926FDAD + 4ED048C5A87C497CA38A128D + 86981932B47E4AD0AE318933 + 120F641F4A6D4A21A66FE422 + B2315D281CFA4208A69CDB94 isa - PBXHeadersBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXGroup + sourceTree + <group> - A172D07E069B4F009901DD4C + D20C6FEB12E641E0BF3897A8 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.objc + name + RACTupleSequence.m path - Pods-specs-OHHTTPStubs.xcconfig + ReactiveCocoaFramework/ReactiveCocoa/RACTupleSequence.m sourceTree - SOURCE_ROOT + <group> - A18B8C2789934D3BBCB03D23 + D237B699419E4A7B93F91134 - fileRef - 5B8BFCFE37B34B1A884613DF + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + OHHTTPStubsResponse.m + path + OHHTTPStubs/Sources/OHHTTPStubsResponse.m + sourceTree + <group> - A2030B9D25124BCC95352042 + D28E24D6A07A427E9292348D fileRef - 756B1D81A44742FFB148E500 + DF370EF81F814D8194EBC387 isa PBXBuildFile - A30872460FBB482F9C99E9E6 + D2A109B78A2E4B5FBA7DBF4B - fileRef - 25D35DB0053540EBAC39E78A + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + RACQueueScheduler.h + path + ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler.h + sourceTree + <group> - A3FA974DD32E44B7A9F4E41A + D2D9B3C3D2E741509E3AA3D3 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWMatcher.h + OHHTTPStubsResponse+HTTPMessage.m path - Kiwi/Classes/KWMatcher.h + OHHTTPStubs/Sources/OHHTTPStubsResponse+HTTPMessage.m sourceTree - SOURCE_ROOT + <group> - A4CDE869765E42D0A1F4C040 + D3A776CF462540D7A43A9271 fileRef - 625877F642B546C98332C80B + A38B7D1010274172B0062C1C isa PBXBuildFile - A5E6BDE267B34ADE910FA0E1 + D3E512B6F10F4281983E93E2 fileRef - 9C646E20509B411E8D96AEF8 + 8324546C8B5549F2AEC52A7D isa PBXBuildFile - A60F44D6383D4E999161CC73 + D3E6517AB59247C38DAB1185 - fileRef - DE3AF2C0ECE74478AE372972 + buildActionMask + 2147483647 + files + + 85EE0992B6864452A081CF12 + 5AE46EF325E94B3EA880A389 + 125D69B38DD84DD6B8A96218 + D5190895580C4B5AAC55BF21 + ADE8713A173C43159EF6A4B3 + 5F632A630A474B70B1A8B265 + D6F49BF3C673451F99C283ED + AE6753C9775D43E7B564A5E5 + 80EC3D987E4B478883634DA4 + 068ECD2563AE44D683417EE9 + 59EB47950FFF4BAF90D91F8C + 92DAA3788893482284B3B4A8 + 19FBF81B18814045B64DB457 + FD686932E8204177B9EA4E6B + A9DE2335F9394AECB5CB6972 + 5FC0861360E447F5B11BB972 + 0108B389FC3A496EAB339512 + 3F564A90536A40ADA567B5F6 + 3759C8C0E3FC4187BDBA5A93 + F5C35AA4FC5340A8B420B99C + 81F1ACD71C4B408A94634DDF + 6A5E1D21C62643BF88837F80 + 25E012BA1E6242979545A0A4 + B90890E891F74362AD009A85 + D87E39B5A9F4416895536BAC + 0DDB21898E294DA385BFB66F + ABFD359A50744FCFA0AB5BA0 + 8A022697C14B40AEB11590C2 + 09C48A7D56C24E0D98F8A6ED + BAF503EB7B7947729F33E812 + 2F171CE3F80144C3B65DF41E + DC21D861E73246C0B82006CF + B9E08D16607646DFAAE4E636 + 2BFDBCE6F4AD4709A86BA5EE + A7C8CAB033C24BF3B41BC5AE + B883E2CB56A04C8FA9D018C0 + 742B1A4A1AC04937A2640C1E + B723B10817464D2A964BD7AE + 3A8D1F3252D747508543C86D + 061C02F2CDBB455F8ECC6BFC + E0CFAA16277345C2A58012BB + 9E7E79157A1846489300183A + 9E951A53251D49D98C70AE39 + 8167F9FB3A3B4622B847CEB6 + DC824CC5B0FD421983F37CB5 + 1DD80B58659C4FC895B7DE83 + 335243A08FD2430FBC4F2F1F + EDDF9950E3D74C1B97A23DAD + A7D5B16A900D433C8CC3CCA9 + 235B0BBB65AC4C4CA7EB31DD + 308F81D102F742F7A8BE9CFB + E418656940554DF3A5771FD4 + C772F452D23A47FC90906757 + 753EF9BDBE2D488784BDC473 + AF37B7E746704725BBE6AEB9 + 3B0CB89D5D2545ACAE2D0836 + E9B6CC1824114D97950A7C67 + DD55637FFEA94B23A1496DFB + 41255049A621436585AFC5DE + F08D431847494AB6AB795D6A + 3580466BDE14473489F2DB75 + 90B8739644574CF0AB00197E + 0CC01CF9DAA648DB9F26D902 + 86A29040DAA345B78AF60551 + 4201C7EF822443D1A99525C2 + EE95C68A1B0E4D8683014505 + 2422D4BC3E6F4A3A9CFD3EBF + 57FE9761852747DCAB5CD34C + 1C7B9BBC033D4DECBC4A1578 + 49C1B2C4CB8C4307B8B542AB + 14D9E65BFEEE42C7B9FE4FC5 + BB625867288B489C9DE092A0 + 43910BDD16C74C1D8F2F7012 + 919827833CEB49379E7F1B4C + 239AFEA6D67C416888554D6A + CAD6358D1B9645F9AC25084F + 643C1FD148B343CEA8B94770 + AF4F992E0B704103858D4F6E + F3060CEE9386484EAA2A9239 + 06FD32D8A8BE4A37BDE37DF0 + 184D1615921B491EAF8EF5D3 + 147BA0232404429BB09484EF + FE79A2E16DBF445ABEF825ED + 3F76663340B94B2984CA7A40 + BD8676B3D72E4345A1F19073 + 361074B0E5BB4333896BC568 + isa - PBXBuildFile + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 - A8B2D6441CFF4B69B1A99622 + D5190895580C4B5AAC55BF21 fileRef - 388E29A4E8A248779E285A6F + 95A40515E5484DA5A98324ED isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - A8C43EF137CC4F3BA333C583 + D51F55D15E5A4B09A174AD9E - fileRef - 0953C0DFE8EF41078ADEEF85 + buildActionMask + 2147483647 + files + + F119F8CF8CF649BAACF433EB + 9E1DDA5F84BF4EDA871491BA + 6390F5D1845E4A878F00C345 + D91119C1E8AC4C58983313C1 + 50BA4DB05ADC41F89BBD2938 + 41EAD6B539404ECF99BAC14E + CE51F80B1D0C4BC6B53AFF0D + 5EC873A3B67F494B84B5302E + 01A6CF0BE9CE4225B0BCE8E7 + B963FA1A7B2C45DB9EA07312 + 4BC2F6766CEE40A595AD02EA + 6C619947D2E64727A33CAAB3 + B5DE488B148F4FEF8B755708 + 1D7E4CCBC34B411C9B0F1949 + 89EA8FF6E6A041849A5BFE0E + 85B672297B174380A590C302 + 2BF7538737344C91A6463296 + 3851BDE43ACC4EF3B742F231 + BD82729312A54010B5793712 + 5CFB4B0219E64DC498B5064A + 5A5E79B952814CEAB63D5048 + CEA1B34AA5014EB2A30A6451 + A2B3F7BABBF246B0AB9BCB1B + 371E33B070CA48FFB0431694 + A33605D89E534B8E964325E0 + 197AACB8A8B0454AB8B11DE9 + 63C547355CCA41148D5A8502 + FC0D078A485C4CDB81E0331B + B403BC9842914A829A32BEC7 + 1DBB08E46F4645D2B91D8C5A + 115F6BCA46A147928C3A5A3B + 9243727EA53046C088EA7D29 + FD901F3BEA4C410380799468 + F922333E2D254C9682F96F03 + 847687C1885545589F4F7474 + 7A02756C69AD4047B0D693F3 + AD6972D11FAB425A869D7102 + B17C00321EBE4181A5DF6C90 + 31B4CE909D344DB9B424E77E + 63F8D9ED12FF471195F8C383 + A506B30B4ACE48F5B85D7F31 + 9877AA2093B14BB4B8926E2D + 5BA1F4F90AFA44A9858B8DB0 + C433D9E617114EA98BCE33DB + F3ABF93706534A31B65A725B + 1CBB6A843BD94536B21CD89E + 4F506B5B0E7C47709FA44452 + 56D4D307DC4A4AF09DAF94EE + 571A1AE8705C422686933D75 + 5FA8245E18A9468BBFE498DE + F4CBB350EB1D4307A1CCE742 + 39FE046FEDD741BCB9075BBF + DA3740A38A2144F7B976F6FA + BA3027B35C234132B737E6CC + C75BAB45243B4576BD253903 + 917201561142444EBE1D38B3 + 2046235E49C148ADBE036915 + A46599BA6FEA4E468F972481 + 6F354EFDB9344A8DAD14E869 + FEAADC00C81E41BDA63E693C + FD95EF7FF0D14D58B90D18E8 + 4408BB0681CE46C1B56C1045 + CFC01F88AC544C9A92275DA4 + 00671B4BAA674E28B3C8BEFD + BE2B55FFA8B5473AA408CB8D + 775B7615ED0A468B956BDBD9 + E729DC6091DE462EBE5E1F60 + 1D11356F5796438AAC9644C0 + 133B0B4DFD2D4EAB8E99AF59 + 2B014875656842DFBDC4CB01 + 65A19347A2174FAF9BBE6A5F + 74F673EA5CA441ACBB95834B + 4639BB1EC512411689D79891 + 6A1FF88A04ED4CA083982641 + 287FA4F176AD41DEA2765D3A + C8F48D0F1EF341AFAD5BC875 + 11F49CCB2D4C46F1ADF832F9 + 8B7D157368574B0680C410D6 + 9DFE77C7BF6241E7AF27A92E + 36368A734173428991FCE787 + 7C8E67E919E147ECAF9B955A + 5A9416F3CA1F4117A6041968 + D3E512B6F10F4281983E93E2 + BF412519750245B8A1586F15 + 5B9842D33DCA42E1BB58BCD1 + 920241BDA6E640BD80591303 + 0819430E4ACE487894D72178 + 443A329B372444D08438D4DA + 9F0422510B99491F85DFB101 + F974D9B355BE45F58BDD4E6F + 9599F28F596F444A95E5AC5A + E42615E4F53D4B6EACC09A84 + isa - PBXBuildFile + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 - A8E1F029C40A4982AACF3060 + D52CE39566D94A66B5471987 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWContextNode.h + NSNumber+KiwiAdditions.m path - Kiwi/Classes/KWContextNode.h + Classes/Core/NSNumber+KiwiAdditions.m sourceTree - SOURCE_ROOT + <group> - A956CB0270644E06904CEBEA + D5804D9293BA4C5FA83AB3D7 - includeInIndex - 1 + children + + 6A9AD2CC0B2F44D9A506AD4F + 2D0A8349F6184F9385D2EEA7 + 2EC784CEF9434F9D8DCA9559 + isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc + PBXGroup name - KWAfterAllNode.m + ReactiveCocoa path - Kiwi/Classes/KWAfterAllNode.m + ReactiveCocoa sourceTree - SOURCE_ROOT - - A99F5CCD3883466199ED2B43 - - fileRef - 2D8DF795D01E4B14B9B183D8 - isa - PBXBuildFile + <group> - AA639AD4F034426E9C6EE8B1 + D5FB67F6BC1B4D2084E07E1D includeInIndex 1 @@ -4551,27 +10548,13 @@ lastKnownFileType sourcecode.c.h name - KWReceiveMatcher.h + KWFutureObject.h path - Kiwi/Classes/KWReceiveMatcher.h + Classes/Core/KWFutureObject.h sourceTree - SOURCE_ROOT - - AB42B9C15E974E92A608B517 - - fileRef - 7C5886BA6BAA43AD96409043 - isa - PBXBuildFile - - AB48F64A57154065AFD79A08 - - fileRef - 7A6D92B774934142B6B52E4D - isa - PBXBuildFile + <group> - ABA4519A10C240A992DFF2DE + D62503EA2BD94415A9EC1240 includeInIndex 1 @@ -4580,13 +10563,13 @@ lastKnownFileType sourcecode.c.h name - NSInvocation+KiwiAdditions.h + RACValueTransformer.h path - Kiwi/Classes/NSInvocation+KiwiAdditions.h + ReactiveCocoaFramework/ReactiveCocoa/RACValueTransformer.h sourceTree - SOURCE_ROOT + <group> - ABB202FBAD074E109CF71566 + D646D9F7C09C4E05AB3E233F includeInIndex 1 @@ -4595,20 +10578,32 @@ lastKnownFileType sourcecode.c.h name - KWContainStringMatcher.h + RACSubscriptingAssignmentTrampoline.h path - Kiwi/Classes/KWContainStringMatcher.h + ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h sourceTree - SOURCE_ROOT + <group> + + D6F49BF3C673451F99C283ED + + fileRef + 88D96CE6C389411DBFCE9E12 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - AE75162B43AC4A7BBE8B3567 + D767F3D5A55F44E48F72FD5E fileRef - 000DDA3F36E84183865E25F4 + 9B237D44F19A4043A2D48413 isa PBXBuildFile - AEDA40E015A94B7F9048ED5D + D7B403F602CB407E86591FDE includeInIndex 1 @@ -4617,152 +10612,192 @@ lastKnownFileType sourcecode.c.h name - KWStub.h + NSObject+KiwiStubAdditions.h path - Kiwi/Classes/KWStub.h + Classes/Stubbing/NSObject+KiwiStubAdditions.h sourceTree - SOURCE_ROOT + <group> - AEDCB01F8A1046B4BDAA0A1A + D7EFA267D14C4BC094E55DE7 - includeInIndex - 1 + baseConfigurationReference + A4BDADB3C94F43D8B0BB5EC2 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-specs-Kiwi-prefix.pch + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Pods-environment.h - sourceTree - SOURCE_ROOT + XCBuildConfiguration + name + Release - AF869EF228F1410B8F36182A + D87E39B5A9F4416895536BAC fileRef - 055FC09FA8354B4B8F426304 + F7EC1BDAB34D4B4098D90757 isa PBXBuildFile settings COMPILER_FLAGS - -fobjc-arc -DOS_OBJECT_USE_OBJC=0 + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker - B088098A6FCF4526B706EBEF - - buildConfigurations - - 8A6E1B25C2534CBCADA35722 - 30C889CB89914BC68C422D9D - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - B1035189597D4AB486B15922 + D8A16659E3D5480DB06353D3 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h + name + RACReplaySubject.h path - Pods-dummy.m + ReactiveCocoaFramework/ReactiveCocoa/RACReplaySubject.h sourceTree - SOURCE_ROOT - - B21BE3A02B9D455EAA686A33 - - fileRef - 7E20F49EDDA34EF48787B3F1 - isa - PBXBuildFile + <group> - B2260DB1576D469BBD5F3700 + D91119C1E8AC4C58983313C1 fileRef - F0E2D6994CE748838FE6E07C + 238148EC249D47DAB3BB9D5A isa PBXBuildFile - B2C7EC765AF541BE8DB317EF + D940BE83D1CF4388BDB4B0B3 - fileRef - 7D9BFDB69EE049EAA02857C8 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWMock.m + path + Classes/Mocking/KWMock.m + sourceTree + <group> - B47BA84054CC4E8C8029DD6F + D9D205F28BE24561B04614C4 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWContextNode.m + KWMatchers.h path - Kiwi/Classes/KWContextNode.m + Classes/Core/KWMatchers.h sourceTree - SOURCE_ROOT + <group> - B5D2852DE22D4958B0100918 + DA3740A38A2144F7B976F6FA fileRef - 2F2F660DFD54463BA9D9A7BF + 28C017E1EDB3426AB9758958 isa PBXBuildFile - B5D48DB07DF048EFB6C67C16 + DA98C7D92BEB412BBEDA7B0E - fileRef - AEDA40E015A94B7F9048ED5D + buildActionMask + 2147483647 + files + + 94D2937F2F0843879A5AD800 + 42A329F4AFF348BCA1187F18 + isa - PBXBuildFile + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 - B5DCCFEA33B048EE8D8816F7 + DB7764BA57594BAEB5A8AFA8 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWBlockNode.m + KWObjCUtilities.h path - Kiwi/Classes/KWBlockNode.m + Classes/Core/KWObjCUtilities.h sourceTree - SOURCE_ROOT + <group> - B691426B5D684E2A9097EF0C + DC21D861E73246C0B82006CF fileRef - 9FE5A4C83F224D4AB067DB45 + 269797A168A34570AF061E01 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - B7EA61D0925D4F0C832E4BF5 + DC26CAA1039A4F1D8E34AF90 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - SenTestSuite+KiwiAdditions.h + RACPassthroughSubscriber.m path - Kiwi/Classes/SenTestSuite+KiwiAdditions.h + ReactiveCocoaFramework/ReactiveCocoa/RACPassthroughSubscriber.m sourceTree - SOURCE_ROOT + <group> - B84A670C25984F7E84EACE3E + DC30647BD4D54B64BE1526B7 includeInIndex 1 @@ -4770,145 +10805,58 @@ PBXFileReference lastKnownFileType sourcecode.c.objc - name - KWBeforeAllNode.m path - Kiwi/Classes/KWBeforeAllNode.m + Pods-SocketRocket-dummy.m sourceTree - SOURCE_ROOT + <group> - B924BCB04C5743CE9DF19E3E + DC824CC5B0FD421983F37CB5 fileRef - 223A1477DF814A05BB730288 + DC26CAA1039A4F1D8E34AF90 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - B9FE69D9E11C46998AC60AD7 + DD50E099DD2944809FA55A39 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWMatcherFactory.h + RACStringSequence.m path - Kiwi/Classes/KWMatcherFactory.h + ReactiveCocoaFramework/ReactiveCocoa/RACStringSequence.m sourceTree - SOURCE_ROOT - - BA41BC3D77AB4B4C86BCF1B0 - - buildActionMask - 2147483647 - files - - C80C3B1F97E545FFAEFD03DB - 6783E85750AE4C4F8B415652 - CA4B96D36A5748F2BE01897E - 41F47E5C4F8548AD9A4205A1 - 0FE5CCFA975C4BCBA37997AC - F3B209C4D9014728891BBE36 - 2DC346E40D444B149107F158 - 69ECFB438B2C4BDFBB603B4F - 4C71C2970B4D4955979294B7 - 475FD2E941CB4679AC3B85F3 - C7E784DAA6E94BB9B7C4D334 - DD502AA03DD34936A83F3629 - 319638578ECD461392837CCB - EFFE8DE8DA5041288EEAC0FE - 26997F9AF54445F186B33E81 - 31A5C113F4F44D96A063C878 - 5A6CD3A6B6614990947BAD10 - 716AF9D7BFB3401C9AB5F9B6 - C2447E0CF3CE4F339A1B446D - 09665D148E40438094738FF5 - 2E428323E50E43A58AB779C8 - 356153393B744B82BB4136C0 - 45707E12EE0641979AF86AEF - 009B87A4517C4E49B32C3249 - A1285EB3DE794B289CD97CC5 - 20EBAD06F679446B9038C1F6 - 88CC7FCF02D74A678E5711B1 - 65C0E3C67CEA4691863B66FA - 6A4109E7DDA34915A329FE1C - A18B8C2789934D3BBCB03D23 - 48AE566003704B51BAEBF699 - 4373A6E2D1974C71856CD952 - 61DE25026F864EF0B63B3971 - B2C7EC765AF541BE8DB317EF - ED0CDD4114C04A068DE081A9 - 5E36E1F290EB4D94A815BE1C - 08841FEE42C14F07A9BFC795 - BF621ABCBA5648B7A6C06738 - B924BCB04C5743CE9DF19E3E - C561FA982BE94239BBCAD409 - C8181796E9ED4ECCAFBDF9BF - 93C0C92AA3924FA5B89F18A2 - E69DE3F2ED614874A402AD19 - 59587E7B09B54B78BF6B686B - 7D4351A35EC141DD83D1F45E - 14727A6326874E8DB1C4C3F9 - 30E5C49E00D54F69B8E48149 - 4C63A4539E65495786B6A65E - 532C2C753A844FEDA2F4EB4B - 50DC1D914ADE432CAF534667 - 40B80186D0084BCF9C84BA60 - D67BE482D0BA4C7A87EAA70D - 487988ED33ED45F481A15E07 - FEC5A9A9F26441F3B5FC0615 - EC947BB168B6458F9D8D65BD - 6EEEAE37E68C4BE48D4D1832 - A60F44D6383D4E999161CC73 - CB3B643261D445E59092D8EC - 9EAA82DA07914D83BD3D0C94 - 7FC3B368CE2C4ED592CAE9F9 - F6C83C03AFF94EC2A93F5A82 - 689D623D0E8E4729974FCEDF - F13568DE799748C8B92E8684 - EDB4802914374911B976D1D4 - 202A037C6FBB44BABF42125A - E9D978C8B61B4A42B49348B0 - F0CB55BA16FA4A15AFA408E5 - DE8A0FAB610748A9BDDE7C26 - 87F89C2E24194A10961BC3DF - 238E720EAB654D9D969FC9D7 - 65485A64A4D24C6D8039328A - 8761C020C58243AD98814BA8 - A8B2D6441CFF4B69B1A99622 - 190D54C881E449CD89D8261A - 897C1BEF548F4A859B79E392 - 2DAFDBBA45734E62A17E83F0 - A99F5CCD3883466199ED2B43 - 95A0C3C0193742BB854E9BED - 2BC0148E6B2447809713C40D - B21BE3A02B9D455EAA686A33 - 3C228FEF3ACE4BB192AB3F46 - 07475DD20A27462DB72313F2 - 5BC48A8E9BDF43209E6FD932 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + <group> - BA5DE68D699F42E482480DBD + DD55637FFEA94B23A1496DFB fileRef - 1261D92AF3944E9AA65E74D1 + DD50E099DD2944809FA55A39 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - BAD23D5A146640F4ABFD1C3B + DD79B55ADFC6408D845C2B4D fileRef - 625877F642B546C98332C80B + 22C3B4D28E024CDCA44EF7E9 isa PBXBuildFile - BB472D7A2DAF4FADAF4FF338 + DE7B0AA0F15748D6A4EC515F includeInIndex 1 @@ -4917,13 +10865,13 @@ lastKnownFileType sourcecode.c.objc name - KWAfterEachNode.m + UIRefreshControl+RACCommandSupport.m path - Kiwi/Classes/KWAfterEachNode.m + ReactiveCocoaFramework/ReactiveCocoa/UIRefreshControl+RACCommandSupport.m sourceTree - SOURCE_ROOT + <group> - BB621ACD7F9B4D88BD0A527C + DEFD2EC3A4784EE98B7D5C36 includeInIndex 1 @@ -4932,20 +10880,13 @@ lastKnownFileType sourcecode.c.objc name - KWGenericMatcher.m + KWStringUtilities.m path - Kiwi/Classes/KWGenericMatcher.m + Classes/Core/KWStringUtilities.m sourceTree - SOURCE_ROOT - - BC111325EADD49779D5434E1 - - fileRef - 9DA1B56D915548479AAB3AA0 - isa - PBXBuildFile + <group> - BC26577D7F904EEF82B048FF + DF09A068E7064655ABD39DAF includeInIndex 1 @@ -4954,33 +10895,26 @@ lastKnownFileType sourcecode.c.h name - KWAny.h + KWMessagePattern.h path - Kiwi/Classes/KWAny.h + NonARC/KWMessagePattern.h sourceTree - SOURCE_ROOT + <group> - BC83F1CD8DE64E8EA6B250B6 + DF370EF81F814D8194EBC387 - explicitFileType - archive.ar - includeInIndex - 0 isa PBXFileReference + lastKnownFileType + wrapper.framework + name + SystemConfiguration.framework path - libPods.a + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/SystemConfiguration.framework sourceTree - BUILT_PRODUCTS_DIR - - BCFB0CBF2F6C4F55AAE818B5 - - fileRef - 0F79CA43B2F94A46A6805A04 - isa - PBXBuildFile + DEVELOPER_DIR - BD068C43ED654803B8C71995 + DFE20A0FB24F4FA49398D470 includeInIndex 1 @@ -4989,20 +10923,20 @@ lastKnownFileType sourcecode.c.h name - KWAfterAllNode.h + KWExistVerifier.h path - Kiwi/Classes/KWAfterAllNode.h + Classes/Verifiers/KWExistVerifier.h sourceTree - SOURCE_ROOT + <group> - BD9386C90FE94D4AA11A693D + E0027BB097AD4C6EA45A3611 fileRef - FB99E112F42B4458A7428CE1 + 9B94DBA390254216B6E8C468 isa PBXBuildFile - BE00DE7B32B243A682DDC187 + E0374AB84A8742499DE195F6 includeInIndex 1 @@ -5011,28 +10945,25 @@ lastKnownFileType sourcecode.c.h name - KWBeWithinMatcher.h + KWBeIdenticalToMatcher.h path - Kiwi/Classes/KWBeWithinMatcher.h + Classes/Matchers/KWBeIdenticalToMatcher.h sourceTree - SOURCE_ROOT + <group> - BF113F4C8D274B2BADE3D699 + E049144009BE4DC4BE9E95E7 - includeInIndex - 1 + fileRef + 1B4721906E994BAE80545326 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWRegularExpressionPatternMatcher.m - path - Kiwi/Classes/KWRegularExpressionPatternMatcher.m - sourceTree - SOURCE_ROOT + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - BF4F4E14A843446C85BAA992 + E0C0BFDD55FF43C08BE8A9F7 includeInIndex 1 @@ -5041,139 +10972,114 @@ lastKnownFileType sourcecode.c.h name - KWReporting.h + RACBlockTrampoline.h path - Kiwi/Classes/KWReporting.h + ReactiveCocoaFramework/ReactiveCocoa/RACBlockTrampoline.h sourceTree - SOURCE_ROOT + <group> - BF621ABCBA5648B7A6C06738 + E0CFAA16277345C2A58012BB fileRef - 1836A8E7BB3340D1BEC5A659 + 63B6DE27271D4674874EF924 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - C16216BA42174DE598332FD8 + E10C6851AA0F4002A89EB05A includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.objc path - Pods-specs-Kiwi-Private.xcconfig + Pods-specs-dummy.m sourceTree - SOURCE_ROOT + <group> - C2447E0CF3CE4F339A1B446D + E1213643460642958D649FCE fileRef - B5DCCFEA33B048EE8D8816F7 + 07C46633DE374EBE9CFB823B isa PBXBuildFile - C37C48B8EA1E4F679BD0D967 + E13324B6331F4BF892ED0310 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWProbe.h + RACQueueScheduler.m path - Kiwi/Classes/KWProbe.h + ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler.m sourceTree - SOURCE_ROOT + <group> - C39ECDF8F3524523B71BEF0B + E1B0DD643D5B44E99DFF8B8C includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - OHHTTPStubsResponse.h + KWBlock.m path - OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.h + Classes/Core/KWBlock.m sourceTree - SOURCE_ROOT + <group> - C3A414A611E34C02B419C3AF + E22C450A2C054F14B5297477 - baseConfigurationReference - 3B78E950BD1846148855AF6A - buildSettings + fileRef + 77CD60CC95334DF88158CE24 + isa + PBXBuildFile + settings - ALWAYS_SEARCH_USER_PATHS - NO - ARCHS - armv6 armv7 - COPY_PHASE_STRIP - YES - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Pods-specs-OHHTTPStubs-prefix.pch - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 4.0 - OTHER_CFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_CPLUSPLUSFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - VALIDATE_PRODUCT - YES + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker - isa - XCBuildConfiguration - name - Release - C3AB70CB973646BAA866BADA + E22ED4747E634035B960D8DE includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWExampleGroupDelegate.h + RACEvent.m path - Kiwi/Classes/KWExampleGroupDelegate.h + ReactiveCocoaFramework/ReactiveCocoa/RACEvent.m sourceTree - SOURCE_ROOT + <group> + + E29BF73DA68F4C66BFAC1C5F + + fileRef + 91C6F3955D674210A0669CD2 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - C4261EBEA1EC4D45B866B139 + E32CC4A0CFF8435894223875 includeInIndex 1 @@ -5181,156 +11087,118 @@ PBXFileReference lastKnownFileType sourcecode.c.h - name - KWExistVerifier.h path - Kiwi/Classes/KWExistVerifier.h + Pods-ReactiveCocoa-prefix.pch sourceTree - SOURCE_ROOT + <group> - C4331BC551114FD2A5514EB1 + E36EC84B9FBD4FF2993081DF includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWContainStringMatcher.m + RACEvent.h path - Kiwi/Classes/KWContainStringMatcher.m + ReactiveCocoaFramework/ReactiveCocoa/RACEvent.h sourceTree - SOURCE_ROOT - - C4D325A517A448D5AE4E001B - - fileRef - CC5D0C2202FF42BA946660A4 - isa - PBXBuildFile - - C561FA982BE94239BBCAD409 - - fileRef - 6F110B5114A54AA18DBA1F34 - isa - PBXBuildFile + <group> - C57E700F3D2A4C1784E25C62 + E3A158ADB28F42C5ADA82BF1 fileRef - 0225821FFE7D4E9EA2258D18 + 1480529E3E834DD3AD07EB7E isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - C587E4E28E77450E8D32A39A + E3E071BE40D44EEBB95ECD4F includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWEqualMatcher.m + NSInvocation+KiwiAdditions.h path - Kiwi/Classes/KWEqualMatcher.m + Classes/Core/NSInvocation+KiwiAdditions.h sourceTree - SOURCE_ROOT + <group> + + E418656940554DF3A5771FD4 + + fileRef + 9E0192D66CAA4C4E8112E83C + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - C59D4099268043BFA60EA2A4 + E42615E4F53D4B6EACC09A84 fileRef - 625877F642B546C98332C80B + 72F658883B7F4799A7557C6F isa PBXBuildFile - C61546A3B30A49959059B7D1 + E43A1A3CDF0E4FF3A2CB6AB6 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWContainMatcher.h + KWFormatter.m path - Kiwi/Classes/KWContainMatcher.h + Classes/Core/KWFormatter.m sourceTree - SOURCE_ROOT + <group> - C64029208A4F4D3BA01157BB + E4922F20065846E187A6D160 buildActionMask 2147483647 files - 2F90A978A5FF4521A6E4A2D6 + 5C8BF678F2844E47899FBA5F + 96B7F329909D453C86941695 + 2A96F1182407483DB2DE3801 + 7B0D7C240C934B1697476414 isa PBXFrameworksBuildPhase runOnlyForDeploymentPostprocessing 0 - C76B4092722943F6B4E00756 - - fileRef - D17EA38DAB1A4F5098CC2DB0 - isa - PBXBuildFile - - C7E784DAA6E94BB9B7C4D334 - - fileRef - 5CC394709A934094B0826155 - isa - PBXBuildFile - - C80C3B1F97E545FFAEFD03DB - - fileRef - A956CB0270644E06904CEBEA - isa - PBXBuildFile - - C8181796E9ED4ECCAFBDF9BF - - fileRef - F8BA36D5DCA14B05B8A62544 - isa - PBXBuildFile - - C86BB3BCB92D4728B6BCE556 - - fileRef - 3080884C6C994C5B8835C3ED - isa - PBXBuildFile - - C8D1C2966B784FC3BB75747E - - fileRef - E638C7BCD02B42149D574241 - isa - PBXBuildFile - - CA4B96D36A5748F2BE01897E - - fileRef - E1BE3EA864234FCC8E7A943E - isa - PBXBuildFile - - CB3B643261D445E59092D8EC + E4A86397D2274FAAA505C7B2 - fileRef - F5E81EADB49145A3AE70159D + buildActionMask + 2147483647 + files + + D0A38184670C4A14910675D5 + F1535BABD6284B0289CE4913 + isa - PBXBuildFile + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 - CBD79DD7CAB9404F836550E6 + E4B0000F87A746CDB2C825FA includeInIndex 1 @@ -5339,28 +11207,28 @@ lastKnownFileType sourcecode.c.h name - NSValue+KiwiAdditions.h + RACStringSequence.h path - Kiwi/Classes/NSValue+KiwiAdditions.h + ReactiveCocoaFramework/ReactiveCocoa/RACStringSequence.h sourceTree - SOURCE_ROOT + <group> - CC3A4C06B2B34AA58BCD8A6A + E53FA948F2044A4FA2A89C5F includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWItNode.h + KWBeKindOfClassMatcher.m path - Kiwi/Classes/KWItNode.h + Classes/Matchers/KWBeKindOfClassMatcher.m sourceTree - SOURCE_ROOT + <group> - CC5D0C2202FF42BA946660A4 + E55D9B19E4AB4084B7C4A744 includeInIndex 1 @@ -5368,93 +11236,67 @@ PBXFileReference lastKnownFileType sourcecode.c.h - name - KWBeIdenticalToMatcher.h path - Kiwi/Classes/KWBeIdenticalToMatcher.h + Pods-SocketRocket-prefix.pch sourceTree - SOURCE_ROOT + <group> - CCAE54C648E04C549E1C1A25 + E65DD95C4B8440E28F3C54B5 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - KWBeTrueMatcher.m + NSObject+RACKVOWrapper.h path - Kiwi/Classes/KWBeTrueMatcher.m - sourceTree - SOURCE_ROOT - - CCD666EBDE1D47BDB32A14E9 - - children - - 9DA1B56D915548479AAB3AA0 - 88A88235D0A649B7BFC46CCE - C39ECDF8F3524523B71BEF0B - 055FC09FA8354B4B8F426304 - - isa - PBXGroup - name - OHHTTPStubs + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACKVOWrapper.h sourceTree <group> - CD24AE0879F34FD4B6B2E408 + E66763C673AD4FB6B695D872 - fileRef - 47A030E9480940B7896ACBF8 + containerPortal + EFBB6CF77B5E4364844354C4 isa - PBXBuildFile - - CE244AEA34B74D4DA111CDDA - - includeInIndex + PBXContainerItemProxy + proxyType 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - Pods-specs-OHHTTPStubs-dummy.m - sourceTree - SOURCE_ROOT + remoteGlobalIDString + 1E8AB76B5699442590151CF0 + remoteInfo + Pods-ReactiveCocoa - CF1E2BCA58BB464BAC4A479A + E6685215037849B0910C5876 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h + name + KWAfterEachNode.h path - Pods-specs-Kiwi-dummy.m + Classes/Nodes/KWAfterEachNode.h sourceTree - SOURCE_ROOT + <group> - D0C72B06C9244DA9931D5344 + E690EBEB17DD479ABC21280F - includeInIndex - 1 + fileRef + 23107D078833429B9B39622C isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWStringPrefixMatcher.m - path - Kiwi/Classes/KWStringPrefixMatcher.m - sourceTree - SOURCE_ROOT + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - D17EA38DAB1A4F5098CC2DB0 + E6E8BDB4AA7C4F88921BD822 includeInIndex 1 @@ -5463,57 +11305,49 @@ lastKnownFileType sourcecode.c.h name - KWBeZeroMatcher.h + KWReporting.h path - Kiwi/Classes/KWBeZeroMatcher.h + Classes/Core/KWReporting.h sourceTree - SOURCE_ROOT + <group> - D18F69C55B684CC6A8757B0F + E729DC6091DE462EBE5E1F60 fileRef - B1035189597D4AB486B15922 + ABF83780E4F54B9A8CB69598 isa PBXBuildFile - D2140D56BD334E97B6829FC2 + E7447CE4280F4724B2C81E43 - includeInIndex - 1 + fileRef + B2991BB941724AAFB030DCC6 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - KWHaveValueMatcher.h - path - Kiwi/Classes/KWHaveValueMatcher.h - sourceTree - SOURCE_ROOT + PBXBuildFile - D21417EA3BC440C68752449A + E7CE9A40476E4DC88D10A08D fileRef - 5E6FAEC9EA9442EAB40239E2 + 1B9F5738B8E841A7B3109410 isa PBXBuildFile - D3ED1121D78348A7BA17EB97 + E8251025E3BE4A1DAB113F0E buildActionMask 2147483647 files - 39447B95C5DB426295DE2531 - AF869EF228F1410B8F36182A - 5096A63C0CBD49DA96E42B59 + 3A8E1F0C94C54B0DB625497B + 3981DDE2DDAA4C36B93654B6 + 593063C939C744AEA2C5074E isa - PBXSourcesBuildPhase + PBXFrameworksBuildPhase runOnlyForDeploymentPostprocessing 0 - D4824E5076DD49D6BB3D0985 + E86EDC8701714880873A623F includeInIndex 1 @@ -5522,101 +11356,58 @@ lastKnownFileType sourcecode.c.objc name - NSInvocation+KiwiAdditions.m + KWEqualMatcher.m path - Kiwi/Classes/NSInvocation+KiwiAdditions.m + Classes/Matchers/KWEqualMatcher.m sourceTree - SOURCE_ROOT + <group> - D53A13362C7D4D81A59C0967 + E9B6CC1824114D97950A7C67 - baseConfigurationReference - 6FFE29E80EBF4AEA90B19FD7 - buildSettings + fileRef + 8A56347717AD4EE68AA2D4E7 + isa + PBXBuildFile + settings - ALWAYS_SEARCH_USER_PATHS - NO - ARCHS - armv6 armv7 - COPY_PHASE_STRIP - NO - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 4.0 - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker - isa - XCBuildConfiguration - name - Debug - D669F81889054783B93FF400 + E9BFD00B6FCE4E618B0ABD40 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - KWEqualMatcher.h + text.xcconfig path - Kiwi/Classes/KWEqualMatcher.h + Pods-specs-Kiwi.xcconfig sourceTree - SOURCE_ROOT + <group> - D67BE482D0BA4C7A87EAA70D + EA6D166F2B874B77BD4ED2B3 fileRef - 16A37C918B734529B369D4C6 + 578314DDCFF7405BBB7F28F5 isa PBXBuildFile - D6BE811CAAA440A3842014B6 + EAB5C84B189A4B79A998B17C includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc - name - NSObject+KiwiMockAdditions.m + text.script.sh path - Kiwi/Classes/NSObject+KiwiMockAdditions.m + Pods-resources.sh sourceTree - SOURCE_ROOT + <group> - D7A606855D71448889BA62E8 + EAC662D4BF854D2F954B65CB includeInIndex 1 @@ -5625,39 +11416,53 @@ lastKnownFileType sourcecode.c.objc name - KWSpec.m + KWProbePoller.m path - Kiwi/Classes/KWSpec.m + Classes/Core/KWProbePoller.m + sourceTree + <group> + + EB4322D0994449B8BC841731 + + children + + 66D3DA459A3249B7A08EB5CA + 7F87E11829654238834014A2 + A241D33728AD4094907B1422 + FDC22D11E4C7463AA08B70C7 + + isa + PBXGroup + name + Support Files sourceTree SOURCE_ROOT - D81529FB1A9544BB9E204B79 + EB5EFEE7325A4C29A2E98183 fileRef - 458BA5E50EDE46CB88EFEF52 + 21EBDA1695F44BE3ABA7DE15 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - D829F232EF4846C0B0345C19 + ED0EA16EAD3246F5B066B049 fileRef - 1966C10EA41E45A383BF2968 + 764AFEF289FF4E1C9EC30290 isa PBXBuildFile - - DA2BB1A3C062453A9E7BF2A3 - - buildSettings + settings - IPHONEOS_DEPLOYMENT_TARGET - 4.0 + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker - isa - XCBuildConfiguration - name - Release - DA6C7EF21E1147E496C92DFE + ED9A729660EA4FC298DC6DD2 includeInIndex 1 @@ -5666,224 +11471,91 @@ lastKnownFileType sourcecode.c.objc name - SenTestSuite+KiwiAdditions.m + NSURLConnection+RACSupport.m path - Kiwi/Classes/SenTestSuite+KiwiAdditions.m + ReactiveCocoaFramework/ReactiveCocoa/NSURLConnection+RACSupport.m sourceTree - SOURCE_ROOT + <group> - DA9CE1E2BAE34B4A8B93D8F5 + EDC1B6A7D15C456293C5E20A fileRef - 131420174C014CC0A4B8AED3 + 2DFDA3FBCFCB4A3089357C7A isa PBXBuildFile - DBFEC935A2714BFB905BB101 + EDDF9950E3D74C1B97A23DAD - includeInIndex - 1 + fileRef + 7351CBBEA4DB4962890A72A6 isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - CFNetwork.framework - path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/CFNetwork.framework - sourceTree - DEVELOPER_DIR + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - DC2FB9B0E1464FFCAE04D560 + EDFFBD49908C43EF9C147529 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWMatchers.h + RACDynamicSequence.m path - Kiwi/Classes/KWMatchers.h + ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSequence.m sourceTree - SOURCE_ROOT - - DD4533FB2A444F238D167711 - - buildActionMask - 2147483647 - files - - 72A6CB98E8354E50AB0F1D43 - A5E6BDE267B34ADE910FA0E1 - A2030B9D25124BCC95352042 - 791BE870AB3443A791EB4141 - 5F49EA6A860E46F0B96B2386 - 1D987852AAF1403CBE5A315B - E40BD30345B745D491AA11D6 - 0C3B4B22FAB643B78F0FAD99 - AB48F64A57154065AFD79A08 - DA9CE1E2BAE34B4A8B93D8F5 - 1ACE630F671D49D3BAE64306 - 3627A09A59E04E4BBE9D3DA9 - C4D325A517A448D5AE4E001B - FCD9238CFF644115B62A2890 - 093D16518B924407BD3133F0 - 2A1CE86002FC46128B0EC7F1 - 5FE55B0238E24108BE1069DD - 1875CF990A3D4041BB0F8CCA - ECA58E99700E4B73BA6B0A41 - 9EB757B2697E46C89EBC62D0 - C76B4092722943F6B4E00756 - FC733740CC7B468F875CF704 - BD9386C90FE94D4AA11A693D - 727250DF6E2A4596A3E018FD - 78F2FD7527F04C68897580D6 - 376D5CBD49574D7C8B102AE0 - AE75162B43AC4A7BBE8B3567 - 44BCC544D3B94617AC91D08E - 9681EC415AF94E328E756293 - 8E34AA0DB2E440C28FDA4EA7 - 142FA58830D64CE39FEF40B2 - 2DDA3EC479904DC487F80E2D - 80FF6F855710472F80BD059D - 40D7030FE86145B38E4CF7EB - C8D1C2966B784FC3BB75747E - 17EBC0A278B84C06972CEC86 - 8745F2EC1BA44654AB91AC78 - 1581FACD930B4176B4F756A6 - 022EE64F38224E26B5DC5F1E - AB42B9C15E974E92A608B517 - 072AA58ED0364347AC68B566 - 18155CF64FBB467C8B0B7A77 - 341A31ECC2E84639856C9C23 - DD9EE5C4CD254AD7AA892B46 - EE8A7BADEB744484AA5440FF - 75EE950458C94FC7A5E4DD47 - 1B5653014A834720B72E3B9B - 99A4213D4B0F40A79555B429 - 4289EC38FDB34B3FAD4713D2 - 93DC1D2DE66D47B6838B9A88 - 5340B9BB33D3456F918D2503 - E81B1FBB6D524D70AEAD281A - CD24AE0879F34FD4B6B2E408 - E9FF99E934DB45D8A1E81186 - 03BA55ECD1FB466E9E987E1E - 226F7DA97B5B4D399E0C1B37 - FF729DD1F92641BC91B2ACEB - BA5DE68D699F42E482480DBD - 91406FB0E85A4BAABA435D5A - 2438A481705B47BF871A4F0F - A8C43EF137CC4F3BA333C583 - 9DAF92FDE4954B6ABCB9CA46 - 093B6E83497241BAA4703A0F - 9041F24FC7F643F6947217EC - 166F039443B2431AAFEFBEB4 - 2F1B3CB422A347D4B7360CAA - 657A9DDD284B4AE6AE5D289B - 245FF8F6735E4CCBA4CC749F - 7B70632E9CF943D09CB064CF - 007D6A8BFFE2401D99D28963 - FE8C7753DEB34A56AA8631A1 - D21417EA3BC440C68752449A - E87AAA47E8F342DAA2AD86AF - B2260DB1576D469BBD5F3700 - 2A545C2E7E134D1D87B6F30B - 580EA428BAB346B5A621EDFE - 7B49607B802643E2B5A1AEE0 - C57E700F3D2A4C1784E25C62 - B5D48DB07DF048EFB6C67C16 - C86BB3BCB92D4728B6BCE556 - 0993C03064C746EBB66DBB7F - 2E3D3786DF1548D0902F607E - EDAC8BD58E4846C1B56C0E7C - BCFB0CBF2F6C4F55AAE818B5 - 082CB756DEA34ABD8D511FD6 - 6596C90DF3734B2B9868C438 - D829F232EF4846C0B0345C19 - 3DEC7F57668B418B9377DDCF - F7189C0A9EB44E2D90EF744D - B5D2852DE22D4958B0100918 - B691426B5D684E2A9097EF0C - E57AF64B905B454D8930E4C4 - 75EAC65B1E264D9183BDD767 - 9E57E24A0FB44DDDB0B43C58 - E09F9260964E422DB2EF2EC9 - 1443E13311B7461DA5208F46 - - isa - PBXHeadersBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - DD502AA03DD34936A83F3629 - - fileRef - 340DF864C1BA4D1EABD936C6 - isa - PBXBuildFile + <group> - DD9EE5C4CD254AD7AA892B46 + EE95C68A1B0E4D8683014505 fileRef - 8B753A6C511E40CE84466C07 + D20C6FEB12E641E0BF3897A8 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - DE3AF2C0ECE74478AE372972 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWRaiseMatcher.m - path - Kiwi/Classes/KWRaiseMatcher.m - sourceTree - SOURCE_ROOT - - DE4AAF571A1D40AD82280B3C + EE9D25436D914DA8A870DEF3 - includeInIndex - 1 + buildConfigurationList + 22A57ECD7733431F9BE869E9 + buildPhases + + 6C486994E5034CBCA313AABA + 48E932E8026449F68CE98968 + 04F529DF36314AD3BA6D7EC2 + + buildRules + + dependencies + isa - PBXFileReference - lastKnownFileType - sourcecode.c.h + PBXNativeTarget name - NSObject+KiwiStubAdditions.h - path - Kiwi/Classes/NSObject+KiwiStubAdditions.h - sourceTree - SOURCE_ROOT + Pods-Reachability + productName + Pods-Reachability + productReference + 3B1DDD364B68465A8D6BEB08 + productType + com.apple.product-type.library.static - DE8A0FAB610748A9BDDE7C26 + EED5E01E64854F4C867C621C fileRef - 64DB77C0D1CD4367A08FCDDF + 87383DFA27664E4D9B5A3ECD isa PBXBuildFile - DE961CA58FD34E38BD574C33 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - KWBeSubclassOfClassMatcher.h - path - Kiwi/Classes/KWBeSubclassOfClassMatcher.h - sourceTree - SOURCE_ROOT - - DEE08E213E904196BEBF63D7 + EF1606F8CFE14DE4BFE1F59F includeInIndex 1 @@ -5892,65 +11564,69 @@ lastKnownFileType sourcecode.c.objc name - KWExistVerifier.m + NSInvocation+RACTypeParsing.m path - Kiwi/Classes/KWExistVerifier.m + ReactiveCocoaFramework/ReactiveCocoa/NSInvocation+RACTypeParsing.m sourceTree - SOURCE_ROOT + <group> - DF8B54EC0E37483AA313BA61 + EF9A8F427E544ABDAA811273 - includeInIndex - 1 + fileRef + 5EFCC5EDB86B44A480BEFA00 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - KiwiMacros.h - path - Kiwi/Classes/KiwiMacros.h - sourceTree - SOURCE_ROOT + PBXBuildFile - E05A1DAF02EC4B9694DF2D74 + EFBB6CF77B5E4364844354C4 - children + attributes + + LastUpgradeCheck + 0500 + + buildConfigurationList + 558A878FB07742F48B479AD2 + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions - 8777FF45154A42B2948CA353 - 428A8EB78BC9465BB54D8B36 - 9F597748B21C42CEBCD46279 - 0201529585604419A1AE4E4D - 07758B687044417B88378C7A + en + + mainGroup + D1FCA9B3A7B84C629D8ED870 + productRefGroup + 120F641F4A6D4A21A66FE422 + projectDirPath + + projectReferences + + projectRoot + + targets + + 44038B7FB3BE4AE5AE12B9C8 + EE9D25436D914DA8A870DEF3 + 1E8AB76B5699442590151CF0 + 2820B6B2A6424E40852AC3CA + 91D6A91614E84DC1B2DE8628 + 7A17300E4D674CC0B2A68C8C + 15A359E7D4AF402D99E6EC37 - isa - PBXGroup - sourceTree - <group> - E09F9260964E422DB2EF2EC9 + EFD97812582444EBACF12D38 fileRef - CBD79DD7CAB9404F836550E6 + DF09A068E7064655ABD39DAF isa PBXBuildFile - E12AE8C526574ECB927D3427 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - KWUserDefinedMatcher.h - path - Kiwi/Classes/KWUserDefinedMatcher.h - sourceTree - SOURCE_ROOT - - E1BE3EA864234FCC8E7A943E + F00F8B0FECEF4E1096B7DB3B includeInIndex 1 @@ -5959,77 +11635,70 @@ lastKnownFileType sourcecode.c.objc name - KWAny.m + UIControl+RACSignalSupport.m path - Kiwi/Classes/KWAny.m + ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupport.m sourceTree - SOURCE_ROOT + <group> - E40BD30345B745D491AA11D6 + F08D431847494AB6AB795D6A fileRef - BC26577D7F904EEF82B048FF + BD0B7CE4EBFD416199CF8778 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - E57AF64B905B454D8930E4C4 + F119F8CF8CF649BAACF433EB fileRef - DE4AAF571A1D40AD82280B3C + F5B24F66923045159B7F0081 isa PBXBuildFile - E5918B17FBEF460AADB6F368 + F1535BABD6284B0289CE4913 - includeInIndex - 1 + fileRef + 5EFCC5EDB86B44A480BEFA00 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - KWMatchers.m - path - Kiwi/Classes/KWMatchers.m - sourceTree - SOURCE_ROOT + PBXBuildFile - E638C7BCD02B42149D574241 + F3060CEE9386484EAA2A9239 - includeInIndex - 1 + fileRef + DE7B0AA0F15748D6A4EC515F isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - KWExample.h - path - Kiwi/Classes/KWExample.h - sourceTree - SOURCE_ROOT + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - E68EBB138DEF47A6A39BBE69 + F3ABF93706534A31B65A725B - includeInIndex - 1 + fileRef + B1D5E3566D18488D8666A7B6 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Pods-specs-environment.h - sourceTree - SOURCE_ROOT + PBXBuildFile - E69DE3F2ED614874A402AD19 + F3D5A9B0E0864B92BED4B19C fileRef - 51F0BE639B794FCE8FD932D8 + 38CC0CEAF0FE4B2786FFA619 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - E7C504DF53524583AA9E8BEF + F3F43C7F5F194793A7D509D9 includeInIndex 1 @@ -6038,36 +11707,42 @@ lastKnownFileType sourcecode.c.objc name - KWItNode.m + KWValue.m path - Kiwi/Classes/KWItNode.m + Classes/Core/KWValue.m sourceTree - SOURCE_ROOT + <group> - E81B1FBB6D524D70AEAD281A + F4668E959E7D4143A1F38D69 - fileRef - 575696B34CB24CE999EC340B + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + NSObject+RACLifting.m + path + ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.m + sourceTree + <group> - E87AAA47E8F342DAA2AD86AF + F4CBB350EB1D4307A1CCE742 fileRef - BF4F4E14A843446C85BAA992 + B6CCF07FD899411882A93980 isa PBXBuildFile - E952D13F467343DD8D1A3302 + F4D5820985CF4B43A43C65B1 baseConfigurationReference - C16216BA42174DE598332FD8 + CD52ED41EF5D448384BA54BE buildSettings ALWAYS_SEARCH_USER_PATHS NO - ARCHS - armv6 armv7 COPY_PHASE_STRIP NO DSTROOT @@ -6080,8 +11755,6 @@ 0 GCC_PRECOMPILE_PREFIX_HEADER YES - GCC_PREFIX_HEADER - Pods-specs-Kiwi-prefix.pch GCC_PREPROCESSOR_DEFINITIONS DEBUG=1 @@ -6094,7 +11767,7 @@ INSTALL_PATH $(BUILT_PRODUCTS_DIR) IPHONEOS_DEPLOYMENT_TARGET - 4.0 + 5.0 OTHER_LDFLAGS PRODUCT_NAME @@ -6111,22 +11784,22 @@ name Debug - E9ADDCFD2F8241DEAE01C976 + F5547ED532444DF189741848 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWExampleNode.h + KWBeforeAllNode.m path - Kiwi/Classes/KWExampleNode.h + Classes/Nodes/KWBeforeAllNode.m sourceTree - SOURCE_ROOT + <group> - E9C914CC13514473A8D69DE4 + F59B6C8ED9B94518A403C6C3 includeInIndex 1 @@ -6134,19 +11807,14 @@ PBXFileReference lastKnownFileType sourcecode.c.objc + name + UITextField+RACSignalSupport.m path - Pods-Reachability-dummy.m + ReactiveCocoaFramework/ReactiveCocoa/UITextField+RACSignalSupport.m sourceTree - SOURCE_ROOT - - E9D978C8B61B4A42B49348B0 - - fileRef - 0BE63869164546C3BF6343DA - isa - PBXBuildFile + <group> - E9F4040FDC9D40A8B360155D + F5B24F66923045159B7F0081 includeInIndex 1 @@ -6155,49 +11823,54 @@ lastKnownFileType sourcecode.c.h name - KWCountType.h + NSArray+RACSequenceAdditions.h path - Kiwi/Classes/KWCountType.h + ReactiveCocoaFramework/ReactiveCocoa/NSArray+RACSequenceAdditions.h sourceTree - SOURCE_ROOT + <group> - E9FF99E934DB45D8A1E81186 + F5B33270D3F74A39AD0B5823 fileRef - CC3A4C06B2B34AA58BCD8A6A + 3121C12B2EFD4872844EAAEA + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + F5C35AA4FC5340A8B420B99C + + fileRef + 40F49F6098C84FC2BC65B9ED isa PBXBuildFile - EC732E0F175643EE9CCF1ED0 + F6F2C166D865440486566456 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWMatchVerifier.h + KWBeBetweenMatcher.m path - Kiwi/Classes/KWMatchVerifier.h + Classes/Matchers/KWBeBetweenMatcher.m sourceTree - SOURCE_ROOT - - EC947BB168B6458F9D8D65BD - - fileRef - 491F3A30336742C09363FFFB - isa - PBXBuildFile + <group> - ECA58E99700E4B73BA6B0A41 + F6F4D352F4984CFD80C7E75A fileRef - FC28FBB6542E431491C4A04A + DC30647BD4D54B64BE1526B7 isa PBXBuildFile - ED0883BBB05E49E0B2A79C2A + F7EC1BDAB34D4B4098D90757 includeInIndex 1 @@ -6206,206 +11879,141 @@ lastKnownFileType sourcecode.c.objc name - KWMatcherFactory.m + RACChannel.m path - Kiwi/Classes/KWMatcherFactory.m + ReactiveCocoaFramework/ReactiveCocoa/RACChannel.m sourceTree - SOURCE_ROOT + <group> - ED0CDD4114C04A068DE081A9 + F829D6F0AA3A42258E849D38 fileRef - 154A27ABE58A45078F4BA286 + 45183855128142DEA48627EA isa PBXBuildFile - ED71BFBB36B54EF1B9A1B824 - - containerPortal - 0777BA3BB9584122ACE4EE63 - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - 81CAD16CBB3143C8A5F918C4 - remoteInfo - Pods-Reachability - - EDAC8BD58E4846C1B56C0E7C + F88005335C06425D9D887177 fileRef - 3AFF981E900D47C1B5E326A5 + C67D555AA53848B9B581BD4D isa PBXBuildFile - EDB4802914374911B976D1D4 + F886DE7E8676427F87D42043 fileRef - D0C72B06C9244DA9931D5344 + FB10ACB930CF4319B07FDE17 isa PBXBuildFile - EE8A7BADEB744484AA5440FF + F8D1FF8E6F304C6C888A1DE5 - fileRef - EF292CE4724A422BA82C59B0 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + RACScheduler.m + path + ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.m + sourceTree + <group> - EF292CE4724A422BA82C59B0 + F8E4EF9644DA4628A96BED31 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWFutureObject.h + RACUnit.m path - Kiwi/Classes/KWFutureObject.h + ReactiveCocoaFramework/ReactiveCocoa/RACUnit.m sourceTree - SOURCE_ROOT + <group> - EF36D6613CF148BCB339F4FD + F8F895A8DFB24606B8F999B1 baseConfigurationReference - 3B78E950BD1846148855AF6A + CD52ED41EF5D448384BA54BE buildSettings ALWAYS_SEARCH_USER_PATHS NO - ARCHS - armv6 armv7 COPY_PHASE_STRIP - NO + YES DSTROOT /tmp/xcodeproj.dst GCC_C_LANGUAGE_STANDARD gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 GCC_PRECOMPILE_PREFIX_HEADER YES - GCC_PREFIX_HEADER - Pods-specs-OHHTTPStubs-prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO GCC_VERSION com.apple.compilers.llvm.clang.1_0 INSTALL_PATH $(BUILT_PRODUCTS_DIR) IPHONEOS_DEPLOYMENT_TARGET - 4.0 + 5.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + OTHER_LDFLAGS PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - - isa - XCBuildConfiguration - name - Debug - - EF4179F378294E3EB69819FE - - buildConfigurationList - 66D5F70B92834CDF8FEC9773 - buildPhases - - D3ED1121D78348A7BA17EB97 - 213298167DAC47C090CF05BD - F5CD4FA62876454EADDD15E3 - - buildRules - - dependencies - + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + isa - PBXNativeTarget + XCBuildConfiguration name - Pods-specs-OHHTTPStubs - productName - Pods-specs-OHHTTPStubs - productReference - 1E88DB2C638C45869220B46C - productType - com.apple.product-type.library.static - - EF41A75BFE7243CAA9FF1DD3 - - buildConfigurations - - 9E95F1093E64439FAF91A903 - D53A13362C7D4D81A59C0967 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName Release - isa - XCConfigurationList - EFFB43BEB94748098A56A500 + F922333E2D254C9682F96F03 - includeInIndex - 1 + fileRef + 2D6FDF81DADD464EB5518615 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - Pods-SocketRocket-dummy.m - sourceTree - SOURCE_ROOT + PBXBuildFile - EFFE8DE8DA5041288EEAC0FE + F974D9B355BE45F58BDD4E6F fileRef - 8704BD946CE240C6ACE9CA77 + 9592740120A1493E93E8BC1F isa PBXBuildFile - F0531BAE563D403FBDFF4C89 + FA6B5205BDCF4BF4B88B1063 - buildConfigurationList - 1EB8ECB08E9140D59F618D7F - buildPhases + buildActionMask + 2147483647 + files - BA41BC3D77AB4B4C86BCF1B0 - 8D0836541C014EC7BEB46CD0 - DD4533FB2A444F238D167711 + EED5E01E64854F4C867C621C - buildRules - - dependencies - isa - PBXNativeTarget - name - Pods-specs-Kiwi - productName - Pods-specs-Kiwi - productReference - 5E15AB3896BE4E7287F8A8C0 - productType - com.apple.product-type.library.static + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 - F05F8DD51A4049A5A374D3E4 + FB10ACB930CF4319B07FDE17 includeInIndex 1 @@ -6414,88 +12022,88 @@ lastKnownFileType sourcecode.c.h name - KWBeforeAllNode.h + KWBeKindOfClassMatcher.h path - Kiwi/Classes/KWBeforeAllNode.h + Classes/Matchers/KWBeKindOfClassMatcher.h sourceTree - SOURCE_ROOT + <group> - F074520187D1417789088DDA + FB1F773527E9460CAF4BD5B1 - buildActionMask - 2147483647 - files - - C59D4099268043BFA60EA2A4 - 6984341C394F41288905E2CC - A1223FACF3914D50B676FF4E - + includeInIndex + 1 isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + SenTestSuite+KiwiAdditions.m + path + SenTestingKit/SenTestSuite+KiwiAdditions.m + sourceTree + <group> - F0CB55BA16FA4A15AFA408E5 + FB4CDE8EDA5D4296BBC9A542 - fileRef - 8ED87155D0E546AD8A384DC0 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + KWAfterAllNode.m + path + Classes/Nodes/KWAfterAllNode.m + sourceTree + <group> - F0E2D6994CE748838FE6E07C + FB83D2CDF8FC455BB6C5B2F3 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWRespondToSelectorMatcher.h + NSSet+RACSequenceAdditions.m path - Kiwi/Classes/KWRespondToSelectorMatcher.h + ReactiveCocoaFramework/ReactiveCocoa/NSSet+RACSequenceAdditions.m sourceTree - SOURCE_ROOT + <group> - F13568DE799748C8B92E8684 + FBB062F93FE2425C8699524F fileRef - 310BE70F66F64D9DA731F0E3 + B0243DD4BDE44188A97DC26D isa PBXBuildFile - F27CFE22D0F54FA0957FC054 + FBCC1AA0592648DD9FDCBCD0 - children - - 6FFE29E80EBF4AEA90B19FD7 - E68EBB138DEF47A6A39BBE69 - 13BD9A952DCD468F8FB57F37 - 88D6E240FA724802BE9499A3 - 07473608A64F4403B0C0A66F - 95207EAC5C8E42379B8E46F4 - isa - PBXGroup - name - Pods-specs - sourceTree - <group> + PBXTargetDependency + target + 1E8AB76B5699442590151CF0 + targetProxy + E66763C673AD4FB6B695D872 - F2A66714D0CA4948A6B8C157 + FBED7EFDFEA44D2D8ED0A8CA - containerPortal - 0777BA3BB9584122ACE4EE63 + fileRef + 9E6E58262EA34A27A4BCFE8A isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - 99E902D1C70F44B3920567BD - remoteInfo - Pods-SocketRocket + PBXBuildFile + + FC0D078A485C4CDB81E0331B + + fileRef + 577D44E25E3E48748C565F66 + isa + PBXBuildFile - F30C2226942540408C5925FF + FCA85E9368B04F16ACD7685C includeInIndex 1 @@ -6504,13 +12112,13 @@ lastKnownFileType sourcecode.c.h name - KWProbePoller.h + RACSubscriber+Private.h path - Kiwi/Classes/KWProbePoller.h + ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber+Private.h sourceTree - SOURCE_ROOT + <group> - F373E1A09E4D4380AA2F5299 + FCED67C1F64340509884414E includeInIndex 1 @@ -6519,103 +12127,92 @@ lastKnownFileType sourcecode.c.objc name - KWBeforeEachNode.m + KWMatcherFactory.m path - Kiwi/Classes/KWBeforeEachNode.m + Classes/Core/KWMatcherFactory.m sourceTree - SOURCE_ROOT + <group> - F3B209C4D9014728891BBE36 + FD686932E8204177B9EA4E6B fileRef - A0C10AE3E81641F28D8FD401 + 5552B3CABD8C4A8384DE9E60 isa PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - F5CD4FA62876454EADDD15E3 + FD901F3BEA4C410380799468 - buildActionMask - 2147483647 - files - - BC111325EADD49779D5434E1 - 306D7AB6D9F8435781B83714 - + fileRef + 105E2373D3964737A3A4A9D2 isa - PBXHeadersBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXBuildFile - F5E81EADB49145A3AE70159D + FD95EF7FF0D14D58B90D18E8 + + fileRef + E4B0000F87A746CDB2C825FA + isa + PBXBuildFile + + FDC22D11E4C7463AA08B70C7 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc - name - KWReceiveMatcher.m + sourcecode.c.h path - Kiwi/Classes/KWReceiveMatcher.m + Pods-Reachability-prefix.pch sourceTree - SOURCE_ROOT + <group> - F6233DE6A65040D38900D8BF + FDCCF2F66E12437C9C08B3E7 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc + name + NSArray+RACSequenceAdditions.m path - Pods-Reachability-prefix.pch + ReactiveCocoaFramework/ReactiveCocoa/NSArray+RACSequenceAdditions.m sourceTree - SOURCE_ROOT - - F6C83C03AFF94EC2A93F5A82 - - fileRef - 81D313EE3E944E37B3AB3788 - isa - PBXBuildFile + <group> - F7189C0A9EB44E2D90EF744D + FDCE235CDDC04F3783A057DE fileRef - 845055AF292B45CC8337AD2C + CF73D0F1A8AB473B934CBBF3 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + - F759DFB278F64E7282870585 + FDEB858833114BF59D388AB4 - explicitFileType - archive.ar includeInIndex - 0 + 1 isa PBXFileReference + lastKnownFileType + text.plist.xml path - libPods-Reachability.a + Pods-specs-acknowledgements.plist sourceTree - BUILT_PRODUCTS_DIR - - F7D806C834AC4C99832D49CE - - buildConfigurations - - 1E8713996E3F49BAB251B7EB - 82ABDE6BA47F48DB9B2E83B1 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList + <group> - F8BA36D5DCA14B05B8A62544 + FDEF44EA44D543DD9E9B5050 includeInIndex 1 @@ -6624,41 +12221,56 @@ lastKnownFileType sourcecode.c.objc name - KWHaveValueMatcher.m + NSMethodSignature+KiwiAdditions.m path - Kiwi/Classes/KWHaveValueMatcher.m + Classes/Core/NSMethodSignature+KiwiAdditions.m sourceTree - SOURCE_ROOT - - F9311DCCAB1549B2A2BE6191 - - buildActionMask - 2147483647 - files - - BAD23D5A146640F4ABFD1C3B - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 + <group> - FB99E112F42B4458A7428CE1 + FE740EBC0CA442FBA9454205 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc name - KWBlockNode.h + KWStringContainsMatcher.m path - Kiwi/Classes/KWBlockNode.h + Classes/Matchers/KWStringContainsMatcher.m sourceTree - SOURCE_ROOT + <group> + + FE79A2E16DBF445ABEF825ED + + fileRef + CB1489830CA9446DAA1C4721 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker + + + FEAADC00C81E41BDA63E693C + + fileRef + 546E0752E7B74342904B3808 + isa + PBXBuildFile + + FEE159CDFAC845BCB30D4255 + + isa + PBXTargetDependency + target + 7A17300E4D674CC0B2A68C8C + targetProxy + 586E6F10DCC342528FA9DB0A - FC28FBB6542E431491C4A04A + FEE67F238D7442EE9087A55F includeInIndex 1 @@ -6667,41 +12279,47 @@ lastKnownFileType sourcecode.c.h name - KWBeTrueMatcher.h + NSData+RACSupport.h path - Kiwi/Classes/KWBeTrueMatcher.h + ReactiveCocoaFramework/ReactiveCocoa/NSData+RACSupport.h sourceTree - SOURCE_ROOT + <group> - FC733740CC7B468F875CF704 + FEE820893D6B4E35AE687AC4 fileRef - 4C70122DFE714497B15FA06F + 6D710363D73F418E8FC175E0 isa PBXBuildFile - FCD9238CFF644115B62A2890 + FF11E920904B443C8846264E fileRef - 6D6C57593C5D437180DC9761 + 0F731461CA5D4CBF834C5BB0 isa PBXBuildFile - FE8C7753DEB34A56AA8631A1 + FF184FDFD0EC4DAF8AFC86EE fileRef - 240B65CBB16B437FB2024905 + E10C6851AA0F4002A89EB05A isa PBXBuildFile - FEC5A9A9F26441F3B5FC0615 + FFB46B3833F545E1B16E27A8 - fileRef - 800EFA74AB034A05A5B1AFCC + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-specs-OHHTTPStubs-Private.xcconfig + sourceTree + <group> - FEEF61ADDFA143C1A495C880 + FFE487E02A694212837E112A includeInIndex 1 @@ -6710,21 +12328,14 @@ lastKnownFileType sourcecode.c.h name - KWBlockRaiseMatcher.h + KWWorkarounds.h path - Kiwi/Classes/KWBlockRaiseMatcher.h + Classes/Core/KWWorkarounds.h sourceTree - SOURCE_ROOT - - FF729DD1F92641BC91B2ACEB - - fileRef - DC2FB9B0E1464FFCAE04D560 - isa - PBXBuildFile + <group> rootObject - 0777BA3BB9584122ACE4EE63 + EFBB6CF77B5E4364844354C4 diff --git a/libPusher-OSX/libPusher-OSX.xcodeproj/xcshareddata/xcschemes/Sample App (OSX).xcscheme b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-Reachability.xcscheme similarity index 54% rename from libPusher-OSX/libPusher-OSX.xcodeproj/xcshareddata/xcschemes/Sample App (OSX).xcscheme rename to Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-Reachability.xcscheme index 47d0d770..25ad9982 100644 --- a/libPusher-OSX/libPusher-OSX.xcodeproj/xcshareddata/xcschemes/Sample App (OSX).xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-Reachability.xcscheme @@ -1,6 +1,6 @@ + BlueprintIdentifier = "EE9D25436D914DA8A870DEF3" + BuildableName = "libPods-Reachability.a" + BlueprintName = "Pods-Reachability" + ReferencedContainer = "container:Pods.xcodeproj"> - - - - - - - - @@ -66,15 +48,6 @@ useCustomWorkingDirectory = "NO" buildConfiguration = "Release" debugDocumentVersioning = "YES"> - - - - diff --git a/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-ReactiveCocoa.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-ReactiveCocoa.xcscheme new file mode 100644 index 00000000..2288268a --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-ReactiveCocoa.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-SocketRocket.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-SocketRocket.xcscheme new file mode 100644 index 00000000..5f631778 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-SocketRocket.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-specs-Kiwi.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-specs-Kiwi.xcscheme new file mode 100644 index 00000000..37db31e7 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-specs-Kiwi.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-specs-OHHTTPStubs.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-specs-OHHTTPStubs.xcscheme new file mode 100644 index 00000000..6c3044ea --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-specs-OHHTTPStubs.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-specs.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-specs.xcscheme index 325154b5..fcabada0 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-specs.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods-specs.xcscheme @@ -1,6 +1,6 @@ diff --git a/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods.xcscheme index c8ade128..26ce9fb6 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/Pods.xcscheme @@ -1,6 +1,6 @@ diff --git a/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/xcschememanagement.plist b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/xcschememanagement.plist index 9313ac73..90c6991e 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Pods/Pods.xcodeproj/xcuserdata/luke.xcuserdatad/xcschemes/xcschememanagement.plist @@ -4,149 +4,75 @@ SchemeUserState - Pods-specs.xcscheme + Pods-Reachability.xcscheme isShown - orderHint - 6 - Pods.xcscheme + Pods-ReactiveCocoa.xcscheme isShown - orderHint - 7 - - - SuppressBuildableAutocreation - - 02F7CA9DF9214D43BB983326 - - primary - - - 058E066784FA49C884C633E0 - - primary - - - 0740E1FCFA6244CA9A993FE8 - - primary - - - 08A9D5DF7A934C5D91224A9D - - primary - - - 11D8ABE1FCB244838A9AA7CE - - primary - - - 2BF681A3CA854FB4AA0BDA21 - - primary - - - 2E9736D95A404976B2D41CF3 - - primary - - - 3198813FAA6C4995AB2E1639 - - primary - - - 397F31D8A5D941F4AE68E95A - - primary - - - 398E3194AD0642E4B6CE4D76 - - primary - - - 42D09E1E8A8843E0B5769C18 - - primary - - - 4ADF3FD954B44E66B0A57CE0 - - primary - - - 4C5D06155D144A8094EA87BF - - primary - - 6D969D3FAB6E4637B46C3BDC + Pods-SocketRocket.xcscheme - primary - - - 70AC31718F814251B089774D - - primary - + isShown + - 72A00082A6D7484B918AFF7E + Pods-specs-Kiwi.xcscheme - primary - + isShown + - 7328A4F9C6374686A27D248B + Pods-specs-OHHTTPStubs.xcscheme - primary - + isShown + - 78EDC9E21ECC43ED93C722D9 + Pods-specs.xcscheme - primary - + isShown + - 81CAD16CBB3143C8A5F918C4 + Pods.xcscheme - primary - + isShown + - 99E902D1C70F44B3920567BD + + SuppressBuildableAutocreation + + 15A359E7D4AF402D99E6EC37 primary - AD2504D2DA164CE9AB24E9DA + 1E8AB76B5699442590151CF0 primary - BB4868375DD040F191C7C834 + 2820B6B2A6424E40852AC3CA primary - EF4179F378294E3EB69819FE + 44038B7FB3BE4AE5AE12B9C8 primary - F0531BAE563D403FBDFF4C89 + 7A17300E4D674CC0B2A68C8C primary - F090D02198D143ECB4D5792B + 91D6A91614E84DC1B2DE8628 primary - FCC83C166A0C45879BF8464F + EE9D25436D914DA8A870DEF3 primary diff --git a/Pods/Reachability/LICENCE.txt b/Pods/Reachability/LICENCE.txt new file mode 100644 index 00000000..12b7844c --- /dev/null +++ b/Pods/Reachability/LICENCE.txt @@ -0,0 +1,24 @@ +Copyright (c) 2011-2013, Tony Million. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/Pods/Reachability/README.md b/Pods/Reachability/README.md index 9b1d719d..57fdab78 100644 --- a/Pods/Reachability/README.md +++ b/Pods/Reachability/README.md @@ -1,27 +1,65 @@ # Reachability -This is a drop-in replacement for Apples Reachability class. It is ARC compatible, uses the new GCD methods to notify of network interface changes. +This is a drop-in replacement for Apple's `Reachability` class. It is ARC-compatible, and it uses the new GCD methods to notify of network interface changes. -In addition to the standard NSNotification it supports the use of Blocks for when the network becomes reachable and unreachable. +In addition to the standard `NSNotification`, it supports the use of blocks for when the network becomes reachable and unreachable. -Finally you can specify wether or not a WWAN connection is considered "reachable". +Finally, you can specify whether a WWAN connection is considered "reachable". -## A Simple example +## Requirements - // allocate a reachability object +Once you have added the `.h/m` files to your project, simply: + +* Go to the `Project->TARGETS->Build Phases->Link Binary With Libraries`. +* Press the plus in the lower left of the list. +* Add `SystemConfiguration.framework`. + +Boom, you're done. + +## Examples + +### Block Example + +This sample uses blocks to notify when the interface state has changed. The blocks will be called on a **BACKGROUND THREAD**, so you need to dispatch UI updates onto the main thread. + + // Allocate a reachability object Reachability* reach = [Reachability reachabilityWithHostname:@"www.google.com"]; - // set the blocks + // Set the blocks reach.reachableBlock = ^(Reachability*reach) { - NSLog(@"REACHABLE!"); + NSLog(@"REACHABLE!"); }; reach.unreachableBlock = ^(Reachability*reach) { - NSLog(@"UNREACHABLE!"); + NSLog(@"UNREACHABLE!"); }; - // start the notifier which will cause the reachability object to retain itself! + // Start the notifier, which will cause the reachability object to retain itself! [reach startNotifier]; +### `NSNotification` Example + +This sample will use `NSNotification`s to notify when the interface has changed. They will be delivered on the **MAIN THREAD**, so you *can* do UI updates from within the function. + +In addition, it asks the `Reachability` object to consider the WWAN (3G/EDGE/CDMA) as a non-reachable connection (you might use this if you are writing a video streaming app, for example, to save the user's data plan). + + // Allocate a reachability object + Reachability* reach = [Reachability reachabilityWithHostname:@"www.google.com"]; + + // Tell the reachability that we DON'T want to be reachable on 3G/EDGE/CDMA + reach.reachableOnWWAN = NO; + + // Here we set up a NSNotification observer. The Reachability that caused the notification + // is passed in the object parameter + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(reachabilityChanged:) + name:kReachabilityChangedNotification + object:nil]; + + [reach startNotifier] + +## Tell the world + +Head over to [Projects using Reachability](https://github.com/tonymillion/Reachability/wiki/Projects-using-Reachability) and add your project for "Maximum Wins!". diff --git a/Pods/Reachability/Reachability.h b/Pods/Reachability/Reachability.h index 40359c54..211b8166 100644 --- a/Pods/Reachability/Reachability.h +++ b/Pods/Reachability/Reachability.h @@ -35,15 +35,35 @@ #import #import +/** + * Does ARC support GCD objects? + * It does if the minimum deployment target is iOS 6+ or Mac OS X 8+ + * + * @see http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h + **/ +#if OS_OBJECT_USE_OBJC +#define NEEDS_DISPATCH_RETAIN_RELEASE 0 +#else +#define NEEDS_DISPATCH_RETAIN_RELEASE 1 +#endif + +/** + * Create NS_ENUM macro if it does not exist on the targeted version of iOS or OS X. + * + * @see http://nshipster.com/ns_enum-ns_options/ + **/ +#ifndef NS_ENUM +#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type +#endif + extern NSString *const kReachabilityChangedNotification; -typedef enum -{ - // Apple NetworkStatus Compatible Names. - NotReachable = 0, - ReachableViaWiFi = 2, - ReachableViaWWAN = 1 -} NetworkStatus; +typedef NS_ENUM(NSInteger, NetworkStatus) { + // Apple NetworkStatus Compatible Names. + NotReachable = 0, + ReachableViaWiFi = 2, + ReachableViaWWAN = 1 +}; @class Reachability; @@ -55,13 +75,9 @@ typedef void (^NetworkUnreachable)(Reachability * reachability); @property (nonatomic, copy) NetworkReachable reachableBlock; @property (nonatomic, copy) NetworkUnreachable unreachableBlock; -@property (nonatomic, assign) SCNetworkReachabilityRef reachabilityRef; -@property (nonatomic, assign) dispatch_queue_t reachabilitySerialQueue; @property (nonatomic, assign) BOOL reachableOnWWAN; -@property (nonatomic, strong) id reachabilityObject; - +(Reachability*)reachabilityWithHostname:(NSString*)hostname; +(Reachability*)reachabilityForInternetConnection; +(Reachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress; diff --git a/Pods/Reachability/Reachability.m b/Pods/Reachability/Reachability.m index c6dc6eae..96ef95cb 100644 --- a/Pods/Reachability/Reachability.m +++ b/Pods/Reachability/Reachability.m @@ -30,10 +30,22 @@ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF NSString *const kReachabilityChangedNotification = @"kReachabilityChangedNotification"; -@interface Reachability (private) +@interface Reachability () + +@property (nonatomic, assign) SCNetworkReachabilityRef reachabilityRef; + + +#if NEEDS_DISPATCH_RETAIN_RELEASE +@property (nonatomic, assign) dispatch_queue_t reachabilitySerialQueue; +#else +@property (nonatomic, strong) dispatch_queue_t reachabilitySerialQueue; +#endif + + +@property (nonatomic, strong) id reachabilityObject; -(void)reachabilityChanged:(SCNetworkReachabilityFlags)flags; --(BOOL)setReachabilityTarget:(NSString*)hostname; +-(BOOL)isReachableWithFlags:(SCNetworkReachabilityFlags)flags; @end @@ -55,13 +67,17 @@ -(BOOL)setReachabilityTarget:(NSString*)hostname; (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-']; } -//Start listening for reachability notifications on the current run loop +// Start listening for reachability notifications on the current run loop static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info) { #pragma unused (target) +#if __has_feature(objc_arc) Reachability *reachability = ((__bridge Reachability*)info); +#else + Reachability *reachability = ((Reachability*)info); +#endif - // we probably dont need an autoreleasepool here as GCD docs state each queue has its own autorelease pool + // We probably don't need an autoreleasepool here, as GCD docs state each queue has its own autorelease pool, // but what the heck eh? @autoreleasepool { @@ -82,13 +98,26 @@ @implementation Reachability @synthesize reachabilityObject; -#pragma mark - class constructor methods +#pragma mark - Class Constructor Methods + ++(Reachability*)reachabilityWithHostName:(NSString*)hostname +{ + return [Reachability reachabilityWithHostname:hostname]; +} + +(Reachability*)reachabilityWithHostname:(NSString*)hostname { SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithName(NULL, [hostname UTF8String]); if (ref) { - return [[self alloc] initWithReachabilityRef:ref]; + id reachability = [[self alloc] initWithReachabilityRef:ref]; + +#if __has_feature(objc_arc) + return reachability; +#else + return [reachability autorelease]; +#endif + } return nil; @@ -99,7 +128,13 @@ +(Reachability *)reachabilityWithAddress:(const struct sockaddr_in *)hostAddress SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)hostAddress); if (ref) { - return [[self alloc] initWithReachabilityRef:ref]; + id reachability = [[self alloc] initWithReachabilityRef:ref]; + +#if __has_feature(objc_arc) + return reachability; +#else + return [reachability autorelease]; +#endif } return nil; @@ -124,15 +159,11 @@ +(Reachability*)reachabilityForLocalWiFi // IN_LINKLOCALNETNUM is defined in as 169.254.0.0 localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM); - Reachability* reach = [self reachabilityWithAddress:&localWifiAddress]; - if(reach!= NULL) - { - } - return reach; + return [self reachabilityWithAddress:&localWifiAddress]; } -// initialization methods +// Initialization methods -(Reachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref { @@ -149,22 +180,29 @@ -(Reachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref -(void)dealloc { [self stopNotifier]; + if(self.reachabilityRef) { CFRelease(self.reachabilityRef); self.reachabilityRef = nil; } -#ifdef DEBUG - NSLog(@"Reachability: dealloc"); + + self.reachableBlock = nil; + self.unreachableBlock = nil; + +#if !(__has_feature(objc_arc)) + [super dealloc]; #endif + + } -#pragma mark - notifier methods +#pragma mark - Notifier Methods // Notifier -// NOTE: this uses GCD to trigger the blocks - they *WILL NOT* be called on THE MAIN THREAD +// NOTE: This uses GCD to trigger the blocks - they *WILL NOT* be called on THE MAIN THREAD // - In other words DO NOT DO ANY UI UPDATES IN THE BLOCKS. -// INSTEAD USE dispatch_async(dispatch_get_main_thread(), ^{UISTUFF}) (or dispatch_sync if you want) +// INSTEAD USE dispatch_async(dispatch_get_main_queue(), ^{UISTUFF}) (or dispatch_sync if you want) -(BOOL)startNotifier { @@ -174,40 +212,84 @@ -(BOOL)startNotifier // woah self.reachabilityObject = self; + + + // First, we need to create a serial queue. + // We allocate this once for the lifetime of the notifier. + self.reachabilitySerialQueue = dispatch_queue_create("com.tonymillion.reachability", NULL); + if(!self.reachabilitySerialQueue) + { + return NO; + } + +#if __has_feature(objc_arc) context.info = (__bridge void *)self; +#else + context.info = (void *)self; +#endif if (!SCNetworkReachabilitySetCallback(self.reachabilityRef, TMReachabilityCallback, &context)) { - printf("SCNetworkReachabilitySetCallback() failed: %s\n", SCErrorString(SCError())); +#ifdef DEBUG + NSLog(@"SCNetworkReachabilitySetCallback() failed: %s", SCErrorString(SCError())); +#endif + + // Clear out the dispatch queue + if(self.reachabilitySerialQueue) + { +#if NEEDS_DISPATCH_RETAIN_RELEASE + dispatch_release(self.reachabilitySerialQueue); +#endif + self.reachabilitySerialQueue = nil; + } + + self.reachabilityObject = nil; + return NO; } - //create a serial queue - self.reachabilitySerialQueue = dispatch_queue_create("com.tonymillion.reachability", NULL); - - // set it as our reachability queue which will retain the queue - if(SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, self.reachabilitySerialQueue)) + // Set it as our reachability queue, which will retain the queue + if(!SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, self.reachabilitySerialQueue)) { - dispatch_release(self.reachabilitySerialQueue); - // refcount should be ++ from the above function so this -- will mean its still 1 - return YES; +#ifdef DEBUG + NSLog(@"SCNetworkReachabilitySetDispatchQueue() failed: %s", SCErrorString(SCError())); +#endif + + // UH OH - FAILURE! + + // First stop, any callbacks! + SCNetworkReachabilitySetCallback(self.reachabilityRef, NULL, NULL); + + // Then clear out the dispatch queue. + if(self.reachabilitySerialQueue) + { +#if NEEDS_DISPATCH_RETAIN_RELEASE + dispatch_release(self.reachabilitySerialQueue); +#endif + self.reachabilitySerialQueue = nil; + } + + self.reachabilityObject = nil; + + return NO; } - dispatch_release(self.reachabilitySerialQueue); - self.reachabilitySerialQueue = nil; - return NO; + return YES; } -(void)stopNotifier { - // first stop any callbacks! + // First stop, any callbacks! SCNetworkReachabilitySetCallback(self.reachabilityRef, NULL, NULL); - // unregister target from the GCD serial dispatch queue - // this will mean the dispatch queue gets dealloc'ed + // Unregister target from the GCD serial dispatch queue. + SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, NULL); + if(self.reachabilitySerialQueue) { - SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, NULL); +#if NEEDS_DISPATCH_RETAIN_RELEASE + dispatch_release(self.reachabilitySerialQueue); +#endif self.reachabilitySerialQueue = nil; } @@ -216,23 +298,18 @@ -(void)stopNotifier #pragma mark - reachability tests -// this is for the case where you flick the airplane mode +// This is for the case where you flick the airplane mode; // you end up getting something like this: //Reachability: WR ct----- //Reachability: -- ------- //Reachability: WR ct----- //Reachability: -- ------- -// we treat this as 4 UNREACHABLE triggers - really apple should do better than this +// We treat this as 4 UNREACHABLE triggers - really apple should do better than this #define testcase (kSCNetworkReachabilityFlagsConnectionRequired | kSCNetworkReachabilityFlagsTransientConnection) --(BOOL)isReachable +-(BOOL)isReachableWithFlags:(SCNetworkReachabilityFlags)flags { - SCNetworkReachabilityFlags flags; - - if(!SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) - return NO; - BOOL connectionUP = YES; if(!(flags & kSCNetworkReachabilityFlagsReachable)) @@ -244,10 +321,10 @@ -(BOOL)isReachable #if TARGET_OS_IPHONE if(flags & kSCNetworkReachabilityFlagsIsWWAN) { - // we're on 3G + // We're on 3G. if(!self.reachableOnWWAN) { - // we dont want to connect when on 3G + // We don't want to connect when on 3G. connectionUP = NO; } } @@ -256,6 +333,16 @@ -(BOOL)isReachable return connectionUP; } +-(BOOL)isReachable +{ + SCNetworkReachabilityFlags flags; + + if(!SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) + return NO; + + return [self isReachableWithFlags:flags]; +} + -(BOOL)isReachableViaWWAN { #if TARGET_OS_IPHONE @@ -264,10 +351,10 @@ -(BOOL)isReachableViaWWAN if(SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) { - // check we're REACHABLE + // Check we're REACHABLE if(flags & kSCNetworkReachabilityFlagsReachable) { - // now, check we're on WWAN + // Now, check we're on WWAN if(flags & kSCNetworkReachabilityFlagsIsWWAN) { return YES; @@ -285,11 +372,11 @@ -(BOOL)isReachableViaWiFi if(SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) { - // check we're reachable + // Check we're reachable if((flags & kSCNetworkReachabilityFlagsReachable)) { #if TARGET_OS_IPHONE - // check we're NOT on WWAN + // Check we're NOT on WWAN if((flags & kSCNetworkReachabilityFlagsIsWWAN)) { return NO; @@ -386,15 +473,15 @@ -(NSString*)currentReachabilityString if(temp == reachableOnWWAN) { - // updated for the fact we have CDMA phones now! - return @"Cellular"; + // Updated for the fact that we have CDMA phones now! + return NSLocalizedString(@"Cellular", @""); } if (temp == ReachableViaWiFi) { - return @"WiFi"; + return NSLocalizedString(@"WiFi", @""); } - return @"No Connection"; + return NSLocalizedString(@"No Connection", @""); } -(NSString*)currentReachabilityFlags @@ -402,21 +489,14 @@ -(NSString*)currentReachabilityFlags return reachabilityFlags([self reachabilityFlags]); } -#pragma mark - callback function calls this method +#pragma mark - Callback function calls this method -(void)reachabilityChanged:(SCNetworkReachabilityFlags)flags { -#ifdef DEBUG - NSLog(@"Reachability: %@", reachabilityFlags(flags)); -#endif - - if([self isReachable]) + if([self isReachableWithFlags:flags]) { if(self.reachableBlock) { -#ifdef DEBUG - NSLog(@"Reachability: blocks are not called on the main thread.\n Use dispatch_async(dispatch_get_main_queue(), ^{}] to update your UI!"); -#endif self.reachableBlock(self); } } @@ -424,9 +504,6 @@ -(void)reachabilityChanged:(SCNetworkReachabilityFlags)flags { if(self.unreachableBlock) { -#ifdef DEBUG - NSLog(@"Reachability: blocks are not called on the main thread.\n Use dispatch_async(dispatch_get_main_queue(), ^{}] to update your UI!"); -#endif self.unreachableBlock(self); } } @@ -438,4 +515,13 @@ -(void)reachabilityChanged:(SCNetworkReachabilityFlags)flags }); } +#pragma mark - Debug Description + +- (NSString *) description; +{ + NSString *description = [NSString stringWithFormat:@"<%@: %#x>", + NSStringFromClass([self class]), (unsigned int) self]; + return description; +} + @end diff --git a/Pods/Reachability/Reachability.podspec b/Pods/Reachability/Reachability.podspec deleted file mode 100644 index b2942dc3..00000000 --- a/Pods/Reachability/Reachability.podspec +++ /dev/null @@ -1,12 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'Reachability' - s.version = '3.0.0' - s.license = 'BSD' - s.homepage = 'https://github.com/tonymillion/Reachability' - s.authors = { 'Tony Million' => 'tonymillion@gmail.com' } - s.summary = 'ARC and GCD Compatible Reachability Class for iOS. Drop in replacement for Apple Reachability.' - s.source = { :git => 'https://github.com/tonymillion/Reachability.git', :tag => '3.0.0' } - s.source_files = 'Reachability.{h,m}' - s.framework = 'SystemConfiguration' - s.requires_arc = true -end diff --git a/Pods/ReactiveCocoa/LICENSE.md b/Pods/ReactiveCocoa/LICENSE.md new file mode 100644 index 00000000..3325055b --- /dev/null +++ b/Pods/ReactiveCocoa/LICENSE.md @@ -0,0 +1,19 @@ +**Copyright (c) 2012 - 2013, GitHub, 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. diff --git a/Pods/ReactiveCocoa/README.md b/Pods/ReactiveCocoa/README.md new file mode 100644 index 00000000..429790c7 --- /dev/null +++ b/Pods/ReactiveCocoa/README.md @@ -0,0 +1,539 @@ +# ReactiveCocoa + +ReactiveCocoa (RAC) is an Objective-C framework for [Functional Reactive +Programming][]. It provides APIs for **composing and transforming streams of +values**. + +If you're already familiar with functional reactive programming or know the basic +premise of ReactiveCocoa, check out the [Documentation][] folder for a framework +overview and more in-depth information about how it all works in practice. + +## New to ReactiveCocoa? + +ReactiveCocoa is documented like crazy, and there's a wealth of introductory +material available to explain what RAC is and how you can use it. + +If you want to learn more, we recommend these resources, roughly in order: + + 1. [Introduction](#introduction) + 1. [When to use ReactiveCocoa](#when-to-use-reactivecocoa) + 1. [Framework Overview][] + 1. [Basic Operators][] + 1. [Header documentation](ReactiveCocoaFramework/ReactiveCocoa) + 1. Previously answered [Stack Overflow](https://github.com/ReactiveCocoa/ReactiveCocoa/wiki) + questions and [GitHub issues](https://github.com/ReactiveCocoa/ReactiveCocoa/issues?labels=question&state=closed) + 1. The rest of the [Documentation][] folder + +## Introduction + +ReactiveCocoa is an implementation of [functional reactive +programming](http://blog.maybeapps.com/post/42894317939/input-and-output). +Rather than using mutable variables which are replaced and modified in-place, +RAC provides signals (represented by `RACSignal`) that capture present and +future values. + +By chaining, combining, and reacting to signals, software can be written +declaratively, without the need for code that continually observes and updates +values. + +For example, a text field can be bound to the latest time, even as it changes, +instead of using additional code that watches the clock and updates the +text field every second. It works much like KVO, but with blocks instead of +overriding `-observeValueForKeyPath:ofObject:change:context:`. + +Signals can also represent asynchronous operations, much like [futures and +promises][]. This greatly simplifies asynchronous software, including networking +code. + +One of the major advantages of RAC is that it provides a single, unified +approach to dealing with asynchronous behaviors, including delegate methods, +callback blocks, target-action mechanisms, notifications, and KVO. + +Here's a simple example: + +```objc +// When self.username changes, log the new name to the console. +// +// RACObserve(self, username) creates a new RACSignal that sends the current +// value of self.username, then the new value whenever it changes. +// -subscribeNext: will execute the block whenever the signal sends a value. +[RACObserve(self, username) subscribeNext:^(NSString *newName) { + NSLog(@"%@", newName); +}]; +``` + +But unlike KVO notifications, signals can be chained together and operated on: + +```objc +// Only log names that start with "j". +// +// -filter returns a new RACSignal that only sends a new value when its block +// returns YES. +[[RACObserve(self, username) + filter:^(NSString *newName) { + return [newName hasPrefix:@"j"]; + }] + subscribeNext:^(NSString *newName) { + NSLog(@"%@", newName); + }]; +``` + +Signals can also be used to derive state. Instead of observing properties and +setting other properties in response to the new values, RAC makes it possible to +express properties in terms of signals and operations: + +```objc +// Create a one-way binding so that self.createEnabled will be +// true whenever self.password and self.passwordConfirmation +// are equal. +// +// RAC() is a macro that makes the binding look nicer. +// +// +combineLatest:reduce: takes an array of signals, executes the block with the +// latest value from each signal whenever any of them changes, and returns a new +// RACSignal that sends the return value of that block as values. +RAC(self, createEnabled) = [RACSignal + combineLatest:@[ RACObserve(self, password), RACObserve(self, passwordConfirmation) ] + reduce:^(NSString *password, NSString *passwordConfirm) { + return @([passwordConfirm isEqualToString:password]); + }]; +``` + +Signals can be built on any stream of values over time, not just KVO. For +example, they can also represent button presses: + +```objc +// Log a message whenever the button is pressed. +// +// RACCommand creates signals to represent UI actions. Each signal can +// represent a button press, for example, and have additional work associated +// with it. +// +// -rac_command is an addition to NSButton. The button will send itself on that +// command whenever it's pressed. +self.button.rac_command = [[RACCommand alloc] initWithSignalBlock:^(id _) { + NSLog(@"button was pressed!"); + return [RACSignal empty]; +}] +``` + +Or asynchronous network operations: + +```objc +// Hook up a "Log in" button to log in over the network. +// +// This block will be run whenever the login command is executed, starting +// the login process. +self.loginCommand = [[RACCommand alloc] initWithSignalBlock:^(id sender) { + // The hypothetical -logIn method returns a signal that sends a value when + // the network request finishes. + return [client logIn]; +}]; + +// -executionSignals returns a signal that includes the signals returned from +// the above block, one for each time the command is executed. +[self.loginCommand.executionSignals subscribeNext:^(RACSignal *loginSignal) { + // Log a message whenever we log in successfully. + [loginSignal subscribeCompleted:^(id _) { + NSLog(@"Logged in successfully!"); + }]; +}]; + +// Execute the login command when the button is pressed. +self.loginButton.rac_command = self.loginCommand; +``` + +Signals can also represent timers, other UI events, or anything else that +changes over time. + +Using signals for asynchronous operations makes it possible to build up more +complex behavior by chaining and transforming those signals. Work can easily be +trigged after a group of operations completes: + +```objc +// Perform 2 network operations and log a message to the console when they are +// both completed. +// +// +merge: takes an array of signals and returns a new RACSignal that passes +// through the values of all of the signals and completes when all of the +// signals complete. +// +// -subscribeCompleted: will execute the block when the signal completes. +[[RACSignal + merge:@[ [client fetchUserRepos], [client fetchOrgRepos] ]] + subscribeCompleted:^{ + NSLog(@"They're both done!"); + }]; +``` + +Signals can be chained to sequentially execute asynchronous operations, instead +of nesting callbacks with blocks. This is similar to how [futures and promises][] +are usually used: + +```objc +// Log in the user, then load any cached messages, then fetch the remaining +// messages from the server. After that's all done, log a message to the +// console. +// +// The hypothetical -logInUser methods returns a signal that completes after +// logging in. +// +// -flattenMap: will execute its block whenever the signal sends a value, and +// return a new RACSignal that merges all of the signals returned from the block +// into a single signal. +[[[[client + logInUser] + flattenMap:^(User *user) { + // Return a signal that loads cached messages for the user. + return [client loadCachedMessagesForUser:user]; + }] + flattenMap:^(NSArray *messages) { + // Return a signal that fetches any remaining messages. + return [client fetchMessagesAfterMessage:messages.lastObject]; + }] + subscribeNext:(NSArray *newMessages) { + NSLog(@"New messages: %@", newMessages); + } completed:^{ + NSLog(@"Fetched all messages."); + }]; +``` + +RAC even makes it easy to bind to the result of an asynchronous operation: + +```objc +// Create a one-way binding so that self.imageView.image will be set the user's +// avatar as soon as it's downloaded. +// +// The hypothetical -fetchUserWithUsername: method returns a signal which sends +// the user. +// +// -deliverOn: creates new signals that will do their work on other queues. In +// this example, it's used to move work to a background queue and then back to the main thread. +// +// -map: calls its block with each user that's fetched and returns a new +// RACSignal that sends values returned from the block. +RAC(self.imageView, image) = [[[[client + fetchUserWithUsername:@"joshaber"] + deliverOn:[RACScheduler scheduler]] + map:^(User *user) { + // Download the avatar (this is done on a background queue). + return [[NSImage alloc] initWithContentsOfURL:user.avatarURL]; + }] + // Now the assignment will be done on the main thread. + deliverOn:RACScheduler.mainThreadScheduler]; +``` + +That demonstrates some of what RAC can do, but it doesn't demonstrate why RAC is +so powerful. It's hard to appreciate RAC from README-sized examples, but it +makes it possible to write code with less state, less boilerplate, better code +locality, and better expression of intent. + +For more sample code, check out the [Mac][GHAPIDemo] or [iOS][RACiOSDemo] demos. +Additional information about RAC can be found in the [Documentation][] folder. + +## When to use ReactiveCocoa + +Upon first glance, ReactiveCocoa is very abstract, and it can be difficult to +understand how to apply it to concrete problems. + +Here are some of the use cases that RAC excels at. + +### Handling asynchronous or event-driven data sources + +Much of Cocoa programming is focused on reacting to user events or changes in +application state. Code that deals with such events can quickly become very +complex and spaghetti-like, with lots of callbacks and state variables to handle +ordering issues. + +Patterns that seem superficially different, like UI callbacks, network +responses, and KVO notifications, actually have a lot in common. [RACSignal][] +unifies all these different APIs so that they can be composed together and +manipulated in the same way. + +For example, the following code: + +```objc +- (void)viewDidLoad { + [super viewDidLoad]; + + [self.usernameTextField addTarget:self action:@selector(updateLogInButton) forControlEvents:UIControlEventEditingChanged]; + [self.passwordTextField addTarget:self action:@selector(updateLogInButton) forControlEvents:UIControlEventEditingChanged]; + [self.logInButton addTarget:self action:@selector(logInPressed:) forControlEvents:UIControlEventTouchUpInside]; +} + +- (void)updateLogInButton { + BOOL textFieldsNonEmpty = self.usernameTextField.text.length > 0 && self.passwordTextField.text.length > 0; + BOOL readyToLogIn = ![[LoginManager sharedManager] isLoggingIn] && !self.loggedIn; + self.logInButton.enabled = textFieldsNonEmpty && readyToLogIn; +} + +- (IBAction)logInPressed:(UIButton *)sender { + [[LoginManager sharedManager] + logInWithUsername:self.usernameTextField.text + password:self.passwordTextField.text + success:^{ + self.loggedIn = YES; + } failure:^(NSError *error) { + [self presentError:error]; + }]; +} + +- (void)loggedOut:(NSNotification *)notification { + self.loggedIn = NO; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if ([object isEqual:[LoginManager sharedManager]] && [keyPath isEqualToString:@"loggingIn"]) { + [self updateLogInButton]; + } +} +``` + +… could be expressed in RAC like so: + +```objc +- (void)viewDidLoad { + [super viewDidLoad]; + + @weakify(self); + + RAC(self.logInButton, enabled) = [RACSignal + combineLatest:@[ + self.usernameTextField.rac_textSignal, + self.passwordTextField.rac_textSignal, + RACObserve(LoginManager.sharedManager, loggingIn), + RACObserve(self, loggedIn) + ] reduce:^(NSString *username, NSString *password, NSNumber *loggingIn, NSNumber *loggedIn) { + return @(username.length > 0 && password.length > 0 && !loggingIn.boolValue && !loggedIn.boolValue); + }]; + + [[self.logInButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(UIButton *sender) { + @strongify(self); + + RACSignal *loginSignal = [[LoginManager sharedManager] + logInWithUsername:self.usernameTextField.text + password:self.passwordTextField.text]; + + [loginSignal subscribeError:^(NSError *error) { + @strongify(self); + [self presentError:error]; + } completed:^{ + @strongify(self); + self.loggedIn = YES; + }]; + }]; + + RAC(self, loggedIn) = [[NSNotificationCenter.defaultCenter + rac_addObserverForName:UserDidLogOutNotification object:nil] + mapReplace:@NO]; +} +``` + +### Chaining dependent operations + +Dependencies are most often found in network requests, where a previous request +to the server needs to complete before the next one can be constructed, and so +on: + +```objc +[client logInWithSuccess:^{ + [client loadCachedMessagesWithSuccess:^(NSArray *messages) { + [client fetchMessagesAfterMessage:messages.lastObject success:^(NSArray *nextMessages) { + NSLog(@"Fetched all messages."); + } failure:^(NSError *error) { + [self presentError:error]; + }]; + } failure:^(NSError *error) { + [self presentError:error]; + }]; +} failure:^(NSError *error) { + [self presentError:error]; +}]; +``` + +ReactiveCocoa makes this pattern particularly easy: + +```objc +[[[[client logIn] + sequenceNext:^{ + return [client loadCachedMessages]; + }] + flattenMap:^(NSArray *messages) { + return [client fetchMessagesAfterMessage:messages.lastObject]; + }] + subscribeError:^(NSError *error) { + [self presentError:error]; + } completed:^{ + NSLog(@"Fetched all messages."); + }]; +``` + +### Parallelizing independent work + +Working with independent data sets in parallel and then combining them into +a final result is non-trivial in Cocoa, and often involves a lot of +synchronization: + +```objc +__block NSArray *databaseObjects; +__block NSArray *fileContents; + +NSOperationQueue *backgroundQueue = [[NSOperationQueue alloc] init]; +NSBlockOperation *databaseOperation = [NSBlockOperation blockOperationWithBlock:^{ + databaseObjects = [databaseClient fetchObjectsMatchingPredicate:predicate]; +}]; + +NSBlockOperation *filesOperation = [NSBlockOperation blockOperationWithBlock:^{ + NSMutableArray *filesInProgress = [NSMutableArray array]; + for (NSString *path in files) { + [filesInProgress addObject:[NSData dataWithContentsOfFile:path]]; + } + + fileContents = [filesInProgress copy]; +}]; + +NSBlockOperation *finishOperation = [NSBlockOperation blockOperationWithBlock:^{ + [self finishProcessingDatabaseObjects:databaseObjects fileContents:fileContents]; + NSLog(@"Done processing"); +}]; + +[finishOperation addDependency:databaseOperation]; +[finishOperation addDependency:filesOperation]; +[backgroundQueue addOperation:databaseOperation]; +[backgroundQueue addOperation:filesOperation]; +[backgroundQueue addOperation:finishOperation]; +``` + +The above code can be cleaned up and optimized by simply composing signals: + +```objc +RACSignal *databaseSignal = [[databaseClient + fetchObjectsMatchingPredicate:predicate] + subscribeOn:[RACScheduler scheduler]]; + +RACSignal *fileSignal = [RACSignal startEagerlyWithScheduler:[RACScheduler scheduler] block:^(id subscriber) { + NSMutableArray *filesInProgress = [NSMutableArray array]; + for (NSString *path in files) { + [filesInProgress addObject:[NSData dataWithContentsOfFile:path]]; + } + + [subscriber sendNext:[filesInProgress copy]]; + [subscriber sendCompleted]; +}]; + +[[RACSignal + combineLatest:@[ databaseSignal, fileSignal ] + reduce:^ id (NSArray *databaseObjects, NSArray *fileContents) { + [self finishProcessingDatabaseObjects:databaseObjects fileContents:fileContents]; + return nil; + }] + subscribeCompleted:^{ + NSLog(@"Done processing"); + }]; +``` + +### Simplifying collection transformations + +Higher-order functions like `map`, `filter`, `fold`/`reduce` are sorely missing +from Foundation, leading to loop-focused code like this: + +```objc +NSMutableArray *results = [NSMutableArray array]; +for (NSString *str in strings) { + if (str.length < 2) { + continue; + } + + NSString *newString = [str stringByAppendingString:@"foobar"]; + [results addObject:newString]; +} +``` + +[RACSequence][] allows any Cocoa collection to be manipulated in a uniform and +declarative way: + +```objc +RACSequence *results = [[strings.rac_sequence + filter:^ BOOL (NSString *str) { + return str.length >= 2; + }] + map:^(NSString *str) { + return [str stringByAppendingString:@"foobar"]; + }]; +``` + +## System Requirements + +ReactiveCocoa supports OS X 10.7+ and iOS 5.0+. + +## Importing ReactiveCocoa + +To add RAC to your application: + + 1. Add the ReactiveCocoa repository as a submodule of your application's + repository. + 1. Run `script/bootstrap` from within the ReactiveCocoa folder. + 1. Drag and drop `ReactiveCocoaFramework/ReactiveCocoa.xcodeproj` into your + application's Xcode project or workspace. + 1. On the "Build Phases" tab of your application target, add RAC to the "Link + Binary With Libraries" phase. + * **On iOS**, add `libReactiveCocoa-iOS.a`. + * **On OS X**, add `ReactiveCocoa.framework`. RAC must also be added to any + "Copy Frameworks" build phase. If you don't already have one, simply add + a "Copy Files" build phase and target the "Frameworks" destination. + 1. Add `"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include" + $(inherited)` to the "Header Search Paths" build setting (this is only + necessary for archive builds, but it has no negative effect otherwise). + 1. **For iOS targets**, add `-ObjC` to the "Other Linker Flags" build setting. + 1. **If you added RAC to a project (not a workspace)**, you will also need to + add the appropriate RAC target to the "Target Dependencies" of your + application. + +If you would prefer to use [CocoaPods](http://cocoapods.org), there are some +[ReactiveCocoa +podspecs](https://github.com/CocoaPods/Specs/tree/master/ReactiveCocoa) that +have been generously contributed by third parties. + +To see a project already set up with RAC, check out the [Mac][GHAPIDemo] or +[iOS][RACiOSDemo] demos. + +## More Info + +ReactiveCocoa is based on .NET's [Reactive +Extensions](http://msdn.microsoft.com/en-us/data/gg577609) (Rx). Most of the +principles of Rx apply to RAC as well. There are some really good Rx resources +out there: + +* [Reactive Extensions MSDN entry](http://msdn.microsoft.com/en-us/library/hh242985.aspx) +* [Reactive Extensions for .NET Introduction](http://leecampbell.blogspot.com/2010/08/reactive-extensions-for-net.html) +* [Rx - Channel 9 videos](http://channel9.msdn.com/tags/Rx/) +* [Reactive Extensions wiki](http://rxwiki.wikidot.com/) +* [101 Rx Samples](http://rxwiki.wikidot.com/101samples) +* [Programming Reactive Extensions and LINQ](http://www.amazon.com/Programming-Reactive-Extensions-Jesse-Liberty/dp/1430237473) + +RAC and Rx are both implementations of functional reactive programming. Here are +some more resources for learning about FRP: + +* [What is FRP? - Elm Language](http://elm-lang.org/learn/What-is-FRP.elm) +* [What is Functional Reactive Programming - Stack Overflow](http://stackoverflow.com/questions/1028250/what-is-functional-reactive-programming/1030631#1030631) +* [Escape from Callback Hell](http://elm-lang.org/learn/Escape-from-Callback-Hell.elm) + +[Basic Operators]: Documentation/BasicOperators.md +[Documentation]: Documentation +[Framework Overview]: Documentation/FrameworkOverview.md +[Functional Reactive Programming]: http://en.wikipedia.org/wiki/Functional_reactive_programming +[GHAPIDemo]: https://github.com/ReactiveCocoa/GHAPIDemo +[Memory Management]: Documentation/MemoryManagement.md +[NSObject+RACLifting]: ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.h +[RACDisposable]: ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.h +[RACEvent]: ReactiveCocoaFramework/ReactiveCocoa/RACEvent.h +[RACMulticastConnection]: ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.h +[RACScheduler]: ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.h +[RACSequence]: ReactiveCocoaFramework/ReactiveCocoa/RACSequence.h +[RACSignal+Operations]: ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.h +[RACSignal]: ReactiveCocoaFramework/ReactiveCocoa/RACSignal.h +[RACStream]: ReactiveCocoaFramework/ReactiveCocoa/RACStream.h +[RACSubscriber]: ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.h +[RAC]: ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h +[RACiOSDemo]: https://github.com/ReactiveCocoa/RACiOSDemo +[futures and promises]: http://en.wikipedia.org/wiki/Futures_and_promises diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSArray+RACSequenceAdditions.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSArray+RACSequenceAdditions.h new file mode 100644 index 00000000..d2d0b3fe --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSArray+RACSequenceAdditions.h @@ -0,0 +1,20 @@ +// +// NSArray+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSArray (RACSequenceAdditions) + +/// Creates and returns a sequence corresponding to the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSArray+RACSequenceAdditions.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSArray+RACSequenceAdditions.m new file mode 100644 index 00000000..ca2b9511 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSArray+RACSequenceAdditions.m @@ -0,0 +1,18 @@ +// +// NSArray+RACSequenceAdditions.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "NSArray+RACSequenceAdditions.h" +#import "RACArraySequence.h" + +@implementation NSArray (RACSequenceAdditions) + +- (RACSequence *)rac_sequence { + return [RACArraySequence sequenceWithArray:self offset:0]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSData+RACSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSData+RACSupport.h new file mode 100644 index 00000000..42198a6b --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSData+RACSupport.h @@ -0,0 +1,22 @@ +// +// NSData+RACSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/11/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; +@class RACScheduler; + +@interface NSData (RACSupport) + +// Read the data at the URL using -[NSData initWithContentsOfURL:options:error:]. +// Sends the data or the error. +// +// scheduler - cannot be nil. ++ (RACSignal *)rac_readContentsOfURL:(NSURL *)URL options:(NSDataReadingOptions)options scheduler:(RACScheduler *)scheduler; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSData+RACSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSData+RACSupport.m new file mode 100644 index 00000000..227eb4de --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSData+RACSupport.m @@ -0,0 +1,35 @@ +// +// NSData+RACSupport.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/11/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "NSData+RACSupport.h" +#import "RACReplaySubject.h" +#import "RACScheduler.h" + +@implementation NSData (RACSupport) + ++ (RACSignal *)rac_readContentsOfURL:(NSURL *)URL options:(NSDataReadingOptions)options scheduler:(RACScheduler *)scheduler { + NSCParameterAssert(scheduler != nil); + + RACReplaySubject *subject = [RACReplaySubject subject]; + [subject setNameWithFormat:@"+rac_readContentsOfURL: %@ options: %lu scheduler: %@", URL, (unsigned long)options, scheduler]; + + [scheduler schedule:^{ + NSError *error = nil; + NSData *data = [[NSData alloc] initWithContentsOfURL:URL options:options error:&error]; + if(data == nil) { + [subject sendError:error]; + } else { + [subject sendNext:data]; + [subject sendCompleted]; + } + }]; + + return subject; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h new file mode 100644 index 00000000..4871fe72 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h @@ -0,0 +1,31 @@ +// +// NSDictionary+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSDictionary (RACSequenceAdditions) + +/// Creates and returns a sequence of RACTuple key/value pairs. The key will be +/// the first element in the tuple, and the value will be the second. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +/// Creates and returns a sequence corresponding to the keys in the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_keySequence; + +/// Creates and returns a sequence corresponding to the values in the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_valueSequence; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSDictionary+RACSequenceAdditions.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSDictionary+RACSequenceAdditions.m new file mode 100644 index 00000000..192e6fde --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSDictionary+RACSequenceAdditions.m @@ -0,0 +1,34 @@ +// +// NSDictionary+RACSequenceAdditions.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "NSDictionary+RACSequenceAdditions.h" +#import "NSArray+RACSequenceAdditions.h" +#import "RACSequence.h" +#import "RACTuple.h" + +@implementation NSDictionary (RACSequenceAdditions) + +- (RACSequence *)rac_sequence { + NSDictionary *immutableDict = [self copy]; + + // TODO: First class support for dictionary sequences. + return [immutableDict.allKeys.rac_sequence map:^(id key) { + id value = immutableDict[key]; + return [RACTuple tupleWithObjects:key, value, nil]; + }]; +} + +- (RACSequence *)rac_keySequence { + return self.allKeys.rac_sequence; +} + +- (RACSequence *)rac_valueSequence { + return self.allValues.rac_sequence; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h new file mode 100644 index 00000000..1d8fc845 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h @@ -0,0 +1,20 @@ +// +// NSEnumerator+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Uri Baghin on 07/01/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSEnumerator (RACSequenceAdditions) + +/// Creates and returns a sequence corresponding to the receiver. +/// +/// The receiver is exhausted lazily as the sequence is enumerated. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.m new file mode 100644 index 00000000..aa56eaaa --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.m @@ -0,0 +1,22 @@ +// +// NSEnumerator+RACSequenceAdditions.m +// ReactiveCocoa +// +// Created by Uri Baghin on 07/01/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "NSEnumerator+RACSequenceAdditions.h" +#import "RACSequence.h" + +@implementation NSEnumerator (RACSequenceAdditions) + +- (RACSequence *)rac_sequence { + return [RACSequence sequenceWithHeadBlock:^{ + return [self nextObject]; + } tailBlock:^{ + return self.rac_sequence; + }]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSFileHandle+RACSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSFileHandle+RACSupport.h new file mode 100644 index 00000000..985398de --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSFileHandle+RACSupport.h @@ -0,0 +1,19 @@ +// +// NSFileHandle+RACSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/10/12. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSignal; + +@interface NSFileHandle (RACSupport) + +// Read any available data in the background and send it. Completes when data +// length is <= 0. +- (RACSignal *)rac_readInBackground; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSFileHandle+RACSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSFileHandle+RACSupport.m new file mode 100644 index 00000000..a258789d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSFileHandle+RACSupport.m @@ -0,0 +1,39 @@ +// +// NSFileHandle+RACSupport.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/10/12. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "NSFileHandle+RACSupport.h" +#import "NSNotificationCenter+RACSupport.h" +#import "RACReplaySubject.h" +#import "RACDisposable.h" + +@implementation NSFileHandle (RACSupport) + +- (RACSignal *)rac_readInBackground { + RACReplaySubject *subject = [RACReplaySubject subject]; + [subject setNameWithFormat:@"%@ -rac_readInBackground", self]; + + RACSignal *dataNotification = [[[NSNotificationCenter defaultCenter] rac_addObserverForName:NSFileHandleReadCompletionNotification object:self] map:^(NSNotification *note) { + return [note.userInfo objectForKey:NSFileHandleNotificationDataItem]; + }]; + + __block RACDisposable *subscription = [dataNotification subscribeNext:^(NSData *data) { + if(data.length > 0) { + [subject sendNext:data]; + [self readInBackgroundAndNotify]; + } else { + [subject sendCompleted]; + [subscription dispose]; + } + }]; + + [self readInBackgroundAndNotify]; + + return subject; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSInvocation+RACTypeParsing.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSInvocation+RACTypeParsing.h new file mode 100644 index 00000000..4f734908 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSInvocation+RACTypeParsing.h @@ -0,0 +1,55 @@ +// +// NSInvocation+RACTypeParsing.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/17/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACTuple; + +@interface NSInvocation (RACTypeParsing) + +/// Sets the argument for the invocation at the given index by unboxing the given +/// object based on the type signature of the argument. +/// +/// This does not support C arrays or unions. +/// +/// Note that calling this on a char * or const char * argument can cause all +/// arguments to be retained. +/// +/// object - The object to unbox and set as the argument. +/// index - The index of the argument to set. +- (void)rac_setArgument:(id)object atIndex:(NSUInteger)index; + +/// Gets the argument for the invocation at the given index based on the +/// invocation's method signature. The value is then wrapped in the appropriate +/// object type. +/// +/// This does not support C arrays or unions. +/// +/// index - The index of the argument to get. +/// +/// Returns the argument of the invocation, wrapped in an object. +- (id)rac_argumentAtIndex:(NSUInteger)index; + +/// Arguments tuple for the invocation. +/// +/// The arguments tuple excludes implicit variables `self` and `_cmd`. +/// +/// See -rac_argumentAtIndex: and -rac_setArgumentAtIndex: for further +/// description of the underlying behavior. +@property (nonatomic, copy) RACTuple *rac_argumentsTuple; + +/// Gets the return value from the invocation based on the invocation's method +/// signature. The value is then wrapped in the appropriate object type. +/// +/// This does not support C arrays or unions. +/// +/// Returns the return value of the invocation, wrapped in an object. Voids are +/// returned as `RACUnit.defaultUnit`. +- (id)rac_returnValue; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSInvocation+RACTypeParsing.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSInvocation+RACTypeParsing.m new file mode 100644 index 00000000..a5318e70 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSInvocation+RACTypeParsing.m @@ -0,0 +1,232 @@ +// +// NSInvocation+RACTypeParsing.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/17/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "NSInvocation+RACTypeParsing.h" +#import "RACTuple.h" +#import "RACUnit.h" +#import + +@implementation NSInvocation (RACTypeParsing) + +- (void)rac_setArgument:(id)object atIndex:(NSUInteger)index { +#define PULL_AND_SET(type, selector) \ + do { \ + type val = [object selector]; \ + [self setArgument:&val atIndex:(NSInteger)index]; \ + } while(0) + + const char *argType = [self.methodSignature getArgumentTypeAtIndex:index]; + // Skip const type qualifier. + if (argType[0] == 'r') { + argType++; + } + + if (strcmp(argType, @encode(id)) == 0 || strcmp(argType, @encode(Class)) == 0) { + [self setArgument:&object atIndex:(NSInteger)index]; + } else if (strcmp(argType, @encode(char)) == 0) { + PULL_AND_SET(char, charValue); + } else if (strcmp(argType, @encode(int)) == 0) { + PULL_AND_SET(int, intValue); + } else if (strcmp(argType, @encode(short)) == 0) { + PULL_AND_SET(short, shortValue); + } else if (strcmp(argType, @encode(long)) == 0) { + PULL_AND_SET(long, longValue); + } else if (strcmp(argType, @encode(long long)) == 0) { + PULL_AND_SET(long long, longLongValue); + } else if (strcmp(argType, @encode(unsigned char)) == 0) { + PULL_AND_SET(unsigned char, unsignedCharValue); + } else if (strcmp(argType, @encode(unsigned int)) == 0) { + PULL_AND_SET(unsigned int, unsignedIntValue); + } else if (strcmp(argType, @encode(unsigned short)) == 0) { + PULL_AND_SET(unsigned short, unsignedShortValue); + } else if (strcmp(argType, @encode(unsigned long)) == 0) { + PULL_AND_SET(unsigned long, unsignedLongValue); + } else if (strcmp(argType, @encode(unsigned long long)) == 0) { + PULL_AND_SET(unsigned long long, unsignedLongLongValue); + } else if (strcmp(argType, @encode(float)) == 0) { + PULL_AND_SET(float, floatValue); + } else if (strcmp(argType, @encode(double)) == 0) { + PULL_AND_SET(double, doubleValue); + } else if (strcmp(argType, @encode(BOOL)) == 0) { + PULL_AND_SET(BOOL, boolValue); + } else if (strcmp(argType, @encode(char *)) == 0) { + const char *cString = [object UTF8String]; + [self setArgument:&cString atIndex:(NSInteger)index]; + [self retainArguments]; + } else if (strcmp(argType, @encode(void (^)(void))) == 0) { + [self setArgument:&object atIndex:(NSInteger)index]; + } else { + NSCParameterAssert([object isKindOfClass:NSValue.class]); + + NSUInteger valueSize = 0; + NSGetSizeAndAlignment([object objCType], &valueSize, NULL); + +#if DEBUG + NSUInteger argSize = 0; + NSGetSizeAndAlignment(argType, &argSize, NULL); + NSCAssert(valueSize == argSize, @"Value size does not match argument size in -rac_setArgument: %@ atIndex: %lu", object, (unsigned long)index); +#endif + + unsigned char valueBytes[valueSize]; + [object getValue:valueBytes]; + + [self setArgument:valueBytes atIndex:(NSInteger)index]; + } + +#undef PULL_AND_SET +} + +- (id)rac_argumentAtIndex:(NSUInteger)index { +#define WRAP_AND_RETURN(type) \ + do { \ + type val = 0; \ + [self getArgument:&val atIndex:(NSInteger)index]; \ + return @(val); \ + } while (0) + + const char *argType = [self.methodSignature getArgumentTypeAtIndex:index]; + // Skip const type qualifier. + if (argType[0] == 'r') { + argType++; + } + + if (strcmp(argType, @encode(id)) == 0 || strcmp(argType, @encode(Class)) == 0) { + __autoreleasing id returnObj; + [self getArgument:&returnObj atIndex:(NSInteger)index]; + return returnObj; + } else if (strcmp(argType, @encode(char)) == 0) { + WRAP_AND_RETURN(char); + } else if (strcmp(argType, @encode(int)) == 0) { + WRAP_AND_RETURN(int); + } else if (strcmp(argType, @encode(short)) == 0) { + WRAP_AND_RETURN(short); + } else if (strcmp(argType, @encode(long)) == 0) { + WRAP_AND_RETURN(long); + } else if (strcmp(argType, @encode(long long)) == 0) { + WRAP_AND_RETURN(long long); + } else if (strcmp(argType, @encode(unsigned char)) == 0) { + WRAP_AND_RETURN(unsigned char); + } else if (strcmp(argType, @encode(unsigned int)) == 0) { + WRAP_AND_RETURN(unsigned int); + } else if (strcmp(argType, @encode(unsigned short)) == 0) { + WRAP_AND_RETURN(unsigned short); + } else if (strcmp(argType, @encode(unsigned long)) == 0) { + WRAP_AND_RETURN(unsigned long); + } else if (strcmp(argType, @encode(unsigned long long)) == 0) { + WRAP_AND_RETURN(unsigned long long); + } else if (strcmp(argType, @encode(float)) == 0) { + WRAP_AND_RETURN(float); + } else if (strcmp(argType, @encode(double)) == 0) { + WRAP_AND_RETURN(double); + } else if (strcmp(argType, @encode(BOOL)) == 0) { + WRAP_AND_RETURN(BOOL); + } else if (strcmp(argType, @encode(char *)) == 0) { + WRAP_AND_RETURN(const char *); + } else if (strcmp(argType, @encode(void (^)(void))) == 0) { + __unsafe_unretained id block = nil; + [self getArgument:&block atIndex:(NSInteger)index]; + return [block copy]; + } else { + NSUInteger valueSize = 0; + NSGetSizeAndAlignment(argType, &valueSize, NULL); + + unsigned char valueBytes[valueSize]; + [self getArgument:valueBytes atIndex:(NSInteger)index]; + + return [NSValue valueWithBytes:valueBytes objCType:argType]; + } + + return nil; + +#undef WRAP_AND_RETURN +} + +- (RACTuple *)rac_argumentsTuple { + NSUInteger numberOfArguments = self.methodSignature.numberOfArguments; + NSMutableArray *argumentsArray = [NSMutableArray arrayWithCapacity:numberOfArguments - 2]; + for (NSUInteger index = 2; index < numberOfArguments; index++) { + [argumentsArray addObject:[self rac_argumentAtIndex:index] ?: RACTupleNil.tupleNil]; + } + + return [RACTuple tupleWithObjectsFromArray:argumentsArray]; +} + +- (void)setRac_argumentsTuple:(RACTuple *)arguments { + NSCAssert(arguments.count == self.methodSignature.numberOfArguments - 2, @"Number of supplied arguments (%lu), does not match the number expected by the signature (%lu)", (unsigned long)arguments.count, (unsigned long)self.methodSignature.numberOfArguments - 2); + + NSUInteger index = 2; + for (id arg in arguments) { + [self rac_setArgument:(arg == RACTupleNil.tupleNil ? nil : arg) atIndex:index]; + index++; + } +} + +- (id)rac_returnValue { +#define WRAP_AND_RETURN(type) \ + do { \ + type val = 0; \ + [self getReturnValue:&val]; \ + return @(val); \ + } while (0) + + const char *returnType = self.methodSignature.methodReturnType; + // Skip const type qualifier. + if (returnType[0] == 'r') { + returnType++; + } + + if (strcmp(returnType, @encode(id)) == 0 || strcmp(returnType, @encode(Class)) == 0 || strcmp(returnType, @encode(void (^)(void))) == 0) { + __autoreleasing id returnObj; + [self getReturnValue:&returnObj]; + return returnObj; + } else if (strcmp(returnType, @encode(char)) == 0) { + WRAP_AND_RETURN(char); + } else if (strcmp(returnType, @encode(int)) == 0) { + WRAP_AND_RETURN(int); + } else if (strcmp(returnType, @encode(short)) == 0) { + WRAP_AND_RETURN(short); + } else if (strcmp(returnType, @encode(long)) == 0) { + WRAP_AND_RETURN(long); + } else if (strcmp(returnType, @encode(long long)) == 0) { + WRAP_AND_RETURN(long long); + } else if (strcmp(returnType, @encode(unsigned char)) == 0) { + WRAP_AND_RETURN(unsigned char); + } else if (strcmp(returnType, @encode(unsigned int)) == 0) { + WRAP_AND_RETURN(unsigned int); + } else if (strcmp(returnType, @encode(unsigned short)) == 0) { + WRAP_AND_RETURN(unsigned short); + } else if (strcmp(returnType, @encode(unsigned long)) == 0) { + WRAP_AND_RETURN(unsigned long); + } else if (strcmp(returnType, @encode(unsigned long long)) == 0) { + WRAP_AND_RETURN(unsigned long long); + } else if (strcmp(returnType, @encode(float)) == 0) { + WRAP_AND_RETURN(float); + } else if (strcmp(returnType, @encode(double)) == 0) { + WRAP_AND_RETURN(double); + } else if (strcmp(returnType, @encode(BOOL)) == 0) { + WRAP_AND_RETURN(BOOL); + } else if (strcmp(returnType, @encode(char *)) == 0) { + WRAP_AND_RETURN(const char *); + } else if (strcmp(returnType, @encode(void)) == 0) { + return RACUnit.defaultUnit; + } else { + NSUInteger valueSize = 0; + NSGetSizeAndAlignment(returnType, &valueSize, NULL); + + unsigned char valueBytes[valueSize]; + [self getReturnValue:valueBytes]; + + return [NSValue valueWithBytes:valueBytes objCType:returnType]; + } + + return nil; + +#undef WRAP_AND_RETURN +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSNotificationCenter+RACSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSNotificationCenter+RACSupport.h new file mode 100644 index 00000000..ddb3954d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSNotificationCenter+RACSupport.h @@ -0,0 +1,18 @@ +// +// NSNotificationCenter+RACSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/10/12. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSignal; + +@interface NSNotificationCenter (RACSupport) + +// Sends the NSNotification every time the notification is posted. +- (RACSignal *)rac_addObserverForName:(NSString *)notificationName object:(id)object; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSNotificationCenter+RACSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSNotificationCenter+RACSupport.m new file mode 100644 index 00000000..4219ecd1 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSNotificationCenter+RACSupport.m @@ -0,0 +1,31 @@ +// +// NSNotificationCenter+RACSupport.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/10/12. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "NSNotificationCenter+RACSupport.h" +#import "RACEXTScope.h" +#import "RACSignal.h" +#import "RACSubscriber.h" +#import "RACDisposable.h" + +@implementation NSNotificationCenter (RACSupport) + +- (RACSignal *)rac_addObserverForName:(NSString *)notificationName object:(id)object { + @unsafeify(object); + return [[RACSignal createSignal:^(id subscriber) { + @strongify(object); + id observer = [self addObserverForName:notificationName object:object queue:nil usingBlock:^(NSNotification *note) { + [subscriber sendNext:note]; + }]; + + return [RACDisposable disposableWithBlock:^{ + [self removeObserver:observer]; + }]; + }] setNameWithFormat:@"-rac_addObserverForName: %@ object: <%@: %p>", notificationName, [object class], object]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDeallocating.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDeallocating.h new file mode 100644 index 00000000..43196dfd --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDeallocating.h @@ -0,0 +1,32 @@ +// +// NSObject+RACDeallocating.h +// ReactiveCocoa +// +// Created by Kazuo Koga on 2013/03/15. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACCompoundDisposable; +@class RACDisposable; +@class RACSignal; + +@interface NSObject (RACDeallocating) + +/// The compound disposable which will be disposed of when the receiver is +/// deallocated. +@property (atomic, readonly, strong) RACCompoundDisposable *rac_deallocDisposable; + +/// Returns a signal that will complete immediately before the receiver is fully deallocated. +- (RACSignal *)rac_willDeallocSignal; + +@end + +@interface NSObject (RACDeallocatingDeprecated) + +- (RACSignal *)rac_didDeallocSignal __attribute__((deprecated("Use -rac_willDeallocSignal"))); + +- (void)rac_addDeallocDisposable:(RACDisposable *)disposable __attribute__((deprecated("Add disposables to -rac_deallocDisposable instead"))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDeallocating.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDeallocating.m new file mode 100644 index 00000000..783ffcea --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDeallocating.m @@ -0,0 +1,124 @@ +// +// NSObject+RACDeallocating.m +// ReactiveCocoa +// +// Created by Kazuo Koga on 2013/03/15. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "NSObject+RACDeallocating.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACSubject.h" +#import +#import + +static const void *RACObjectCompoundDisposable = &RACObjectCompoundDisposable; + +static NSMutableSet *swizzledClasses() { + static dispatch_once_t onceToken; + static NSMutableSet *swizzledClasses = nil; + dispatch_once(&onceToken, ^{ + swizzledClasses = [[NSMutableSet alloc] init]; + }); + + return swizzledClasses; +} + +static void swizzleDeallocIfNeeded(Class classToSwizzle) { + @synchronized (swizzledClasses()) { + NSString *className = NSStringFromClass(classToSwizzle); + if ([swizzledClasses() containsObject:className]) return; + + SEL deallocSelector = sel_registerName("dealloc"); + + __block void (*originalDealloc)(__unsafe_unretained id, SEL) = NULL; + + id newDealloc = ^(__unsafe_unretained id self) { + RACCompoundDisposable *compoundDisposable = objc_getAssociatedObject(self, RACObjectCompoundDisposable); + [compoundDisposable dispose]; + + if (originalDealloc == NULL) { + struct objc_super superInfo = { + .receiver = self, + .super_class = class_getSuperclass(classToSwizzle) + }; + + void (*msgSend)(struct objc_super *, SEL) = (__typeof__(msgSend))objc_msgSendSuper; + msgSend(&superInfo, deallocSelector); + } else { + originalDealloc(self, deallocSelector); + } + }; + + IMP newDeallocIMP = imp_implementationWithBlock(newDealloc); + + if (!class_addMethod(classToSwizzle, deallocSelector, newDeallocIMP, "v@:")) { + // The class already contains a method implementation. + Method deallocMethod = class_getInstanceMethod(classToSwizzle, deallocSelector); + + // We need to store original implementation before setting new implementation + // in case method is called at the time of setting. + originalDealloc = (__typeof__(originalDealloc))method_getImplementation(deallocMethod); + + // We need to store original implementation again, in case it just changed. + originalDealloc = (__typeof__(originalDealloc))method_setImplementation(deallocMethod, newDeallocIMP); + } + + [swizzledClasses() addObject:className]; + } +} + +@implementation NSObject (RACDeallocating) + +- (RACSignal *)rac_willDeallocSignal { + RACSubject *subject = [RACSubject subject]; + + [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{ + [subject sendCompleted]; + }]]; + + return subject; +} + +- (RACCompoundDisposable *)rac_deallocDisposable { + @synchronized (self) { + RACCompoundDisposable *compoundDisposable = objc_getAssociatedObject(self, RACObjectCompoundDisposable); + if (compoundDisposable != nil) return compoundDisposable; + + swizzleDeallocIfNeeded(self.class); + + compoundDisposable = [RACCompoundDisposable compoundDisposable]; + objc_setAssociatedObject(self, RACObjectCompoundDisposable, compoundDisposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + return compoundDisposable; + } +} + +@end + +@implementation NSObject (RACDeallocatingDeprecated) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" + +- (RACSignal *)rac_didDeallocSignal { + RACSubject *subject = [RACSubject subject]; + + RACScopedDisposable *disposable = [[RACDisposable + disposableWithBlock:^{ + [subject sendCompleted]; + }] + asScopedDisposable]; + + objc_setAssociatedObject(self, (__bridge void *)disposable, disposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + return subject; +} + +- (void)rac_addDeallocDisposable:(RACDisposable *)disposable { + [self.rac_deallocDisposable addDisposable:disposable]; +} + +#pragma clang diagnostic pop + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDescription.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDescription.h new file mode 100644 index 00000000..ebb09aaa --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDescription.h @@ -0,0 +1,20 @@ +// +// NSObject+RACDescription.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-05-13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@interface NSObject (RACDescription) + +/// A simplified description of the receiver for Debug builds, which does not +/// invoke -description (and thus should be much faster in many cases). +/// +/// This method will return a constant string in Release builds, skipping any +/// work. +- (NSString *)rac_description; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDescription.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDescription.m new file mode 100644 index 00000000..e281c63d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACDescription.m @@ -0,0 +1,46 @@ +// +// NSObject+RACDescription.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-05-13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "NSObject+RACDescription.h" +#import "RACTuple.h" + +@implementation NSObject (RACDescription) + +- (NSString *)rac_description { +#ifdef DEBUG + return [[NSString alloc] initWithFormat:@"<%@: %p>", self.class, self]; +#else + return @"(description skipped)"; +#endif +} + +@end + +@implementation NSValue (RACDescription) + +- (NSString *)rac_description { + return self.description; +} + +@end + +@implementation NSString (RACDescription) + +- (NSString *)rac_description { + return self.description; +} + +@end + +@implementation RACTuple (RACDescription) + +- (NSString *)rac_description { + return self.allObjects.description; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACKVOWrapper.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACKVOWrapper.h new file mode 100644 index 00000000..b06de905 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACKVOWrapper.h @@ -0,0 +1,55 @@ +// +// NSObject+RACKVOWrapper.h +// GitHub +// +// Created by Josh Abernathy on 10/11/11. +// Copyright (c) 2011 GitHub. All rights reserved. +// + +#import + + +/// RAC-specific KVO change dictionary key: Will be @YES if the change was caused +/// by the value at the key path or an intermediate value deallocating, @NO +/// otherwise. +extern NSString * const RACKeyValueChangeCausedByDeallocationKey; + +/// RAC-specific KVO change dictionary key: Will be @YES if the change only +/// affected the value of the last key path component leaving the values of the +/// intermediate key path components unaltered, @NO otherwise. +extern NSString * const RACKeyValueChangeAffectedOnlyLastComponentKey; + +@class RACDisposable, RACKVOTrampoline; + +@interface NSObject (RACKVOWrapper) + +/// Adds the given block as the callbacks for when the key path changes. +/// +/// Unlike direct KVO observation, this handles deallocation of `weak` properties +/// by generating an appropriate notification. This will only occur if there is +/// an `@property` declaration visible in the observed class, with the `weak` +/// memory management attribute. +/// +/// The observation does not need to be explicitly removed. It will be removed +/// when the observer or the receiver deallocate. +/// +/// keyPath - The key path to observe. Must not be nil. +/// options - The KVO observation options. +/// observer - The object that requested the observation. May be nil. +/// block - The block called when the value at the key path changes. It is +/// passed the current value of the key path and the extended KVO +/// change dictionary including RAC-specific keys and values. Must not +/// be nil. +/// +/// Returns a disposable that can be used to stop the observation. +- (RACDisposable *)rac_observeKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(NSObject *)observer block:(void (^)(id value, NSDictionary *change))block; + +@end + +typedef void (^RACKVOBlock)(id target, id observer, NSDictionary *change); + +@interface NSObject (RACKVOWrapperDeprecated) + +- (RACKVOTrampoline *)rac_addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options block:(RACKVOBlock)block __attribute((deprecated("Use rac_observeKeyPath:options:observer:block: instead."))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACKVOWrapper.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACKVOWrapper.m new file mode 100644 index 00000000..5275f98e --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACKVOWrapper.m @@ -0,0 +1,230 @@ +// +// NSObject+RACKVOWrapper.m +// GitHub +// +// Created by Josh Abernathy on 10/11/11. +// Copyright (c) 2011 GitHub. All rights reserved. +// + +#import "NSObject+RACKVOWrapper.h" +#import "RACEXTRuntimeExtensions.h" +#import "RACEXTScope.h" +#import "NSObject+RACDeallocating.h" +#import "NSString+RACKeyPathUtilities.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACKVOTrampoline.h" +#import "RACSerialDisposable.h" + +NSString * const RACKeyValueChangeCausedByDeallocationKey = @"RACKeyValueChangeCausedByDeallocationKey"; +NSString * const RACKeyValueChangeAffectedOnlyLastComponentKey = @"RACKeyValueChangeAffectedOnlyLastComponentKey"; + +@implementation NSObject (RACKVOWrapper) + +- (RACDisposable *)rac_observeKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(NSObject *)observer block:(void (^)(id, NSDictionary *))block { + NSCParameterAssert(block != nil); + NSCParameterAssert(keyPath.rac_keyPathComponents.count > 0); + + keyPath = [keyPath copy]; + + @unsafeify(observer); + + NSArray *keyPathComponents = keyPath.rac_keyPathComponents; + BOOL keyPathHasOneComponent = (keyPathComponents.count == 1); + NSString *keyPathHead = keyPathComponents[0]; + NSString *keyPathTail = keyPath.rac_keyPathByDeletingFirstKeyPathComponent; + + RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; + + // The disposable that groups all disposal necessary to clean up the callbacks + // added to the value of the first key path component. + RACSerialDisposable *firstComponentSerialDisposable = [RACSerialDisposable serialDisposableWithDisposable:[RACCompoundDisposable compoundDisposable]]; + RACCompoundDisposable * (^firstComponentDisposable)(void) = ^{ + return (RACCompoundDisposable *)firstComponentSerialDisposable.disposable; + }; + + [disposable addDisposable:firstComponentSerialDisposable]; + + // Adds the callback block to the value's deallocation. Also adds the logic to + // clean up the callback to the firstComponentDisposable. + void (^addDeallocObserverToPropertyValue)(NSObject *, NSString *, NSObject *) = ^(NSObject *parent, NSString *propertyKey, NSObject *value) { + // If a key path value is the observer, commonly when a key path begins + // with "self", we prevent deallocation triggered callbacks for any such key + // path components. Thus, the observer's deallocation is not considered a + // change to the key path. + @strongify(observer); + if (value == observer) return; + + objc_property_t property = class_getProperty(object_getClass(parent), propertyKey.UTF8String); + if (property == NULL) { + // If we can't find an Objective-C property for this key, we assume + // that we don't need to observe its deallocation (thus matching + // vanilla KVO behavior). + // + // Even if we wanted to, there's not enough type information on + // ivars to figure out its memory management. + return; + } + + rac_propertyAttributes *attributes = rac_copyPropertyAttributes(property); + if (attributes == NULL) return; + + @onExit { + free(attributes); + }; + + if (attributes->objectClass == nil && strcmp(attributes->type, @encode(id)) != 0) { + // If this property isn't actually an object (or is a Class object), + // no point in observing the deallocation of the wrapper returned by + // KVC. + return; + } + + if (!attributes->weak) { + // If this property is an object, but not declared `weak`, we + // don't need to watch for it spontaneously being set to nil. + // + // Attempting to observe non-weak properties will result in + // broken behavior for dynamic getters, so don't even try. + return; + } + + NSDictionary *change = @{ + NSKeyValueChangeKindKey: @(NSKeyValueChangeSetting), + NSKeyValueChangeNewKey: NSNull.null, + RACKeyValueChangeCausedByDeallocationKey: @YES, + RACKeyValueChangeAffectedOnlyLastComponentKey: @(keyPathHasOneComponent) + }; + + RACCompoundDisposable *valueDisposable = value.rac_deallocDisposable; + RACDisposable *deallocDisposable = [RACDisposable disposableWithBlock:^{ + block(nil, change); + }]; + + [valueDisposable addDisposable:deallocDisposable]; + [firstComponentDisposable() addDisposable:[RACDisposable disposableWithBlock:^{ + [valueDisposable removeDisposable:deallocDisposable]; + }]]; + }; + + // Adds the callback block to the remaining path components on the value. Also + // adds the logic to clean up the callbacks to the firstComponentDisposable. + void (^addObserverToValue)(NSObject *) = ^(NSObject *value) { + @strongify(observer); + RACDisposable *observerDisposable = [value rac_observeKeyPath:keyPathTail options:(options & ~NSKeyValueObservingOptionInitial) observer:observer block:block]; + [firstComponentDisposable() addDisposable:observerDisposable]; + }; + + // Observe only the first key path component, when the value changes clean up + // the callbacks on the old value, add callbacks to the new value and call the + // callback block as needed. + // + // Note this does not use NSKeyValueObservingOptionInitial so this only + // handles changes to the value, callbacks to the initial value must be added + // separately. + NSKeyValueObservingOptions trampolineOptions = (options | NSKeyValueObservingOptionPrior) & ~NSKeyValueObservingOptionInitial; + RACKVOTrampoline *trampoline = [[RACKVOTrampoline alloc] initWithTarget:self observer:observer keyPath:keyPathHead options:trampolineOptions block:^(id trampolineTarget, id trampolineObserver, NSDictionary *change) { + // Prepare the change dictionary by adding the RAC specific keys + { + NSMutableDictionary *newChange = [change mutableCopy]; + newChange[RACKeyValueChangeCausedByDeallocationKey] = @NO; + newChange[RACKeyValueChangeAffectedOnlyLastComponentKey] = @(keyPathHasOneComponent); + change = newChange.copy; + } + + // If this is a prior notification, clean up all the callbacks added to the + // previous value and call the callback block. Everything else is deferred + // until after we get the notification after the change. + if ([change[NSKeyValueChangeNotificationIsPriorKey] boolValue]) { + [firstComponentDisposable() dispose]; + + if ((options & NSKeyValueObservingOptionPrior) != 0) { + block([trampolineTarget valueForKeyPath:keyPath], change); + } + + return; + } + + // From here the notification is not prior. + NSObject *value = [trampolineTarget valueForKey:keyPathHead]; + + // If the value has changed but is nil, there is no need to add callbacks to + // it, just call the callback block. + if (value == nil) { + block(nil, change); + return; + } + + // From here the notification is not prior and the value is not nil. + + // Create a new firstComponentDisposable while getting rid of the old one at + // the same time, in case this is being called concurrently. + RACDisposable *oldFirstComponentDisposable = [firstComponentSerialDisposable swapInDisposable:[RACCompoundDisposable compoundDisposable]]; + [oldFirstComponentDisposable dispose]; + + addDeallocObserverToPropertyValue(trampolineTarget, keyPathHead, value); + + // If there are no further key path components, there is no need to add the + // other callbacks, just call the callback block with the value itself. + if (keyPathHasOneComponent) { + block(value, change); + return; + } + + // The value has changed, is not nil, and there are more key path components + // to consider. Add the callbacks to the value for the remaining key path + // components and call the callback block with the current value of the full + // key path. + addObserverToValue(value); + block([value valueForKeyPath:keyPathTail], change); + }]; + + // Stop the KVO observation when this one is disposed of. + [disposable addDisposable:trampoline]; + + // Add the callbacks to the initial value if needed. + NSObject *value = [self valueForKey:keyPathHead]; + if (value != nil) { + addDeallocObserverToPropertyValue(self, keyPathHead, value); + + if (!keyPathHasOneComponent) { + addObserverToValue(value); + } + } + + // Call the block with the initial value if needed. + if ((options & NSKeyValueObservingOptionInitial) != 0) { + id initialValue = [self valueForKeyPath:keyPath]; + NSDictionary *initialChange = @{ + NSKeyValueChangeKindKey: @(NSKeyValueChangeSetting), + NSKeyValueChangeNewKey: initialValue ?: NSNull.null, + RACKeyValueChangeCausedByDeallocationKey: @NO, + RACKeyValueChangeAffectedOnlyLastComponentKey: @(keyPathHasOneComponent) + }; + block(initialValue, initialChange); + } + + + RACCompoundDisposable *observerDisposable = observer.rac_deallocDisposable; + RACCompoundDisposable *selfDisposable = self.rac_deallocDisposable; + // Dispose of this observation if the receiver or the observer deallocate. + [observerDisposable addDisposable:disposable]; + [selfDisposable addDisposable:disposable]; + + return disposable; +} + +@end + +@implementation NSObject (RACKVOWrapperDeprecated) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" + +- (RACKVOTrampoline *)rac_addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options block:(RACKVOBlock)block { + return [[RACKVOTrampoline alloc] initWithTarget:self observer:observer keyPath:keyPath options:options block:block]; +} + +#pragma clang diagnostic pop + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.h new file mode 100644 index 00000000..0feb272d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.h @@ -0,0 +1,55 @@ +// +// NSObject+RACLifting.h +// iOSDemo +// +// Created by Josh Abernathy on 10/13/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +@class RACSignal; + +@interface NSObject (RACLifting) + +/// Lifts the selector on the receiver into the reactive world. The selector will +/// be invoked whenever any signal argument sends a value, but only after each +/// signal has sent an initial value. +/// +/// It will replay the most recently sent value to new subscribers. +/// +/// This does not support C arrays or unions. +/// +/// selector - The selector on self to invoke. +/// firstSignal - The signal corresponding to the first method argument. This +/// must not be nil. +/// ... - A list of RACSignals corresponding to the remaining arguments. +/// There must be a non-nil signal for each method argument. +/// +/// Examples +/// +/// [button rac_liftSelector:@selector(setTitleColor:forState:) withSignals:textColorSignal, [RACSignal return:@(UIControlStateNormal)], nil]; +/// +/// Returns a signal which sends the return value from each invocation of the +/// selector. If the selector returns void, it instead sends RACUnit.defaultUnit. +/// It completes only after all the signal arguments complete. +- (RACSignal *)rac_liftSelector:(SEL)selector withSignals:(RACSignal *)firstSignal, ... NS_REQUIRES_NIL_TERMINATION; + +/// Like -rac_liftSelector:withSignals:, but accepts an array instead of +/// a variadic list of arguments. +- (RACSignal *)rac_liftSelector:(SEL)selector withSignalsFromArray:(NSArray *)signals; + +@end + +@interface NSObject (RACLiftingDeprecated) + +- (RACSignal *)rac_liftSelector:(SEL)selector withObjects:(id)arg, ... __attribute__((deprecated("Use -rac_liftSelector:withSignals: instead"))); +- (RACSignal *)rac_liftSelector:(SEL)selector withObjectsFromArray:(NSArray *)args __attribute__((deprecated("Use -rac_liftSelector:withSignalsFromArray: instead"))); +- (RACSignal *)rac_liftBlock:(id)block withArguments:(id)arg, ... NS_REQUIRES_NIL_TERMINATION __attribute__((deprecated("Use +combineLatest:reduce: instead"))); +- (RACSignal *)rac_liftBlock:(id)block withArgumentsFromArray:(NSArray *)args __attribute__((deprecated("Use +combineLatest:reduce: instead"))); + +@end + +@interface NSObject (RACLiftingUnavailable) + +- (instancetype)rac_lift __attribute__((unavailable("Use -rac_liftSelector:withSignals: instead"))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.m new file mode 100644 index 00000000..d9a28439 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACLifting.m @@ -0,0 +1,132 @@ +// +// NSObject+RACLifting.m +// iOSDemo +// +// Created by Josh Abernathy on 10/13/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "NSObject+RACLifting.h" +#import "RACEXTScope.h" +#import "NSInvocation+RACTypeParsing.h" +#import "NSObject+RACDeallocating.h" +#import "RACSignal+Operations.h" +#import "RACTuple.h" +#import "NSObject+RACDescription.h" + +@implementation NSObject (RACLifting) + +- (RACSignal *)rac_liftSelector:(SEL)selector withSignalsFromArray:(NSArray *)signals { + NSCParameterAssert(selector != NULL); + NSCParameterAssert(signals != nil); + NSCParameterAssert(signals.count > 0); + + NSMethodSignature *methodSignature = [self methodSignatureForSelector:selector]; + NSCAssert(methodSignature != nil, @"%@ does not respond to %@", self, NSStringFromSelector(selector)); + + NSUInteger numberOfArguments __attribute__((unused)) = methodSignature.numberOfArguments - 2; + NSCAssert(numberOfArguments == signals.count, @"Wrong number of signals for %@ (expected %lu, got %lu)", NSStringFromSelector(selector), (unsigned long)numberOfArguments, (unsigned long)signals.count); + + @unsafeify(self); + + return [[[[[RACSignal + combineLatest:signals] + takeUntil:self.rac_willDeallocSignal] + map:^(RACTuple *arguments) { + @strongify(self); + + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSignature]; + invocation.selector = selector; + invocation.rac_argumentsTuple = arguments; + [invocation invokeWithTarget:self]; + + return invocation.rac_returnValue; + }] + replayLast] + setNameWithFormat:@"%@ -rac_liftSelector: %@ withSignalsFromArray: %@", [self rac_description], NSStringFromSelector(selector), signals]; +} + +- (RACSignal *)rac_liftSelector:(SEL)selector withSignals:(RACSignal *)firstSignal, ... { + NSCParameterAssert(firstSignal != nil); + + NSMutableArray *signals = [NSMutableArray array]; + + va_list args; + va_start(args, firstSignal); + for (id currentSignal = firstSignal; currentSignal != nil; currentSignal = va_arg(args, id)) { + NSCAssert([currentSignal isKindOfClass:RACSignal.class], @"Argument %@ is not a RACSignal", currentSignal); + + [signals addObject:currentSignal]; + } + va_end(args); + + return [[self + rac_liftSelector:selector withSignalsFromArray:signals] + setNameWithFormat:@"%@ -rac_liftSelector: %@ withSignals: %@", [self rac_description], NSStringFromSelector(selector), signals]; +} + +@end + +@implementation NSObject (RACLiftingDeprecated) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" + +static NSArray *RACMapArgumentsToSignals(NSArray *args) { + NSMutableArray *mappedArgs = [NSMutableArray array]; + for (id arg in args) { + if ([arg isEqual:RACTupleNil.tupleNil]) { + [mappedArgs addObject:[RACSignal return:nil]]; + } else if ([arg isKindOfClass:RACSignal.class]) { + [mappedArgs addObject:arg]; + } else { + [mappedArgs addObject:[RACSignal return:arg]]; + } + } + + return mappedArgs; +} + +- (RACSignal *)rac_liftSelector:(SEL)selector withObjects:(id)arg, ... { + NSMethodSignature *methodSignature = [self methodSignatureForSelector:selector]; + NSMutableArray *arguments = [NSMutableArray array]; + + va_list args; + va_start(args, arg); + for (NSUInteger i = 2; i < methodSignature.numberOfArguments; i++) { + id currentObject = (i == 2 ? arg : va_arg(args, id)); + [arguments addObject:currentObject ?: RACTupleNil.tupleNil]; + } + + va_end(args); + return [self rac_liftSelector:selector withObjectsFromArray:arguments]; +} + +- (RACSignal *)rac_liftSelector:(SEL)selector withObjectsFromArray:(NSArray *)args { + return [self rac_liftSelector:selector withSignalsFromArray:RACMapArgumentsToSignals(args)]; +} + +- (RACSignal *)rac_liftBlock:(id)block withArguments:(id)arg, ... { + NSMutableArray *arguments = [NSMutableArray array]; + + va_list args; + va_start(args, arg); + for (id currentObject = arg; currentObject != nil; currentObject = va_arg(args, id)) { + [arguments addObject:currentObject]; + } + + va_end(args); + return [self rac_liftBlock:block withArgumentsFromArray:arguments]; +} + +- (RACSignal *)rac_liftBlock:(id)block withArgumentsFromArray:(NSArray *)args { + return [[[[RACSignal + combineLatest:RACMapArgumentsToSignals(args)] + reduceEach:block] + takeUntil:self.rac_willDeallocSignal] + replayLast]; +} + +#pragma clang diagnostic pop + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACPropertySubscribing.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACPropertySubscribing.h new file mode 100644 index 00000000..10bb68dd --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACPropertySubscribing.h @@ -0,0 +1,102 @@ +// +// NSObject+RACPropertySubscribing.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/2/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import "RACEXTKeyPathCoding.h" +#import "RACmetamacros.h" + +/// Creates a signal which observes `KEYPATH` on `TARGET` for changes. +/// +/// In either case, the observation continues until `TARGET` _or self_ is +/// deallocated. If any intermediate object is deallocated instead, it will be +/// assumed to have been set to nil. +/// +/// Make sure to `@strongify(self)` when using this macro within a block! The +/// macro will _always_ reference `self`, which can silently introduce a retain +/// cycle within a block. As a result, you should make sure that `self` is a weak +/// reference (e.g., created by `@weakify` and `@strongify`) before the +/// expression that uses `RACObserve`. +/// +/// Examples +/// +/// // Observes self, and doesn't stop until self is deallocated. +/// RACSignal *selfSignal = RACObserve(self, arrayController.items); +/// +/// // Observes the array controller, and stops when self _or_ the array +/// // controller is deallocated. +/// RACSignal *arrayControllerSignal = RACObserve(self.arrayController, items); +/// +/// // Observes obj.arrayController, and stops when self _or_ the array +/// // controller is deallocated. +/// RACSignal *signal2 = RACObserve(obj.arrayController, items); +/// +/// @weakify(self); +/// RACSignal *signal3 = [anotherSignal flattenMap:^(NSArrayController *arrayController) { +/// // Avoids a retain cycle because of RACObserve implicitly referencing +/// // self. +/// @strongify(self); +/// return RACObserve(arrayController, items); +/// }]; +/// +/// Returns a signal which sends the current value of the key path on +/// subscription, then sends the new value every time it changes, and sends +/// completed if self or observer is deallocated. +#define RACObserve(TARGET, KEYPATH) \ + [(id)(TARGET) rac_valuesForKeyPath:@keypath(TARGET, KEYPATH) observer:self] + +@class RACDisposable; +@class RACSignal; + +@interface NSObject (RACPropertySubscribing) + +/// Creates a signal to observe the value at the given key path. +/// +/// The initial value is sent on subscription, the subsequent values are sent +/// from whichever thread the change occured on, even if it doesn't have a valid +/// scheduler. +/// +/// Returns a signal that immediately sends the receiver's current value at the +/// given keypath, then any changes thereafter. +- (RACSignal *)rac_valuesForKeyPath:(NSString *)keyPath observer:(NSObject *)observer; + +/// Creates a signal to observe the changes of the given key path. +/// +/// The initial value is sent on subscription, the subsequent values are sent +/// from whichever thread the change occured on, even if it doesn't have a valid +/// scheduler. +/// +/// Returns a signal that sends tuples containing the current value at the key +/// path and the change dictionary for each KVO callback. +- (RACSignal *)rac_valuesAndChangesForKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(NSObject *)observer; + +@end + +#define RACAble(...) \ + metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__)) \ + (_RACAbleObject(self, __VA_ARGS__)) \ + (_RACAbleObject(__VA_ARGS__)) + +#define _RACAbleObject(object, property) [object rac_signalForKeyPath:@keypath(object, property) observer:self] + +#define RACAbleWithStart(...) \ + metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__)) \ + (_RACAbleWithStartObject(self, __VA_ARGS__)) \ + (_RACAbleWithStartObject(__VA_ARGS__)) + +#define _RACAbleWithStartObject(object, property) [object rac_signalWithStartingValueForKeyPath:@keypath(object, property) observer:self] + +@interface NSObject (RACPropertySubscribingDeprecated) + ++ (RACSignal *)rac_signalFor:(NSObject *)object keyPath:(NSString *)keyPath observer:(NSObject *)observer __attribute__((deprecated("Use -rac_valuesForKeyPath:observer: or RACObserve() instead."))); ++ (RACSignal *)rac_signalWithStartingValueFor:(NSObject *)object keyPath:(NSString *)keyPath observer:(NSObject *)observer __attribute__((deprecated("Use -rac_valuesForKeyPath:observer: or RACObserve() instead."))); ++ (RACSignal *)rac_signalWithChangesFor:(NSObject *)object keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(NSObject *)observer __attribute__((deprecated("Use -rac_valuesAndChangesForKeyPath:options:observer: instead."))); +- (RACSignal *)rac_signalForKeyPath:(NSString *)keyPath observer:(NSObject *)observer __attribute__((deprecated("Use -rac_valuesForKeyPath:observer: or RACObserve() instead."))); +- (RACSignal *)rac_signalWithStartingValueForKeyPath:(NSString *)keyPath observer:(NSObject *)observer __attribute__((deprecated("Use -rac_valuesForKeyPath:observer: or RACObserve() instead."))); +- (RACDisposable *)rac_deriveProperty:(NSString *)keyPath from:(RACSignal *)signal __attribute__((deprecated("Use -[RACSignal setKeyPath:onObject:] instead"))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACPropertySubscribing.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACPropertySubscribing.m new file mode 100644 index 00000000..9a158778 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACPropertySubscribing.m @@ -0,0 +1,145 @@ +// +// NSObject+RACPropertySubscribing.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/2/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "NSObject+RACPropertySubscribing.h" +#import "RACEXTScope.h" +#import "NSObject+RACDeallocating.h" +#import "NSObject+RACDescription.h" +#import "NSObject+RACKVOWrapper.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACKVOTrampoline.h" +#import "RACSubscriber.h" +#import "RACSignal+Operations.h" +#import "RACTuple.h" +#import + +@implementation NSObject (RACPropertySubscribing) + +- (RACSignal *)rac_valuesForKeyPath:(NSString *)keyPath observer:(NSObject *)observer { + return [[[self rac_valuesAndChangesForKeyPath:keyPath options:NSKeyValueObservingOptionInitial observer:observer] reduceEach:^(id value, NSDictionary *change) { + return value; + }] setNameWithFormat:@"RACObserve(%@, %@)", self.rac_description, keyPath]; +} + +- (RACSignal *)rac_valuesAndChangesForKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(NSObject *)observer { + keyPath = [keyPath copy]; + + RACDisposable *deallocFlagDisposable = [[RACDisposable alloc] init]; + RACCompoundDisposable *observerDisposable = observer.rac_deallocDisposable; + RACCompoundDisposable *objectDisposable = self.rac_deallocDisposable; + [observerDisposable addDisposable:deallocFlagDisposable]; + [objectDisposable addDisposable:deallocFlagDisposable]; + + @unsafeify(self, observer); + return [RACSignal createSignal:^ RACDisposable * (id subscriber) { + if (deallocFlagDisposable.disposed) { + [subscriber sendCompleted]; + return nil; + } + + @strongify(self, observer); + + RACDisposable *observationDisposable = [self rac_observeKeyPath:keyPath options:options observer:observer block:^(id value, NSDictionary *change) { + [subscriber sendNext:RACTuplePack(value, change)]; + }]; + + RACDisposable *deallocDisposable = [RACDisposable disposableWithBlock:^{ + [observationDisposable dispose]; + [subscriber sendCompleted]; + }]; + + [observer.rac_deallocDisposable addDisposable:deallocDisposable]; + [self.rac_deallocDisposable addDisposable:deallocDisposable]; + + return [RACDisposable disposableWithBlock:^{ + [observerDisposable removeDisposable:deallocFlagDisposable]; + [objectDisposable removeDisposable:deallocFlagDisposable]; + [observerDisposable removeDisposable:deallocDisposable]; + [objectDisposable removeDisposable:deallocDisposable]; + [observationDisposable dispose]; + }]; + }]; +} + +@end + +static RACSignal *signalWithoutChangesFor(Class class, NSObject *object, NSString *keyPath, NSKeyValueObservingOptions options, NSObject *observer) { + NSCParameterAssert(object != nil); + NSCParameterAssert(keyPath != nil); + NSCParameterAssert(observer != nil); + + keyPath = [keyPath copy]; + + @unsafeify(object); + + return [[class + rac_signalWithChangesFor:object keyPath:keyPath options:options observer:observer] + map:^(NSDictionary *change) { + @strongify(object); + return [object valueForKeyPath:keyPath]; + }]; +} + +@implementation NSObject (RACPropertySubscribingDeprecated) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" + ++ (RACSignal *)rac_signalFor:(NSObject *)object keyPath:(NSString *)keyPath observer:(NSObject *)observer { + return signalWithoutChangesFor(self, object, keyPath, 0, observer); +} + ++ (RACSignal *)rac_signalWithStartingValueFor:(NSObject *)object keyPath:(NSString *)keyPath observer:(NSObject *)observer { + return signalWithoutChangesFor(self, object, keyPath, NSKeyValueObservingOptionInitial, observer); +} + ++ (RACSignal *)rac_signalWithChangesFor:(NSObject *)object keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(NSObject *)observer { + @unsafeify(observer, object); + return [[RACSignal createSignal:^(id subscriber) { + + @strongify(observer, object); + RACKVOTrampoline *KVOTrampoline = [object rac_addObserver:observer forKeyPath:keyPath options:options block:^(id target, id observer, NSDictionary *change) { + [subscriber sendNext:change]; + }]; + + @weakify(subscriber); + RACDisposable *deallocDisposable = [RACDisposable disposableWithBlock:^{ + @strongify(subscriber); + [KVOTrampoline dispose]; + [subscriber sendCompleted]; + }]; + + [observer.rac_deallocDisposable addDisposable:deallocDisposable]; + [object.rac_deallocDisposable addDisposable:deallocDisposable]; + + RACCompoundDisposable *observerDisposable = observer.rac_deallocDisposable; + RACCompoundDisposable *objectDisposable = object.rac_deallocDisposable; + return [RACDisposable disposableWithBlock:^{ + [observerDisposable removeDisposable:deallocDisposable]; + [objectDisposable removeDisposable:deallocDisposable]; + [KVOTrampoline dispose]; + }]; + }] setNameWithFormat:@"RACAble(%@, %@)", object.rac_description, keyPath]; +} + +- (RACSignal *)rac_signalForKeyPath:(NSString *)keyPath observer:(NSObject *)observer { + return [self.class rac_signalFor:self keyPath:keyPath observer:observer]; +} + +- (RACSignal *)rac_signalWithStartingValueForKeyPath:(NSString *)keyPath observer:(NSObject *)observer { + return [self.class rac_signalWithStartingValueFor:self keyPath:keyPath observer:observer]; +} + +- (RACDisposable *)rac_deriveProperty:(NSString *)keyPath from:(RACSignal *)signal { + return [signal setKeyPath:keyPath onObject:self]; +} + +#pragma clang diagnostic pop + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACSelectorSignal.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACSelectorSignal.h new file mode 100644 index 00000000..c6f3de5d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACSelectorSignal.h @@ -0,0 +1,79 @@ +// +// NSObject+RACSelectorSignal.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/18/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +/// The domain for any errors originating from -rac_signalForSelector:. +extern NSString * const RACSelectorSignalErrorDomain; + +/// -rac_signalForSelector: was going to add a new method implementation for +/// `selector`, but another thread added an implementation before it was able to. +/// +/// This will _not_ occur for cases where a method implementation exists before +/// -rac_signalForSelector: is invoked. +extern const NSInteger RACSelectorSignalErrorMethodSwizzlingRace; + +@interface NSObject (RACSelectorSignal) + +/// Creates a signal associated with the receiver, which will send a tuple of the +/// method's arguments each time the given selector is invoked. +/// +/// If the selector is already implemented on the receiver, the existing +/// implementation will be invoked _before_ the signal fires. +/// +/// If the selector is not yet implemented on the receiver, the injected +/// implementation will have a `void` return type and accept only object +/// arguments. Invoking the added implementation with non-object values, or +/// expecting a return value, will result in undefined behavior. +/// +/// This is useful for changing an event or delegate callback into a signal. For +/// example, on an NSView: +/// +/// [[view rac_signalForSelector:@selector(mouseDown:)] subscribeNext:^(RACTuple *args) { +/// NSEvent *event = args.first; +/// NSLog(@"mouse button pressed: %@", event); +/// }]; +/// +/// selector - The selector for whose invocations are to be observed. If it +/// doesn't exist, it will be implemented to accept object arguments +/// and return void. This cannot have C arrays or unions as arguments +/// or C arrays, unions, structs, complex or vector types as return +/// type. +/// +/// Returns a signal which will send a tuple of arguments upon each invocation of +/// the selector, then completes when the receiver is deallocated. `next` events +/// will be sent synchronously from the thread that invoked the method. If +/// a runtime call fails, the signal will send an error in the +/// RACSelectorSignalErrorDomain. +- (RACSignal *)rac_signalForSelector:(SEL)selector; + +/// Behaves like -rac_signalForSelector:, but if the selector is not yet +/// implemented on the receiver, its method signature is looked up within +/// `protocol`, and may accept non-object arguments. +/// +/// If the selector is not yet implemented and has a return value, the injected +/// method will return all zero bits (equal to `nil`, `NULL`, 0, 0.0f, etc.). +/// +/// selector - The selector for whose invocations are to be observed. If it +/// doesn't exist, it will be implemented using information from +/// `protocol`, and may accept non-object arguments and return +/// a value. This cannot have C arrays or unions as arguments or +/// return type. +/// protocol - The protocol in which `selector` is declared. This will be used +/// for type information if the selector is not already implemented on +/// the receiver. This must not be `NULL`, and `selector` must exist +/// in this protocol. +/// +/// Returns a signal which will send a tuple of arguments on each invocation of +/// the selector, or an error in RACSelectorSignalErrorDomain if a runtime +/// call fails. +- (RACSignal *)rac_signalForSelector:(SEL)selector fromProtocol:(Protocol *)protocol; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACSelectorSignal.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACSelectorSignal.m new file mode 100644 index 00000000..83d03d46 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSObject+RACSelectorSignal.m @@ -0,0 +1,276 @@ +// +// NSObject+RACSelectorSignal.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/18/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "NSObject+RACSelectorSignal.h" +#import "RACEXTRuntimeExtensions.h" +#import "NSInvocation+RACTypeParsing.h" +#import "NSObject+RACDeallocating.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACObjCRuntime.h" +#import "RACSubject.h" +#import "RACTuple.h" +#import "NSObject+RACDescription.h" +#import +#import + +NSString * const RACSelectorSignalErrorDomain = @"RACSelectorSignalErrorDomain"; +const NSInteger RACSelectorSignalErrorMethodSwizzlingRace = 1; + +static NSString * const RACSignalForSelectorAliasPrefix = @"rac_alias_"; +static NSString * const RACSubclassSuffix = @"_RACSelectorSignal"; + +static NSMutableSet *swizzledClasses() { + static NSMutableSet *set; + static dispatch_once_t pred; + + dispatch_once(&pred, ^{ + set = [[NSMutableSet alloc] init]; + }); + + return set; +} + +@implementation NSObject (RACSelectorSignal) + +static BOOL RACForwardInvocation(id self, NSInvocation *invocation) { + SEL aliasSelector = RACAliasForSelector(invocation.selector); + RACSubject *subject = objc_getAssociatedObject(self, aliasSelector); + + Class class = object_getClass(invocation.target); + BOOL respondsToAlias = [class instancesRespondToSelector:aliasSelector]; + if (respondsToAlias) { + invocation.selector = aliasSelector; + [invocation invoke]; + } + + if (subject == nil) return respondsToAlias; + + [subject sendNext:invocation.rac_argumentsTuple]; + return YES; +} + +static void RACSwizzleForwardInvocation(Class class) { + SEL forwardInvocationSEL = @selector(forwardInvocation:); + Method forwardInvocationMethod = class_getInstanceMethod(class, forwardInvocationSEL); + + // Preserve any existing implementation of -forwardInvocation:. + void (*originalForwardInvocation)(id, SEL, NSInvocation *) = NULL; + if (forwardInvocationMethod != NULL) { + originalForwardInvocation = (__typeof__(originalForwardInvocation))method_getImplementation(forwardInvocationMethod); + } + + // Set up a new version of -forwardInvocation:. + // + // If the selector has been passed to -rac_signalForSelector:, invoke + // the aliased method, and forward the arguments to any attached signals. + // + // If the selector has not been passed to -rac_signalForSelector:, + // invoke any existing implementation of -forwardInvocation:. If there + // was no existing implementation, throw an unrecognized selector + // exception. + id newForwardInvocation = ^(id self, NSInvocation *invocation) { + BOOL matched = RACForwardInvocation(self, invocation); + if (matched) return; + + if (originalForwardInvocation == NULL) { + [self doesNotRecognizeSelector:invocation.selector]; + } else { + originalForwardInvocation(self, forwardInvocationSEL, invocation); + } + }; + + class_replaceMethod(class, forwardInvocationSEL, imp_implementationWithBlock(newForwardInvocation), "v@:@"); +} + +static void RACSwizzleRespondsToSelector(Class class) { + SEL respondsToSelectorSEL = @selector(respondsToSelector:); + + // Preserve existing implementation of -respondsToSelector:. + Method respondsToSelectorMethod = class_getInstanceMethod(class, respondsToSelectorSEL); + BOOL (*originalRespondsToSelector)(id, SEL, SEL) = (__typeof__(originalRespondsToSelector))method_getImplementation(respondsToSelectorMethod); + + // Set up a new version of -respondsToSelector: that returns YES for methods + // added by -rac_signalForSelector:. + // + // If the selector has a method defined on the receiver's actual class, and + // if that method's implementation is _objc_msgForward, then returns whether + // the instance has a signal for the selector. + // Otherwise, call the original -respondsToSelector:. + id newRespondsToSelector = ^ BOOL (id self, SEL selector) { + Method method = rac_getImmediateInstanceMethod(object_getClass(self), selector); + + if (method != NULL && method_getImplementation(method) == _objc_msgForward) { + SEL aliasSelector = RACAliasForSelector(selector); + return objc_getAssociatedObject(self, aliasSelector) != nil; + } + + return originalRespondsToSelector(self, respondsToSelectorSEL, selector); + }; + + class_replaceMethod(class, @selector(respondsToSelector:), imp_implementationWithBlock(newRespondsToSelector), method_getTypeEncoding(respondsToSelectorMethod)); +} + +// It's hard to tell which struct return types use _objc_msgForward, and +// which use _objc_msgForward_stret instead, so just exclude all struct, array, +// union, complex and vector return types. +static void RACCheckTypeEncoding(const char *typeEncoding) { +#if !NS_BLOCK_ASSERTIONS + // Some types, including vector types, are not encoded. In these cases the + // signature starts with the size of the argument frame. + NSCAssert(*typeEncoding < '1' || *typeEncoding > '9', @"unknown method return type not supported in type encoding: %s", typeEncoding); + NSCAssert(strstr(typeEncoding, "(") != typeEncoding, @"union method return type not supported"); + NSCAssert(strstr(typeEncoding, "{") != typeEncoding, @"struct method return type not supported"); + NSCAssert(strstr(typeEncoding, "[") != typeEncoding, @"array method return type not supported"); + NSCAssert(strstr(typeEncoding, @encode(_Complex float)) != typeEncoding, @"complex float method return type not supported"); + NSCAssert(strstr(typeEncoding, @encode(_Complex double)) != typeEncoding, @"complex double method return type not supported"); + NSCAssert(strstr(typeEncoding, @encode(_Complex long double)) != typeEncoding, @"complex long double method return type not supported"); + +#endif // !NS_BLOCK_ASSERTIONS +} + +static RACSignal *NSObjectRACSignalForSelector(NSObject *self, SEL selector, Protocol *protocol) { + SEL aliasSelector = RACAliasForSelector(selector); + + @synchronized (self) { + RACSubject *subject = objc_getAssociatedObject(self, aliasSelector); + if (subject != nil) return subject; + + Class class = RACSwizzleClass(self); + NSCAssert(class != nil, @"Could not swizzle class of %@", self); + + subject = [[RACSubject subject] setNameWithFormat:@"%@ -rac_signalForSelector: %@", self.rac_description, NSStringFromSelector(selector)]; + objc_setAssociatedObject(self, aliasSelector, subject, OBJC_ASSOCIATION_RETAIN); + + [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{ + [subject sendCompleted]; + }]]; + + Method targetMethod = class_getInstanceMethod(class, selector); + if (targetMethod == NULL) { + const char *typeEncoding; + if (protocol == NULL) { + typeEncoding = RACSignatureForUndefinedSelector(selector); + } else { + // Look for the selector as an optional instance method. + struct objc_method_description methodDescription = protocol_getMethodDescription(protocol, selector, NO, YES); + + if (methodDescription.name == NULL) { + // Then fall back to looking for a required instance + // method. + methodDescription = protocol_getMethodDescription(protocol, selector, YES, YES); + NSCAssert(methodDescription.name != NULL, @"Selector %@ does not exist in <%s>", NSStringFromSelector(selector), protocol_getName(protocol)); + } + + typeEncoding = methodDescription.types; + } + + RACCheckTypeEncoding(typeEncoding); + + // Define the selector to call -forwardInvocation:. + if (!class_addMethod(class, selector, _objc_msgForward, typeEncoding)) { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedString(@"A race condition occurred implementing %@ on class %@", nil), NSStringFromSelector(selector), class], + NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Invoke -rac_signalForSelector: again to override the implementation.", nil) + }; + + return [RACSignal error:[NSError errorWithDomain:RACSelectorSignalErrorDomain code:RACSelectorSignalErrorMethodSwizzlingRace userInfo:userInfo]]; + } + } else if (method_getImplementation(targetMethod) != _objc_msgForward) { + // Make a method alias for the existing method implementation. + const char *typeEncoding = method_getTypeEncoding(targetMethod); + + RACCheckTypeEncoding(typeEncoding); + + BOOL addedAlias __attribute__((unused)) = class_addMethod(class, aliasSelector, method_getImplementation(targetMethod), typeEncoding); + NSCAssert(addedAlias, @"Original implementation for %@ is already copied to %@ on %@", NSStringFromSelector(selector), NSStringFromSelector(aliasSelector), class); + + // Redefine the selector to call -forwardInvocation:. + class_replaceMethod(class, selector, _objc_msgForward, method_getTypeEncoding(targetMethod)); + } + + return subject; + } +} + +static SEL RACAliasForSelector(SEL originalSelector) { + NSString *selectorName = NSStringFromSelector(originalSelector); + return NSSelectorFromString([RACSignalForSelectorAliasPrefix stringByAppendingString:selectorName]); +} + +static const char *RACSignatureForUndefinedSelector(SEL selector) { + const char *name = sel_getName(selector); + NSMutableString *signature = [NSMutableString stringWithString:@"v@:"]; + + while ((name = strchr(name, ':')) != NULL) { + [signature appendString:@"@"]; + name++; + } + + return signature.UTF8String; +} + +static Class RACSwizzleClass(NSObject *self) { + Class statedClass = self.class; + Class baseClass = object_getClass(self); + NSString *className = NSStringFromClass(baseClass); + + if ([className hasSuffix:RACSubclassSuffix]) { + return baseClass; + } else if (statedClass != baseClass) { + // If the class is already lying about what it is, it's probably a KVO + // dynamic subclass or something else that we shouldn't subclass + // ourselves. + // + // Just swizzle -forwardInvocation: in-place. Since the object's class + // was almost certainly dynamically changed, we shouldn't see another of + // these classes in the hierarchy. + // + // Additionally, swizzle -respondsToSelector: because the default + // implementation may be ignorant of methods added to this class. + @synchronized (swizzledClasses()) { + if (![swizzledClasses() containsObject:className]) { + RACSwizzleForwardInvocation(baseClass); + RACSwizzleRespondsToSelector(baseClass); + [swizzledClasses() addObject:className]; + } + } + + return baseClass; + } + + const char *subclassName = [className stringByAppendingString:RACSubclassSuffix].UTF8String; + Class subclass = objc_getClass(subclassName); + + if (subclass == nil) { + subclass = [RACObjCRuntime createClass:subclassName inheritingFromClass:baseClass]; + if (subclass == nil) return nil; + + RACSwizzleForwardInvocation(subclass); + RACSwizzleRespondsToSelector(subclass); + objc_registerClassPair(subclass); + } + + object_setClass(self, subclass); + return subclass; +} + +- (RACSignal *)rac_signalForSelector:(SEL)selector { + NSCParameterAssert(selector != NULL); + + return NSObjectRACSignalForSelector(self, selector, NULL); +} + +- (RACSignal *)rac_signalForSelector:(SEL)selector fromProtocol:(Protocol *)protocol { + NSCParameterAssert(selector != NULL); + NSCParameterAssert(protocol != NULL); + + return NSObjectRACSignalForSelector(self, selector, protocol); +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h new file mode 100644 index 00000000..8bea2db7 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h @@ -0,0 +1,20 @@ +// +// NSOrderedSet+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSOrderedSet (RACSequenceAdditions) + +/// Creates and returns a sequence corresponding to the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.m new file mode 100644 index 00000000..55dfd0b7 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.m @@ -0,0 +1,19 @@ +// +// NSOrderedSet+RACSequenceAdditions.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "NSOrderedSet+RACSequenceAdditions.h" +#import "NSArray+RACSequenceAdditions.h" + +@implementation NSOrderedSet (RACSequenceAdditions) + +- (RACSequence *)rac_sequence { + // TODO: First class support for ordered set sequences. + return self.array.rac_sequence; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSSet+RACSequenceAdditions.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSSet+RACSequenceAdditions.h new file mode 100644 index 00000000..66655016 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSSet+RACSequenceAdditions.h @@ -0,0 +1,20 @@ +// +// NSSet+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSSet (RACSequenceAdditions) + +/// Creates and returns a sequence corresponding to the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSSet+RACSequenceAdditions.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSSet+RACSequenceAdditions.m new file mode 100644 index 00000000..cc07f75c --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSSet+RACSequenceAdditions.m @@ -0,0 +1,19 @@ +// +// NSSet+RACSequenceAdditions.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "NSSet+RACSequenceAdditions.h" +#import "NSArray+RACSequenceAdditions.h" + +@implementation NSSet (RACSequenceAdditions) + +- (RACSequence *)rac_sequence { + // TODO: First class support for set sequences. + return self.allObjects.rac_sequence; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACKeyPathUtilities.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACKeyPathUtilities.h new file mode 100644 index 00000000..7d163fad --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACKeyPathUtilities.h @@ -0,0 +1,33 @@ +// +// NSString+RACKeyPathUtilities.h +// ReactiveCocoa +// +// Created by Uri Baghin on 05/05/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@interface NSString (RACKeyPathUtilities) + +/// Returns an array of the components of the receiver. +/// +/// Calling this method on a string that isn't a key path is considered undefined +/// behavior. +- (NSArray *)rac_keyPathComponents; + +/// Returns a key path with all the components of the receiver except for the +/// last one. +/// +/// Calling this method on a string that isn't a key path is considered undefined +/// behavior. +- (NSString *)rac_keyPathByDeletingLastKeyPathComponent; + +/// Returns a key path with all the components of the receiver expect for the +/// first one. +/// +/// Calling this method on a string that isn't a key path is considered undefined +/// behavior. +- (NSString *)rac_keyPathByDeletingFirstKeyPathComponent; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACKeyPathUtilities.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACKeyPathUtilities.m new file mode 100644 index 00000000..63a100c6 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACKeyPathUtilities.m @@ -0,0 +1,36 @@ +// +// NSString+RACKeyPathUtilities.m +// ReactiveCocoa +// +// Created by Uri Baghin on 05/05/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "NSString+RACKeyPathUtilities.h" + +@implementation NSString (RACKeyPathUtilities) + +- (NSArray *)rac_keyPathComponents { + if (self.length == 0) { + return nil; + } + return [self componentsSeparatedByString:@"."]; +} + +- (NSString *)rac_keyPathByDeletingLastKeyPathComponent { + NSUInteger lastDotIndex = [self rangeOfString:@"." options:NSBackwardsSearch].location; + if (lastDotIndex == NSNotFound) { + return nil; + } + return [self substringToIndex:lastDotIndex]; +} + +- (NSString *)rac_keyPathByDeletingFirstKeyPathComponent { + NSUInteger firstDotIndex = [self rangeOfString:@"."].location; + if (firstDotIndex == NSNotFound) { + return nil; + } + return [self substringFromIndex:firstDotIndex + 1]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSequenceAdditions.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSequenceAdditions.h new file mode 100644 index 00000000..0116231f --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSequenceAdditions.h @@ -0,0 +1,21 @@ +// +// NSString+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSString (RACSequenceAdditions) + +/// Creates and returns a sequence containing strings corresponding to each +/// composed character sequence in the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSequenceAdditions.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSequenceAdditions.m new file mode 100644 index 00000000..eb6a76ef --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSequenceAdditions.m @@ -0,0 +1,18 @@ +// +// NSString+RACSequenceAdditions.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "NSString+RACSequenceAdditions.h" +#import "RACStringSequence.h" + +@implementation NSString (RACSequenceAdditions) + +- (RACSequence *)rac_sequence { + return [RACStringSequence sequenceWithString:self offset:0]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSupport.h new file mode 100644 index 00000000..d904a4cf --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSupport.h @@ -0,0 +1,22 @@ +// +// NSString+RACSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/11/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; +@class RACScheduler; + +@interface NSString (RACSupport) + +// Reads in the contents of the file using +[NSString stringWithContentsOfURL:usedEncoding:error:]. +// Note that encoding won't be valid until the signal completes successfully. +// +// scheduler - cannot be nil. ++ (RACSignal *)rac_readContentsOfURL:(NSURL *)URL usedEncoding:(NSStringEncoding *)encoding scheduler:(RACScheduler *)scheduler; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSupport.m new file mode 100644 index 00000000..c6ebe0b1 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSString+RACSupport.m @@ -0,0 +1,35 @@ +// +// NSString+RACSupport.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/11/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "NSString+RACSupport.h" +#import "RACReplaySubject.h" +#import "RACScheduler.h" + +@implementation NSString (RACSupport) + ++ (RACSignal *)rac_readContentsOfURL:(NSURL *)URL usedEncoding:(NSStringEncoding *)encoding scheduler:(RACScheduler *)scheduler { + NSCParameterAssert(scheduler != nil); + + RACReplaySubject *subject = [RACReplaySubject subject]; + [subject setNameWithFormat:@"+rac_readContentsOfURL: %@ usedEncoding:scheduler: %@", URL, scheduler]; + + [scheduler schedule:^{ + NSError *error = nil; + NSString *string = [NSString stringWithContentsOfURL:URL usedEncoding:encoding error:&error]; + if(string == nil) { + [subject sendError:error]; + } else { + [subject sendNext:string]; + [subject sendCompleted]; + } + }]; + + return subject; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSURLConnection+RACSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSURLConnection+RACSupport.h new file mode 100644 index 00000000..e9bf04f3 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSURLConnection+RACSupport.h @@ -0,0 +1,25 @@ +// +// NSURLConnection+RACSupport.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-01. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +@interface NSURLConnection (RACSupport) + +// Lazily loads data for the given request in the background. +// +// request - The URL request to load. This must not be nil. +// +// Returns a signal which will begin loading the request upon each subscription, +// then send a `RACTuple` of the received `NSURLResponse` and downloaded +// `NSData`, and complete on a background thread. If any errors occur, the +// returned signal will error out. ++ (RACSignal *)rac_sendAsynchronousRequest:(NSURLRequest *)request; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSURLConnection+RACSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSURLConnection+RACSupport.m new file mode 100644 index 00000000..e6b7360e --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/NSURLConnection+RACSupport.m @@ -0,0 +1,47 @@ +// +// NSURLConnection+RACSupport.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-01. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "NSURLConnection+RACSupport.h" +#import "RACDisposable.h" +#import "RACSignal.h" +#import "RACSignal+Operations.h" +#import "RACSubscriber.h" +#import "RACTuple.h" + +@implementation NSURLConnection (RACSupport) + ++ (RACSignal *)rac_sendAsynchronousRequest:(NSURLRequest *)request { + NSCParameterAssert(request != nil); + + return [[RACSignal + createSignal:^ RACDisposable * (id subscriber) { + NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + queue.name = @"com.github.ReactiveCocoa.NSURLConnectionRACSupport"; + + [NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { + if (data == nil) { + [subscriber sendError:error]; + } else { + [subscriber sendNext:RACTuplePack(response, data)]; + [subscriber sendCompleted]; + } + }]; + + return [RACDisposable disposableWithBlock:^{ + // It's not clear if this will actually cancel the connection, + // but we can at least prevent _some_ unnecessary work -- + // without writing all the code for a proper delegate, which + // doesn't really belong in RAC. + queue.suspended = YES; + [queue cancelAllOperations]; + }]; + }] + setNameWithFormat:@"+rac_sendAsynchronousRequest: %@", request]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACArraySequence.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACArraySequence.h new file mode 100644 index 00000000..6936a0a8 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACArraySequence.h @@ -0,0 +1,18 @@ +// +// RACArraySequence.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "RACSequence.h" + +/// Private class that adapts an array to the RACSequence interface. +@interface RACArraySequence : RACSequence + +/// Returns a sequence for enumerating over the given array, starting from the +/// given offset. The array will be copied to prevent mutation. ++ (instancetype)sequenceWithArray:(NSArray *)array offset:(NSUInteger)offset; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACArraySequence.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACArraySequence.m new file mode 100644 index 00000000..f7ca69dd --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACArraySequence.m @@ -0,0 +1,125 @@ +// +// RACArraySequence.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "RACArraySequence.h" + +@interface RACArraySequence () + +// Redeclared from the superclass and marked deprecated to prevent using `array` +// where `backingArray` is intended. +@property (nonatomic, copy, readonly) NSArray *array __attribute__((deprecated)); + +// The array being sequenced. +@property (nonatomic, copy, readonly) NSArray *backingArray; + +// The index in the array from which the sequence starts. +@property (nonatomic, assign, readonly) NSUInteger offset; + +@end + +@implementation RACArraySequence + +#pragma mark Lifecycle + ++ (instancetype)sequenceWithArray:(NSArray *)array offset:(NSUInteger)offset { + NSCParameterAssert(offset <= array.count); + + if (offset == array.count) return self.empty; + + RACArraySequence *seq = [[self alloc] init]; + seq->_backingArray = [array copy]; + seq->_offset = offset; + return seq; +} + +#pragma mark RACSequence + +- (id)head { + return [self.backingArray objectAtIndex:self.offset]; +} + +- (RACSequence *)tail { + RACSequence *sequence = [self.class sequenceWithArray:self.backingArray offset:self.offset + 1]; + sequence.name = self.name; + return sequence; +} + +#pragma mark NSFastEnumeration + +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id[])stackbuf count:(NSUInteger)len { + NSCParameterAssert(len > 0); + + if (state->state >= self.backingArray.count) { + // Enumeration has completed. + return 0; + } + + if (state->state == 0) { + state->state = self.offset; + + // Since a sequence doesn't mutate, this just needs to be set to + // something non-NULL. + state->mutationsPtr = state->extra; + } + + state->itemsPtr = stackbuf; + + NSUInteger startIndex = state->state; + NSUInteger index = 0; + + for (id value in self.backingArray) { + // Constructing an index set for -enumerateObjectsAtIndexes: can actually be + // slower than just skipping the items we don't care about. + if (index < startIndex) { + ++index; + continue; + } + + stackbuf[index - startIndex] = value; + + ++index; + if (index - startIndex >= len) break; + } + + NSCAssert(index > startIndex, @"Final index (%lu) should be greater than start index (%lu)", (unsigned long)index, (unsigned long)startIndex); + + state->state = index; + return index - startIndex; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" +- (NSArray *)array { + return [self.backingArray subarrayWithRange:NSMakeRange(self.offset, self.backingArray.count - self.offset)]; +} +#pragma clang diagnostic pop + +#pragma mark NSCoding + +- (id)initWithCoder:(NSCoder *)coder { + self = [super initWithCoder:coder]; + if (self == nil) return nil; + + _backingArray = [coder decodeObjectForKey:@"array"]; + _offset = 0; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + // Encoding is handled in RACSequence. + [super encodeWithCoder:coder]; +} + +#pragma mark NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p>{ name = %@, array = %@ }", self.class, self, self.name, self.backingArray]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBacktrace.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBacktrace.h new file mode 100644 index 00000000..8588c802 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBacktrace.h @@ -0,0 +1,70 @@ +// +// RACBacktrace.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-08-20. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#ifdef DEBUG + +extern void rac_dispatch_async(dispatch_queue_t queue, dispatch_block_t block); +extern void rac_dispatch_barrier_async(dispatch_queue_t queue, dispatch_block_t block); +extern void rac_dispatch_after(dispatch_time_t time, dispatch_queue_t queue, dispatch_block_t block); +extern void rac_dispatch_async_f(dispatch_queue_t queue, void *context, dispatch_function_t function); +extern void rac_dispatch_barrier_async_f(dispatch_queue_t queue, void *context, dispatch_function_t function); +extern void rac_dispatch_after_f(dispatch_time_t time, dispatch_queue_t queue, void *context, dispatch_function_t function); + +#define dispatch_async rac_dispatch_async +#define dispatch_barrier_async rac_dispatch_barrier_async +#define dispatch_after rac_dispatch_after +#define dispatch_async_f rac_dispatch_async_f +#define dispatch_barrier_async_f rac_dispatch_barrier_async_f +#define dispatch_after_f rac_dispatch_after_f + +/// Preserves backtraces across asynchronous calls. +/// +/// On OS X, you can enable the automatic capturing of asynchronous backtraces +/// (in Debug builds) by setting the `DYLD_INSERT_LIBRARIES` environment variable +/// to `@executable_path/../Frameworks/ReactiveCocoa.framework/ReactiveCocoa` in +/// your scheme's Run action settings. +/// +/// On iOS, your project and RAC will automatically use the `rac_` GCD functions +/// (declared above) for asynchronous work. Unfortunately, unlike OS X, it's +/// impossible to capture backtraces inside NSOperationQueue or other code +/// outside of your project. +/// +/// Once backtraces are being captured, you can `po [RACBacktrace backtrace]` in +/// the debugger to print them out at any time. You can even set up an alias in +/// ~/.lldbinit to do so: +/// +/// command alias racbt po [RACBacktrace backtrace] +/// +@interface RACBacktrace : NSObject + +/// The backtrace from any previous thread. +@property (nonatomic, strong, readonly) RACBacktrace *previousThreadBacktrace; + +/// The call stack of this backtrace's thread. +@property (nonatomic, copy, readonly) NSArray *callStackSymbols; + +/// Captures the current thread's backtrace, appending it to any backtrace from +/// a previous thread. ++ (instancetype)backtrace; + +/// Same as +backtrace, but omits the specified number of frames at the +/// top of the stack (in addition to this method itself). ++ (instancetype)backtraceIgnoringFrames:(NSUInteger)ignoreCount; + +@end + +#else + +#define rac_dispatch_async dispatch_async +#define rac_dispatch_barrier_async dispatch_barrier_async +#define rac_dispatch_after dispatch_after +#define rac_dispatch_async_f dispatch_async_f +#define rac_dispatch_barrier_async_f dispatch_barrier_async_f +#define rac_dispatch_after_f dispatch_after_f + +#endif diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBacktrace.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBacktrace.m new file mode 100644 index 00000000..a578e79e --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBacktrace.m @@ -0,0 +1,244 @@ +// +// RACBacktrace.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-08-16. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import +#import "RACBacktrace.h" + +#define RAC_BACKTRACE_MAX_CALL_STACK_FRAMES 128 + +#ifdef DEBUG + +// Undefine the macros that hide the real GCD functions. +#undef dispatch_async +#undef dispatch_barrier_async +#undef dispatch_after +#undef dispatch_async_f +#undef dispatch_barrier_async_f +#undef dispatch_after_f + +@interface RACBacktrace () { + void *_callStackAddresses[RAC_BACKTRACE_MAX_CALL_STACK_FRAMES]; + int _callStackSize; +} + +@property (nonatomic, strong, readwrite) RACBacktrace *previousThreadBacktrace; +@end + +@interface RACDispatchInfo : NSObject + +// The recorded backtrace. +@property (nonatomic, strong, readonly) RACBacktrace *backtrace; + +// The information for the original dispatch. +@property (nonatomic, readonly) dispatch_function_t function; +@property (nonatomic, readonly) void *context; +@property (nonatomic, readonly) dispatch_queue_t queue; + +- (id)initWithQueue:(dispatch_queue_t)queue function:(dispatch_function_t)function context:(void *)context; + +@end + +// Function for use with dispatch_async_f and friends, which will save the +// backtrace onto the current queue, then call through to the original dispatch. +static void RACTraceDispatch (void *ptr) { + // Balance out the retain necessary for async calls. + RACDispatchInfo *info __attribute__((objc_precise_lifetime)) = CFBridgingRelease(ptr); + + dispatch_queue_set_specific(info.queue, (void *)pthread_self(), (__bridge void *)info.backtrace, NULL); + info.function(info.context); + dispatch_queue_set_specific(info.queue, (void *)pthread_self(), NULL, NULL); +} + +// Always inline this function, for consistency in backtraces. +__attribute__((always_inline)) +static dispatch_block_t RACBacktraceBlock (dispatch_queue_t queue, dispatch_block_t block) { + RACBacktrace *backtrace = [RACBacktrace backtrace]; + + return [^{ + __autoreleasing RACBacktrace *backtraceKeptAlive = backtrace; + + dispatch_queue_set_specific(queue, (void *)pthread_self(), (__bridge void *)backtraceKeptAlive, NULL); + block(); + dispatch_queue_set_specific(queue, (void *)pthread_self(), NULL, NULL); + } copy]; +} + +void rac_dispatch_async(dispatch_queue_t queue, dispatch_block_t block) { + dispatch_async(queue, RACBacktraceBlock(queue, block)); +} + +void rac_dispatch_barrier_async(dispatch_queue_t queue, dispatch_block_t block) { + dispatch_barrier_async(queue, RACBacktraceBlock(queue, block)); +} + +void rac_dispatch_after(dispatch_time_t time, dispatch_queue_t queue, dispatch_block_t block) { + dispatch_after(time, queue, RACBacktraceBlock(queue, block)); +} + +void rac_dispatch_async_f(dispatch_queue_t queue, void *context, dispatch_function_t function) { + RACDispatchInfo *info = [[RACDispatchInfo alloc] initWithQueue:queue function:function context:context]; + dispatch_async_f(queue, (void *)CFBridgingRetain(info), &RACTraceDispatch); +} + +void rac_dispatch_barrier_async_f(dispatch_queue_t queue, void *context, dispatch_function_t function) { + RACDispatchInfo *info = [[RACDispatchInfo alloc] initWithQueue:queue function:function context:context]; + dispatch_barrier_async_f(queue, (void *)CFBridgingRetain(info), &RACTraceDispatch); +} + +void rac_dispatch_after_f(dispatch_time_t time, dispatch_queue_t queue, void *context, dispatch_function_t function) { + RACDispatchInfo *info = [[RACDispatchInfo alloc] initWithQueue:queue function:function context:context]; + dispatch_after_f(time, queue, (void *)CFBridgingRetain(info), &RACTraceDispatch); +} + +// This is what actually performs the injection. +// +// The DYLD_INSERT_LIBRARIES environment variable must include the RAC dynamic +// library in order for this to work. +__attribute__((used)) static struct { const void *replacement; const void *replacee; } interposers[] __attribute__((section("__DATA,__interpose"))) = { + { (const void *)&rac_dispatch_async, (const void *)&dispatch_async }, + { (const void *)&rac_dispatch_barrier_async, (const void *)&dispatch_barrier_async }, + { (const void *)&rac_dispatch_after, (const void *)&dispatch_after }, + { (const void *)&rac_dispatch_async_f, (const void *)&dispatch_async_f }, + { (const void *)&rac_dispatch_barrier_async_f, (const void *)&dispatch_barrier_async_f }, + { (const void *)&rac_dispatch_after_f, (const void *)&dispatch_after_f }, +}; + +static void RACSignalHandler (int sig) { + NSLog(@"Backtrace: %@", [RACBacktrace backtrace]); + fflush(stdout); + + // Restore the default action and raise the signal again. + signal(sig, SIG_DFL); + raise(sig); +} + +static void RACExceptionHandler (NSException *ex) { + NSLog(@"Uncaught exception %@", ex); + NSLog(@"Backtrace: %@", [RACBacktrace backtrace]); + fflush(stdout); +} + +@implementation RACBacktrace + +#pragma mark Properties + +- (NSArray *)callStackSymbols { + if (_callStackSize == 0) return @[]; + + char **symbols = backtrace_symbols(_callStackAddresses, _callStackSize); + NSMutableArray *array = [NSMutableArray arrayWithCapacity:(NSUInteger)_callStackSize]; + + for (int i = 0; i < _callStackSize; i++) { + NSString *str = @(symbols[i]); + [array addObject:str]; + } + + free(symbols); + return array; +} + +#pragma mark Initialization + ++ (void)load { + @autoreleasepool { + NSString *libraries = [[[NSProcessInfo processInfo] environment] objectForKey:@"DYLD_INSERT_LIBRARIES"]; + + // Don't install our handlers if we're not actually intercepting function + // calls. + if ([libraries rangeOfString:@"ReactiveCocoa"].length == 0) return; + + NSLog(@"*** Enabling asynchronous backtraces"); + + NSSetUncaughtExceptionHandler(&RACExceptionHandler); + } + + signal(SIGILL, &RACSignalHandler); + signal(SIGTRAP, &RACSignalHandler); + signal(SIGABRT, &RACSignalHandler); + signal(SIGFPE, &RACSignalHandler); + signal(SIGBUS, &RACSignalHandler); + signal(SIGSEGV, &RACSignalHandler); + signal(SIGSYS, &RACSignalHandler); + signal(SIGPIPE, &RACSignalHandler); +} + +#pragma mark Backtraces + ++ (instancetype)backtrace { + return [self backtraceIgnoringFrames:1]; +} + ++ (instancetype)backtraceIgnoringFrames:(NSUInteger)ignoreCount { + @autoreleasepool { + RACBacktrace *oldBacktrace = (__bridge id)dispatch_get_specific((void *)pthread_self()); + + RACBacktrace *newBacktrace = [[RACBacktrace alloc] init]; + newBacktrace.previousThreadBacktrace = oldBacktrace; + + int size = backtrace(newBacktrace->_callStackAddresses, RAC_BACKTRACE_MAX_CALL_STACK_FRAMES); + + // Omit this method plus however many others from the backtrace. + ++ignoreCount; + if ((NSUInteger)size > ignoreCount) { + memmove(newBacktrace->_callStackAddresses, newBacktrace->_callStackAddresses + ignoreCount, ((NSUInteger)size - ignoreCount) * sizeof(char *)); + size -= (int)ignoreCount; + } + + newBacktrace->_callStackSize = size; + return newBacktrace; + } +} + +#pragma mark NSObject + +- (NSString *)description { + NSString *str = [NSString stringWithFormat:@"%@", self.callStackSymbols]; + if (self.previousThreadBacktrace != nil) { + str = [str stringByAppendingFormat:@"\n\n... asynchronously invoked from: %@", self.previousThreadBacktrace]; + } + + return str; +} + +@end + +@implementation RACDispatchInfo + +#pragma mark Lifecycle + +- (id)initWithQueue:(dispatch_queue_t)queue function:(dispatch_function_t)function context:(void *)context { + @autoreleasepool { + NSCParameterAssert(queue != NULL); + NSCParameterAssert(function != NULL); + + self = [super init]; + if (self == nil) return nil; + + _backtrace = [RACBacktrace backtraceIgnoringFrames:1]; + + dispatch_retain(queue); + _queue = queue; + + _function = function; + _context = context; + + return self; + } +} + +- (void)dealloc { + if (_queue != NULL) { + dispatch_release(_queue); + _queue = NULL; + } +} + +@end + +#endif diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBehaviorSubject.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBehaviorSubject.h new file mode 100644 index 00000000..2f9e0dbc --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBehaviorSubject.h @@ -0,0 +1,19 @@ +// +// RACBehaviorSubject.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/16/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSubject.h" + + +/// A behavior subject sends the last value it received when it is subscribed to. +@interface RACBehaviorSubject : RACSubject + +/// Creates a new behavior subject with a default value. If it hasn't received +/// any values when it gets subscribed to, it sends the default value. ++ (instancetype)behaviorSubjectWithDefaultValue:(id)value; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBehaviorSubject.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBehaviorSubject.m new file mode 100644 index 00000000..dfda2ac0 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBehaviorSubject.m @@ -0,0 +1,56 @@ +// +// RACBehaviorSubject.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/16/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACBehaviorSubject.h" +#import "RACDisposable.h" +#import "RACScheduler+Private.h" + +@interface RACBehaviorSubject () + +// This property should only be used while synchronized on self. +@property (nonatomic, strong) id currentValue; + +@end + +@implementation RACBehaviorSubject + +#pragma mark Lifecycle + ++ (instancetype)behaviorSubjectWithDefaultValue:(id)value { + RACBehaviorSubject *subject = [self subject]; + subject.currentValue = value; + return subject; +} + +#pragma mark RACSignal + +- (RACDisposable *)subscribe:(id)subscriber { + RACDisposable *subscriptionDisposable = [super subscribe:subscriber]; + + RACDisposable *schedulingDisposable = [RACScheduler.subscriptionScheduler schedule:^{ + @synchronized (self) { + [subscriber sendNext:self.currentValue]; + } + }]; + + return [RACDisposable disposableWithBlock:^{ + [subscriptionDisposable dispose]; + [schedulingDisposable dispose]; + }]; +} + +#pragma mark RACSubscriber + +- (void)sendNext:(id)value { + @synchronized (self) { + self.currentValue = value; + [super sendNext:value]; + } +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBlockTrampoline.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBlockTrampoline.h new file mode 100644 index 00000000..01bf3c6f --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBlockTrampoline.h @@ -0,0 +1,30 @@ +// +// RACBlockTrampoline.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 10/21/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACTuple; + +/// Allows a limited type of dynamic block invocation. +@interface RACBlockTrampoline : NSObject + +/// Invokes the given block with the given arguments. All of the block's +/// argument types must be objects and it must be typed to return an object. +/// +/// At this time, it only supports blocks that take up to 15 arguments. Any more +/// is just cray. +/// +/// block - The block to invoke. Must accept as many arguments as are given in +/// the arguments array. Cannot be nil. +/// arguments - The arguments with which to invoke the block. `RACTupleNil`s will +/// be passed as nils. +/// +/// Returns the return value of invoking the block. ++ (id)invokeBlock:(id)block withArguments:(RACTuple *)arguments; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBlockTrampoline.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBlockTrampoline.m new file mode 100644 index 00000000..07903dd9 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACBlockTrampoline.m @@ -0,0 +1,156 @@ +// +// RACBlockTrampoline.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 10/21/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACBlockTrampoline.h" +#import "RACTuple.h" + +@interface RACBlockTrampoline () +@property (nonatomic, readonly, copy) id block; +@end + +@implementation RACBlockTrampoline + +#pragma mark API + +- (id)initWithBlock:(id)block { + self = [super init]; + if (self == nil) return nil; + + _block = [block copy]; + + return self; +} + ++ (id)invokeBlock:(id)block withArguments:(RACTuple *)arguments { + NSCParameterAssert(block != NULL); + + RACBlockTrampoline *trampoline = [[self alloc] initWithBlock:block]; + return [trampoline invokeWithArguments:arguments]; +} + +- (id)invokeWithArguments:(RACTuple *)arguments { + SEL selector = [self selectorForArgumentCount:arguments.count]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[self methodSignatureForSelector:selector]]; + invocation.selector = selector; + invocation.target = self; + + for (NSUInteger i = 0; i < arguments.count; i++) { + id arg = arguments[i]; + NSInteger argIndex = (NSInteger)(i + 2); + [invocation setArgument:&arg atIndex:argIndex]; + } + + [invocation invoke]; + + __unsafe_unretained id returnVal; + [invocation getReturnValue:&returnVal]; + return returnVal; +} + +- (SEL)selectorForArgumentCount:(NSUInteger)count { + NSCParameterAssert(count > 0); + + switch (count) { + case 0: return NULL; + case 1: return @selector(performWith:); + case 2: return @selector(performWith::); + case 3: return @selector(performWith:::); + case 4: return @selector(performWith::::); + case 5: return @selector(performWith:::::); + case 6: return @selector(performWith::::::); + case 7: return @selector(performWith:::::::); + case 8: return @selector(performWith::::::::); + case 9: return @selector(performWith:::::::::); + case 10: return @selector(performWith::::::::::); + case 11: return @selector(performWith:::::::::::); + case 12: return @selector(performWith::::::::::::); + case 13: return @selector(performWith:::::::::::::); + case 14: return @selector(performWith::::::::::::::); + case 15: return @selector(performWith:::::::::::::::); + } + + NSCAssert(NO, @"The argument count is too damn high! Only blocks of up to 15 arguments are currently supported."); + return NULL; +} + +- (id)performWith:(id)obj1 { + id (^block)(id) = self.block; + return block(obj1); +} + +- (id)performWith:(id)obj1 :(id)obj2 { + id (^block)(id, id) = self.block; + return block(obj1, obj2); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 { + id (^block)(id, id, id) = self.block; + return block(obj1, obj2, obj3); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 { + id (^block)(id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 { + id (^block)(id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 :(id)obj6 { + id (^block)(id, id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5, obj6); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 :(id)obj6 :(id)obj7 { + id (^block)(id, id, id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5, obj6, obj7); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 :(id)obj6 :(id)obj7 :(id)obj8 { + id (^block)(id, id, id, id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 :(id)obj6 :(id)obj7 :(id)obj8 :(id)obj9 { + id (^block)(id, id, id, id, id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 :(id)obj6 :(id)obj7 :(id)obj8 :(id)obj9 :(id)obj10 { + id (^block)(id, id, id, id, id, id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9, obj10); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 :(id)obj6 :(id)obj7 :(id)obj8 :(id)obj9 :(id)obj10 :(id)obj11 { + id (^block)(id, id, id, id, id, id, id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9, obj10, obj11); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 :(id)obj6 :(id)obj7 :(id)obj8 :(id)obj9 :(id)obj10 :(id)obj11 :(id)obj12 { + id (^block)(id, id, id, id, id, id, id, id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9, obj10, obj11, obj12); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 :(id)obj6 :(id)obj7 :(id)obj8 :(id)obj9 :(id)obj10 :(id)obj11 :(id)obj12 :(id)obj13 { + id (^block)(id, id, id, id, id, id, id, id, id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9, obj10, obj11, obj12, obj13); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 :(id)obj6 :(id)obj7 :(id)obj8 :(id)obj9 :(id)obj10 :(id)obj11 :(id)obj12 :(id)obj13 :(id)obj14 { + id (^block)(id, id, id, id, id, id, id, id, id, id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9, obj10, obj11, obj12, obj13, obj14); +} + +- (id)performWith:(id)obj1 :(id)obj2 :(id)obj3 :(id)obj4 :(id)obj5 :(id)obj6 :(id)obj7 :(id)obj8 :(id)obj9 :(id)obj10 :(id)obj11 :(id)obj12 :(id)obj13 :(id)obj14 :(id)obj15 { + id (^block)(id, id, id, id, id, id, id, id, id, id, id, id, id, id, id) = self.block; + return block(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9, obj10, obj11, obj12, obj13, obj14, obj15); +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACChannel.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACChannel.h new file mode 100644 index 00000000..ef1d6f1b --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACChannel.h @@ -0,0 +1,70 @@ +// +// RACChannel.h +// ReactiveCocoa +// +// Created by Uri Baghin on 01/01/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACSignal.h" +#import "RACSubscriber.h" + +@class RACChannelTerminal; + +/// A two-way channel. +/// +/// Conceptually, RACChannel can be thought of as a bidirectional connection, +/// composed of two controllable signals that work in parallel. +/// +/// For example, when connecting between a view and a model: +/// +/// Model View +/// `leadingTerminal` ------> `followingTerminal` +/// `leadingTerminal` <------ `followingTerminal` +/// +/// The initial value of the model and all future changes to it are _sent on_ the +/// `leadingTerminal`, and _received by_ subscribers of the `followingTerminal`. +/// +/// Likewise, whenever the user changes the value of the view, that value is sent +/// on the `followingTerminal`, and received in the model from the +/// `leadingTerminal`. However, the initial value of the view is not received +/// from the `leadingTerminal` (only future changes). +@interface RACChannel : NSObject + +/// The terminal which "leads" the channel, by sending its latest value +/// immediately to new subscribers of the `followingTerminal`. +/// +/// New subscribers to this terminal will not receive a starting value, but will +/// receive all future values that are sent to the `followingTerminal`. +@property (nonatomic, strong, readonly) RACChannelTerminal *leadingTerminal; + +/// The terminal which "follows" the lead of the other terminal, only sending +/// _future_ values to the subscribers of the `leadingTerminal`. +/// +/// The latest value sent to the `leadingTerminal` (if any) will be sent +/// immediately to new subscribers of this terminal, and then all future values +/// as well. +@property (nonatomic, strong, readonly) RACChannelTerminal *followingTerminal; + +@end + +/// Represents one end of a RACChannel. +/// +/// An terminal is similar to a socket or pipe -- it represents one end of +/// a connection (the RACChannel, in this case). Values sent to this terminal +/// will _not_ be received by its subscribers. Instead, the values will be sent +/// to the subscribers of the RACChannel's _other_ terminal. +/// +/// For example, when using the `followingTerminal`, _sent_ values can only be +/// _received_ from the `leadingTerminal`, and vice versa. +/// +/// To make it easy to terminate a RACChannel, `error` and `completed` events +/// sent to either terminal will be received by the subscribers of _both_ +/// terminals. +/// +/// Do not instantiate this class directly. Create a RACChannel instead. +@interface RACChannelTerminal : RACSignal + +- (id)init __attribute__((unavailable("Instantiate a RACChannel instead"))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACChannel.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACChannel.m new file mode 100644 index 00000000..5aae48d5 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACChannel.m @@ -0,0 +1,91 @@ +// +// RACChannel.m +// ReactiveCocoa +// +// Created by Uri Baghin on 01/01/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACChannel.h" +#import "RACDisposable.h" +#import "RACReplaySubject.h" +#import "RACSignal+Operations.h" +#import "RACUnit.h" + +@interface RACChannelTerminal () + +// The values for this terminal. +@property (nonatomic, strong, readonly) RACSignal *values; + +// A subscriber will will send values to the other terminal. +@property (nonatomic, strong, readonly) id otherTerminal; + +- (id)initWithValues:(RACSignal *)values otherTerminal:(id)otherTerminal; + +@end + +@implementation RACChannel + +- (id)init { + self = [super init]; + if (self == nil) return nil; + + // We don't want any starting value from the leadingSubject, but we do want + // error and completion to be replayed. + RACReplaySubject *leadingSubject = [[RACReplaySubject replaySubjectWithCapacity:0] setNameWithFormat:@"leadingSubject"]; + RACReplaySubject *followingSubject = [[RACReplaySubject replaySubjectWithCapacity:1] setNameWithFormat:@"followingSubject"]; + + // Propagate errors and completion to everything. + [[leadingSubject ignoreValues] subscribe:followingSubject]; + [[followingSubject ignoreValues] subscribe:leadingSubject]; + + _leadingTerminal = [[[RACChannelTerminal alloc] initWithValues:leadingSubject otherTerminal:followingSubject] setNameWithFormat:@"leadingTerminal"]; + _followingTerminal = [[[RACChannelTerminal alloc] initWithValues:followingSubject otherTerminal:leadingSubject] setNameWithFormat:@"followingTerminal"]; + + return self; +} + +@end + +@implementation RACChannelTerminal + +#pragma mark Lifecycle + +- (id)initWithValues:(RACSignal *)values otherTerminal:(id)otherTerminal { + NSCParameterAssert(values != nil); + NSCParameterAssert(otherTerminal != nil); + + self = [super init]; + if (self == nil) return nil; + + _values = values; + _otherTerminal = otherTerminal; + + return self; +} + +#pragma mark RACSignal + +- (RACDisposable *)subscribe:(id)subscriber { + return [self.values subscribe:subscriber]; +} + +#pragma mark + +- (void)sendNext:(id)value { + [self.otherTerminal sendNext:value]; +} + +- (void)sendError:(NSError *)error { + [self.otherTerminal sendError:error]; +} + +- (void)sendCompleted { + [self.otherTerminal sendCompleted]; +} + +- (void)didSubscribeWithDisposable:(RACDisposable *)disposable { + [self.otherTerminal didSubscribeWithDisposable:disposable]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCommand.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCommand.h new file mode 100644 index 00000000..6fefa6b1 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCommand.h @@ -0,0 +1,123 @@ +// +// RACCommand.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/3/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +/// The domain for errors originating within `RACCommand`. +extern NSString * const RACCommandErrorDomain; + +/// -execute: was invoked while the command was disabled. +extern const NSInteger RACCommandErrorNotEnabled; + +/// A `userInfo` key for an error, associated with the `RACCommand` that the +/// error originated from. +/// +/// This is included only when the error code is `RACCommandErrorNotEnabled`. +extern NSString * const RACUnderlyingCommandErrorKey; + +/// A command is a signal triggered in response to some action, typically +/// UI-related. +@interface RACCommand : NSObject + +/// A signal of the signals returned by successful invocations of -execute: +/// (i.e., while the receiver is `enabled`). +/// +/// Errors will be automatically caught upon the inner signals, and sent upon +/// `errors` instead. If you _want_ to receive inner errors, use -execute: or +/// -[RACSignal materialize]. +/// +/// Only executions that begin _after_ subscription will be sent upon this +/// signal. All inner signals will arrive upon the main thread. +@property (nonatomic, strong, readonly) RACSignal *executionSignals; + +/// A signal of whether this command is currently executing. +/// +/// This will send YES whenever -execute: is invoked and the created signal has +/// not yet terminated. Once all executions have terminated, `executing` will +/// send NO. +/// +/// This signal will send its current value upon subscription, and then all +/// future values on the main thread. +@property (nonatomic, strong, readonly) RACSignal *executing; + +/// A signal of whether this command is able to execute. +/// +/// This will send NO if: +/// +/// - The command was created with an `enabledSignal`, and NO is sent upon that +/// signal, or +/// - `allowsConcurrentExecution` is NO and the command has started executing. +/// +/// Once the above conditions are no longer met, the signal will send YES. +/// +/// This signal will send its current value upon subscription, and then all +/// future values on the main thread. +@property (nonatomic, strong, readonly) RACSignal *enabled; + +/// Forwards any errors that occur within signals returned by -execute:. +/// +/// When an error occurs on a signal returned from -execute:, this signal will +/// send the associated NSError value as a `next` event (since an `error` event +/// would terminate the stream). +/// +/// After subscription, this signal will send all future errors on the main +/// thread. +@property (nonatomic, strong, readonly) RACSignal *errors; + +/// Whether the command allows multiple executions to proceed concurrently. +/// +/// The default value for this property is NO. +@property (atomic, assign) BOOL allowsConcurrentExecution; + +/// Invokes -initWithSignalBlock:enabled: with a nil `enabledSignal`. +- (id)initWithSignalBlock:(RACSignal * (^)(id input))signalBlock; + +/// Initializes a command that is conditionally enabled. +/// +/// This is the designated initializer for this class. +/// +/// enabledSignal - A signal of BOOLs which indicate whether the command should +/// be enabled. `enabled` will be based on the latest value sent +/// from this signal. Before any values are sent, `enabled` will +/// default to YES. This argument may be nil. +/// signalBlock - A block which will map each input value (passed to -execute:) +/// to a signal of work. The returned signal will be multicasted +/// to a replay subject, sent on `executionSignals`, then +/// subscribed to synchronously. Neither the block nor the +/// returned signal may be nil. +- (id)initWithEnabled:(RACSignal *)enabledSignal signalBlock:(RACSignal * (^)(id input))signalBlock; + +/// If the receiver is enabled, this method will: +/// +/// 1. Invoke the `signalBlock` given at the time of initialization. +/// 2. Multicast the returned signal to a RACReplaySubject. +/// 3. Send the multicasted signal on `executionSignals`. +/// 4. Subscribe (connect) to the original signal on the main thread. +/// +/// input - The input value to pass to the receiver's `signalBlock`. This may be +/// nil. +/// +/// Returns the multicasted signal, after subscription. If the receiver is not +/// enabled, returns a signal that will send an error with code +/// RACCommandErrorNotEnabled. +- (RACSignal *)execute:(id)input; + +@end + +@interface RACCommand (Unavailable) + +@property (atomic, readonly) BOOL canExecute __attribute__((unavailable("Use the 'enabled' signal instead"))); + ++ (instancetype)command __attribute__((unavailable("Use -initWithSignalBlock: instead"))); ++ (instancetype)commandWithCanExecuteSignal:(RACSignal *)canExecuteSignal __attribute__((unavailable("Use -initWithEnabled:signalBlock: instead"))); +- (id)initWithCanExecuteSignal:(RACSignal *)canExecuteSignal __attribute__((unavailable("Use -initWithEnabled:signalBlock: instead"))); +- (RACSignal *)addSignalBlock:(RACSignal * (^)(id value))signalBlock __attribute__((unavailable("Pass the signalBlock to -initWithSignalBlock: instead"))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCommand.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCommand.m new file mode 100644 index 00000000..36527b41 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCommand.m @@ -0,0 +1,273 @@ +// +// RACCommand.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/3/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACCommand.h" +#import "RACEXTScope.h" +#import "NSArray+RACSequenceAdditions.h" +#import "NSObject+RACDeallocating.h" +#import "NSObject+RACDescription.h" +#import "NSObject+RACPropertySubscribing.h" +#import "RACMulticastConnection.h" +#import "RACReplaySubject.h" +#import "RACScheduler.h" +#import "RACSequence.h" +#import "RACSerialDisposable.h" +#import "RACSignal+Operations.h" +#import + +NSString * const RACCommandErrorDomain = @"RACCommandErrorDomain"; +NSString * const RACUnderlyingCommandErrorKey = @"RACUnderlyingCommandErrorKey"; + +const NSInteger RACCommandErrorNotEnabled = 1; + +@interface RACCommand () { + // The mutable array backing `activeExecutionSignals`. + // + // This should only be used while synchronized on `self`. + NSMutableArray *_activeExecutionSignals; + + // Atomic backing variable for `allowsConcurrentExecution`. + volatile uint32_t _allowsConcurrentExecution; +} + +// An array of signals representing in-flight executions, in the order they +// began. +// +// This property is KVO-compliant. +@property (atomic, copy, readonly) NSArray *activeExecutionSignals; + +// `enabled`, but without a hop to the main thread. +// +// Values from this signal may arrive on any thread. +@property (nonatomic, strong, readonly) RACSignal *immediateEnabled; + +// The signal block that the receiver was initialized with. +@property (nonatomic, copy, readonly) RACSignal * (^signalBlock)(id input); + +// Improves the performance of KVO on the receiver. +// +// See the documentation for for more information. +@property (atomic) void *observationInfo; + +// Adds a signal to `activeExecutionSignals` and generates a KVO notification. +- (void)addActiveExecutionSignal:(RACSignal *)signal; + +// Removes a signal from `activeExecutionSignals` and generates a KVO +// notification. +- (void)removeActiveExecutionSignal:(RACSignal *)signal; + +@end + +@implementation RACCommand + +#pragma mark Properties + +- (BOOL)allowsConcurrentExecution { + return _allowsConcurrentExecution != 0; +} + +- (void)setAllowsConcurrentExecution:(BOOL)allowed { + [self willChangeValueForKey:@keypath(self.allowsConcurrentExecution)]; + + if (allowed) { + OSAtomicOr32Barrier(1, &_allowsConcurrentExecution); + } else { + OSAtomicAnd32Barrier(0, &_allowsConcurrentExecution); + } + + [self didChangeValueForKey:@keypath(self.allowsConcurrentExecution)]; +} + +- (NSArray *)activeExecutionSignals { + @synchronized (self) { + return [_activeExecutionSignals copy]; + } +} + +- (void)addActiveExecutionSignal:(RACSignal *)signal { + NSCParameterAssert([signal isKindOfClass:RACSignal.class]); + + @synchronized (self) { + // The KVO notification has to be generated while synchronized, because + // it depends on the index remaining consistent. + NSIndexSet *indexes = [NSIndexSet indexSetWithIndex:_activeExecutionSignals.count]; + [self willChange:NSKeyValueChangeInsertion valuesAtIndexes:indexes forKey:@keypath(self.activeExecutionSignals)]; + [_activeExecutionSignals addObject:signal]; + [self didChange:NSKeyValueChangeInsertion valuesAtIndexes:indexes forKey:@keypath(self.activeExecutionSignals)]; + } +} + +- (void)removeActiveExecutionSignal:(RACSignal *)signal { + NSCParameterAssert([signal isKindOfClass:RACSignal.class]); + + @synchronized (self) { + // The indexes have to be calculated and the notification generated + // while synchronized, because they depend on the indexes remaining + // consistent. + NSIndexSet *indexes = [_activeExecutionSignals indexesOfObjectsPassingTest:^ BOOL (RACSignal *obj, NSUInteger index, BOOL *stop) { + return obj == signal; + }]; + + if (indexes.count == 0) return; + + [self willChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@keypath(self.activeExecutionSignals)]; + [_activeExecutionSignals removeObjectsAtIndexes:indexes]; + [self didChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@keypath(self.activeExecutionSignals)]; + } +} + +#pragma mark Lifecycle + +- (id)init { + NSCAssert(NO, @"Use -initWithSignalBlock: instead"); + return nil; +} + +- (id)initWithSignalBlock:(RACSignal * (^)(id input))signalBlock { + return [self initWithEnabled:nil signalBlock:signalBlock]; +} + +- (id)initWithEnabled:(RACSignal *)enabledSignal signalBlock:(RACSignal * (^)(id input))signalBlock { + NSCParameterAssert(signalBlock != nil); + + self = [super init]; + if (self == nil) return nil; + + _activeExecutionSignals = [[NSMutableArray alloc] init]; + _signalBlock = [signalBlock copy]; + + // A signal of additions to `activeExecutionSignals`. + RACSignal *newActiveExecutionSignals = [[[[[self + rac_valuesAndChangesForKeyPath:@keypath(self.activeExecutionSignals) options:NSKeyValueObservingOptionNew observer:nil] + reduceEach:^(id _, NSDictionary *change) { + NSArray *signals = change[NSKeyValueChangeNewKey]; + if (signals == nil) return [RACSignal empty]; + + return [signals.rac_sequence signalWithScheduler:RACScheduler.immediateScheduler]; + }] + concat] + publish] + autoconnect]; + + _executionSignals = [[[newActiveExecutionSignals + map:^(RACSignal *signal) { + return [signal catchTo:[RACSignal empty]]; + }] + deliverOn:RACScheduler.mainThreadScheduler] + setNameWithFormat:@"%@ -executionSignals", self]; + + // `errors` needs to be multicasted so that it picks up all + // `activeExecutionSignals` that are added. + // + // In other words, if someone subscribes to `errors` _after_ an execution + // has started, it should still receive any error from that execution. + RACMulticastConnection *errorsConnection = [[[newActiveExecutionSignals + flattenMap:^(RACSignal *signal) { + return [[signal + ignoreValues] + catch:^(NSError *error) { + return [RACSignal return:error]; + }]; + }] + deliverOn:RACScheduler.mainThreadScheduler] + publish]; + + _errors = [errorsConnection.signal setNameWithFormat:@"%@ -errors", self]; + [errorsConnection connect]; + + RACSignal *immediateExecuting = [RACObserve(self, activeExecutionSignals) map:^(NSArray *activeSignals) { + return @(activeSignals.count > 0); + }]; + + _executing = [[[[[immediateExecuting + deliverOn:RACScheduler.mainThreadScheduler] + // This is useful before the first value arrives on the main thread. + startWith:@NO] + distinctUntilChanged] + replayLast] + setNameWithFormat:@"%@ -executing", self]; + + RACSignal *moreExecutionsAllowed = [RACSignal + if:RACObserve(self, allowsConcurrentExecution) + then:[RACSignal return:@YES] + else:[immediateExecuting not]]; + + if (enabledSignal == nil) { + enabledSignal = [RACSignal return:@YES]; + } else { + enabledSignal = [[[enabledSignal + startWith:@YES] + takeUntil:self.rac_willDeallocSignal] + replayLast]; + } + + _immediateEnabled = [[RACSignal + combineLatest:@[ enabledSignal, moreExecutionsAllowed ]] + and]; + + _enabled = [[[[[self.immediateEnabled + take:1] + concat:[[self.immediateEnabled skip:1] deliverOn:RACScheduler.mainThreadScheduler]] + distinctUntilChanged] + replayLast] + setNameWithFormat:@"%@ -enabled", self]; + + return self; +} + +#pragma mark Execution + +- (RACSignal *)execute:(id)input { + // `immediateEnabled` is guaranteed to send a value upon subscription, so + // -first is acceptable here. + BOOL enabled = [[self.immediateEnabled first] boolValue]; + if (!enabled) { + NSError *error = [NSError errorWithDomain:RACCommandErrorDomain code:RACCommandErrorNotEnabled userInfo:@{ + NSLocalizedDescriptionKey: NSLocalizedString(@"The command is disabled and cannot be executed", nil), + RACUnderlyingCommandErrorKey: self + }]; + + return [RACSignal error:error]; + } + + RACSignal *signal = self.signalBlock(input); + NSCAssert(signal != nil, @"nil signal returned from signal block for value: %@", input); + + // We subscribe to the signal on the main thread so that it occurs _after_ + // -addActiveExecutionSignal: completes below. + // + // This means that `executing` and `enabled` will send updated values before + // the signal actually starts performing work. + RACMulticastConnection *connection = [[signal + subscribeOn:RACScheduler.mainThreadScheduler] + multicast:[RACReplaySubject subject]]; + + @weakify(self); + + [self addActiveExecutionSignal:connection.signal]; + [connection.signal subscribeError:^(NSError *error) { + @strongify(self); + [self removeActiveExecutionSignal:connection.signal]; + } completed:^{ + @strongify(self); + [self removeActiveExecutionSignal:connection.signal]; + }]; + + [connection connect]; + return [connection.signal setNameWithFormat:@"%@ -execute: %@", self, [input rac_description]]; +} + +#pragma mark NSKeyValueObserving + ++ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key { + // Generate all KVO notifications manually to avoid the performance impact + // of unnecessary swizzling. + return NO; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposable.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposable.h new file mode 100644 index 00000000..bb25f7d2 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposable.h @@ -0,0 +1,48 @@ +// +// RACCompoundDisposable.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/30/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACDisposable.h" + +/// A disposable of disposables. When it is disposed, it disposes of all its +/// contained disposables. +/// +/// If -addDisposable: is called after the compound disposable has been disposed +/// of, the given disposable is immediately disposed. This allows a compound +/// disposable to act as a stand-in for a disposable that will be delivered +/// asynchronously. +@interface RACCompoundDisposable : RACDisposable + +/// Creates and returns a new compound disposable. ++ (instancetype)compoundDisposable; + +/// Creates and returns a new compound disposable containing the given +/// disposables. ++ (instancetype)compoundDisposableWithDisposables:(NSArray *)disposables; + +/// Adds the given disposable. If the receiving disposable has already been +/// disposed of, the given disposable is disposed immediately. +/// +/// This method is thread-safe. +/// +/// disposable - The disposable to add. This may be nil, in which case nothing +/// happens. +- (void)addDisposable:(RACDisposable *)disposable; + +/// Removes the specified disposable from the compound disposable (regardless of +/// its disposed status), or does nothing if it's not in the compound disposable. +/// +/// This is mainly useful for limiting the memory usage of the compound +/// disposable for long-running operations. +/// +/// This method is thread-safe. +/// +/// disposable - The disposable to remove. This argument may be nil (to make the +/// use of weak references easier). +- (void)removeDisposable:(RACDisposable *)disposable; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposable.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposable.m new file mode 100644 index 00000000..3b0471cc --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposable.m @@ -0,0 +1,239 @@ +// +// RACCompoundDisposable.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/30/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACCompoundDisposable.h" +#import "RACCompoundDisposableProvider.h" +#import + +// The number of child disposables for which space will be reserved directly in +// `RACCompoundDisposable`. +// +// This number has been empirically determined to provide a good tradeoff +// between performance, memory usage, and `RACCompoundDisposable` instance size +// in a moderately complex GUI application. +// +// Profile any change! +#define RACCompoundDisposableInlineCount 2 + +static CFMutableArrayRef RACCreateDisposablesArray(void) { + // Compare values using only pointer equality. + CFArrayCallBacks callbacks = kCFTypeArrayCallBacks; + callbacks.equal = NULL; + + return CFArrayCreateMutable(NULL, 0, &callbacks); +} + +@interface RACCompoundDisposable () { + // Used for synchronization. + OSSpinLock _spinLock; + + #if RACCompoundDisposableInlineCount + // A fast array to the first N of the receiver's disposables. + // + // Once this is full, `_disposables` will be created and used for additional + // disposables. + // + // This array should only be manipulated while _spinLock is held. + RACDisposable *_inlineDisposables[RACCompoundDisposableInlineCount]; + #endif + + // Contains the receiver's disposables. + // + // This array should only be manipulated while _spinLock is held. If + // `_disposed` is YES, this may be NULL. + CFMutableArrayRef _disposables; + + // Whether the receiver has already been disposed. + // + // This ivar should only be accessed while _spinLock is held. + BOOL _disposed; +} + +@end + +@implementation RACCompoundDisposable + +#pragma mark Properties + +- (BOOL)isDisposed { + OSSpinLockLock(&_spinLock); + BOOL disposed = _disposed; + OSSpinLockUnlock(&_spinLock); + + return disposed; +} + +#pragma mark Lifecycle + ++ (instancetype)compoundDisposable { + return [[self alloc] initWithDisposables:nil]; +} + ++ (instancetype)compoundDisposableWithDisposables:(NSArray *)disposables { + return [[self alloc] initWithDisposables:disposables]; +} + +- (id)initWithDisposables:(NSArray *)otherDisposables { + self = [self init]; + if (self == nil) return nil; + + #if RACCompoundDisposableInlineCount + [otherDisposables enumerateObjectsUsingBlock:^(RACDisposable *disposable, NSUInteger index, BOOL *stop) { + _inlineDisposables[index] = disposable; + + // Stop after this iteration if we've reached the end of the inlined + // array. + if (index == RACCompoundDisposableInlineCount - 1) *stop = YES; + }]; + #endif + + if (otherDisposables.count > RACCompoundDisposableInlineCount) { + _disposables = RACCreateDisposablesArray(); + + CFRange range = CFRangeMake(RACCompoundDisposableInlineCount, (CFIndex)otherDisposables.count - RACCompoundDisposableInlineCount); + CFArrayAppendArray(_disposables, (__bridge CFArrayRef)otherDisposables, range); + } + + return self; +} + +- (id)initWithBlock:(void (^)(void))block { + RACDisposable *disposable = [RACDisposable disposableWithBlock:block]; + return [self initWithDisposables:@[ disposable ]]; +} + +- (void)dealloc { + #if RACCompoundDisposableInlineCount + for (unsigned i = 0; i < RACCompoundDisposableInlineCount; i++) { + _inlineDisposables[i] = nil; + } + #endif + + if (_disposables != NULL) { + CFRelease(_disposables); + _disposables = NULL; + } +} + +#pragma mark Addition and Removal + +- (void)addDisposable:(RACDisposable *)disposable { + NSCParameterAssert(disposable != self); + if (disposable == nil) return; + + BOOL shouldDispose = NO; + + OSSpinLockLock(&_spinLock); + { + if (_disposed) { + shouldDispose = YES; + } else { + #if RACCompoundDisposableInlineCount + for (unsigned i = 0; i < RACCompoundDisposableInlineCount; i++) { + if (_inlineDisposables[i] == nil) { + _inlineDisposables[i] = disposable; + goto foundSlot; + } + } + #endif + + if (_disposables == NULL) _disposables = RACCreateDisposablesArray(); + CFArrayAppendValue(_disposables, (__bridge void *)disposable); + + if (RACCOMPOUNDDISPOSABLE_ADDED_ENABLED()) { + RACCOMPOUNDDISPOSABLE_ADDED(self.description.UTF8String, disposable.description.UTF8String, CFArrayGetCount(_disposables) + RACCompoundDisposableInlineCount); + } + + #if RACCompoundDisposableInlineCount + foundSlot:; + #endif + } + } + OSSpinLockUnlock(&_spinLock); + + // Performed outside of the lock in case the compound disposable is used + // recursively. + if (shouldDispose) [disposable dispose]; +} + +- (void)removeDisposable:(RACDisposable *)disposable { + if (disposable == nil) return; + + OSSpinLockLock(&_spinLock); + { + if (!_disposed) { + #if RACCompoundDisposableInlineCount + for (unsigned i = 0; i < RACCompoundDisposableInlineCount; i++) { + if (_inlineDisposables[i] == disposable) _inlineDisposables[i] = nil; + } + #endif + + if (_disposables != NULL) { + CFIndex count = CFArrayGetCount(_disposables); + for (CFIndex i = count - 1; i >= 0; i--) { + const void *item = CFArrayGetValueAtIndex(_disposables, i); + if (item == (__bridge void *)disposable) { + CFArrayRemoveValueAtIndex(_disposables, i); + } + } + + if (RACCOMPOUNDDISPOSABLE_REMOVED_ENABLED()) { + RACCOMPOUNDDISPOSABLE_REMOVED(self.description.UTF8String, disposable.description.UTF8String, CFArrayGetCount(_disposables) + RACCompoundDisposableInlineCount); + } + } + } + } + OSSpinLockUnlock(&_spinLock); +} + +#pragma mark RACDisposable + +static void disposeEach(const void *value, void *context) { + RACDisposable *disposable = (__bridge id)value; + [disposable dispose]; +} + +- (void)dispose { + #if RACCompoundDisposableInlineCount + RACDisposable *inlineCopy[RACCompoundDisposableInlineCount]; + #endif + + CFArrayRef remainingDisposables = NULL; + + OSSpinLockLock(&_spinLock); + { + _disposed = YES; + + #if RACCompoundDisposableInlineCount + for (unsigned i = 0; i < RACCompoundDisposableInlineCount; i++) { + inlineCopy[i] = _inlineDisposables[i]; + _inlineDisposables[i] = nil; + } + #endif + + remainingDisposables = _disposables; + _disposables = NULL; + } + OSSpinLockUnlock(&_spinLock); + + #if RACCompoundDisposableInlineCount + // Dispose outside of the lock in case the compound disposable is used + // recursively. + for (unsigned i = 0; i < RACCompoundDisposableInlineCount; i++) { + [inlineCopy[i] dispose]; + } + #endif + + if (remainingDisposables == NULL) return; + + CFIndex count = CFArrayGetCount(remainingDisposables); + CFArrayApplyFunction(remainingDisposables, CFRangeMake(0, count), &disposeEach, NULL); + CFRelease(remainingDisposables); +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposableProvider.d b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposableProvider.d new file mode 100644 index 00000000..847db19b --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACCompoundDisposableProvider.d @@ -0,0 +1,4 @@ +provider RACCompoundDisposable { + probe added(char *compoundDisposable, char *disposable, long newTotal); + probe removed(char *compoundDisposable, char *disposable, long newTotal); +}; diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDelegateProxy.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDelegateProxy.h new file mode 100644 index 00000000..7278f2b0 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDelegateProxy.h @@ -0,0 +1,28 @@ +// +// RACDelegateProxy.h +// ReactiveCocoa +// +// Created by Cody Krieger on 5/19/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +/// A delegate object suitable for using -rac_signalForSelector:fromProtocol: +/// upon. +@interface RACDelegateProxy : NSObject + +/// The delegate to which messages should be forwarded if not handled by +/// any -signalForSelector: applications. +@property (nonatomic, unsafe_unretained) id rac_proxiedDelegate; + +/// Creates a delegate proxy capable of responding to selectors from `protocol`. +- (instancetype)initWithProtocol:(Protocol *)protocol; + +/// Calls -rac_signalForSelector:fromProtocol: using the `protocol` specified +/// during initialization. +- (RACSignal *)signalForSelector:(SEL)selector; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDelegateProxy.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDelegateProxy.m new file mode 100644 index 00000000..1d4fcbcd --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDelegateProxy.m @@ -0,0 +1,78 @@ +// +// RACDelegateProxy.m +// ReactiveCocoa +// +// Created by Cody Krieger on 5/19/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACDelegateProxy.h" +#import "RACSignal+Operations.h" +#import "NSObject+RACSelectorSignal.h" +#import "NSObject+RACDeallocating.h" +#import + +@interface RACDelegateProxy () { + // Declared as an ivar to avoid method naming conflicts. + Protocol *_protocol; +} + +@end + +@implementation RACDelegateProxy + +#pragma mark Lifecycle + +- (instancetype)initWithProtocol:(Protocol *)protocol { + NSCParameterAssert(protocol != NULL); + + self = [super init]; + if (self == nil) return nil; + + class_addProtocol(self.class, protocol); + + _protocol = protocol; + + return self; +} + +#pragma mark API + +- (RACSignal *)signalForSelector:(SEL)selector { + return [self rac_signalForSelector:selector fromProtocol:_protocol]; +} + +#pragma mark NSObject + +- (BOOL)isProxy { + return YES; +} + +- (void)forwardInvocation:(NSInvocation *)invocation { + [invocation invokeWithTarget:self.rac_proxiedDelegate]; +} + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { + // Look for the selector as an optional instance method. + struct objc_method_description methodDescription = protocol_getMethodDescription(_protocol, selector, NO, YES); + + if (methodDescription.name == NULL) { + // Then fall back to looking for a required instance + // method. + methodDescription = protocol_getMethodDescription(_protocol, selector, YES, YES); + if (methodDescription.name == NULL) return [super methodSignatureForSelector:selector]; + } + + return [NSMethodSignature signatureWithObjCTypes:methodDescription.types]; +} + +- (BOOL)respondsToSelector:(SEL)selector { + // Add the delegate to the autorelease pool, so it doesn't get deallocated + // between this method call and -forwardInvocation:. + __autoreleasing id delegate = self.rac_proxiedDelegate; + if ([delegate respondsToSelector:selector]) return YES; + + return [super respondsToSelector:selector]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.h new file mode 100644 index 00000000..c044fea6 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.h @@ -0,0 +1,36 @@ +// +// RACDisposable.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/16/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACScopedDisposable; + + +/// A disposable encapsulates the work necessary to tear down and cleanup a +/// subscription. +@interface RACDisposable : NSObject + +/// Whether the receiver has been disposed. +/// +/// Use of this property is discouraged, since it may be set to `YES` +/// concurrently at any time. +/// +/// This property is not KVO-compliant. +@property (atomic, assign, getter = isDisposed, readonly) BOOL disposed; + ++ (instancetype)disposableWithBlock:(void (^)(void))block; + +/// Performs the disposal work. Can be called multiple times, though sebsequent +/// calls won't do anything. +- (void)dispose; + +/// Returns a new disposable which will dispose of this disposable when it gets +/// dealloc'd. +- (RACScopedDisposable *)asScopedDisposable; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.m new file mode 100644 index 00000000..08eceb22 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDisposable.m @@ -0,0 +1,92 @@ +// +// RACDisposable.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/16/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACDisposable.h" +#import "RACScopedDisposable.h" +#import + +@interface RACDisposable () { + // A copied block of type void (^)(void) containing the logic for disposal, + // a pointer to `self` if no logic should be performed upon disposal, or + // NULL if the receiver is already disposed. + // + // This should only be used atomically. + void * volatile _disposeBlock; +} + +@end + +@implementation RACDisposable + +#pragma mark Properties + +- (BOOL)isDisposed { + return _disposeBlock == NULL; +} + +#pragma mark Lifecycle + +- (id)init { + self = [super init]; + if (self == nil) return nil; + + _disposeBlock = (__bridge void *)self; + OSMemoryBarrier(); + + return self; +} + +- (id)initWithBlock:(void (^)(void))block { + NSCParameterAssert(block != nil); + + self = [super init]; + if (self == nil) return nil; + + _disposeBlock = (void *)CFBridgingRetain([block copy]); + OSMemoryBarrier(); + + return self; +} + ++ (instancetype)disposableWithBlock:(void (^)(void))block { + return [[self alloc] initWithBlock:block]; +} + +- (void)dealloc { + if (_disposeBlock == NULL || _disposeBlock == (__bridge void *)self) return; + + CFRelease(_disposeBlock); + _disposeBlock = NULL; +} + +#pragma mark Disposal + +- (void)dispose { + void (^disposeBlock)(void) = NULL; + + while (YES) { + void *blockPtr = _disposeBlock; + if (OSAtomicCompareAndSwapPtrBarrier(blockPtr, NULL, &_disposeBlock)) { + if (blockPtr != (__bridge void *)self) { + disposeBlock = CFBridgingRelease(blockPtr); + } + + break; + } + } + + if (disposeBlock != nil) disposeBlock(); +} + +#pragma mark Scoped Disposables + +- (RACScopedDisposable *)asScopedDisposable { + return [RACScopedDisposable scopedDisposableWithDisposable:self]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSequence.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSequence.h new file mode 100644 index 00000000..4bbe4d15 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSequence.h @@ -0,0 +1,20 @@ +// +// RACDynamicSequence.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "RACSequence.h" + +/// Private class that implements a sequence dynamically using blocks. +@interface RACDynamicSequence : RACSequence + +/// Returns a sequence which evaluates `dependencyBlock` only once, the first +/// time either `headBlock` or `tailBlock` is evaluated. The result of +/// `dependencyBlock` will be passed into `headBlock` and `tailBlock` when +/// invoked. ++ (RACSequence *)sequenceWithLazyDependency:(id (^)(void))dependencyBlock headBlock:(id (^)(id dependency))headBlock tailBlock:(RACSequence *(^)(id dependency))tailBlock; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSequence.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSequence.m new file mode 100644 index 00000000..48a977b8 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSequence.m @@ -0,0 +1,197 @@ +// +// RACDynamicSequence.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "RACDynamicSequence.h" +#import + +// Determines how RACDynamicSequences will be deallocated before the next one is +// shifted onto the autorelease pool. +// +// This avoids stack overflows when deallocating long chains of dynamic +// sequences. +#define DEALLOC_OVERFLOW_GUARD 100 + +@interface RACDynamicSequence () { + // The value for the "head" property, if it's been evaluated already. + // + // Because it's legal for head to be nil, this ivar is valid any time + // headBlock is nil. + // + // This ivar should only be accessed while synchronized on self. + id _head; + + // The value for the "tail" property, if it's been evaluated already. + // + // Because it's legal for tail to be nil, this ivar is valid any time + // tailBlock is nil. + // + // This ivar should only be accessed while synchronized on self. + RACSequence *_tail; + + // The result of an evaluated `dependencyBlock`. + // + // This ivar is valid any time `hasDependency` is YES and `dependencyBlock` + // is nil. + // + // This ivar should only be accessed while synchronized on self. + id _dependency; +} + +// A block used to evaluate head. This should be set to nil after `_head` has been +// initialized. +// +// This is marked `strong` instead of `copy` because of some bizarre block +// copying bug. See https://github.com/ReactiveCocoa/ReactiveCocoa/pull/506. +// +// The signature of this block varies based on the value of `hasDependency`: +// +// - If YES, this block is of type `id (^)(id)`. +// - If NO, this block is of type `id (^)(void)`. +// +// This property should only be accessed while synchronized on self. +@property (nonatomic, strong) id headBlock; + +// A block used to evaluate tail. This should be set to nil after `_tail` has been +// initialized. +// +// This is marked `strong` instead of `copy` because of some bizarre block +// copying bug. See https://github.com/ReactiveCocoa/ReactiveCocoa/pull/506. +// +// The signature of this block varies based on the value of `hasDependency`: +// +// - If YES, this block is of type `RACSequence * (^)(id)`. +// - If NO, this block is of type `RACSequence * (^)(void)`. +// +// This property should only be accessed while synchronized on self. +@property (nonatomic, strong) id tailBlock; + +// Whether the receiver was initialized with a `dependencyBlock`. +// +// This property should only be accessed while synchronized on self. +@property (nonatomic, assign) BOOL hasDependency; + +// A dependency which must be evaluated before `headBlock` and `tailBlock`. This +// should be set to nil after `_dependency` and `dependencyBlockExecuted` have +// been set. +// +// This is marked `strong` instead of `copy` because of some bizarre block +// copying bug. See https://github.com/ReactiveCocoa/ReactiveCocoa/pull/506. +// +// This property should only be accessed while synchronized on self. +@property (nonatomic, strong) id (^dependencyBlock)(void); + +@end + +@implementation RACDynamicSequence + +#pragma mark Lifecycle + ++ (RACSequence *)sequenceWithHeadBlock:(id (^)(void))headBlock tailBlock:(RACSequence *(^)(void))tailBlock { + NSCParameterAssert(headBlock != nil); + + RACDynamicSequence *seq = [[RACDynamicSequence alloc] init]; + seq.headBlock = [headBlock copy]; + seq.tailBlock = [tailBlock copy]; + seq.hasDependency = NO; + return seq; +} + ++ (RACSequence *)sequenceWithLazyDependency:(id (^)(void))dependencyBlock headBlock:(id (^)(id dependency))headBlock tailBlock:(RACSequence *(^)(id dependency))tailBlock { + NSCParameterAssert(dependencyBlock != nil); + NSCParameterAssert(headBlock != nil); + + RACDynamicSequence *seq = [[RACDynamicSequence alloc] init]; + seq.headBlock = [headBlock copy]; + seq.tailBlock = [tailBlock copy]; + seq.dependencyBlock = [dependencyBlock copy]; + seq.hasDependency = YES; + return seq; +} + +- (void)dealloc { + static volatile int32_t directDeallocCount = 0; + + if (OSAtomicIncrement32(&directDeallocCount) >= DEALLOC_OVERFLOW_GUARD) { + OSAtomicAdd32(-DEALLOC_OVERFLOW_GUARD, &directDeallocCount); + + // Put this sequence's tail onto the autorelease pool so we stop + // recursing. + __autoreleasing RACSequence *tail __attribute__((unused)) = _tail; + } + + _tail = nil; +} + +#pragma mark RACSequence + +- (id)head { + @synchronized (self) { + id untypedHeadBlock = self.headBlock; + if (untypedHeadBlock == nil) return _head; + + if (self.hasDependency) { + if (self.dependencyBlock != nil) { + _dependency = self.dependencyBlock(); + self.dependencyBlock = nil; + } + + id (^headBlock)(id) = untypedHeadBlock; + _head = headBlock(_dependency); + } else { + id (^headBlock)(void) = untypedHeadBlock; + _head = headBlock(); + } + + self.headBlock = nil; + return _head; + } +} + +- (RACSequence *)tail { + @synchronized (self) { + id untypedTailBlock = self.tailBlock; + if (untypedTailBlock == nil) return _tail; + + if (self.hasDependency) { + if (self.dependencyBlock != nil) { + _dependency = self.dependencyBlock(); + self.dependencyBlock = nil; + } + + RACSequence * (^tailBlock)(id) = untypedTailBlock; + _tail = tailBlock(_dependency); + } else { + RACSequence * (^tailBlock)(void) = untypedTailBlock; + _tail = tailBlock(); + } + + if (_tail.name == nil) _tail.name = self.name; + + self.tailBlock = nil; + return _tail; + } +} + +#pragma mark NSObject + +- (NSString *)description { + id head = @"(unresolved)"; + id tail = @"(unresolved)"; + + @synchronized (self) { + if (self.headBlock == nil) head = _head; + if (self.tailBlock == nil) { + tail = _tail; + if (tail == self) tail = @"(self)"; + } + } + + return [NSString stringWithFormat:@"<%@: %p>{ name = %@, head = %@, tail = %@ }", self.class, self, self.name, head, tail]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSignal.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSignal.h new file mode 100644 index 00000000..d98d486c --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSignal.h @@ -0,0 +1,17 @@ +// +// RACDynamicSignal.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-10. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +// A private `RACSignal` subclasses that implements its subscription behavior +// using a block. +@interface RACDynamicSignal : RACSignal + ++ (RACSignal *)createSignal:(RACDisposable * (^)(id subscriber))didSubscribe; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSignal.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSignal.m new file mode 100644 index 00000000..36cbf4bb --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACDynamicSignal.m @@ -0,0 +1,188 @@ +// +// RACDynamicSignal.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-10. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACDynamicSignal.h" +#import "RACEXTScope.h" +#import "RACPassthroughSubscriber.h" +#import "RACScheduler+Private.h" +#import "RACSubscriber.h" +#import + +// Retains dynamic signals while they wait for subscriptions. +// +// This set must only be used on the main thread. +static CFMutableSetRef RACActiveSignals = nil; + +// A linked list of RACDynamicSignals, used in RACActiveSignalsToCheck. +typedef struct RACSignalList { + CFTypeRef retainedSignal; + struct RACSignalList * restrict next; +} RACSignalList; + +// An atomic queue of signals to check for subscribers. If any signals with zero +// subscribers are found in this queue, they are removed from RACActiveSignals. +static OSQueueHead RACActiveSignalsToCheck = OS_ATOMIC_QUEUE_INIT; + +// Whether RACActiveSignalsToCheck will be enumerated on the next iteration on +// the main run loop. +static volatile uint32_t RACWillCheckActiveSignals = 0; + +@interface RACDynamicSignal () { + // Contains all subscribers to the receiver. + // + // All access to this array must be synchronized using `_subscribersLock`. + NSMutableArray *_subscribers; + + // Synchronizes access to `_subscribers`. + OSSpinLock _subscribersLock; +} + +// The block to invoke for each subscriber. +@property (nonatomic, copy, readonly) RACDisposable * (^didSubscribe)(id subscriber); + +@end + +@implementation RACDynamicSignal + +#pragma mark Lifecycle + ++ (void)initialize { + if (self != RACDynamicSignal.class) return; + + CFSetCallBacks callbacks = kCFTypeSetCallBacks; + + // Use pointer equality and hashes for membership testing. + callbacks.equal = NULL; + callbacks.hash = NULL; + + RACActiveSignals = CFSetCreateMutable(NULL, 0, &callbacks); +} + ++ (RACSignal *)createSignal:(RACDisposable * (^)(id subscriber))didSubscribe { + RACDynamicSignal *signal = [[self alloc] init]; + signal->_didSubscribe = [didSubscribe copy]; + return [signal setNameWithFormat:@"+createSignal:"]; +} + +- (instancetype)init { + self = [super init]; + if (self == nil) return nil; + + // As soon as we're created we're already trying to be released. Such is life. + [self invalidateGlobalRefIfNoNewSubscribersShowUp]; + + return self; +} + +static void RACCheckActiveSignals(void) { + // Clear this flag now, so another thread can re-dispatch to the main queue + // as needed. + OSAtomicAnd32Barrier(0, &RACWillCheckActiveSignals); + + RACSignalList * restrict elem; + + while ((elem = OSAtomicDequeue(&RACActiveSignalsToCheck, offsetof(RACSignalList, next))) != NULL) { + RACDynamicSignal *signal = CFBridgingRelease(elem->retainedSignal); + free(elem); + + if (signal.hasSubscribers) { + // We want to keep the signal around until all its subscribers are done + CFSetAddValue(RACActiveSignals, (__bridge void *)signal); + } else { + CFSetRemoveValue(RACActiveSignals, (__bridge void *)signal); + } + } +} + +- (void)invalidateGlobalRefIfNoNewSubscribersShowUp { + // If no one subscribes in one pass of the main run loop, then we're free to + // go. It's up to the caller to keep us alive if they still want us. + RACSignalList *elem = malloc(sizeof(*elem)); + + // This also serves to retain the signal until the next pass. + elem->retainedSignal = CFBridgingRetain(self); + OSAtomicEnqueue(&RACActiveSignalsToCheck, elem, offsetof(RACSignalList, next)); + + // Not using a barrier because duplicate scheduling isn't erroneous, just + // less optimized. + int32_t willCheck = OSAtomicOr32Orig(1, &RACWillCheckActiveSignals); + + // Only schedule a check if RACWillCheckActiveSignals was 0 before. + if (willCheck == 0) { + dispatch_async(dispatch_get_main_queue(), ^{ + RACCheckActiveSignals(); + }); + } +} + +#pragma mark Managing Subscribers + +- (BOOL)hasSubscribers { + OSSpinLockLock(&_subscribersLock); + BOOL hasSubscribers = _subscribers.count > 0; + OSSpinLockUnlock(&_subscribersLock); + + return hasSubscribers; +} + +- (RACDisposable *)subscribe:(id)subscriber { + NSCParameterAssert(subscriber != nil); + + RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; + subscriber = [[RACPassthroughSubscriber alloc] initWithSubscriber:subscriber signal:self disposable:disposable]; + + OSSpinLockLock(&_subscribersLock); + if (_subscribers == nil) { + _subscribers = [NSMutableArray arrayWithObject:subscriber]; + } else { + [_subscribers addObject:subscriber]; + } + OSSpinLockUnlock(&_subscribersLock); + + @weakify(self); + RACDisposable *defaultDisposable = [RACDisposable disposableWithBlock:^{ + @strongify(self); + if (self == nil) return; + + BOOL stillHasSubscribers = YES; + + OSSpinLockLock(&_subscribersLock); + { + // Since newer subscribers are generally shorter-lived, search + // starting from the end of the list. + NSUInteger index = [_subscribers indexOfObjectWithOptions:NSEnumerationReverse passingTest:^ BOOL (id obj, NSUInteger index, BOOL *stop) { + return obj == subscriber; + }]; + + if (index != NSNotFound) { + [_subscribers removeObjectAtIndex:index]; + stillHasSubscribers = _subscribers.count > 0; + } + } + OSSpinLockUnlock(&_subscribersLock); + + if (!stillHasSubscribers) { + [self invalidateGlobalRefIfNoNewSubscribersShowUp]; + } + }]; + + [disposable addDisposable:defaultDisposable]; + + if (self.didSubscribe != NULL) { + RACDisposable *schedulingDisposable = [RACScheduler.subscriptionScheduler schedule:^{ + RACDisposable *innerDisposable = self.didSubscribe(subscriber); + [disposable addDisposable:innerDisposable]; + }]; + + [disposable addDisposable:schedulingDisposable]; + } + + return disposable; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEagerSequence.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEagerSequence.h new file mode 100644 index 00000000..ac513491 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEagerSequence.h @@ -0,0 +1,14 @@ +// +// RACEagerSequence.h +// ReactiveCocoa +// +// Created by Uri Baghin on 02/01/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACArraySequence.h" + +/// Private class that implements an eager sequence. +@interface RACEagerSequence : RACArraySequence + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEagerSequence.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEagerSequence.m new file mode 100644 index 00000000..f12fbe94 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEagerSequence.m @@ -0,0 +1,66 @@ +// +// RACEagerSequence.m +// ReactiveCocoa +// +// Created by Uri Baghin on 02/01/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACEagerSequence.h" +#import "NSObject+RACDescription.h" +#import "RACArraySequence.h" + +@implementation RACEagerSequence + +#pragma mark RACStream + ++ (instancetype)return:(id)value { + return [[self sequenceWithArray:@[ value ] offset:0] setNameWithFormat:@"+return: %@", [value rac_description]]; +} + +- (instancetype)bind:(RACStreamBindBlock (^)(void))block { + NSCParameterAssert(block != nil); + RACStreamBindBlock bindBlock = block(); + NSArray *currentArray = self.array; + NSMutableArray *resultArray = [NSMutableArray arrayWithCapacity:currentArray.count]; + + for (id value in currentArray) { + BOOL stop = NO; + RACSequence *boundValue = (id)bindBlock(value, &stop); + if (boundValue == nil) break; + + for (id x in boundValue) { + [resultArray addObject:x]; + } + + if (stop) break; + } + + return [[self.class sequenceWithArray:resultArray offset:0] setNameWithFormat:@"[%@] -bind:", self.name]; +} + +- (instancetype)concat:(RACSequence *)sequence { + NSCParameterAssert(sequence != nil); + NSCParameterAssert([sequence isKindOfClass:RACSequence.class]); + + NSArray *array = [self.array arrayByAddingObjectsFromArray:sequence.array]; + return [[self.class sequenceWithArray:array offset:0] setNameWithFormat:@"[%@] -concat: %@", self.name, sequence]; +} + +#pragma mark Extended methods + +- (RACSequence *)eagerSequence { + return self; +} + +- (RACSequence *)lazySequence { + return [RACArraySequence sequenceWithArray:self.array offset:0]; +} + +- (id)foldRightWithStart:(id)start reduce:(id (^)(id, RACSequence *rest))reduce { + return [super foldRightWithStart:start reduce:^(id first, RACSequence *rest) { + return reduce(first, rest.eagerSequence); + }]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySequence.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySequence.h new file mode 100644 index 00000000..664ba384 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySequence.h @@ -0,0 +1,13 @@ +// +// RACEmptySequence.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "RACSequence.h" + +/// Private class representing an empty sequence. +@interface RACEmptySequence : RACSequence +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySequence.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySequence.m new file mode 100644 index 00000000..e4df1507 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySequence.m @@ -0,0 +1,71 @@ +// +// RACEmptySequence.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "RACEmptySequence.h" + +@implementation RACEmptySequence + +#pragma mark Lifecycle + ++ (instancetype)empty { + static id singleton; + static dispatch_once_t pred; + + dispatch_once(&pred, ^{ + singleton = [[self alloc] init]; + }); + + return singleton; +} + +#pragma mark RACSequence + +- (id)head { + return nil; +} + +- (RACSequence *)tail { + return nil; +} + +- (RACSequence *)bind:(RACStreamBindBlock)bindBlock passingThroughValuesFromSequence:(RACSequence *)passthroughSequence { + return passthroughSequence ?: self; +} + +#pragma mark NSCoding + +- (Class)classForCoder { + // Empty sequences should be encoded as themselves, not array sequences. + return self.class; +} + +- (id)initWithCoder:(NSCoder *)coder { + // Return the singleton. + return self.class.empty; +} + +- (void)encodeWithCoder:(NSCoder *)coder { +} + +#pragma mark NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p>{ name = %@ }", self.class, self, self.name]; +} + +- (NSUInteger)hash { + // This hash isn't ideal, but it's better than -[RACSequence hash], which + // would just be zero because we have no head. + return (NSUInteger)(__bridge void *)self; +} + +- (BOOL)isEqual:(RACSequence *)seq { + return (self == seq); +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySignal.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySignal.h new file mode 100644 index 00000000..90b4f00a --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySignal.h @@ -0,0 +1,17 @@ +// +// RACEmptySignal.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-10. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACSignal.h" + +// A private `RACSignal` subclasses that synchronously sends completed to any +// subscribers. +@interface RACEmptySignal : RACSignal + ++ (RACSignal *)empty; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySignal.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySignal.m new file mode 100644 index 00000000..8bc8f41e --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEmptySignal.m @@ -0,0 +1,62 @@ +// +// RACEmptySignal.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-10. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACEmptySignal.h" +#import "RACScheduler+Private.h" +#import "RACSubscriber.h" + +@implementation RACEmptySignal + +#pragma mark Properties + +// Only allow this signal's name to be customized in DEBUG, since it's +// a singleton in release builds (see +empty). +- (void)setName:(NSString *)name { +#ifdef DEBUG + [super setName:name]; +#endif +} + +- (NSString *)name { +#ifdef DEBUG + return super.name; +#else + return @"+empty"; +#endif +} + +#pragma mark Lifecycle + ++ (RACSignal *)empty { +#ifdef DEBUG + // Create multiple instances of this class in DEBUG so users can set custom + // names on each. + return [[[self alloc] init] setNameWithFormat:@"+empty"]; +#else + static id singleton; + static dispatch_once_t pred; + + dispatch_once(&pred, ^{ + singleton = [[self alloc] init]; + }); + + return singleton; +#endif +} + +#pragma mark Subscription + +- (RACDisposable *)subscribe:(id)subscriber { + NSCParameterAssert(subscriber != nil); + + return [RACScheduler.subscriptionScheduler schedule:^{ + [subscriber sendCompleted]; + }]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACErrorSignal.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACErrorSignal.h new file mode 100644 index 00000000..c942f9e3 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACErrorSignal.h @@ -0,0 +1,17 @@ +// +// RACErrorSignal.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-10. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACSignal.h" + +// A private `RACSignal` subclasses that synchronously sends an error to any +// subscribers. +@interface RACErrorSignal : RACSignal + ++ (RACSignal *)error:(NSError *)error; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACErrorSignal.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACErrorSignal.m new file mode 100644 index 00000000..fd6778cb --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACErrorSignal.m @@ -0,0 +1,47 @@ +// +// RACErrorSignal.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-10. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACErrorSignal.h" +#import "RACScheduler+Private.h" +#import "RACSubscriber.h" + +@interface RACErrorSignal () + +// The error to send upon subscription. +@property (nonatomic, strong, readonly) NSError *error; + +@end + +@implementation RACErrorSignal + +#pragma mark Lifecycle + ++ (RACSignal *)error:(NSError *)error { + RACErrorSignal *signal = [[self alloc] init]; + signal->_error = error; + +#ifdef DEBUG + [signal setNameWithFormat:@"+error: %@", error]; +#else + signal.name = @"+error:"; +#endif + + return signal; +} + +#pragma mark Subscription + +- (RACDisposable *)subscribe:(id)subscriber { + NSCParameterAssert(subscriber != nil); + + return [RACScheduler.subscriptionScheduler schedule:^{ + [subscriber sendError:self.error]; + }]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEvent.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEvent.h new file mode 100644 index 00000000..9e64e5a4 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEvent.h @@ -0,0 +1,51 @@ +// +// RACEvent.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-01-07. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +/// Describes the type of a RACEvent. +/// +/// RACEventTypeCompleted - A `completed` event. +/// RACEventTypeError - An `error` event. +/// RACEventTypeNext - A `next` event. +typedef enum : NSUInteger { + RACEventTypeCompleted, + RACEventTypeError, + RACEventTypeNext +} RACEventType; + +/// Represents an event sent by a RACSignal. +/// +/// This corresponds to the `Notification` class in Rx. +@interface RACEvent : NSObject + +/// Returns a singleton RACEvent representing the `completed` event. ++ (instancetype)completedEvent; + +/// Returns a new event of type RACEventTypeError, containing the given error. ++ (instancetype)eventWithError:(NSError *)error; + +/// Returns a new event of type RACEventTypeNext, containing the given value. ++ (instancetype)eventWithValue:(id)value; + +/// The type of event represented by the receiver. +@property (nonatomic, assign, readonly) RACEventType eventType; + +/// Returns whether the receiver is of type RACEventTypeCompleted or +/// RACEventTypeError. +@property (nonatomic, getter = isFinished, assign, readonly) BOOL finished; + +/// The error associated with an event of type RACEventTypeError. This will be +/// nil for all other event types. +@property (nonatomic, strong, readonly) NSError *error; + +/// The value associated with an event of type RACEventTypeNext. This will be +/// nil for all other event types. +@property (nonatomic, strong, readonly) id value; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEvent.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEvent.m new file mode 100644 index 00000000..270a95d7 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACEvent.m @@ -0,0 +1,113 @@ +// +// RACEvent.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-01-07. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACEvent.h" + +@interface RACEvent () + +// An object associated with this event. This will be used for the error and +// value properties. +@property (nonatomic, strong, readonly) id object; + +// Initializes the receiver with the given type and object. +- (id)initWithEventType:(RACEventType)type object:(id)object; + +@end + +@implementation RACEvent + +#pragma mark Properties + +- (BOOL)isFinished { + return self.eventType == RACEventTypeCompleted || self.eventType == RACEventTypeError; +} + +- (NSError *)error { + return (self.eventType == RACEventTypeError ? self.object : nil); +} + +- (id)value { + return (self.eventType == RACEventTypeNext ? self.object : nil); +} + +#pragma mark Lifecycle + ++ (instancetype)completedEvent { + static dispatch_once_t pred; + static id singleton; + + dispatch_once(&pred, ^{ + singleton = [[self alloc] initWithEventType:RACEventTypeCompleted object:nil]; + }); + + return singleton; +} + ++ (instancetype)eventWithError:(NSError *)error { + return [[self alloc] initWithEventType:RACEventTypeError object:error]; +} + ++ (instancetype)eventWithValue:(id)value { + return [[self alloc] initWithEventType:RACEventTypeNext object:value]; +} + +- (id)initWithEventType:(RACEventType)type object:(id)object { + self = [super init]; + if (self == nil) return nil; + + _eventType = type; + _object = object; + + return self; +} + +#pragma mark NSCopying + +- (id)copyWithZone:(NSZone *)zone { + return self; +} + +#pragma mark NSObject + +- (NSString *)description { + NSString *eventDescription = nil; + + switch (self.eventType) { + case RACEventTypeCompleted: + eventDescription = @"completed"; + break; + + case RACEventTypeError: + eventDescription = [NSString stringWithFormat:@"error = %@", self.object]; + break; + + case RACEventTypeNext: + eventDescription = [NSString stringWithFormat:@"next = %@", self.object]; + break; + + default: + NSCAssert(NO, @"Unrecognized event type: %i", (int)self.eventType); + } + + return [NSString stringWithFormat:@"<%@: %p>{ %@ }", self.class, self, eventDescription]; +} + +- (NSUInteger)hash { + return self.eventType ^ [self.object hash]; +} + +- (BOOL)isEqual:(id)event { + if (event == self) return YES; + if (![event isKindOfClass:RACEvent.class]) return NO; + if (self.eventType != [event eventType]) return NO; + + // Catches the nil case too. + return self.object == [event object] || [self.object isEqual:[event object]]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACGroupedSignal.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACGroupedSignal.h new file mode 100644 index 00000000..697d9221 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACGroupedSignal.h @@ -0,0 +1,20 @@ +// +// RACGroupedSignal.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/2/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSubject.h" + + +/// A grouped signal is used by -[RACSignal groupBy:transform:]. +@interface RACGroupedSignal : RACSubject + +/// The key shared by the group. +@property (nonatomic, readonly, copy) id key; + ++ (instancetype)signalWithKey:(id)key; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACGroupedSignal.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACGroupedSignal.m new file mode 100644 index 00000000..00e03784 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACGroupedSignal.m @@ -0,0 +1,25 @@ +// +// RACGroupedSignal.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/2/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACGroupedSignal.h" + +@interface RACGroupedSignal () +@property (nonatomic, copy) id key; +@end + +@implementation RACGroupedSignal + +#pragma mark API + ++ (instancetype)signalWithKey:(id)key { + RACGroupedSignal *subject = [self subject]; + subject.key = key; + return subject; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACImmediateScheduler.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACImmediateScheduler.h new file mode 100644 index 00000000..316e9f34 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACImmediateScheduler.h @@ -0,0 +1,14 @@ +// +// RACImmediateScheduler.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/30/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACScheduler.h" + +/// A scheduler which immediately executes its scheduled blocks. +@interface RACImmediateScheduler : RACScheduler + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACImmediateScheduler.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACImmediateScheduler.m new file mode 100644 index 00000000..f32eda3f --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACImmediateScheduler.m @@ -0,0 +1,44 @@ +// +// RACImmediateScheduler.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/30/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACImmediateScheduler.h" +#import "RACScheduler+Private.h" + +@implementation RACImmediateScheduler + +#pragma mark Lifecycle + +- (id)init { + return [super initWithName:@"com.ReactiveCocoa.RACScheduler.immediateScheduler"]; +} + +#pragma mark RACScheduler + +- (RACDisposable *)schedule:(void (^)(void))block { + NSCParameterAssert(block != NULL); + + block(); + return nil; +} + +- (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block { + NSCParameterAssert(date != nil); + NSCParameterAssert(block != NULL); + + [NSThread sleepUntilDate:date]; + block(); + + return nil; +} + +- (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block { + NSCAssert(NO, @"+[RACScheduler immediateScheduler] does not support %@.", NSStringFromSelector(_cmd)); + return nil; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOChannel.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOChannel.h new file mode 100644 index 00000000..060a4cc5 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOChannel.h @@ -0,0 +1,97 @@ +// +// RACKVOChannel.h +// ReactiveCocoa +// +// Created by Uri Baghin on 27/12/2012. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACChannel.h" +#import "RACEXTKeyPathCoding.h" +#import "RACmetamacros.h" + +/// Creates a RACKVOChannel to the given key path. When the targeted object +/// deallocates, the channel will complete. +/// +/// If RACChannelTo() is used as an expression, it returns a RACChannelTerminal that +/// can be used to watch the specified property for changes, and set new values +/// for it. The terminal will start with the property's current value upon +/// subscription. +/// +/// If RACChannelTo() is used on the left-hand side of an assignment, there must a +/// RACChannelTerminal on the right-hand side of the assignment. The two will be +/// subscribed to one another: the property's value is immediately set to the +/// value of the channel terminal on the right-hand side, and subsequent changes +/// to either terminal will be reflected on the other. +/// +/// There are two different versions of this macro: +/// +/// - RACChannelTo(TARGET, KEYPATH, NILVALUE) will create a channel to the `KEYPATH` +/// of `TARGET`. If the terminal is ever sent a `nil` value, the property will +/// be set to `NILVALUE` instead. `NILVALUE` may itself be `nil` for object +/// properties, but an NSValue should be used for primitive properties, to +/// avoid an exception if `nil` is sent (which might occur if an intermediate +/// object is set to `nil`). +/// - RACChannelTo(TARGET, KEYPATH) is the same as the above, but `NILVALUE` defaults to +/// `nil`. +/// +/// Examples +/// +/// RACChannelTerminal *integerChannel = RACChannelTo(self, integerProperty, @42); +/// +/// // Sets self.integerProperty to 5. +/// [integerChannel sendNext:@5]; +/// +/// // Logs the current value of self.integerProperty, and all future changes. +/// [integerChannel subscribeNext:^(id value) { +/// NSLog(@"value: %@", value); +/// }]; +/// +/// // Binds properties to each other, taking the initial value from the right +/// side. +/// RACChannelTo(view, objectProperty) = RACChannelTo(model, objectProperty); +/// RACChannelTo(view, integerProperty, @2) = RACChannelTo(model, integerProperty, @10); +#define RACChannelTo(TARGET, ...) \ + metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__)) \ + (RACChannelTo_(TARGET, __VA_ARGS__, nil)) \ + (RACChannelTo_(TARGET, __VA_ARGS__)) + +/// Do not use this directly. Use the RACChannelTo macro above. +#define RACChannelTo_(TARGET, KEYPATH, NILVALUE) \ + [[RACKVOChannel alloc] initWithTarget:(TARGET) keyPath:@keypath(TARGET, KEYPATH) nilValue:(NILVALUE)][@keypath(RACKVOChannel.new, followingTerminal)] + +/// A RACChannel that observes a KVO-compliant key path for changes. +@interface RACKVOChannel : RACChannel + +/// Initializes a channel that will observe the given object and key path. +/// +/// The current value of the key path, and future KVO notifications for the given +/// key path, will be sent to subscribers of the channel's `followingTerminal`. +/// Values sent to the `followingTerminal` will be set at the given key path using +/// key-value coding. +/// +/// When the target object deallocates, the channel will complete. Signal errors +/// are considered undefined behavior. +/// +/// This is the designated initializer for this class. +/// +/// target - The object to bind to. +/// keyPath - The key path to observe and set the value of. +/// nilValue - The value to set at the key path whenever a `nil` value is +/// received. This may be nil when connecting to object properties, but +/// an NSValue should be used for primitive properties, to avoid an +/// exception if `nil` is received (which might occur if an intermediate +/// object is set to `nil`). +- (id)initWithTarget:(NSObject *)target keyPath:(NSString *)keyPath nilValue:(id)nilValue; + +- (id)init __attribute__((unavailable("Use -initWithTarget:keyPath:nilValue: instead"))); + +@end + +/// Methods needed for the convenience macro. Do not call explicitly. +@interface RACKVOChannel (RACChannelTo) + +- (RACChannelTerminal *)objectForKeyedSubscript:(NSString *)key; +- (void)setObject:(RACChannelTerminal *)otherTerminal forKeyedSubscript:(NSString *)key; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOChannel.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOChannel.m new file mode 100644 index 00000000..e0d1a82d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOChannel.m @@ -0,0 +1,206 @@ +// +// RACKVOChannel.m +// ReactiveCocoa +// +// Created by Uri Baghin on 27/12/2012. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACKVOChannel.h" +#import "RACEXTScope.h" +#import "NSObject+RACDeallocating.h" +#import "NSObject+RACDescription.h" +#import "NSObject+RACKVOWrapper.h" +#import "NSObject+RACPropertySubscribing.h" +#import "NSString+RACKeyPathUtilities.h" +#import "RACChannel.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACReplaySubject.h" +#import "RACSignal+Operations.h" +#import "RACSubscriber+Private.h" +#import "RACSubject.h" + +// Key for the array of RACKVOChannel's additional thread local +// data in the thread dictionary. +static NSString * const RACKVOChannelDataDictionaryKey = @"RACKVOChannelKey"; + +// Wrapper class for additional thread local data. +@interface RACKVOChannelData : NSObject + +// The flag used to ignore updates the channel itself has triggered. +@property (nonatomic, assign) BOOL ignoreNextUpdate; + +// A pointer to the owner of the data. Only use this for pointer comparison, +// never as an object reference. +@property (nonatomic, assign) void *owner; + ++ (instancetype)dataForChannel:(RACKVOChannel *)channel; + +@end + +@interface RACKVOChannel () + +// The object whose key path the channel is wrapping. +@property (atomic, unsafe_unretained) NSObject *target; + +// The key path the channel is wrapping. +@property (nonatomic, copy, readonly) NSString *keyPath; + +// Returns the existing thread local data container or nil if none exists. +@property (nonatomic, strong, readonly) RACKVOChannelData *currentThreadData; + +// Creates the thread local data container for the channel. +- (void)createCurrentThreadData; + +// Destroy the thread local data container for the channel. +- (void)destroyCurrentThreadData; + +@end + +@implementation RACKVOChannel + +#pragma mark Properties + +- (RACKVOChannelData *)currentThreadData { + NSMutableArray *dataArray = NSThread.currentThread.threadDictionary[RACKVOChannelDataDictionaryKey]; + + for (RACKVOChannelData *data in dataArray) { + if (data.owner == (__bridge void *)self) return data; + } + + return nil; +} + +#pragma mark Lifecycle + +- (id)initWithTarget:(NSObject *)target keyPath:(NSString *)keyPath nilValue:(id)nilValue { + NSCParameterAssert(keyPath.rac_keyPathComponents.count > 0); + + self = [super init]; + if (self == nil) return nil; + + _target = target; + _keyPath = [keyPath copy]; + + [self.leadingTerminal setNameWithFormat:@"[-initWithTarget: %@ keyPath: %@ nilValue: %@] -leadingTerminal", target, keyPath, nilValue]; + [self.followingTerminal setNameWithFormat:@"[-initWithTarget: %@ keyPath: %@ nilValue: %@] -followingTerminal", target, keyPath, nilValue]; + + // Observe the key path on target for changes and forward the changes to the + // terminal. + // + // Intentionally capturing `self` strongly in the blocks below, so the + // channel object stays alive while observing. + RACDisposable *observationDisposable = [target rac_observeKeyPath:keyPath options:NSKeyValueObservingOptionInitial observer:nil block:^(id value, NSDictionary *change) { + // If the change wasn't triggered by deallocation, only affects the last + // path component, and ignoreNextUpdate is set, then it was triggered by + // this channel and should not be forwarded. + if (![change[RACKeyValueChangeCausedByDeallocationKey] boolValue] && [change[RACKeyValueChangeAffectedOnlyLastComponentKey] boolValue] && self.currentThreadData.ignoreNextUpdate) { + [self destroyCurrentThreadData]; + return; + } + + [self.leadingTerminal sendNext:value]; + }]; + + NSString *keyPathByDeletingLastKeyPathComponent = keyPath.rac_keyPathByDeletingLastKeyPathComponent; + NSArray *keyPathComponents = keyPath.rac_keyPathComponents; + NSUInteger keyPathComponentsCount = keyPathComponents.count; + NSString *lastKeyPathComponent = keyPathComponents.lastObject; + + // Update the value of the property with the values received. + [[self.leadingTerminal + finally:^{ + [observationDisposable dispose]; + }] + subscribeNext:^(id x) { + // Check the value of the second to last key path component. Since the + // channel can only update the value of a property on an object, and not + // update intermediate objects, it can only update the value of the whole + // key path if this object is not nil. + NSObject *object = (keyPathComponentsCount > 1 ? [self.target valueForKeyPath:keyPathByDeletingLastKeyPathComponent] : self.target); + if (object == nil) return; + + // Set the ignoreNextUpdate flag before setting the value so this channel + // ignores the value in the subsequent -didChangeValueForKey: callback. + [self createCurrentThreadData]; + self.currentThreadData.ignoreNextUpdate = YES; + + [object setValue:x ?: nilValue forKey:lastKeyPathComponent]; + } error:^(NSError *error) { + NSCAssert(NO, @"Received error in %@: %@", self, error); + + // Log the error if we're running with assertions disabled. + NSLog(@"Received error in %@: %@", self, error); + }]; + + // Capture `self` weakly for the target's deallocation disposable, so we can + // freely deallocate if we complete before then. + @weakify(self); + + [target.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{ + @strongify(self); + [self.leadingTerminal sendCompleted]; + self.target = nil; + }]]; + + return self; +} + +- (void)createCurrentThreadData { + NSMutableArray *dataArray = NSThread.currentThread.threadDictionary[RACKVOChannelDataDictionaryKey]; + if (dataArray == nil) { + dataArray = [NSMutableArray array]; + NSThread.currentThread.threadDictionary[RACKVOChannelDataDictionaryKey] = dataArray; + [dataArray addObject:[RACKVOChannelData dataForChannel:self]]; + return; + } + + for (RACKVOChannelData *data in dataArray) { + if (data.owner == (__bridge void *)self) return; + } + + [dataArray addObject:[RACKVOChannelData dataForChannel:self]]; +} + +- (void)destroyCurrentThreadData { + NSMutableArray *dataArray = NSThread.currentThread.threadDictionary[RACKVOChannelDataDictionaryKey]; + NSUInteger index = [dataArray indexOfObjectPassingTest:^ BOOL (RACKVOChannelData *data, NSUInteger idx, BOOL *stop) { + return data.owner == (__bridge void *)self; + }]; + + if (index != NSNotFound) [dataArray removeObjectAtIndex:index]; +} + +@end + +@implementation RACKVOChannel (RACChannelTo) + +- (RACChannelTerminal *)objectForKeyedSubscript:(NSString *)key { + NSCParameterAssert(key != nil); + + RACChannelTerminal *terminal = [self valueForKey:key]; + NSCAssert([terminal isKindOfClass:RACChannelTerminal.class], @"Key \"%@\" does not identify a channel terminal", key); + + return terminal; +} + +- (void)setObject:(RACChannelTerminal *)otherTerminal forKeyedSubscript:(NSString *)key { + NSCParameterAssert(otherTerminal != nil); + + RACChannelTerminal *selfTerminal = [self objectForKeyedSubscript:key]; + [otherTerminal subscribe:selfTerminal]; + [[selfTerminal skip:1] subscribe:otherTerminal]; +} + +@end + +@implementation RACKVOChannelData + ++ (instancetype)dataForChannel:(RACKVOChannel *)channel { + RACKVOChannelData *data = [[self alloc] init]; + data->_owner = (__bridge void *)channel; + return data; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOTrampoline.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOTrampoline.h new file mode 100644 index 00000000..dab15c58 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOTrampoline.h @@ -0,0 +1,31 @@ +// +// RACKVOTrampoline.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 1/15/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import +#import "NSObject+RACKVOWrapper.h" +#import "RACDisposable.h" + +/// The KVO trampoline object. Represents a KVO observation. +/// +/// Disposing of the trampoline will stop observation. +@interface RACKVOTrampoline : RACDisposable + +/// Initializes the receiver with the given parameters. +/// +/// target - The object whose key path should be observed. Cannot be nil. +/// observer - The object that gets notified when the value at the key path +/// changes. Can be nil. +/// keyPath - The key path on `target` to observe. Cannot be nil. +/// options - Any key value observing options to use in the observation. +/// block - The block to call when the value at the observed key path changes. +/// Cannot be nil. +/// +/// Returns the initialized object. +- (id)initWithTarget:(NSObject *)target observer:(NSObject *)observer keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options block:(RACKVOBlock)block; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOTrampoline.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOTrampoline.m new file mode 100644 index 00000000..1e4feae9 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACKVOTrampoline.m @@ -0,0 +1,100 @@ +// +// RACKVOTrampoline.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 1/15/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACKVOTrampoline.h" +#import "NSObject+RACDeallocating.h" +#import "RACCompoundDisposable.h" + +static void *RACKVOWrapperContext = &RACKVOWrapperContext; + +@interface RACKVOTrampoline () + +// The keypath which the trampoline is observing. +@property (nonatomic, readonly, copy) NSString *keyPath; + +// These properties should only be manipulated while synchronized on the +// receiver. +@property (nonatomic, readonly, copy) RACKVOBlock block; +@property (nonatomic, readonly, unsafe_unretained) NSObject *target; +@property (nonatomic, readonly, unsafe_unretained) NSObject *observer; + +@end + +@implementation RACKVOTrampoline + +#pragma mark Lifecycle + +- (id)initWithTarget:(NSObject *)target observer:(NSObject *)observer keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options block:(RACKVOBlock)block { + NSCParameterAssert(target != nil); + NSCParameterAssert(keyPath != nil); + NSCParameterAssert(block != nil); + + self = [super init]; + if (self == nil) return nil; + + _keyPath = [keyPath copy]; + + _block = [block copy]; + _target = target; + _observer = observer; + + [self.target addObserver:self forKeyPath:self.keyPath options:options context:&RACKVOWrapperContext]; + [self.target.rac_deallocDisposable addDisposable:self]; + [self.observer.rac_deallocDisposable addDisposable:self]; + + return self; +} + +- (void)dealloc { + [self dispose]; +} + +#pragma mark Observation + +- (void)dispose { + NSObject *target; + NSObject *observer; + + @synchronized (self) { + _block = nil; + + target = self.target; + observer = self.observer; + + _target = nil; + _observer = nil; + } + + [target.rac_deallocDisposable removeDisposable:self]; + [observer.rac_deallocDisposable removeDisposable:self]; + + [target removeObserver:self forKeyPath:self.keyPath context:&RACKVOWrapperContext]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if (context != &RACKVOWrapperContext) { + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; + return; + } + + RACKVOBlock block; + id observer; + id target; + + @synchronized (self) { + block = self.block; + observer = self.observer; + target = self.target; + } + + if (block == nil) return; + + block(target, observer, change); +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection+Private.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection+Private.h new file mode 100644 index 00000000..43931f85 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection+Private.h @@ -0,0 +1,17 @@ +// +// RACMulticastConnection+Private.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/11/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACMulticastConnection.h" + +@class RACSubject; + +@interface RACMulticastConnection () + +- (id)initWithSourceSignal:(RACSignal *)source subject:(RACSubject *)subject; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.h new file mode 100644 index 00000000..5361f5dd --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.h @@ -0,0 +1,46 @@ +// +// RACMulticastConnection.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/11/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +@class RACSignal; +@class RACDisposable; + +/// A multicast connection encapsulates the idea of sharing one subscription to a +/// signal to many subscribers. This is most often needed if the subscription to +/// the underlying signal involves side-effects or shouldn't be called more than +/// once. +/// +/// The multicasted signal is only subscribed to when +/// -[RACMulticastConnection connect] is called. Until that happens, no values +/// will be sent on `signal`. See -[RACMulticastConnection autoconnect] for how +/// -[RACMulticastConnection connect] can be called automatically. +/// +/// Note that you shouldn't create RACMulticastConnection manually. Instead use +/// -[RACSignal publish] or -[RACSignal multicast:]. +@interface RACMulticastConnection : NSObject + +/// The multicasted signal. +@property (nonatomic, strong, readonly) RACSignal *signal; + +/// Connect to the underlying signal by subscribing to it. Calling this multiple +/// times does nothing but return the existing connection's disposable. +/// +/// Returns the disposable for the subscription to the multicasted signal. +- (RACDisposable *)connect; + +/// Connects to the underlying signal when the returned signal is first +/// subscribed to, and disposes of the subscription to the multicasted signal +/// when the returned signal has no subscribers. +/// +/// If new subscribers show up after being disposed, they'll subscribe and then +/// be immediately disposed of. The returned signal will never re-connect to the +/// multicasted signal. +/// +/// Returns the autoconnecting signal. +- (RACSignal *)autoconnect; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.m new file mode 100644 index 00000000..1534d96f --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACMulticastConnection.m @@ -0,0 +1,85 @@ +// +// RACMulticastConnection.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/11/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACMulticastConnection.h" +#import "RACMulticastConnection+Private.h" +#import "RACDisposable.h" +#import "RACSerialDisposable.h" +#import "RACSubject.h" +#import + +@interface RACMulticastConnection () { + RACSubject *_signal; + + // When connecting, a caller should attempt to atomically swap the value of this + // from `0` to `1`. + // + // If the swap is successful the caller is resposible for subscribing `_signal` + // to `sourceSignal` and storing the returned disposable in `serialDisposable`. + // + // If the swap is unsuccessful it means that `_sourceSignal` has already been + // connected and the caller has no action to take. + int32_t volatile _hasConnected; +} + +@property (nonatomic, readonly, strong) RACSignal *sourceSignal; +@property (strong) RACSerialDisposable *serialDisposable; +@end + +@implementation RACMulticastConnection + +#pragma mark Lifecycle + +- (id)initWithSourceSignal:(RACSignal *)source subject:(RACSubject *)subject { + NSCParameterAssert(source != nil); + NSCParameterAssert(subject != nil); + + self = [super init]; + if (self == nil) return nil; + + _sourceSignal = source; + _serialDisposable = [[RACSerialDisposable alloc] init]; + _signal = subject; + + return self; +} + +#pragma mark Connecting + +- (RACDisposable *)connect { + BOOL shouldConnect = OSAtomicCompareAndSwap32Barrier(0, 1, &_hasConnected); + + if (shouldConnect) { + self.serialDisposable.disposable = [self.sourceSignal subscribe:_signal]; + } + + return self.serialDisposable; +} + +- (RACSignal *)autoconnect { + __block volatile int32_t subscriberCount = 0; + + return [[RACSignal + createSignal:^(id subscriber) { + OSAtomicIncrement32Barrier(&subscriberCount); + + RACDisposable *subscriptionDisposable = [self.signal subscribe:subscriber]; + RACDisposable *connectionDisposable = [self connect]; + + return [RACDisposable disposableWithBlock:^{ + [subscriptionDisposable dispose]; + + if (OSAtomicDecrement32Barrier(&subscriberCount) == 0) { + [connectionDisposable dispose]; + } + }]; + }] + setNameWithFormat:@"[%@] -autoconnect", self.signal.name]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.h new file mode 100644 index 00000000..dc58fe53 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.h @@ -0,0 +1,16 @@ +// +// RACObjCRuntime.h +// ReactiveCocoa +// +// Created by Cody Krieger on 5/19/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@interface RACObjCRuntime : NSObject + +/// Invokes objc_allocateClassPair(). Can be called from ARC code. ++ (Class)createClass:(const char *)className inheritingFromClass:(Class)superclass; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.m new file mode 100644 index 00000000..43cfc196 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.m @@ -0,0 +1,22 @@ +// +// RACObjCRuntime.m +// ReactiveCocoa +// +// Created by Cody Krieger on 5/19/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACObjCRuntime.h" +#import + +#if __has_feature(objc_arc) +#error "This file must be compiled without ARC." +#endif + +@implementation RACObjCRuntime + ++ (Class)createClass:(const char *)className inheritingFromClass:(Class)superclass { + return objc_allocateClassPair(superclass, className, 0); +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACPassthroughSubscriber.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACPassthroughSubscriber.h new file mode 100644 index 00000000..8c5b3b6a --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACPassthroughSubscriber.h @@ -0,0 +1,28 @@ +// +// RACPassthroughSubscriber.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-06-13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import +#import "RACSubscriber.h" + +@class RACCompoundDisposable; +@class RACSignal; + +/// Passes through all events to another subscriber while not disposed. +@interface RACPassthroughSubscriber : NSObject + +/// Initializes the receiver to pass through events until disposed. +/// +/// subscriber - The subscriber to forward events to. This must not be nil. +/// signal - The signal that will be sending events to the receiver. +/// disposable - When this disposable is disposed, no more events will be +/// forwarded. This must not be nil. +/// +/// Returns an initialized passthrough subscriber. +- (instancetype)initWithSubscriber:(id)subscriber signal:(RACSignal *)signal disposable:(RACCompoundDisposable *)disposable; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACPassthroughSubscriber.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACPassthroughSubscriber.m new file mode 100644 index 00000000..c51d0b0b --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACPassthroughSubscriber.m @@ -0,0 +1,103 @@ +// +// RACPassthroughSubscriber.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-06-13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACPassthroughSubscriber.h" +#import "RACCompoundDisposable.h" +#import "RACSignal.h" +#import "RACSignalProvider.h" + +static const char *cleanedDTraceString(NSString *original) { + return [original stringByReplacingOccurrencesOfString:@"\\s+" withString:@" " options:NSRegularExpressionSearch range:NSMakeRange(0, original.length)].UTF8String; +} + +static const char *cleanedSignalDescription(RACSignal *signal) { + NSString *desc = signal.description; + + NSRange range = [desc rangeOfString:@" name:"]; + if (range.location != NSNotFound) { + desc = [desc stringByReplacingCharactersInRange:range withString:@""]; + } + + return cleanedDTraceString(desc); +} + +@interface RACPassthroughSubscriber () + +// The subscriber to which events should be forwarded. +@property (nonatomic, strong, readonly) id innerSubscriber; + +// The signal sending events to this subscriber. +// +// This property isn't `weak` because it's only used for DTrace probes, so +// a zeroing weak reference would incur an unnecessary performance penalty in +// normal usage. +@property (nonatomic, unsafe_unretained, readonly) RACSignal *signal; + +// A disposable representing the subscription. When disposed, no further events +// should be sent to the `innerSubscriber`. +@property (nonatomic, strong, readonly) RACCompoundDisposable *disposable; + +@end + +@implementation RACPassthroughSubscriber + +#pragma mark Lifecycle + +- (instancetype)initWithSubscriber:(id)subscriber signal:(RACSignal *)signal disposable:(RACCompoundDisposable *)disposable { + NSCParameterAssert(subscriber != nil); + + self = [super init]; + if (self == nil) return nil; + + _innerSubscriber = subscriber; + _signal = signal; + _disposable = disposable; + + [self.innerSubscriber didSubscribeWithDisposable:self.disposable]; + return self; +} + +#pragma mark RACSubscriber + +- (void)sendNext:(id)value { + if (self.disposable.disposed) return; + + if (RACSIGNAL_NEXT_ENABLED()) { + RACSIGNAL_NEXT(cleanedSignalDescription(self.signal), cleanedDTraceString(self.innerSubscriber.description), cleanedDTraceString([value description])); + } + + [self.innerSubscriber sendNext:value]; +} + +- (void)sendError:(NSError *)error { + if (self.disposable.disposed) return; + + if (RACSIGNAL_ERROR_ENABLED()) { + RACSIGNAL_ERROR(cleanedSignalDescription(self.signal), cleanedDTraceString(self.innerSubscriber.description), cleanedDTraceString(error.description)); + } + + [self.innerSubscriber sendError:error]; +} + +- (void)sendCompleted { + if (self.disposable.disposed) return; + + if (RACSIGNAL_COMPLETED_ENABLED()) { + RACSIGNAL_COMPLETED(cleanedSignalDescription(self.signal), cleanedDTraceString(self.innerSubscriber.description)); + } + + [self.innerSubscriber sendCompleted]; +} + +- (void)didSubscribeWithDisposable:(RACDisposable *)disposable { + if (disposable != self.disposable) { + [self.disposable addDisposable:disposable]; + } +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler+Subclass.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler+Subclass.h new file mode 100644 index 00000000..48ef6366 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler+Subclass.h @@ -0,0 +1,46 @@ +// +// RACQueueScheduler+Subclass.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 6/6/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACQueueScheduler.h" + +/// An interface for use by subclasses. +/// +/// Subclasses should use `-performAsCurrentScheduler:` to do the actual block +/// invocation so that +[RACScheduler currentScheduler] behaves as expected. +/// +/// **Note that RACSchedulers are expected to be serial**. Subclasses must honor +/// that contract. See `RACTargetQueueScheduler` for a queue-based scheduler +/// which will enforce the serialization guarantee. +@interface RACQueueScheduler () + +/// The queue on which blocks are enqueued. +@property (nonatomic, readonly) dispatch_queue_t queue; + +/// Initializes the receiver with the name of the scheduler and the queue which +/// the scheduler should use. +/// +/// name - The name of the scheduler. If nil, a default name will be used. +/// queue - The queue upon which the receiver should enqueue scheduled blocks. +/// This argument must not be NULL. +/// +/// Returns the initialized object. +- (id)initWithName:(NSString *)name queue:(dispatch_queue_t)queue; + +/// Performs the given block with the receiver as the current scheduler for +/// `queue`. This should only be called by subclasses to perform scheduled blocks +/// on their queue. +/// +/// block - The block to execute. Cannot be NULL. +- (void)performAsCurrentScheduler:(void (^)(void))block; + +/// Converts a date into a GCD time using dispatch_walltime(). +/// +/// date - The date to convert. This must not be nil. ++ (dispatch_time_t)wallTimeWithDate:(NSDate *)date; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler.h new file mode 100644 index 00000000..ef42512f --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler.h @@ -0,0 +1,18 @@ +// +// RACQueueScheduler.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/30/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACScheduler.h" + +/// An abstract scheduler which asynchronously enqueues all its work to a Grand +/// Central Dispatch queue. +/// +/// Because RACQueueScheduler is abstract, it should not be instantiated +/// directly. Create a subclass using the `RACQueueScheduler+Subclass.h` +/// interface and use that instead. +@interface RACQueueScheduler : RACScheduler +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler.m new file mode 100644 index 00000000..7ae82026 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACQueueScheduler.m @@ -0,0 +1,120 @@ +// +// RACQueueScheduler.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/30/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACQueueScheduler.h" +#import "RACBacktrace.h" +#import "RACDisposable.h" +#import "RACQueueScheduler+Subclass.h" +#import "RACScheduler+Private.h" + +@implementation RACQueueScheduler + +#pragma mark Lifecycle + +- (void)dealloc { + dispatch_release(_queue); +} + +- (id)initWithName:(NSString *)name queue:(dispatch_queue_t)queue { + NSCParameterAssert(queue != NULL); + + self = [super initWithName:name]; + if (self == nil) return nil; + + dispatch_retain(queue); + _queue = queue; + + return self; +} + +#pragma mark Date Conversions + ++ (dispatch_time_t)wallTimeWithDate:(NSDate *)date { + NSCParameterAssert(date != nil); + + double seconds = 0; + double frac = modf(date.timeIntervalSince1970, &seconds); + + struct timespec walltime = { + .tv_sec = (time_t)fmin(fmax(seconds, LONG_MIN), LONG_MAX), + .tv_nsec = (long)fmin(fmax(frac * NSEC_PER_SEC, LONG_MIN), LONG_MAX) + }; + + return dispatch_walltime(&walltime, 0); +} + +#pragma mark RACScheduler + +- (RACDisposable *)schedule:(void (^)(void))block { + NSCParameterAssert(block != NULL); + + RACDisposable *disposable = [[RACDisposable alloc] init]; + + dispatch_async(self.queue, ^{ + if (disposable.disposed) return; + [self performAsCurrentScheduler:block]; + }); + + return disposable; +} + +- (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block { + NSCParameterAssert(date != nil); + NSCParameterAssert(block != NULL); + + RACDisposable *disposable = [[RACDisposable alloc] init]; + + dispatch_after([self.class wallTimeWithDate:date], self.queue, ^{ + if (disposable.disposed) return; + [self performAsCurrentScheduler:block]; + }); + + return disposable; +} + +- (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block { + NSCParameterAssert(date != nil); + NSCParameterAssert(interval > 0.0 && interval < INT64_MAX / NSEC_PER_SEC); + NSCParameterAssert(leeway >= 0.0 && leeway < INT64_MAX / NSEC_PER_SEC); + NSCParameterAssert(block != NULL); + + uint64_t intervalInNanoSecs = (uint64_t)(interval * NSEC_PER_SEC); + uint64_t leewayInNanoSecs = (uint64_t)(leeway * NSEC_PER_SEC); + + dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, self.queue); + dispatch_source_set_timer(timer, [self.class wallTimeWithDate:date], intervalInNanoSecs, leewayInNanoSecs); + dispatch_source_set_event_handler(timer, block); + dispatch_resume(timer); + + return [RACDisposable disposableWithBlock:^{ + dispatch_source_cancel(timer); + dispatch_release(timer); + }]; +} + +- (void)performAsCurrentScheduler:(void (^)(void))block { + NSCParameterAssert(block != NULL); + + // If we're using a concurrent queue, we could end up in here concurrently, + // in which case we *don't* want to clear the current scheduler immediately + // after our block is done executing, but only *after* all our concurrent + // invocations are done. + + RACScheduler *previousScheduler = RACScheduler.currentScheduler; + NSThread.currentThread.threadDictionary[RACSchedulerCurrentSchedulerKey] = self; + + block(); + + if (previousScheduler != nil) { + NSThread.currentThread.threadDictionary[RACSchedulerCurrentSchedulerKey] = previousScheduler; + } else { + [NSThread.currentThread.threadDictionary removeObjectForKey:RACSchedulerCurrentSchedulerKey]; + } +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReplaySubject.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReplaySubject.h new file mode 100644 index 00000000..cd6f2ecd --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReplaySubject.h @@ -0,0 +1,23 @@ +// +// RACReplaySubject.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/14/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSubject.h" + +extern const NSUInteger RACReplaySubjectUnlimitedCapacity; + + +/// A replay subject saves the values it is sent (up to its defined capacity) +/// and resends those to new subscribers. It will also replay an error or +/// completion. +@interface RACReplaySubject : RACSubject + +/// Creates a new replay subject with the given capacity. A capacity of +/// RACReplaySubjectUnlimitedCapacity means values are never trimmed. ++ (instancetype)replaySubjectWithCapacity:(NSUInteger)capacity; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReplaySubject.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReplaySubject.m new file mode 100644 index 00000000..bca008e6 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReplaySubject.m @@ -0,0 +1,112 @@ +// +// RACReplaySubject.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/14/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACReplaySubject.h" +#import "RACDisposable.h" +#import "RACScheduler+Private.h" +#import "RACSubscriber.h" +#import "RACTuple.h" +#import "RACCompoundDisposable.h" + +const NSUInteger RACReplaySubjectUnlimitedCapacity = NSUIntegerMax; + +@interface RACReplaySubject () + +@property (nonatomic, assign, readonly) NSUInteger capacity; + +// These properties should only be modified while synchronized on self. +@property (nonatomic, strong, readonly) NSMutableArray *valuesReceived; +@property (nonatomic, assign) BOOL hasCompleted; +@property (nonatomic, assign) BOOL hasError; +@property (nonatomic, strong) NSError *error; + +@end + + +@implementation RACReplaySubject + +#pragma mark Lifecycle + ++ (instancetype)replaySubjectWithCapacity:(NSUInteger)capacity { + return [[self alloc] initWithCapacity:capacity]; +} + +- (instancetype)init { + return [self initWithCapacity:RACReplaySubjectUnlimitedCapacity]; +} + +- (instancetype)initWithCapacity:(NSUInteger)capacity { + self = [super init]; + if (self == nil) return nil; + + _capacity = capacity; + _valuesReceived = (capacity == RACReplaySubjectUnlimitedCapacity ? [NSMutableArray array] : [NSMutableArray arrayWithCapacity:capacity]); + + return self; +} + +#pragma mark RACSignal + +- (RACDisposable *)subscribe:(id)subscriber { + RACCompoundDisposable *compoundDisposable = [RACCompoundDisposable compoundDisposable]; + + RACDisposable *schedulingDisposable = [RACScheduler.subscriptionScheduler schedule:^{ + @synchronized (self) { + for (id value in self.valuesReceived) { + if (compoundDisposable.disposed) return; + + [subscriber sendNext:([value isKindOfClass:RACTupleNil.class] ? nil : value)]; + } + + if (compoundDisposable.disposed) return; + + if (self.hasCompleted) { + [subscriber sendCompleted]; + } else if (self.hasError) { + [subscriber sendError:self.error]; + } else { + RACDisposable *subscriptionDisposable = [super subscribe:subscriber]; + [compoundDisposable addDisposable:subscriptionDisposable]; + } + } + }]; + + [compoundDisposable addDisposable:schedulingDisposable]; + + return compoundDisposable; +} + +#pragma mark RACSubscriber + +- (void)sendNext:(id)value { + @synchronized (self) { + [self.valuesReceived addObject:value ?: RACTupleNil.tupleNil]; + [super sendNext:value]; + + if (self.capacity != RACReplaySubjectUnlimitedCapacity && self.valuesReceived.count > self.capacity) { + [self.valuesReceived removeObjectsInRange:NSMakeRange(0, self.valuesReceived.count - self.capacity)]; + } + } +} + +- (void)sendCompleted { + @synchronized (self) { + self.hasCompleted = YES; + [super sendCompleted]; + } +} + +- (void)sendError:(NSError *)e { + @synchronized (self) { + self.hasError = YES; + self.error = e; + [super sendError:e]; + } +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReturnSignal.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReturnSignal.h new file mode 100644 index 00000000..73e56746 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReturnSignal.h @@ -0,0 +1,17 @@ +// +// RACReturnSignal.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-10. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACSignal.h" + +// A private `RACSignal` subclasses that synchronously sends a value to any +// subscribers, then completes. +@interface RACReturnSignal : RACSignal + ++ (RACSignal *)return:(id)value; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReturnSignal.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReturnSignal.m new file mode 100644 index 00000000..30066345 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACReturnSignal.m @@ -0,0 +1,90 @@ +// +// RACReturnSignal.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-10. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACReturnSignal.h" +#import "RACScheduler+Private.h" +#import "RACSubscriber.h" +#import "RACUnit.h" + +@interface RACReturnSignal () + +// The value to send upon subscription. +@property (nonatomic, strong, readonly) id value; + +@end + +@implementation RACReturnSignal + +#pragma mark Properties + +// Only allow this signal's name to be customized in DEBUG, since it's +// potentially a singleton in release builds (see +return:). +- (void)setName:(NSString *)name { +#ifdef DEBUG + [super setName:name]; +#endif +} + +- (NSString *)name { +#ifdef DEBUG + return super.name; +#else + return @"+return:"; +#endif +} + +#pragma mark Lifecycle + ++ (RACSignal *)return:(id)value { +#ifndef DEBUG + // In release builds, use singletons for two very common cases. + if (value == RACUnit.defaultUnit) { + static RACReturnSignal *unitSingleton; + static dispatch_once_t unitPred; + + dispatch_once(&unitPred, ^{ + unitSingleton = [[self alloc] init]; + unitSingleton->_value = RACUnit.defaultUnit; + }); + + return unitSingleton; + } else if (value == nil) { + static RACReturnSignal *nilSingleton; + static dispatch_once_t nilPred; + + dispatch_once(&nilPred, ^{ + nilSingleton = [[self alloc] init]; + nilSingleton->_value = nil; + }); + + return nilSingleton; + } +#endif + + RACReturnSignal *signal = [[self alloc] init]; + signal->_value = value; + +#ifdef DEBUG + [signal setNameWithFormat:@"+return: %@", value]; +#endif + + return signal; +} + +#pragma mark Subscription + +- (RACDisposable *)subscribe:(id)subscriber { + NSCParameterAssert(subscriber != nil); + + return [RACScheduler.subscriptionScheduler schedule:^{ + [subscriber sendNext:self.value]; + [subscriber sendCompleted]; + }]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler+Private.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler+Private.h new file mode 100644 index 00000000..a73ddae4 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler+Private.h @@ -0,0 +1,34 @@ +// +// RACScheduler+Private.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/29/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACScheduler.h" + +/// The thread-specific current scheduler key. +extern NSString * const RACSchedulerCurrentSchedulerKey; + +/// A private interface for internal RAC use only. +@interface RACScheduler () + +/// A dedicated scheduler that fills two requirements: +/// +/// 1. By the time subscription happens, we need a valid +currentScheduler. +/// 2. Subscription should happen as soon as possible. +/// +/// To fulfill those two, if we already have a valid +currentScheduler, it +/// immediately executes scheduled blocks. If we don't, it will execute scheduled +/// blocks with a private background scheduler. ++ (instancetype)subscriptionScheduler; + +/// Initializes the receiver with the given name. +/// +/// name - The name of the scheduler. If nil, a default name will be used. +/// +/// Returns the initialized object. +- (id)initWithName:(NSString *)name; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.h new file mode 100644 index 00000000..ce1ee327 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.h @@ -0,0 +1,148 @@ +// +// RACScheduler.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/16/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +/// The priority for the scheduler. +/// +/// RACSchedulerPriorityHigh - High priority. +/// RACSchedulerPriorityDefault - Default priority. +/// RACSchedulerPriorityLow - Low priority. +/// RACSchedulerPriorityBackground - Background priority. +typedef enum : long { + RACSchedulerPriorityHigh = DISPATCH_QUEUE_PRIORITY_HIGH, + RACSchedulerPriorityDefault = DISPATCH_QUEUE_PRIORITY_DEFAULT, + RACSchedulerPriorityLow = DISPATCH_QUEUE_PRIORITY_LOW, + RACSchedulerPriorityBackground = DISPATCH_QUEUE_PRIORITY_BACKGROUND, +} RACSchedulerPriority; + +/// Scheduled with -scheduleRecursiveBlock:, this type of block is passed a block +/// with which it can call itself recursively. +typedef void (^RACSchedulerRecursiveBlock)(void (^reschedule)(void)); + +@class RACDisposable; + +/// Schedulers are used to control when and where work is performed. +@interface RACScheduler : NSObject + +/// A singleton scheduler that immediately executes the blocks it is given. +/// +/// **Note:** Unlike most other schedulers, this does not set the current +/// scheduler. There may still be a valid +currentScheduler if this is used +/// within a block scheduled on a different scheduler. ++ (RACScheduler *)immediateScheduler; + +/// A singleton scheduler that executes blocks in the main thread. ++ (RACScheduler *)mainThreadScheduler; + +/// Creates and returns a new background scheduler with the given priority and +/// name. The name is for debug and instrumentation purposes only. +/// +/// Scheduler creation is cheap. It's unnecessary to save the result of this +/// method call unless you want to serialize some actions on the same background +/// scheduler. ++ (RACScheduler *)schedulerWithPriority:(RACSchedulerPriority)priority name:(NSString *)name; + +/// Invokes +schedulerWithPriority:name: with a default name. ++ (RACScheduler *)schedulerWithPriority:(RACSchedulerPriority)priority; + +/// Invokes +schedulerWithPriority: with RACSchedulerPriorityDefault. ++ (RACScheduler *)scheduler; + +/// The current scheduler. This will only be valid when used from within a +/// -[RACScheduler schedule:] block or when on the main thread. ++ (RACScheduler *)currentScheduler; + +/// Schedule the given block for execution on the scheduler. +/// +/// Scheduled blocks will be executed in the order in which they were scheduled. +/// +/// block - The block to schedule for execution. Cannot be nil. +/// +/// Returns a disposable which can be used to cancel the scheduled block before +/// it begins executing, or nil if cancellation is not supported. +- (RACDisposable *)schedule:(void (^)(void))block; + +/// Schedule the given block for execution on the scheduler at or after +/// a specific time. +/// +/// Note that blocks scheduled for a certain time will not preempt any other +/// scheduled work that is executing at the time. +/// +/// When invoked on the +immediateScheduler, the calling thread **will block** +/// until the specified time. +/// +/// date - The earliest time at which `block` should begin executing. The block +/// may not execute immediately at this time, whether due to system load +/// or another block on the scheduler currently being run. Cannot be nil. +/// block - The block to schedule for execution. Cannot be nil. +/// +/// Returns a disposable which can be used to cancel the scheduled block before +/// it begins executing, or nil if cancellation is not supported. +- (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block; + +/// Schedule the given block for execution on the scheduler after the delay. +/// +/// Converts the delay into an NSDate, then invokes `-after:schedule:`. +- (RACDisposable *)afterDelay:(NSTimeInterval)delay schedule:(void (^)(void))block; + +/// Reschedule the given block at a particular interval, starting at a specific +/// time, and with a given leeway for deferral. +/// +/// Note that blocks scheduled for a certain time will not preempt any other +/// scheduled work that is executing at the time. +/// +/// Regardless of the value of `leeway`, the given block may not execute exactly +/// at `when` or exactly on successive intervals, whether due to system load or +/// because another block is currently being run on the scheduler. +/// +/// It is considered undefined behavior to invoke this method on the +/// +immediateScheduler. +/// +/// date - The earliest time at which `block` should begin executing. The +/// block may not execute immediately at this time, whether due to +/// system load or another block on the scheduler currently being +/// run. Cannot be nil. +/// interval - The interval at which the block should be rescheduled, starting +/// from `date`. This will use the system wall clock, to avoid +/// skew when the computer goes to sleep. +/// leeway - A hint to the system indicating the number of seconds that each +/// scheduling can be deferred. Note that this is just a hint, and +/// there may be some additional latency no matter what. +/// block - The block to repeatedly schedule for execution. Cannot be nil. +/// +/// Returns a disposable which can be used to cancel the automatic scheduling and +/// rescheduling, or nil if cancellation is not supported. +- (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block; + +/// Schedule the given recursive block for execution on the scheduler. The +/// scheduler will automatically flatten any recursive scheduling into iteration +/// instead, so this can be used without issue for blocks that may keep invoking +/// themselves forever. +/// +/// Scheduled blocks will be executed in the order in which they were scheduled. +/// +/// recursiveBlock - The block to schedule for execution. When invoked, the +/// recursive block will be passed a `void (^)(void)` block +/// which will reschedule the recursive block at the end of the +/// receiver's queue. This passed-in block will automatically +/// skip scheduling if the scheduling of the `recursiveBlock` +/// was disposed in the meantime. +/// +/// Returns a disposable which can be used to cancel the scheduled block before +/// it begins executing, or to stop it from rescheduling if it's already begun +/// execution. +- (RACDisposable *)scheduleRecursiveBlock:(RACSchedulerRecursiveBlock)recursiveBlock; + +@end + +@interface RACScheduler (Deprecated) + ++ (RACScheduler *)schedulerWithQueue:(dispatch_queue_t)queue name:(NSString *)name __attribute__((deprecated("Use -[RACScheduler initWithName:targetQueue:] instead."))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.m new file mode 100644 index 00000000..a55cacaa --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScheduler.m @@ -0,0 +1,206 @@ +// +// RACScheduler.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/16/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACScheduler.h" +#import "RACBacktrace.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACImmediateScheduler.h" +#import "RACScheduler+Private.h" +#import "RACSubscriptionScheduler.h" +#import "RACTargetQueueScheduler.h" + +// The key for the thread-specific current scheduler. +NSString * const RACSchedulerCurrentSchedulerKey = @"RACSchedulerCurrentSchedulerKey"; + +@interface RACScheduler () +@property (nonatomic, readonly, copy) NSString *name; +@end + +@implementation RACScheduler + +#pragma mark NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p> %@", self.class, self, self.name]; +} + +#pragma mark Initializers + +- (id)initWithName:(NSString *)name { + self = [super init]; + if (self == nil) return nil; + + if (name == nil) { + _name = [NSString stringWithFormat:@"com.ReactiveCocoa.%@.anonymousScheduler", self.class]; + } else { + _name = [name copy]; + } + + return self; +} + +#pragma mark Schedulers + ++ (instancetype)immediateScheduler { + static dispatch_once_t onceToken; + static RACScheduler *immediateScheduler; + dispatch_once(&onceToken, ^{ + immediateScheduler = [[RACImmediateScheduler alloc] init]; + }); + + return immediateScheduler; +} + ++ (instancetype)mainThreadScheduler { + static dispatch_once_t onceToken; + static RACScheduler *mainThreadScheduler; + dispatch_once(&onceToken, ^{ + mainThreadScheduler = [[RACTargetQueueScheduler alloc] initWithName:@"com.ReactiveCocoa.RACScheduler.mainThreadScheduler" targetQueue:dispatch_get_main_queue()]; + }); + + return mainThreadScheduler; +} + ++ (instancetype)schedulerWithPriority:(RACSchedulerPriority)priority name:(NSString *)name { + return [[RACTargetQueueScheduler alloc] initWithName:name targetQueue:dispatch_get_global_queue(priority, 0)]; +} + ++ (instancetype)schedulerWithPriority:(RACSchedulerPriority)priority { + return [self schedulerWithPriority:priority name:@"com.ReactiveCocoa.RACScheduler.backgroundScheduler"]; +} + ++ (instancetype)scheduler { + return [self schedulerWithPriority:RACSchedulerPriorityDefault]; +} + ++ (instancetype)subscriptionScheduler { + static dispatch_once_t onceToken; + static RACScheduler *subscriptionScheduler; + dispatch_once(&onceToken, ^{ + subscriptionScheduler = [[RACSubscriptionScheduler alloc] init]; + }); + + return subscriptionScheduler; +} + ++ (BOOL)isOnMainThread { + return [NSOperationQueue.currentQueue isEqual:NSOperationQueue.mainQueue] || [NSThread isMainThread]; +} + ++ (instancetype)currentScheduler { + RACScheduler *scheduler = NSThread.currentThread.threadDictionary[RACSchedulerCurrentSchedulerKey]; + if (scheduler != nil) return scheduler; + if ([self.class isOnMainThread]) return RACScheduler.mainThreadScheduler; + + return nil; +} + +#pragma mark Scheduling + +- (RACDisposable *)schedule:(void (^)(void))block { + NSCAssert(NO, @"%@ must be implemented by subclasses.", NSStringFromSelector(_cmd)); + return nil; +} + +- (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block { + NSCAssert(NO, @"%@ must be implemented by subclasses.", NSStringFromSelector(_cmd)); + return nil; +} + +- (RACDisposable *)afterDelay:(NSTimeInterval)delay schedule:(void (^)(void))block { + return [self after:[NSDate dateWithTimeIntervalSinceNow:delay] schedule:block]; +} + +- (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block { + NSCAssert(NO, @"%@ must be implemented by subclasses.", NSStringFromSelector(_cmd)); + return nil; +} + +- (RACDisposable *)scheduleRecursiveBlock:(RACSchedulerRecursiveBlock)recursiveBlock { + RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; + + [self scheduleRecursiveBlock:[recursiveBlock copy] addingToDisposable:disposable]; + return disposable; +} + +- (void)scheduleRecursiveBlock:(RACSchedulerRecursiveBlock)recursiveBlock addingToDisposable:(RACCompoundDisposable *)disposable { + @autoreleasepool { + RACCompoundDisposable *selfDisposable = [RACCompoundDisposable compoundDisposable]; + [disposable addDisposable:selfDisposable]; + + __weak RACDisposable *weakSelfDisposable = selfDisposable; + + RACDisposable *schedulingDisposable = [self schedule:^{ + @autoreleasepool { + // At this point, we've been invoked, so our disposable is now useless. + [disposable removeDisposable:weakSelfDisposable]; + } + + if (disposable.disposed) return; + + void (^reallyReschedule)(void) = ^{ + if (disposable.disposed) return; + [self scheduleRecursiveBlock:recursiveBlock addingToDisposable:disposable]; + }; + + // Protects the variables below. + // + // This doesn't actually need to be __block qualified, but Clang + // complains otherwise. :C + __block NSLock *lock = [[NSLock alloc] init]; + lock.name = [NSString stringWithFormat:@"%@ %@", self, NSStringFromSelector(_cmd)]; + + __block NSUInteger rescheduleCount = 0; + + // Set to YES once synchronous execution has finished. Further + // rescheduling should occur immediately (rather than being + // flattened). + __block BOOL rescheduleImmediately = NO; + + @autoreleasepool { + recursiveBlock(^{ + [lock lock]; + BOOL immediate = rescheduleImmediately; + if (!immediate) ++rescheduleCount; + [lock unlock]; + + if (immediate) reallyReschedule(); + }); + } + + [lock lock]; + NSUInteger synchronousCount = rescheduleCount; + rescheduleImmediately = YES; + [lock unlock]; + + for (NSUInteger i = 0; i < synchronousCount; i++) { + reallyReschedule(); + } + }]; + + [selfDisposable addDisposable:schedulingDisposable]; + } +} + +@end + +@implementation RACScheduler (Deprecated) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" + ++ (instancetype)schedulerWithQueue:(dispatch_queue_t)queue name:(NSString *)name { + NSCParameterAssert(queue != NULL); + + return [[RACTargetQueueScheduler alloc] initWithName:name targetQueue:queue]; +} + +#pragma clang diagnostic pop + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScopedDisposable.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScopedDisposable.h new file mode 100644 index 00000000..03da6a27 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScopedDisposable.h @@ -0,0 +1,19 @@ +// +// RACScopedDisposable.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/28/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACDisposable.h" + + +/// A disposable that calls its own -dispose when it is dealloc'd. +@interface RACScopedDisposable : RACDisposable + +/// Creates a new scoped disposable that will also dispose of the given +/// disposable when it is dealloc'd. ++ (instancetype)scopedDisposableWithDisposable:(RACDisposable *)disposable; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScopedDisposable.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScopedDisposable.m new file mode 100644 index 00000000..91115be5 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACScopedDisposable.m @@ -0,0 +1,32 @@ +// +// RACScopedDisposable.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/28/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACScopedDisposable.h" + +@implementation RACScopedDisposable + +#pragma mark Lifecycle + ++ (instancetype)scopedDisposableWithDisposable:(RACDisposable *)disposable { + return [self disposableWithBlock:^{ + [disposable dispose]; + }]; +} + +- (void)dealloc { + [self dispose]; +} + +#pragma mark RACDisposable + +- (RACScopedDisposable *)asScopedDisposable { + // totally already are + return self; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSequence.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSequence.h new file mode 100644 index 00000000..a39f840a --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSequence.h @@ -0,0 +1,154 @@ +// +// RACSequence.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import +#import "RACStream.h" + +@class RACScheduler; +@class RACSignal; + +/// Represents an immutable sequence of values. Unless otherwise specified, the +/// sequences' values are evaluated lazily on demand. Like Cocoa collections, +/// sequences cannot contain nil. +/// +/// Most inherited RACStream methods that accept a block will execute the block +/// _at most_ once for each value that is evaluated in the returned sequence. +/// Side effects are subject to the behavior described in +/// +sequenceWithHeadBlock:tailBlock:. +/// +/// Implemented as a class cluster. A minimal implementation for a subclass +/// consists simply of -head and -tail. +@interface RACSequence : RACStream + +/// The first object in the sequence, or nil if the sequence is empty. +/// +/// Subclasses must provide an implementation of this method. +@property (nonatomic, strong, readonly) id head; + +/// All but the first object in the sequence, or nil if the sequence is empty. +/// +/// Subclasses must provide an implementation of this method. +@property (nonatomic, strong, readonly) RACSequence *tail; + +/// Evaluates the full sequence to produce an equivalently-sized array. +@property (nonatomic, copy, readonly) NSArray *array; + +/// Returns an enumerator of all objects in the sequence. +@property (nonatomic, copy, readonly) NSEnumerator *objectEnumerator; + +/// Converts a sequence into an eager sequence. +/// +/// An eager sequence fully evaluates all of its values immediately. Sequences +/// derived from an eager sequence will also be eager. +/// +/// Returns a new eager sequence, or the receiver if the sequence is already +/// eager. +@property (nonatomic, copy, readonly) RACSequence *eagerSequence; + +/// Converts a sequence into a lazy sequence. +/// +/// A lazy sequence evaluates its values on demand, as they are accessed. +/// Sequences derived from a lazy sequence will also be lazy. +/// +/// Returns a new lazy sequence, or the receiver if the sequence is already lazy. +@property (nonatomic, copy, readonly) RACSequence *lazySequence; + +/// Invokes -signalWithScheduler: with a new RACScheduler. +- (RACSignal *)signal; + +/// Evaluates the full sequence on the given scheduler. +/// +/// Each item is evaluated in its own scheduled block, such that control of the +/// scheduler is yielded between each value. +/// +/// Returns a signal which sends the receiver's values on the given scheduler as +/// they're evaluated. +- (RACSignal *)signalWithScheduler:(RACScheduler *)scheduler; + +/// Applies a left fold to the sequence. +/// +/// This is the same as iterating the sequence along with a provided start value. +/// This uses a constant amount of memory. A left fold is left-associative so in +/// the sequence [1,2,3] the block would applied in the following order: +/// reduce(reduce(reduce(start, 1), 2), 3) +/// +/// start - The starting value for the fold. Used as `accumulator` for the +/// first fold. +/// reduce - The block used to combine the accumulated value and the next value. +/// Cannot be nil. +/// +/// Returns a reduced value. +- (id)foldLeftWithStart:(id)start reduce:(id (^)(id accumulator, id value))reduce; + +/// Applies a right fold to the sequence. +/// +/// A right fold is equivalent to recursion on the list. The block is evaluated +/// from the right to the left in list. It is right associative so it's applied +/// to the rightmost elements first. For example, in the sequence [1,2,3] the +/// block is applied in the order: +/// reduce(1, reduce(2, reduce(3, start))) +/// +/// start - The starting value for the fold. +/// reduce - The block used to combine the accumulated value and the next head. +/// The block is given the accumulated value and the value of the rest +/// of the computation (result of the recursion). This is computed when +/// you retrieve its value using `rest.head`. This allows you to +/// prevent unnecessary computation by not accessing `rest.head` if you +/// don't need to. +/// +/// Returns a reduced value. +- (id)foldRightWithStart:(id)start reduce:(id (^)(id first, RACSequence *rest))reduce; + +/// Check if any value in sequence passes the block. +/// +/// block - The block predicate used to check each item. Cannot be nil. +/// +/// Returns a boolean indiciating if any value in the sequence passed. +- (BOOL)any:(BOOL (^)(id value))block; + +/// Check if all values in the sequence pass the block. +/// +/// block - The block predicate used to check each item. Cannot be nil. +/// +/// Returns a boolean indicating if all values in the sequence passed. +- (BOOL)all:(BOOL (^)(id value))block; + +/// Returns the first object that passes the block. +/// +/// block - The block predicate used to check each item. Cannot be nil. +/// +/// Returns an object that passes the block or nil if no objects passed. +- (id)objectPassingTest:(BOOL (^)(id value))block; + +/// Creates a sequence that dynamically generates its values. +/// +/// headBlock - Invoked the first time -head is accessed. +/// tailBlock - Invoked the first time -tail is accessed. +/// +/// The results from each block are memoized, so each block will be invoked at +/// most once, no matter how many times the head and tail properties of the +/// sequence are accessed. +/// +/// Any side effects in `headBlock` or `tailBlock` should be thread-safe, since +/// the sequence may be evaluated at any time from any thread. Not only that, but +/// -tail may be accessed before -head, or both may be accessed simultaneously. +/// As noted above, side effects will only be triggered the _first_ time -head or +/// -tail is invoked. +/// +/// Returns a sequence that lazily invokes the given blocks to provide head and +/// tail. `headBlock` must not be nil. ++ (RACSequence *)sequenceWithHeadBlock:(id (^)(void))headBlock tailBlock:(RACSequence *(^)(void))tailBlock; + +@end + +@interface RACSequence (Deprecated) + +- (id)foldLeftWithStart:(id)start combine:(id (^)(id accumulator, id value))combine __attribute__((deprecated("Renamed to -foldLeftWithStart:reduce:"))); +- (id)foldRightWithStart:(id)start combine:(id (^)(id first, RACSequence *rest))combine __attribute__((deprecated("Renamed to -foldRightWithStart:reduce:"))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSequence.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSequence.m new file mode 100644 index 00000000..9567ea8d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSequence.m @@ -0,0 +1,384 @@ +// +// RACSequence.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "RACSequence.h" +#import "RACArraySequence.h" +#import "RACDynamicSequence.h" +#import "RACEagerSequence.h" +#import "RACEmptySequence.h" +#import "RACScheduler.h" +#import "RACSignal.h" +#import "RACSubscriber.h" +#import "RACTuple.h" +#import "RACUnarySequence.h" + +// An enumerator over sequences. +@interface RACSequenceEnumerator : NSEnumerator + +// The sequence the enumerator is enumerating. +// +// This will change as the enumerator is exhausted. This property should only be +// accessed while synchronized on self. +@property (nonatomic, strong) RACSequence *sequence; + +@end + +@interface RACSequence () + +// Performs one iteration of lazy binding, passing through values from `current` +// until the sequence is exhausted, then recursively binding the remaining +// values in the receiver. +// +// Returns a new sequence which contains `current`, followed by the combined +// result of all applications of `block` to the remaining values in the receiver. +- (instancetype)bind:(RACStreamBindBlock)block passingThroughValuesFromSequence:(RACSequence *)current; + +@end + +@implementation RACSequenceEnumerator + +- (id)nextObject { + id object = nil; + + @synchronized (self) { + object = self.sequence.head; + self.sequence = self.sequence.tail; + } + + return object; +} + +@end + +@implementation RACSequence + +#pragma mark Lifecycle + ++ (RACSequence *)sequenceWithHeadBlock:(id (^)(void))headBlock tailBlock:(RACSequence *(^)(void))tailBlock { + return [[RACDynamicSequence sequenceWithHeadBlock:headBlock tailBlock:tailBlock] setNameWithFormat:@"+sequenceWithHeadBlock:tailBlock:"]; +} + +#pragma mark Class cluster primitives + +- (id)head { + NSCAssert(NO, @"%s must be overridden by subclasses", __func__); + return nil; +} + +- (RACSequence *)tail { + NSCAssert(NO, @"%s must be overridden by subclasses", __func__); + return nil; +} + +#pragma mark RACStream + ++ (instancetype)empty { + return RACEmptySequence.empty; +} + ++ (instancetype)return:(id)value { + return [RACUnarySequence return:value]; +} + +- (instancetype)bind:(RACStreamBindBlock (^)(void))block { + RACStreamBindBlock bindBlock = block(); + return [[self bind:bindBlock passingThroughValuesFromSequence:nil] setNameWithFormat:@"[%@] -bind:", self.name]; +} + +- (instancetype)bind:(RACStreamBindBlock)bindBlock passingThroughValuesFromSequence:(RACSequence *)passthroughSequence { + // Store values calculated in the dependency here instead, avoiding any kind + // of temporary collection and boxing. + // + // This relies on the implementation of RACDynamicSequence synchronizing + // access to its head, tail, and dependency, and we're only doing it because + // we really need the performance. + __block RACSequence *valuesSeq = self; + __block RACSequence *current = passthroughSequence; + __block BOOL stop = NO; + + RACSequence *sequence = [RACDynamicSequence sequenceWithLazyDependency:^ id { + while (current.head == nil) { + if (stop) return nil; + + // We've exhausted the current sequence, create a sequence from the + // next value. + id value = valuesSeq.head; + + if (value == nil) { + // We've exhausted all the sequences. + stop = YES; + return nil; + } + + current = (id)bindBlock(value, &stop); + if (current == nil) { + stop = YES; + return nil; + } + + valuesSeq = valuesSeq.tail; + } + + NSCAssert([current isKindOfClass:RACSequence.class], @"-bind: block returned an object that is not a sequence: %@", current); + return nil; + } headBlock:^(id _) { + return current.head; + } tailBlock:^ id (id _) { + if (stop) return nil; + + return [valuesSeq bind:bindBlock passingThroughValuesFromSequence:current.tail]; + }]; + + sequence.name = self.name; + return sequence; +} + +- (instancetype)concat:(RACStream *)stream { + NSCParameterAssert(stream != nil); + + return [[[RACArraySequence sequenceWithArray:@[ self, stream ] offset:0] + flatten] + setNameWithFormat:@"[%@] -concat: %@", self.name, stream]; +} + +- (instancetype)zipWith:(RACSequence *)sequence { + NSCParameterAssert(sequence != nil); + + return [[RACSequence + sequenceWithHeadBlock:^ id { + if (self.head == nil || sequence.head == nil) return nil; + return RACTuplePack(self.head, sequence.head); + } tailBlock:^ id { + if (self.tail == nil || [[RACSequence empty] isEqual:self.tail]) return nil; + if (sequence.tail == nil || [[RACSequence empty] isEqual:sequence.tail]) return nil; + + return [self.tail zipWith:sequence.tail]; + }] + setNameWithFormat:@"[%@] -zipWith: %@", self.name, sequence]; +} + +#pragma mark Extended methods + +- (NSArray *)array { + NSMutableArray *array = [NSMutableArray array]; + for (id obj in self) { + [array addObject:obj]; + } + + return [array copy]; +} + +- (NSEnumerator *)objectEnumerator { + RACSequenceEnumerator *enumerator = [[RACSequenceEnumerator alloc] init]; + enumerator.sequence = self; + return enumerator; +} + +- (RACSignal *)signal { + return [[self signalWithScheduler:[RACScheduler scheduler]] setNameWithFormat:@"[%@] -signal", self.name]; +} + +- (RACSignal *)signalWithScheduler:(RACScheduler *)scheduler { + return [[RACSignal createSignal:^(id subscriber) { + __block RACSequence *sequence = self; + + return [scheduler scheduleRecursiveBlock:^(void (^reschedule)(void)) { + if (sequence.head == nil) { + [subscriber sendCompleted]; + return; + } + + [subscriber sendNext:sequence.head]; + + sequence = sequence.tail; + reschedule(); + }]; + }] setNameWithFormat:@"[%@] -signalWithScheduler:", self.name]; +} + +- (id)foldLeftWithStart:(id)start reduce:(id (^)(id, id))reduce { + NSCParameterAssert(reduce != NULL); + + if (self.head == nil) return start; + + for (id value in self) { + start = reduce(start, value); + } + + return start; +} + +- (id)foldRightWithStart:(id)start reduce:(id (^)(id, RACSequence *))reduce { + NSCParameterAssert(reduce != NULL); + + if (self.head == nil) return start; + + RACSequence *rest = [RACSequence sequenceWithHeadBlock:^{ + return [self.tail foldRightWithStart:start reduce:reduce]; + } tailBlock:nil]; + + return reduce(self.head, rest); +} + +- (BOOL)any:(BOOL (^)(id))block { + NSCParameterAssert(block != NULL); + + return [self objectPassingTest:block] != nil; +} + +- (BOOL)all:(BOOL (^)(id))block { + NSCParameterAssert(block != NULL); + + NSNumber *result = [self foldLeftWithStart:@YES reduce:^(NSNumber *accumulator, id value) { + return @(accumulator.boolValue && block(value)); + }]; + + return result.boolValue; +} + +- (id)objectPassingTest:(BOOL (^)(id))block { + NSCParameterAssert(block != NULL); + + return [self filter:block].head; +} + +- (RACSequence *)eagerSequence { + return [RACEagerSequence sequenceWithArray:self.array offset:0]; +} + +- (RACSequence *)lazySequence { + return self; +} + +#pragma mark NSCopying + +- (id)copyWithZone:(NSZone *)zone { + return self; +} + +#pragma mark NSCoding + +- (Class)classForCoder { + // Most sequences should be archived as RACArraySequences. + return RACArraySequence.class; +} + +- (id)initWithCoder:(NSCoder *)coder { + if (![self isKindOfClass:RACArraySequence.class]) return [[RACArraySequence alloc] initWithCoder:coder]; + + // Decoding is handled in RACArraySequence. + return [super init]; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.array forKey:@"array"]; +} + +#pragma mark NSFastEnumeration + +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id *)stackbuf count:(NSUInteger)len { + if (state->state == ULONG_MAX) { + // Enumeration has completed. + return 0; + } + + // We need to traverse the sequence itself on repeated calls to this + // method, so use the 'state' field to track the current head. + RACSequence *(^getSequence)(void) = ^{ + return (__bridge RACSequence *)(void *)state->state; + }; + + void (^setSequence)(RACSequence *) = ^(RACSequence *sequence) { + // Release the old sequence and retain the new one. + CFBridgingRelease((void *)state->state); + + state->state = (unsigned long)CFBridgingRetain(sequence); + }; + + void (^complete)(void) = ^{ + // Release any stored sequence. + setSequence(nil); + state->state = ULONG_MAX; + }; + + if (state->state == 0) { + // Since a sequence doesn't mutate, this just needs to be set to + // something non-NULL. + state->mutationsPtr = state->extra; + + setSequence(self); + } + + state->itemsPtr = stackbuf; + + NSUInteger enumeratedCount = 0; + while (enumeratedCount < len) { + RACSequence *seq = getSequence(); + + // Because the objects in a sequence may be generated lazily, we want to + // prevent them from being released until the enumerator's used them. + __autoreleasing id obj = seq.head; + if (obj == nil) { + complete(); + break; + } + + stackbuf[enumeratedCount++] = obj; + + if (seq.tail == nil) { + complete(); + break; + } + + setSequence(seq.tail); + } + + return enumeratedCount; +} + +#pragma mark NSObject + +- (NSUInteger)hash { + return [self.head hash]; +} + +- (BOOL)isEqual:(RACSequence *)seq { + if (self == seq) return YES; + if (![seq isKindOfClass:RACSequence.class]) return NO; + + for (id selfObj in self) { + id seqObj = seq.head; + + // Handles the nil case too. + if (![seqObj isEqual:selfObj]) return NO; + + seq = seq.tail; + } + + // self is now depleted -- the argument should be too. + return (seq.head == nil); +} + +@end + +@implementation RACSequence (Deprecated) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" + +- (id)foldLeftWithStart:(id)start combine:(id (^)(id accumulator, id value))combine { + return [self foldLeftWithStart:start reduce:combine]; +} + +- (id)foldRightWithStart:(id)start combine:(id (^)(id first, RACSequence *rest))combine { + return [self foldRightWithStart:start reduce:combine]; +} + +#pragma clang diagnostic pop + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSerialDisposable.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSerialDisposable.h new file mode 100644 index 00000000..a3fc1d45 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSerialDisposable.h @@ -0,0 +1,43 @@ +// +// RACSerialDisposable.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-07-22. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACDisposable.h" + +/// A disposable that contains exactly one other disposable and allows it to be +/// swapped out atomically. +@interface RACSerialDisposable : RACDisposable + +/// The inner disposable managed by the serial disposable. +/// +/// This property is thread-safe for reading and writing. However, if you want to +/// read the current value _and_ write a new one atomically, use +/// -swapInDisposable: instead. +/// +/// Disposing of the receiver will also dispose of the current disposable set for +/// this property, then set the property to nil. If any new disposable is set +/// after the receiver is disposed, it will be disposed immediately and this +/// property will remain set to nil. +@property (atomic, strong) RACDisposable *disposable; + +/// Creates a serial disposable which will wrap the given disposable. +/// +/// disposable - The value to set for `disposable`. This may be nil. +/// +/// Returns a RACSerialDisposable, or nil if an error occurs. ++ (instancetype)serialDisposableWithDisposable:(RACDisposable *)disposable; + +/// Atomically swaps the receiver's `disposable` for `newDisposable`. +/// +/// newDisposable - The new value for `disposable`. If the receiver has already +/// been disposed, this disposable will be too, and `disposable` +/// will remain set to nil. This argument may be nil. +/// +/// Returns the previous value for the `disposable` property. +- (RACDisposable *)swapInDisposable:(RACDisposable *)newDisposable; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSerialDisposable.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSerialDisposable.m new file mode 100644 index 00000000..975afbfe --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSerialDisposable.m @@ -0,0 +1,133 @@ +// +// RACSerialDisposable.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-07-22. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACSerialDisposable.h" +#import + +@interface RACSerialDisposable () { + // A reference to the receiver's `disposable`. This variable must only be + // modified atomically. + // + // If this is `self`, no `disposable` has been set, but the receiver has not + // been disposed of yet. `self` is never stored retained. + // + // If this is `nil`, the receiver has been disposed. + // + // Otherwise, this is a retained reference to the inner disposable and the + // receiver has not been disposed of yet. + void * volatile _disposablePtr; +} + +@end + +@implementation RACSerialDisposable + +#pragma mark Properties + +- (BOOL)isDisposed { + return _disposablePtr == nil; +} + +- (RACDisposable *)disposable { + RACDisposable *disposable = (__bridge id)_disposablePtr; + return (disposable == self ? nil : disposable); +} + +- (void)setDisposable:(RACDisposable *)disposable { + [self swapInDisposable:disposable]; +} + +#pragma mark Lifecycle + ++ (instancetype)serialDisposableWithDisposable:(RACDisposable *)disposable { + RACSerialDisposable *serialDisposable = [[self alloc] init]; + serialDisposable.disposable = disposable; + return serialDisposable; +} + +- (id)init { + self = [super init]; + if (self == nil) return nil; + + _disposablePtr = (__bridge void *)self; + OSMemoryBarrier(); + + return self; +} + +- (id)initWithBlock:(void (^)(void))block { + self = [self init]; + if (self == nil) return nil; + + self.disposable = [RACDisposable disposableWithBlock:block]; + + return self; +} + +- (void)dealloc { + self.disposable = nil; +} + +#pragma mark Inner Disposable + +- (RACDisposable *)swapInDisposable:(RACDisposable *)newDisposable { + void * const selfPtr = (__bridge void *)self; + + // Only retain the new disposable if it's not `self`. + // Take ownership before attempting the swap so that a subsequent swap + // receives an owned reference. + void *newDisposablePtr = selfPtr; + if (newDisposable != nil) { + newDisposablePtr = (void *)CFBridgingRetain(newDisposable); + } + + void *existingDisposablePtr; + // Keep trying while we're not disposed. + while ((existingDisposablePtr = _disposablePtr) != NULL) { + if (!OSAtomicCompareAndSwapPtrBarrier(existingDisposablePtr, newDisposablePtr, &_disposablePtr)) { + continue; + } + + // Return nil if _disposablePtr was set to self. Otherwise, release + // the old value and return it as an object. + if (existingDisposablePtr == selfPtr) { + return nil; + } else { + return CFBridgingRelease(existingDisposablePtr); + } + } + + // At this point, we've found out that we were already disposed. + [newDisposable dispose]; + + // Failed to swap, clean up the ownership we took prior to the swap. + if (newDisposable != nil) { + CFRelease(newDisposablePtr); + } + + return nil; +} + +#pragma mark Disposal + +- (void)dispose { + void *existingDisposablePtr; + + while ((existingDisposablePtr = _disposablePtr) != NULL) { + if (OSAtomicCompareAndSwapPtrBarrier(existingDisposablePtr, NULL, &_disposablePtr)) { + if (existingDisposablePtr != (__bridge void *)self) { + RACDisposable *existingDisposable = CFBridgingRelease(existingDisposablePtr); + [existingDisposable dispose]; + } + + break; + } + } +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.h new file mode 100644 index 00000000..b5951dde --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.h @@ -0,0 +1,597 @@ +// +// RACSignal+Operations.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-09-06. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import "RACSignal.h" + +/// The domain for errors originating in RACSignal operations. +extern NSString * const RACSignalErrorDomain; + +/// The error code used with -timeout:. +extern const NSInteger RACSignalErrorTimedOut; + +/// The error code used when a value passed into +switch:cases:default: does not +/// match any of the cases, and no default was given. +extern const NSInteger RACSignalErrorNoMatchingCase; + +@class RACMulticastConnection; +@class RACDisposable; +@class RACScheduler; +@class RACSequence; +@class RACSubject; +@class RACTuple; +@class RACCommand; +@protocol RACSubscriber; + +@interface RACSignal (Operations) + +/// Do the given block on `next`. This should be used to inject side effects into +/// the signal. +- (RACSignal *)doNext:(void (^)(id x))block; + +/// Do the given block on `error`. This should be used to inject side effects +/// into the signal. +- (RACSignal *)doError:(void (^)(NSError *error))block; + +/// Do the given block on `completed`. This should be used to inject side effects +/// into the signal. +- (RACSignal *)doCompleted:(void (^)(void))block; + +/// Send `next`s only if we don't receive another `next` in `interval` seconds. +/// +/// If a `next` is received, and then another `next` is received before +/// `interval` seconds have passed, the first value is discarded. +/// +/// After `interval` seconds have passed since the most recent `next` was sent, +/// the most recent `next` is forwarded on the scheduler that the value was +/// originally received on. If +[RACScheduler currentScheduler] was nil at the +/// time, a private background scheduler is used. +/// +/// Returns a signal which sends throttled and delayed `next` events. Completion +/// and errors are always forwarded immediately. +- (RACSignal *)throttle:(NSTimeInterval)interval; + +/// Throttles `next`s for which `predicate` returns YES. +/// +/// When `predicate` returns YES for a `next`: +/// +/// 1. If another `next` is received before `interval` seconds have passed, the +/// prior value is discarded. This happens regardless of whether the new +/// value will be throttled. +/// 2. After `interval` seconds have passed since the value was originally +/// received, it will be forwarded on the scheduler that it was received +/// upon. If +[RACScheduler currentScheduler] was nil at the time, a private +/// background scheduler is used. +/// +/// When `predicate` returns NO for a `next`, it is forwarded immediately, +/// without any throttling. +/// +/// interval - The number of seconds for which to buffer the latest value that +/// passes `predicate`. +/// predicate - Passed each `next` from the receiver, this block returns +/// whether the given value should be throttled. This argument must +/// not be nil. +/// +/// Returns a signal which sends `next` events, throttled when `predicate` +/// returns YES. Completion and errors are always forwarded immediately. +- (RACSignal *)throttle:(NSTimeInterval)interval valuesPassingTest:(BOOL (^)(id next))predicate; + +/// Forwards `next` and `completed` events after delaying for `interval` seconds +/// on the current scheduler (on which the events were delivered). +/// +/// If +[RACScheduler currentScheduler] is nil when `next` or `completed` is +/// received, a private background scheduler is used. +/// +/// Returns a signal which sends delayed `next` and `completed` events. Errors +/// are always forwarded immediately. +- (RACSignal *)delay:(NSTimeInterval)interval; + +/// Resubscribes when the signal completes. +- (RACSignal *)repeat; + +/// Execute the given block each time a subscription is created. +/// +/// block - A block which defines the subscription side effects. Cannot be `nil`. +/// +/// Example: +/// +/// // Write new file, with backup. +/// [[[[fileManager +/// rac_createFileAtPath:path contents:data] +/// initially:^{ +/// // 2. Second, backup current file +/// [fileManager moveItemAtPath:path toPath:backupPath error:nil]; +/// }] +/// initially:^{ +/// // 1. First, acquire write lock. +/// [writeLock lock]; +/// }] +/// finally:^{ +/// [writeLock unlock]; +/// }]; +/// +/// Returns a signal that passes through all events of the receiver, plus +/// introduces side effects which occur prior to any subscription side effects +/// of the receiver. +- (RACSignal *)initially:(void (^)(void))block; + +/// Execute the given block when the signal completes or errors. +- (RACSignal *)finally:(void (^)(void))block; + +/// Divides the receiver's `next`s into buffers which deliver every `interval` +/// seconds. +/// +/// interval - The interval in which values are grouped into one buffer. +/// scheduler - The scheduler upon which the returned signal will deliver its +/// values. This must not be nil or +[RACScheduler +/// immediateScheduler]. +/// +/// Returns a signal which sends RACTuples of the buffered values at each +/// interval on `scheduler`. When the receiver completes, any currently-buffered +/// values will be sent immediately. +- (RACSignal *)bufferWithTime:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler; + +/// Collect all receiver's `next`s into a NSArray. nil values will be converted +/// to NSNull. +/// +/// This corresponds to the `ToArray` method in Rx. +/// +/// Returns a signal which sends a single NSArray when the receiver completes +/// successfully. +- (RACSignal *)collect; + +/// Takes the last `count` `next`s after the receiving signal completes. +- (RACSignal *)takeLast:(NSUInteger)count; + +/// Combines the latest values from the receiver and the given signal into +/// RACTuples, once both have sent at least one `next`. +/// +/// Any additional `next`s will result in a new RACTuple with the latest values +/// from both signals. +/// +/// signal - The signal to combine with. This argument must not be nil. +/// +/// Returns a signal which sends RACTuples of the combined values, forwards any +/// `error` events, and completes when both input signals complete. +- (RACSignal *)combineLatestWith:(RACSignal *)signal; + +/// Combines the latest values from the given signals into RACTuples, once all +/// the signals have sent at least one `next`. +/// +/// Any additional `next`s will result in a new RACTuple with the latest values +/// from all signals. +/// +/// signals - The signals to combine. If this collection is empty, the returned +/// signal will immediately complete upon subscription. +/// +/// Returns a signal which sends RACTuples of the combined values, forwards any +/// `error` events, and completes when all input signals complete. ++ (RACSignal *)combineLatest:(id)signals; + +/// Combines signals using +combineLatest:, then reduces the resulting tuples +/// into a single value using -reduceEach:. +/// +/// signals - The signals to combine. If this collection is empty, the +/// returned signal will immediately complete upon subscription. +/// reduceBlock - The block which reduces the latest values from all the +/// signals into one value. It must take as many arguments as the +/// number of signals given. Each argument will be an object +/// argument. The return value must be an object. This argument +/// must not be nil. +/// +/// Example: +/// +/// [RACSignal combineLatest:@[ stringSignal, intSignal ] reduce:^(NSString *string, NSNumber *number) { +/// return [NSString stringWithFormat:@"%@: %@", string, number]; +/// }]; +/// +/// Returns a signal which sends the results from each invocation of +/// `reduceBlock`. ++ (RACSignal *)combineLatest:(id)signals reduce:(id (^)())reduceBlock; + +/// Sends the latest `next` from any of the signals. +/// +/// Returns a signal that passes through values from each of the given signals, +/// and sends `completed` when all of them complete. If any signal sends an error, +/// the returned signal sends `error` immediately. ++ (RACSignal *)merge:(id)signals; + +/// Merges the signals sent by the receiver into a flattened signal, but only +/// subscribes to `maxConcurrent` number of signals at a time. New signals are +/// queued and subscribed to as other signals complete. +/// +/// If an error occurs on any of the signals, it is sent on the returned signal. +/// It completes only after the receiver and all sent signals have completed. +/// +/// This corresponds to `Merge(IObservable>, Int32)` +/// in Rx. +/// +/// maxConcurrent - the maximum number of signals to subscribe to at a +/// time. If 0, it subscribes to an unlimited number of +/// signals. +- (RACSignal *)flatten:(NSUInteger)maxConcurrent; + +/// Ignores all `next`s from the receiver, waits for the receiver to complete, +/// then subscribes to a new signal. +/// +/// block - A block which will create or obtain a new signal to subscribe to, +/// executed only after the receiver completes. This block must not be +/// nil, and it must not return a nil signal. +/// +/// Returns a signal which will pass through the events of the signal created in +/// `block`. If the receiver errors out, the returned signal will error as well. +- (RACSignal *)then:(RACSignal * (^)(void))block; + +/// Concats the inner signals of a signal of signals. +- (RACSignal *)concat; + +/// Aggregate `next`s with the given start and combination. +- (RACSignal *)aggregateWithStart:(id)start reduce:(id (^)(id running, id next))reduceBlock; + +/// Aggregate `next`s with the given start and combination. The start factory +/// block is called to get a new start object for each subscription. +- (RACSignal *)aggregateWithStartFactory:(id (^)(void))startFactory reduce:(id (^)(id running, id next))reduceBlock; + +/// Invokes -setKeyPath:onObject:nilValue: with `nil` for the nil value. +- (RACDisposable *)setKeyPath:(NSString *)keyPath onObject:(NSObject *)object; + +/// Binds the receiver to an object, automatically setting the given key path on +/// every `next`. When the signal completes, the binding is automatically +/// disposed of. +/// +/// Sending an error on the signal is considered undefined behavior, and will +/// generate an assertion failure in Debug builds. +/// +/// A given key on an object should only have one active signal bound to it at any +/// given time. Binding more than one signal to the same property is considered +/// undefined behavior. +/// +/// keyPath - The key path to update with `next`s from the receiver. +/// object - The object that `keyPath` is relative to. +/// nilValue - The value to set at the key path whenever `nil` is sent by the +/// receiver. This may be nil when binding to object properties, but +/// an NSValue should be used for primitive properties, to avoid an +/// exception if `nil` is sent (which might occur if an intermediate +/// object is set to `nil`). +/// +/// Returns a disposable which can be used to terminate the binding. +- (RACDisposable *)setKeyPath:(NSString *)keyPath onObject:(NSObject *)object nilValue:(id)nilValue; + +/// Sends NSDate.date every `interval` seconds. +/// +/// interval - The time interval in seconds at which the current time is sent. +/// scheduler - The scheduler upon which the current NSDate should be sent. This +/// must not be nil or +[RACScheduler immediateScheduler]. +/// +/// Returns a signal that sends the current date/time every `interval` on +/// `scheduler`. ++ (RACSignal *)interval:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler; + +/// Sends NSDate.date at intervals of at least `interval` seconds, up to +/// approximately `interval` + `leeway` seconds. +/// +/// The created signal will defer sending each `next` for at least `interval` +/// seconds, and for an additional amount of time up to `leeway` seconds in the +/// interest of performance or power consumption. Note that some additional +/// latency is to be expected, even when specifying a `leeway` of 0. +/// +/// interval - The base interval between `next`s. +/// scheduler - The scheduler upon which the current NSDate should be sent. This +/// must not be nil or +[RACScheduler immediateScheduler]. +/// leeway - The maximum amount of additional time the `next` can be deferred. +/// +/// Returns a signal that sends the current date/time at intervals of at least +/// `interval seconds` up to approximately `interval` + `leeway` seconds on +/// `scheduler`. ++ (RACSignal *)interval:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler withLeeway:(NSTimeInterval)leeway; + +/// Take `next`s until the `signalTrigger` sends `next` or `completed`. +/// +/// Returns a signal which passes through all events from the receiver until +/// `signalTrigger` sends `next` or `completed`, at which point the returned signal +/// will send `completed`. +- (RACSignal *)takeUntil:(RACSignal *)signalTrigger; + +/// Subscribe to the returned signal when an error occurs. +- (RACSignal *)catch:(RACSignal * (^)(NSError *error))catchBlock; + +/// Subscribe to the given signal when an error occurs. +- (RACSignal *)catchTo:(RACSignal *)signal; + +/// Runs `tryBlock` against each of the receiver's values, passing values +/// until `tryBlock` returns NO, or the receiver completes. +/// +/// tryBlock - An action to run against each of the receiver's values. +/// The block should return YES to indicate that the action was +/// successful. This block must not be nil. +/// +/// Example: +/// +/// // The returned signal will send an error if data values cannot be +/// // written to `someFileURL`. +/// [signal try:^(NSData *data, NSError **errorPtr) { +/// return [data writeToURL:someFileURL options:NSDataWritingAtomic error:errorPtr]; +/// }]; +/// +/// Returns a signal which passes through all the values of the receiver. If +/// `tryBlock` fails for any value, the returned signal will error using the +/// `NSError` passed out from the block. +- (RACSignal *)try:(BOOL (^)(id value, NSError **errorPtr))tryBlock; + +/// Runs `mapBlock` against each of the receiver's values, mapping values until +/// `mapBlock` returns nil, or the receiver completes. +/// +/// mapBlock - An action to map each of the receiver's values. The block should +/// return a non-nil value to indicate that the action was successful. +/// This block must not be nil. +/// +/// Example: +/// +/// // The returned signal will send an error if data cannot be read from +/// // `fileURL`. +/// [signal tryMap:^(NSURL *fileURL, NSError **errorPtr) { +/// return [NSData dataWithContentsOfURL:fileURL options:0 error:errorPtr]; +/// }]; +/// +/// Returns a signal which transforms all the values of the receiver. If +/// `mapBlock` returns nil for any value, the returned signal will error using +/// the `NSError` passed out from the block. +- (RACSignal *)tryMap:(id (^)(id value, NSError **errorPtr))mapBlock; + +/// Returns the first `next`. Note that this is a blocking call. +- (id)first; + +/// Returns the first `next` or `defaultValue` if the signal completes or errors +/// without sending a `next`. Note that this is a blocking call. +- (id)firstOrDefault:(id)defaultValue; + +/// Returns the first `next` or `defaultValue` if the signal completes or errors +/// without sending a `next`. If an error occurs success will be NO and error +/// will be populated. Note that this is a blocking call. +/// +/// Both success and error may be NULL. +- (id)firstOrDefault:(id)defaultValue success:(BOOL *)success error:(NSError **)error; + +/// Blocks the caller and waits for the signal to complete. +/// +/// error - If not NULL, set to any error that occurs. +/// +/// Returns whether the signal completed successfully. If NO, `error` will be set +/// to the error that occurred. +- (BOOL)waitUntilCompleted:(NSError **)error; + +/// Defer creation of a signal until the signal's actually subscribed to. +/// +/// This can be used to effectively turn a hot signal into a cold signal. ++ (RACSignal *)defer:(RACSignal * (^)(void))block; + +/// Every time the receiver sends a new RACSignal, subscribes and sends `next`s and +/// `error`s only for that signal. +/// +/// The receiver must be a signal of signals. +/// +/// Returns a signal which passes through `next`s and `error`s from the latest +/// signal sent by the receiver, and sends `completed` when both the receiver and +/// the last sent signal complete. +- (RACSignal *)switchToLatest; + +/// Switches between the signals in `cases` as well as `defaultSignal` based on +/// the latest value sent by `signal`. +/// +/// signal - A signal of objects used as keys in the `cases` dictionary. +/// This argument must not be nil. +/// cases - A dictionary that has signals as values. This argument must +/// not be nil. A RACTupleNil key in this dictionary will match +/// nil `next` events that are received on `signal`. +/// defaultSignal - The signal to pass through after `signal` sends a value for +/// which `cases` does not contain a signal. If nil, any +/// unmatched values will result in +/// a RACSignalErrorNoMatchingCase error. +/// +/// Returns a signal which passes through `next`s and `error`s from one of the +/// the signals in `cases` or `defaultSignal`, and sends `completed` when both +/// `signal` and the last used signal complete. If no `defaultSignal` is given, +/// an unmatched `next` will result in an error on the returned signal. ++ (RACSignal *)switch:(RACSignal *)signal cases:(NSDictionary *)cases default:(RACSignal *)defaultSignal; + +/// Switches between `trueSignal` and `falseSignal` based on the latest value +/// sent by `boolSignal`. +/// +/// boolSignal - A signal of BOOLs determining whether `trueSignal` or +/// `falseSignal` should be active. This argument must not be nil. +/// trueSignal - The signal to pass through after `boolSignal` has sent YES. +/// This argument must not be nil. +/// falseSignal - The signal to pass through after `boolSignal` has sent NO. This +/// argument must not be nil. +/// +/// Returns a signal which passes through `next`s and `error`s from `trueSignal` +/// and/or `falseSignal`, and sends `completed` when both `boolSignal` and the +/// last switched signal complete. ++ (RACSignal *)if:(RACSignal *)boolSignal then:(RACSignal *)trueSignal else:(RACSignal *)falseSignal; + +/// Add every `next` to an array. Nils are represented by NSNulls. Note that this +/// is a blocking call. +/// +/// **This is not the same as the `ToArray` method in Rx.** See -collect for +/// that behavior instead. +/// +/// Returns the array of `next` values, or nil if an error occurs. +- (NSArray *)toArray; + +/// Add every `next` to a sequence. Nils are represented by NSNulls. +/// +/// This corresponds to the `ToEnumerable` method in Rx. +/// +/// Returns a sequence which provides values from the signal as they're sent. +/// Trying to retrieve a value from the sequence which has not yet been sent will +/// block. +@property (nonatomic, strong, readonly) RACSequence *sequence; + +/// Creates and returns a multicast connection. This allows you to share a single +/// subscription to the underlying signal. +- (RACMulticastConnection *)publish; + +/// Creates and returns a multicast connection that pushes values into the given +/// subject. This allows you to share a single subscription to the underlying +/// signal. +- (RACMulticastConnection *)multicast:(RACSubject *)subject; + +/// Multicasts the signal to a RACReplaySubject of unlimited capacity, and +/// immediately connects to the resulting RACMulticastConnection. +/// +/// Returns the connected, multicasted signal. +- (RACSignal *)replay; + +/// Multicasts the signal to a RACReplaySubject of capacity 1, and immediately +/// connects to the resulting RACMulticastConnection. +/// +/// Returns the connected, multicasted signal. +- (RACSignal *)replayLast; + +/// Multicasts the signal to a RACReplaySubject of unlimited capacity, and +/// lazily connects to the resulting RACMulticastConnection. +/// +/// This means the returned signal will subscribe to the multicasted signal only +/// when the former receives its first subscription. +/// +/// Returns the lazily connected, multicasted signal. +- (RACSignal *)replayLazily; + +/// Sends an error after `interval` seconds if the source doesn't complete +/// before then. +/// +/// The error will be in the RACSignalErrorDomain and have a code of +/// RACSignalErrorTimedOut. +/// +/// interval - The number of seconds after which the signal should error out. +/// scheduler - The scheduler upon which any timeout error should be sent. This +/// must not be nil or +[RACScheduler immediateScheduler]. +/// +/// Returns a signal that passes through the receiver's events, until the stream +/// finishes or times out, at which point an error will be sent on `scheduler`. +- (RACSignal *)timeout:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler; + +/// Creates and returns a signal that delivers its events on the given scheduler. +/// Any side effects of the receiver will still be performed on the original +/// thread. +/// +/// This is ideal when the signal already performs its work on the desired +/// thread, but you want to handle its events elsewhere. +/// +/// This corresponds to the `ObserveOn` method in Rx. +- (RACSignal *)deliverOn:(RACScheduler *)scheduler; + +/// Creates and returns a signal that executes its side effects and delivers its +/// events on the given scheduler. +/// +/// Use of this operator should be avoided whenever possible, because the +/// receiver's side effects may not be safe to run on another thread. If you just +/// want to receive the signal's events on `scheduler`, use -deliverOn: instead. +- (RACSignal *)subscribeOn:(RACScheduler *)scheduler; + +/// Groups each received object into a group, as determined by calling `keyBlock` +/// with that object. The object sent is transformed by calling `transformBlock` +/// with the object. If `transformBlock` is nil, it sends the original object. +/// +/// The returned signal is a signal of RACGroupedSignal. +- (RACSignal *)groupBy:(id (^)(id object))keyBlock transform:(id (^)(id object))transformBlock; + +/// Calls -[RACSignal groupBy:keyBlock transform:nil]. +- (RACSignal *)groupBy:(id (^)(id object))keyBlock; + +/// Sends an [NSNumber numberWithBool:YES] if the receiving signal sends any +/// objects. +- (RACSignal *)any; + +/// Sends an [NSNumber numberWithBool:YES] if the receiving signal sends any +/// objects that pass `predicateBlock`. +/// +/// predicateBlock - cannot be nil. +- (RACSignal *)any:(BOOL (^)(id object))predicateBlock; + +/// Sends an [NSNumber numberWithBool:YES] if all the objects the receiving +/// signal sends pass `predicateBlock`. +/// +/// predicateBlock - cannot be nil. +- (RACSignal *)all:(BOOL (^)(id object))predicateBlock; + +/// Resubscribes to the receiving signal if an error occurs, up until it has +/// retried the given number of times. +/// +/// retryCount - if 0, it keeps retrying until it completes. +- (RACSignal *)retry:(NSInteger)retryCount; + +/// Resubscribes to the receiving signal if an error occurs. +- (RACSignal *)retry; + +/// Sends the latest value from the receiver only when `sampler` sends a value. +/// The returned signal could repeat values if `sampler` fires more often than +/// the receiver. Values from `sampler` are ignored before the receiver sends +/// its first value. +/// +/// sampler - The signal that controls when the latest value from the receiver +/// is sent. Cannot be nil. +- (RACSignal *)sample:(RACSignal *)sampler; + +/// Ignores all `next`s from the receiver. +/// +/// Returns a signal which only passes through `error` or `completed` events from +/// the receiver. +- (RACSignal *)ignoreValues; + +/// Converts each of the receiver's events into a RACEvent object. +/// +/// Returns a signal which sends the receiver's events as RACEvents, and +/// completes after the receiver sends `completed` or `error`. +- (RACSignal *)materialize; + +/// Converts each RACEvent in the receiver back into "real" RACSignal events. +/// +/// Returns a signal which sends `next` for each value RACEvent, `error` for each +/// error RACEvent, and `completed` for each completed RACEvent. +- (RACSignal *)dematerialize; + +/// Inverts each NSNumber-wrapped BOOL sent by the receiver. It will assert if +/// the receiver sends anything other than NSNumbers. +/// +/// Returns a signal of inverted NSNumber-wrapped BOOLs. +- (RACSignal *)not; + +/// Performs a boolean AND on all of the RACTuple of NSNumbers in sent by the receiver. +/// +/// Asserts if the receiver sends anything other than a RACTuple of one or more NSNumbers. +/// +/// Returns a signal that applies AND to each NSNumber in the tuple. +- (RACSignal *)and; + +/// Performs a boolean OR on all of the RACTuple of NSNumbers in sent by the receiver. +/// +/// Asserts if the receiver sends anything other than a RACTuple of one or more NSNumbers. +/// +/// Returns a signal that applies OR to each NSNumber in the tuple. +- (RACSignal *)or; + +@end + +@interface RACSignal (OperationsDeprecated) + +- (RACSignal *)windowWithStart:(RACSignal *)openSignal close:(RACSignal * (^)(RACSignal *start))closeBlock __attribute__((deprecated("See https://github.com/ReactiveCocoa/ReactiveCocoa/issues/587"))); +- (RACSignal *)buffer:(NSUInteger)bufferCount __attribute__((deprecated("See https://github.com/ReactiveCocoa/ReactiveCocoa/issues/587"))); +- (RACSignal *)let:(RACSignal * (^)(RACSignal *sharedSignal))letBlock __attribute__((deprecated("Use -publish instead"))); ++ (RACSignal *)interval:(NSTimeInterval)interval __attribute__((deprecated("Use +interval:onScheduler: instead"))); ++ (RACSignal *)interval:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway __attribute__((deprecated("Use +interval:onScheduler:withLeeway: instead"))); +- (RACSignal *)bufferWithTime:(NSTimeInterval)interval __attribute__((deprecated("Use -bufferWithTime:onScheduler: instead"))); +- (RACSignal *)timeout:(NSTimeInterval)interval __attribute__((deprecated("Use -timeout:onScheduler: instead"))); +- (RACDisposable *)toProperty:(NSString *)keyPath onObject:(NSObject *)object __attribute__((deprecated("Renamed to -setKeyPath:onObject:"))); +- (RACSignal *)ignoreElements __attribute__((deprecated("Renamed to -ignoreValues"))); +- (RACSignal *)sequenceNext:(RACSignal * (^)(void))block __attribute__((deprecated("Renamed to -then:"))); +- (RACSignal *)aggregateWithStart:(id)start combine:(id (^)(id running, id next))combineBlock __attribute__((deprecated("Renamed to -aggregateWithStart:reduce:"))); +- (RACSignal *)aggregateWithStartFactory:(id (^)(void))startFactory combine:(id (^)(id running, id next))combineBlock __attribute__((deprecated("Renamed to -aggregateWithStartFactory:reduce:"))); +- (RACDisposable *)executeCommand:(RACCommand *)command __attribute__((deprecated("Use -flattenMap: or -subscribeNext: instead"))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.m new file mode 100644 index 00000000..9f09fe63 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal+Operations.m @@ -0,0 +1,1396 @@ +// +// RACSignal+Operations.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-09-06. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSignal+Operations.h" +#import "NSObject+RACDeallocating.h" +#import "NSObject+RACDescription.h" +#import "RACCommand.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACEvent.h" +#import "RACGroupedSignal.h" +#import "RACMulticastConnection+Private.h" +#import "RACReplaySubject.h" +#import "RACScheduler+Private.h" +#import "RACScheduler.h" +#import "RACSerialDisposable.h" +#import "RACSignalSequence.h" +#import "RACStream+Private.h" +#import "RACSubject.h" +#import "RACSubscriber+Private.h" +#import "RACSubscriber.h" +#import "RACTuple.h" +#import "RACUnit.h" +#import +#import + +NSString * const RACSignalErrorDomain = @"RACSignalErrorDomain"; + +const NSInteger RACSignalErrorTimedOut = 1; +const NSInteger RACSignalErrorNoMatchingCase = 2; + +// Subscribes to the given signal with the given blocks. +// +// If the signal errors or completes, the corresponding block is invoked. If the +// disposable passed to the block is _not_ disposed, then the signal is +// subscribed to again. +static RACDisposable *subscribeForever (RACSignal *signal, void (^next)(id), void (^error)(NSError *, RACDisposable *), void (^completed)(RACDisposable *)) { + next = [next copy]; + error = [error copy]; + completed = [completed copy]; + + RACCompoundDisposable *compoundDisposable = [RACCompoundDisposable compoundDisposable]; + + RACSchedulerRecursiveBlock recursiveBlock = ^(void (^recurse)(void)) { + RACCompoundDisposable *selfDisposable = [RACCompoundDisposable compoundDisposable]; + [compoundDisposable addDisposable:selfDisposable]; + + __weak RACDisposable *weakSelfDisposable = selfDisposable; + + RACDisposable *subscriptionDisposable = [signal subscribeNext:next error:^(NSError *e) { + @autoreleasepool { + error(e, compoundDisposable); + [compoundDisposable removeDisposable:weakSelfDisposable]; + } + + recurse(); + } completed:^{ + @autoreleasepool { + completed(compoundDisposable); + [compoundDisposable removeDisposable:weakSelfDisposable]; + } + + recurse(); + }]; + + [selfDisposable addDisposable:subscriptionDisposable]; + }; + + // Subscribe once immediately, and then use recursive scheduling for any + // further resubscriptions. + recursiveBlock(^{ + RACScheduler *recursiveScheduler = RACScheduler.currentScheduler ?: [RACScheduler scheduler]; + + RACDisposable *schedulingDisposable = [recursiveScheduler scheduleRecursiveBlock:recursiveBlock]; + [compoundDisposable addDisposable:schedulingDisposable]; + }); + + return compoundDisposable; +} + +@implementation RACSignal (Operations) + +- (RACSignal *)doNext:(void (^)(id x))block { + NSCParameterAssert(block != NULL); + + return [[RACSignal createSignal:^(id subscriber) { + return [self subscribeNext:^(id x) { + block(x); + [subscriber sendNext:x]; + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + [subscriber sendCompleted]; + }]; + }] setNameWithFormat:@"[%@] -doNext:", self.name]; +} + +- (RACSignal *)doError:(void (^)(NSError *error))block { + NSCParameterAssert(block != NULL); + + return [[RACSignal createSignal:^(id subscriber) { + return [self subscribeNext:^(id x) { + [subscriber sendNext:x]; + } error:^(NSError *error) { + block(error); + [subscriber sendError:error]; + } completed:^{ + [subscriber sendCompleted]; + }]; + }] setNameWithFormat:@"[%@] -doError:", self.name]; +} + +- (RACSignal *)doCompleted:(void (^)(void))block { + NSCParameterAssert(block != NULL); + + return [[RACSignal createSignal:^(id subscriber) { + return [self subscribeNext:^(id x) { + [subscriber sendNext:x]; + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + block(); + [subscriber sendCompleted]; + }]; + }] setNameWithFormat:@"[%@] -doCompleted:", self.name]; +} + +- (RACSignal *)throttle:(NSTimeInterval)interval { + return [[self throttle:interval valuesPassingTest:^(id _) { + return YES; + }] setNameWithFormat:@"[%@] -throttle: %f", self.name, (double)interval]; +} + +- (RACSignal *)throttle:(NSTimeInterval)interval valuesPassingTest:(BOOL (^)(id next))predicate { + NSCParameterAssert(interval >= 0); + NSCParameterAssert(predicate != nil); + + return [[RACSignal createSignal:^(id subscriber) { + RACCompoundDisposable *compoundDisposable = [RACCompoundDisposable compoundDisposable]; + + // We may never use this scheduler, but we need to set it up ahead of + // time so that our scheduled blocks are run serially if we do. + RACScheduler *scheduler = [RACScheduler scheduler]; + + // Information about any currently-buffered `next` event. + __block id nextValue = nil; + __block BOOL hasNextValue = NO; + RACSerialDisposable *nextDisposable = [[RACSerialDisposable alloc] init]; + + void (^flushNext)(BOOL send) = ^(BOOL send) { + @synchronized (compoundDisposable) { + [nextDisposable.disposable dispose]; + + if (!hasNextValue) return; + if (send) [subscriber sendNext:nextValue]; + + nextValue = nil; + hasNextValue = NO; + } + }; + + RACDisposable *subscriptionDisposable = [self subscribeNext:^(id x) { + RACScheduler *delayScheduler = RACScheduler.currentScheduler ?: scheduler; + BOOL shouldThrottle = predicate(x); + + @synchronized (compoundDisposable) { + flushNext(NO); + if (!shouldThrottle) { + [subscriber sendNext:x]; + return; + } + + nextValue = x; + hasNextValue = YES; + nextDisposable.disposable = [delayScheduler afterDelay:interval schedule:^{ + flushNext(YES); + }]; + } + } error:^(NSError *error) { + [compoundDisposable dispose]; + [subscriber sendError:error]; + } completed:^{ + flushNext(YES); + [subscriber sendCompleted]; + }]; + + [compoundDisposable addDisposable:subscriptionDisposable]; + return compoundDisposable; + }] setNameWithFormat:@"[%@] -throttle: %f valuesPassingTest:", self.name, (double)interval]; +} + +- (RACSignal *)delay:(NSTimeInterval)interval { + return [[RACSignal createSignal:^(id subscriber) { + RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; + + // We may never use this scheduler, but we need to set it up ahead of + // time so that our scheduled blocks are run serially if we do. + RACScheduler *scheduler = [RACScheduler scheduler]; + + void (^schedule)(dispatch_block_t) = ^(dispatch_block_t block) { + RACScheduler *delayScheduler = RACScheduler.currentScheduler ?: scheduler; + RACDisposable *schedulerDisposable = [delayScheduler afterDelay:interval schedule:block]; + [disposable addDisposable:schedulerDisposable]; + }; + + RACDisposable *subscriptionDisposable = [self subscribeNext:^(id x) { + schedule(^{ + [subscriber sendNext:x]; + }); + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + schedule(^{ + [subscriber sendCompleted]; + }); + }]; + + [disposable addDisposable:subscriptionDisposable]; + return disposable; + }] setNameWithFormat:@"[%@] -delay: %f", self.name, (double)interval]; +} + +- (RACSignal *)repeat { + return [[RACSignal createSignal:^(id subscriber) { + return subscribeForever(self, + ^(id x) { + [subscriber sendNext:x]; + }, + ^(NSError *error, RACDisposable *disposable) { + [disposable dispose]; + [subscriber sendError:error]; + }, + ^(RACDisposable *disposable) { + // Resubscribe. + }); + }] setNameWithFormat:@"[%@] -repeat", self.name]; +} + +- (RACSignal *)catch:(RACSignal * (^)(NSError *error))catchBlock { + NSCParameterAssert(catchBlock != NULL); + + return [[RACSignal createSignal:^(id subscriber) { + RACSerialDisposable *catchDisposable = [[RACSerialDisposable alloc] init]; + + RACDisposable *subscriptionDisposable = [self subscribeNext:^(id x) { + [subscriber sendNext:x]; + } error:^(NSError *error) { + RACSignal *signal = catchBlock(error); + NSCAssert(signal != nil, @"Expected non-nil signal from catch block on %@", self); + catchDisposable.disposable = [signal subscribe:subscriber]; + } completed:^{ + [subscriber sendCompleted]; + }]; + + return [RACDisposable disposableWithBlock:^{ + [catchDisposable dispose]; + [subscriptionDisposable dispose]; + }]; + }] setNameWithFormat:@"[%@] -catch:", self.name]; +} + +- (RACSignal *)catchTo:(RACSignal *)signal { + return [[self catch:^(NSError *error) { + return signal; + }] setNameWithFormat:@"[%@] -catchTo: %@", self.name, signal]; +} + +- (RACSignal *)try:(BOOL (^)(id value, NSError **errorPtr))tryBlock { + NSCParameterAssert(tryBlock != NULL); + + return [[self flattenMap:^(id value) { + NSError *error = nil; + BOOL passed = tryBlock(value, &error); + return (passed ? [RACSignal return:value] : [RACSignal error:error]); + }] setNameWithFormat:@"[%@] -try:", self.name]; +} + +- (RACSignal *)tryMap:(id (^)(id value, NSError **errorPtr))mapBlock { + NSCParameterAssert(mapBlock != NULL); + + return [[self flattenMap:^(id value) { + NSError *error = nil; + id mappedValue = mapBlock(value, &error); + return (mappedValue == nil ? [RACSignal error:error] : [RACSignal return:mappedValue]); + }] setNameWithFormat:@"[%@] -tryMap:", self.name]; +} + +- (RACSignal *)initially:(void (^)(void))block { + NSCParameterAssert(block != NULL); + + return [[RACSignal defer:^{ + block(); + return self; + }] setNameWithFormat:@"[%@] -initially:", self.name]; +} + +- (RACSignal *)finally:(void (^)(void))block { + NSCParameterAssert(block != NULL); + + return [[[self + doError:^(NSError *error) { + block(); + }] + doCompleted:^{ + block(); + }] + setNameWithFormat:@"[%@] -finally:", self.name]; +} + +- (RACSignal *)bufferWithTime:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler { + NSCParameterAssert(scheduler != nil); + NSCParameterAssert(scheduler != RACScheduler.immediateScheduler); + + return [[RACSignal createSignal:^(id subscriber) { + RACSerialDisposable *timerDisposable = [[RACSerialDisposable alloc] init]; + NSMutableArray *values = [NSMutableArray array]; + + void (^flushValues)() = ^{ + @synchronized (values) { + [timerDisposable.disposable dispose]; + + if (values.count == 0) return; + + RACTuple *tuple = [RACTuple tupleWithObjectsFromArray:values convertNullsToNils:NO]; + [values removeAllObjects]; + [subscriber sendNext:tuple]; + } + }; + + RACDisposable *selfDisposable = [self subscribeNext:^(id x) { + @synchronized (values) { + if (values.count == 0) { + timerDisposable.disposable = [[[RACSignal + interval:interval onScheduler:scheduler] + take:1] + subscribeNext:^(id _) { + flushValues(); + }]; + } + + [values addObject:x]; + } + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + flushValues(); + [subscriber sendCompleted]; + }]; + + return [RACDisposable disposableWithBlock:^{ + [selfDisposable dispose]; + [timerDisposable dispose]; + }]; + }] setNameWithFormat:@"[%@] -bufferWithTime: %f", self.name, (double)interval]; +} + +- (RACSignal *)collect { + return [[self aggregateWithStartFactory:^{ + return [[NSMutableArray alloc] init]; + } reduce:^(NSMutableArray *collectedValues, id x) { + [collectedValues addObject:(x ?: NSNull.null)]; + return collectedValues; + }] setNameWithFormat:@"[%@] -collect", self.name]; +} + +- (RACSignal *)takeLast:(NSUInteger)count { + return [[RACSignal createSignal:^(id subscriber) { + NSMutableArray *valuesTaken = [NSMutableArray arrayWithCapacity:count]; + return [self subscribeNext:^(id x) { + [valuesTaken addObject:x ? : [RACTupleNil tupleNil]]; + + while(valuesTaken.count > count) { + [valuesTaken removeObjectAtIndex:0]; + } + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + for(id value in valuesTaken) { + [subscriber sendNext:[value isKindOfClass:[RACTupleNil class]] ? nil : value]; + } + + [subscriber sendCompleted]; + }]; + }] setNameWithFormat:@"[%@] -takeLast: %lu", self.name, (unsigned long)count]; +} + +- (RACSignal *)combineLatestWith:(RACSignal *)signal { + NSCParameterAssert(signal != nil); + + return [[RACSignal createSignal:^(id subscriber) { + RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; + + __block id lastSelfValue = nil; + __block BOOL selfCompleted = NO; + + __block id lastOtherValue = nil; + __block BOOL otherCompleted = NO; + + void (^sendNext)(void) = ^{ + @synchronized (disposable) { + if (lastSelfValue == nil || lastOtherValue == nil) return; + [subscriber sendNext:[RACTuple tupleWithObjects:lastSelfValue, lastOtherValue, nil]]; + } + }; + + RACDisposable *selfDisposable = [self subscribeNext:^(id x) { + @synchronized (disposable) { + lastSelfValue = x ?: RACTupleNil.tupleNil; + sendNext(); + } + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + @synchronized (disposable) { + selfCompleted = YES; + if (otherCompleted) [subscriber sendCompleted]; + } + }]; + + [disposable addDisposable:selfDisposable]; + + RACDisposable *otherDisposable = [signal subscribeNext:^(id x) { + @synchronized (disposable) { + lastOtherValue = x ?: RACTupleNil.tupleNil; + sendNext(); + } + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + @synchronized (disposable) { + otherCompleted = YES; + if (selfCompleted) [subscriber sendCompleted]; + } + }]; + + [disposable addDisposable:otherDisposable]; + + return disposable; + }] setNameWithFormat:@"[%@] -combineLatestWith: %@", self.name, signal]; +} + ++ (RACSignal *)combineLatest:(id)signals { + return [[self join:signals block:^(RACSignal *left, RACSignal *right) { + return [left combineLatestWith:right]; + }] setNameWithFormat:@"+combineLatest: %@", signals]; +} + ++ (RACSignal *)combineLatest:(id)signals reduce:(id (^)())reduceBlock { + NSCParameterAssert(reduceBlock != nil); + + RACSignal *result = [self combineLatest:signals]; + + // Although we assert this condition above, older versions of this method + // supported this argument being nil. Avoid crashing Release builds of + // apps that depended on that. + if (reduceBlock != nil) result = [result reduceEach:reduceBlock]; + + return [result setNameWithFormat:@"+combineLatest: %@ reduce:", signals]; +} + ++ (RACSignal *)merge:(id)signals { + NSMutableArray *copiedSignals = [[NSMutableArray alloc] init]; + for (RACSignal *signal in signals) { + [copiedSignals addObject:signal]; + } + + return [[[RACSignal + createSignal:^ RACDisposable * (id subscriber) { + for (RACSignal *signal in copiedSignals) { + [subscriber sendNext:signal]; + } + + [subscriber sendCompleted]; + return nil; + }] + flatten] + setNameWithFormat:@"+merge: %@", copiedSignals]; +} + +- (RACSignal *)flatten:(NSUInteger)maxConcurrent { + return [[RACSignal createSignal:^(id subscriber) { + RACCompoundDisposable *compoundDisposable = [RACCompoundDisposable compoundDisposable]; + NSMutableSet *activeSignals = [NSMutableSet setWithObject:self]; + NSMutableArray *queuedSignals = [NSMutableArray array]; + + // Marks the given signal as completed. + // + // This block should only be accessed while synchronized on + // `compoundDisposable`. + __block void (^completeSignal)(RACSignal *) = nil; + + // Returns whether the signal should complete. + BOOL (^dequeueAndSubscribeIfAllowed)(void) = ^{ + RACSignal *signal; + @synchronized (compoundDisposable) { + BOOL completed = activeSignals.count < 1 && queuedSignals.count < 1; + if (completed) return YES; + + // We add one to maxConcurrent since self is an active + // signal at the start and we don't want that to count + // against the max. + NSUInteger maxIncludingSelf = maxConcurrent + ([activeSignals containsObject:self] ? 1 : 0); + if (activeSignals.count >= maxIncludingSelf && maxConcurrent != 0) return NO; + + if (queuedSignals.count < 1) return NO; + + signal = queuedSignals[0]; + [queuedSignals removeObjectAtIndex:0]; + + [activeSignals addObject:signal]; + } + + __block RACDisposable *disposable = [signal subscribeNext:^(id x) { + [subscriber sendNext:x]; + } error:^(NSError *error) { + [subscriber sendError:error]; + [compoundDisposable removeDisposable:disposable]; + } completed:^{ + @synchronized (compoundDisposable) { + completeSignal(signal); + } + + [compoundDisposable removeDisposable:disposable]; + }]; + + [compoundDisposable addDisposable:disposable]; + return NO; + }; + + completeSignal = ^(RACSignal *signal) { + [activeSignals removeObject:signal]; + + BOOL completed = dequeueAndSubscribeIfAllowed(); + if (completed) { + [subscriber sendCompleted]; + } + }; + + [compoundDisposable addDisposable:[RACDisposable disposableWithBlock:^{ + @synchronized (compoundDisposable) { + completeSignal = ^(RACSignal *signal) { + // Do nothing. We're just replacing this block to break the + // retain cycle. + }; + } + }]]; + + RACDisposable *disposable = [self subscribeNext:^(id x) { + NSCAssert([x isKindOfClass:RACSignal.class], @"The source must be a signal of signals. Instead, got %@", x); + + RACSignal *innerSignal = x; + @synchronized (compoundDisposable) { + [queuedSignals addObject:innerSignal]; + } + + dequeueAndSubscribeIfAllowed(); + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + @synchronized (compoundDisposable) { + completeSignal(self); + } + }]; + + [compoundDisposable addDisposable:disposable]; + return compoundDisposable; + }] setNameWithFormat:@"[%@] -flatten: %lu", self.name, (unsigned long)maxConcurrent]; +} + +- (RACSignal *)then:(RACSignal * (^)(void))block { + NSCParameterAssert(block != nil); + + return [[[self + ignoreValues] + concat:[RACSignal defer:block]] + setNameWithFormat:@"[%@] -then:", self.name]; +} + +- (RACSignal *)concat { + return [[self flatten:1] setNameWithFormat:@"[%@] -concat", self.name]; +} + +- (RACSignal *)aggregateWithStartFactory:(id (^)(void))startFactory reduce:(id (^)(id running, id next))reduceBlock { + NSCParameterAssert(startFactory != NULL); + NSCParameterAssert(reduceBlock != NULL); + + return [[RACSignal createSignal:^(id subscriber) { + __block id runningValue = startFactory(); + return [self subscribeNext:^(id x) { + runningValue = reduceBlock(runningValue, x); + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + [subscriber sendNext:runningValue]; + [subscriber sendCompleted]; + }]; + }] setNameWithFormat:@"[%@] -aggregateWithStartFactory:reduce:", self.name]; +} + +- (RACSignal *)aggregateWithStart:(id)start reduce:(id (^)(id running, id next))reduceBlock { + RACSignal *signal = [self aggregateWithStartFactory:^{ + return start; + } reduce:reduceBlock]; + + return [signal setNameWithFormat:@"[%@] -aggregateWithStart: %@ reduce:", self.name, [start rac_description]]; +} + +- (RACDisposable *)setKeyPath:(NSString *)keyPath onObject:(NSObject *)object { + return [self setKeyPath:keyPath onObject:object nilValue:nil]; +} + +- (RACDisposable *)setKeyPath:(NSString *)keyPath onObject:(NSObject *)object nilValue:(id)nilValue { + NSCParameterAssert(keyPath != nil); + NSCParameterAssert(object != nil); + + keyPath = [keyPath copy]; + + RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; + + // Purposely not retaining 'object', since we want to tear down the binding + // when it deallocates normally. + __block void * volatile objectPtr = (__bridge void *)object; + + RACDisposable *subscriptionDisposable = [self subscribeNext:^(id x) { + NSObject *object = (__bridge id)objectPtr; + [object setValue:x ?: nilValue forKeyPath:keyPath]; + } error:^(NSError *error) { + NSObject *object = (__bridge id)objectPtr; + + NSCAssert(NO, @"Received error from %@ in binding for key path \"%@\" on %@: %@", self, keyPath, object, error); + + // Log the error if we're running with assertions disabled. + NSLog(@"Received error from %@ in binding for key path \"%@\" on %@: %@", self, keyPath, object, error); + + [disposable dispose]; + } completed:^{ + [disposable dispose]; + }]; + + [disposable addDisposable:subscriptionDisposable]; + + #if DEBUG + static void *bindingsKey = &bindingsKey; + NSMutableDictionary *bindings; + + @synchronized (object) { + bindings = objc_getAssociatedObject(object, bindingsKey); + if (bindings == nil) { + bindings = [NSMutableDictionary dictionary]; + objc_setAssociatedObject(object, bindingsKey, bindings, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + } + + @synchronized (bindings) { + NSCAssert(bindings[keyPath] == nil, @"Signal %@ is already bound to key path \"%@\" on object %@, adding signal %@ is undefined behavior", [bindings[keyPath] nonretainedObjectValue], keyPath, object, self); + + bindings[keyPath] = [NSValue valueWithNonretainedObject:self]; + } + #endif + + RACDisposable *clearPointerDisposable = [RACDisposable disposableWithBlock:^{ + #if DEBUG + @synchronized (bindings) { + [bindings removeObjectForKey:keyPath]; + } + #endif + + while (YES) { + void *ptr = objectPtr; + if (OSAtomicCompareAndSwapPtrBarrier(ptr, NULL, &objectPtr)) { + break; + } + } + }]; + + [disposable addDisposable:clearPointerDisposable]; + + [object.rac_deallocDisposable addDisposable:disposable]; + + RACCompoundDisposable *objectDisposable = object.rac_deallocDisposable; + return [RACDisposable disposableWithBlock:^{ + [objectDisposable removeDisposable:disposable]; + [disposable dispose]; + }]; +} + ++ (RACSignal *)interval:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler { + return [[RACSignal interval:interval onScheduler:scheduler withLeeway:0.0] setNameWithFormat:@"+interval: %f onScheduler: %@", (double)interval, scheduler]; +} + ++ (RACSignal *)interval:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler withLeeway:(NSTimeInterval)leeway { + NSCParameterAssert(scheduler != nil); + NSCParameterAssert(scheduler != RACScheduler.immediateScheduler); + + return [[RACSignal createSignal:^(id subscriber) { + return [scheduler after:[NSDate dateWithTimeIntervalSinceNow:interval] repeatingEvery:interval withLeeway:leeway schedule:^{ + [subscriber sendNext:[NSDate date]]; + }]; + }] setNameWithFormat:@"+interval: %f onScheduler: %@ withLeeway: %f", (double)interval, scheduler, (double)leeway]; +} + +- (RACSignal *)takeUntil:(RACSignal *)signalTrigger { + return [[RACSignal createSignal:^(id subscriber) { + RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; + void (^triggerCompletion)(void) = ^{ + [disposable dispose]; + [subscriber sendCompleted]; + }; + + RACDisposable *triggerDisposable = [signalTrigger subscribeNext:^(id _) { + triggerCompletion(); + } completed:^{ + triggerCompletion(); + }]; + + [disposable addDisposable:triggerDisposable]; + + RACDisposable *selfDisposable = [self subscribeNext:^(id x) { + [subscriber sendNext:x]; + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + [disposable dispose]; + [subscriber sendCompleted]; + }]; + + [disposable addDisposable:selfDisposable]; + + return disposable; + }] setNameWithFormat:@"[%@] -takeUntil: %@", self.name, signalTrigger]; +} + +- (RACSignal *)switchToLatest { + return [[RACSignal createSignal:^(id subscriber) { + RACMulticastConnection *connection = [self publish]; + + RACDisposable *subscriptionDisposable = [[connection.signal + flattenMap:^(RACSignal *x) { + if (x == nil) return [RACSignal empty]; + + NSCAssert([x isKindOfClass:RACSignal.class], @"-switchToLatest requires that the source signal (%@) send signals. Instead we got: %@", self, x); + + // -concat:[RACSignal never] prevents completion of the receiver from + // prematurely terminating the inner signal. + return [x takeUntil:[connection.signal concat:[RACSignal never]]]; + }] + subscribe:subscriber]; + + RACDisposable *connectionDisposable = [connection connect]; + return [RACDisposable disposableWithBlock:^{ + [subscriptionDisposable dispose]; + [connectionDisposable dispose]; + }]; + }] setNameWithFormat:@"[%@] -switchToLatest", self.name]; +} + ++ (RACSignal *)switch:(RACSignal *)signal cases:(NSDictionary *)cases default:(RACSignal *)defaultSignal { + NSCParameterAssert(signal != nil); + NSCParameterAssert(cases != nil); + + for (id key in cases) { + id value __attribute__((unused)) = cases[key]; + NSCAssert([value isKindOfClass:RACSignal.class], @"Expected all cases to be RACSignals, %@ isn't", value); + } + + NSDictionary *copy = [cases copy]; + + return [[[signal + map:^(id key) { + if (key == nil) key = RACTupleNil.tupleNil; + + RACSignal *signal = copy[key] ?: defaultSignal; + if (signal == nil) { + NSString *description = [NSString stringWithFormat:NSLocalizedString(@"No matching signal found for value %@", @""), key]; + return [RACSignal error:[NSError errorWithDomain:RACSignalErrorDomain code:RACSignalErrorNoMatchingCase userInfo:@{ NSLocalizedDescriptionKey: description }]]; + } + + return signal; + }] + switchToLatest] + setNameWithFormat:@"+switch: %@ cases: %@ default: %@", signal, cases, defaultSignal]; +} + ++ (RACSignal *)if:(RACSignal *)boolSignal then:(RACSignal *)trueSignal else:(RACSignal *)falseSignal { + NSCParameterAssert(boolSignal != nil); + NSCParameterAssert(trueSignal != nil); + NSCParameterAssert(falseSignal != nil); + + return [[[boolSignal + map:^(NSNumber *value) { + NSCAssert([value isKindOfClass:NSNumber.class], @"Expected %@ to send BOOLs, not %@", boolSignal, value); + + return (value.boolValue ? trueSignal : falseSignal); + }] + switchToLatest] + setNameWithFormat:@"+if: %@ then: %@ else: %@", boolSignal, trueSignal, falseSignal]; +} + +- (id)first { + return [self firstOrDefault:nil]; +} + +- (id)firstOrDefault:(id)defaultValue { + return [self firstOrDefault:defaultValue success:NULL error:NULL]; +} + +- (id)firstOrDefault:(id)defaultValue success:(BOOL *)success error:(NSError **)error { + NSCondition *condition = [[NSCondition alloc] init]; + condition.name = [NSString stringWithFormat:@"[%@] -firstOrDefault: %@ success:error:", self.name, defaultValue]; + + __block id value = defaultValue; + __block BOOL done = NO; + + // Ensures that we don't pass values across thread boundaries by reference. + __block NSError *localError; + __block BOOL localSuccess; + + [[self take:1] subscribeNext:^(id x) { + [condition lock]; + + value = x; + localSuccess = YES; + + done = YES; + [condition broadcast]; + [condition unlock]; + } error:^(NSError *e) { + [condition lock]; + + if (!done) { + localSuccess = NO; + localError = e; + + done = YES; + [condition broadcast]; + } + + [condition unlock]; + } completed:^{ + [condition lock]; + + localSuccess = YES; + + done = YES; + [condition broadcast]; + [condition unlock]; + }]; + + [condition lock]; + while (!done) { + [condition wait]; + } + + if (success != NULL) *success = localSuccess; + if (error != NULL) *error = localError; + + [condition unlock]; + return value; +} + +- (BOOL)waitUntilCompleted:(NSError **)error { + BOOL success = NO; + + [[[self + ignoreValues] + setNameWithFormat:@"[%@] -waitUntilCompleted:", self.name] + firstOrDefault:nil success:&success error:error]; + + return success; +} + ++ (RACSignal *)defer:(RACSignal * (^)(void))block { + NSCParameterAssert(block != NULL); + + return [[RACSignal createSignal:^(id subscriber) { + return [block() subscribe:subscriber]; + }] setNameWithFormat:@"+defer:"]; +} + +- (NSArray *)toArray { + return [[[self collect] first] copy]; +} + +- (RACSequence *)sequence { + return [[RACSignalSequence sequenceWithSignal:self] setNameWithFormat:@"[%@] -sequence", self.name]; +} + +- (RACMulticastConnection *)publish { + RACSubject *subject = [[RACSubject subject] setNameWithFormat:@"[%@] -publish", self.name]; + RACMulticastConnection *connection = [self multicast:subject]; + return connection; +} + +- (RACMulticastConnection *)multicast:(RACSubject *)subject { + [subject setNameWithFormat:@"[%@] -multicast: %@", self.name, subject.name]; + RACMulticastConnection *connection = [[RACMulticastConnection alloc] initWithSourceSignal:self subject:subject]; + return connection; +} + +- (RACSignal *)replay { + RACReplaySubject *subject = [[RACReplaySubject subject] setNameWithFormat:@"[%@] -replay", self.name]; + + RACMulticastConnection *connection = [self multicast:subject]; + [connection connect]; + + return connection.signal; +} + +- (RACSignal *)replayLast { + RACReplaySubject *subject = [[RACReplaySubject replaySubjectWithCapacity:1] setNameWithFormat:@"[%@] -replayLast", self.name]; + + RACMulticastConnection *connection = [self multicast:subject]; + [connection connect]; + + return connection.signal; +} + +- (RACSignal *)replayLazily { + RACMulticastConnection *connection = [self multicast:[RACReplaySubject subject]]; + return [[RACSignal + defer:^{ + [connection connect]; + return connection.signal; + }] + setNameWithFormat:@"[%@] -replayLazily", self.name]; +} + +- (RACSignal *)timeout:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler { + NSCParameterAssert(scheduler != nil); + NSCParameterAssert(scheduler != RACScheduler.immediateScheduler); + + return [[RACSignal createSignal:^(id subscriber) { + RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; + + RACDisposable *timeoutDisposable = [[[RACSignal + interval:interval onScheduler:scheduler] + take:1] + subscribeNext:^(id _) { + [disposable dispose]; + [subscriber sendError:[NSError errorWithDomain:RACSignalErrorDomain code:RACSignalErrorTimedOut userInfo:nil]]; + }]; + + [disposable addDisposable:timeoutDisposable]; + + RACDisposable *subscriptionDisposable = [self subscribeNext:^(id x) { + [subscriber sendNext:x]; + } error:^(NSError *error) { + [disposable dispose]; + [subscriber sendError:error]; + } completed:^{ + [disposable dispose]; + [subscriber sendCompleted]; + }]; + + [disposable addDisposable:subscriptionDisposable]; + return disposable; + }] setNameWithFormat:@"[%@] -timeout: %f", self.name, (double)interval]; +} + +- (RACSignal *)deliverOn:(RACScheduler *)scheduler { + return [[RACSignal createSignal:^(id subscriber) { + return [self subscribeNext:^(id x) { + [scheduler schedule:^{ + [subscriber sendNext:x]; + }]; + } error:^(NSError *error) { + [scheduler schedule:^{ + [subscriber sendError:error]; + }]; + } completed:^{ + [scheduler schedule:^{ + [subscriber sendCompleted]; + }]; + }]; + }] setNameWithFormat:@"[%@] -deliverOn: %@", self.name, scheduler]; +} + +- (RACSignal *)subscribeOn:(RACScheduler *)scheduler { + return [[RACSignal createSignal:^(id subscriber) { + RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; + + RACDisposable *schedulingDisposable = [scheduler schedule:^{ + RACDisposable *subscriptionDisposable = [self subscribeNext:^(id x) { + [subscriber sendNext:x]; + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + [subscriber sendCompleted]; + }]; + + [disposable addDisposable:subscriptionDisposable]; + }]; + + [disposable addDisposable:schedulingDisposable]; + return disposable; + }] setNameWithFormat:@"[%@] -subscribeOn: %@", self.name, scheduler]; +} + +- (RACSignal *)groupBy:(id (^)(id object))keyBlock transform:(id (^)(id object))transformBlock { + NSCParameterAssert(keyBlock != NULL); + + return [[RACSignal createSignal:^(id subscriber) { + NSMutableDictionary *groups = [NSMutableDictionary dictionary]; + + return [self subscribeNext:^(id x) { + id key = keyBlock(x); + RACGroupedSignal *groupSubject = nil; + @synchronized(groups) { + groupSubject = [groups objectForKey:key]; + if(groupSubject == nil) { + groupSubject = [RACGroupedSignal signalWithKey:key]; + [groups setObject:groupSubject forKey:key]; + [subscriber sendNext:groupSubject]; + } + } + + [groupSubject sendNext:transformBlock != NULL ? transformBlock(x) : x]; + } error:^(NSError *error) { + [subscriber sendError:error]; + + [groups.allValues makeObjectsPerformSelector:@selector(sendError:) withObject:error]; + } completed:^{ + [subscriber sendCompleted]; + + [groups.allValues makeObjectsPerformSelector:@selector(sendCompleted)]; + }]; + }] setNameWithFormat:@"[%@] -groupBy:transform:", self.name]; +} + +- (RACSignal *)groupBy:(id (^)(id object))keyBlock { + return [[self groupBy:keyBlock transform:nil] setNameWithFormat:@"[%@] -groupBy:", self.name]; +} + +- (RACSignal *)any { + return [[self any:^(id x) { + return YES; + }] setNameWithFormat:@"[%@] -any", self.name]; +} + +- (RACSignal *)any:(BOOL (^)(id object))predicateBlock { + NSCParameterAssert(predicateBlock != NULL); + + return [[[self materialize] bind:^{ + return ^(RACEvent *event, BOOL *stop) { + if (event.finished) { + *stop = YES; + return [RACSignal return:@NO]; + } + + if (predicateBlock(event.value)) { + *stop = YES; + return [RACSignal return:@YES]; + } + + return [RACSignal empty]; + }; + }] setNameWithFormat:@"[%@] -any:", self.name]; +} + +- (RACSignal *)all:(BOOL (^)(id object))predicateBlock { + NSCParameterAssert(predicateBlock != NULL); + + return [[[self materialize] bind:^{ + return ^(RACEvent *event, BOOL *stop) { + if (event.eventType == RACEventTypeCompleted) { + *stop = YES; + return [RACSignal return:@YES]; + } + + if (event.eventType == RACEventTypeError || !predicateBlock(event.value)) { + *stop = YES; + return [RACSignal return:@NO]; + } + + return [RACSignal empty]; + }; + }] setNameWithFormat:@"[%@] -all:", self.name]; +} + +- (RACSignal *)retry:(NSInteger)retryCount { + return [[RACSignal createSignal:^(id subscriber) { + __block NSInteger currentRetryCount = 0; + return subscribeForever(self, + ^(id x) { + [subscriber sendNext:x]; + }, + ^(NSError *error, RACDisposable *disposable) { + if (retryCount == 0 || currentRetryCount < retryCount) { + // Resubscribe. + currentRetryCount++; + return; + } + + [disposable dispose]; + [subscriber sendError:error]; + }, + ^(RACDisposable *disposable) { + [disposable dispose]; + [subscriber sendCompleted]; + }); + }] setNameWithFormat:@"[%@] -retry: %lu", self.name, (unsigned long)retryCount]; +} + +- (RACSignal *)retry { + return [[self retry:0] setNameWithFormat:@"[%@] -retry", self.name]; +} + +- (RACSignal *)sample:(RACSignal *)sampler { + NSCParameterAssert(sampler != nil); + + return [[RACSignal createSignal:^(id subscriber) { + NSLock *lock = [[NSLock alloc] init]; + __block id lastValue; + __block BOOL hasValue = NO; + + RACSerialDisposable *samplerDisposable = [[RACSerialDisposable alloc] init]; + RACDisposable *sourceDisposable = [self subscribeNext:^(id x) { + [lock lock]; + hasValue = YES; + lastValue = x; + [lock unlock]; + } error:^(NSError *error) { + [samplerDisposable dispose]; + [subscriber sendError:error]; + } completed:^{ + [samplerDisposable dispose]; + [subscriber sendCompleted]; + }]; + + samplerDisposable.disposable = [sampler subscribeNext:^(id _) { + BOOL shouldSend = NO; + id value; + [lock lock]; + shouldSend = hasValue; + value = lastValue; + [lock unlock]; + + if (shouldSend) { + [subscriber sendNext:value]; + } + } error:^(NSError *error) { + [sourceDisposable dispose]; + [subscriber sendError:error]; + } completed:^{ + [sourceDisposable dispose]; + [subscriber sendCompleted]; + }]; + + return [RACDisposable disposableWithBlock:^{ + [samplerDisposable dispose]; + [sourceDisposable dispose]; + }]; + }] setNameWithFormat:@"[%@] -sample: %@", self.name, sampler]; +} + +- (RACSignal *)ignoreValues { + return [[self filter:^(id _) { + return NO; + }] setNameWithFormat:@"[%@] -ignoreValues", self.name]; +} + +- (RACSignal *)materialize { + return [[RACSignal createSignal:^(id subscriber) { + return [self subscribeNext:^(id x) { + [subscriber sendNext:[RACEvent eventWithValue:x]]; + } error:^(NSError *error) { + [subscriber sendNext:[RACEvent eventWithError:error]]; + [subscriber sendCompleted]; + } completed:^{ + [subscriber sendNext:RACEvent.completedEvent]; + [subscriber sendCompleted]; + }]; + }] setNameWithFormat:@"[%@] -materialize", self.name]; +} + +- (RACSignal *)dematerialize { + return [[self bind:^{ + return ^(RACEvent *event, BOOL *stop) { + switch (event.eventType) { + case RACEventTypeCompleted: + *stop = YES; + return [RACSignal empty]; + + case RACEventTypeError: + *stop = YES; + return [RACSignal error:event.error]; + + case RACEventTypeNext: + return [RACSignal return:event.value]; + } + }; + }] setNameWithFormat:@"[%@] -dematerialize", self.name]; +} + +- (RACSignal *)not { + return [[self map:^(NSNumber *value) { + NSCAssert([value isKindOfClass:NSNumber.class], @"-not must only be used on a signal of NSNumbers. Instead, got: %@", value); + + return @(!value.boolValue); + }] setNameWithFormat:@"[%@] -not", self.name]; +} + +- (RACSignal *)and { + return [[self map:^(RACTuple *tuple) { + NSCAssert([tuple isKindOfClass:RACTuple.class], @"-and must only be used on a signal of RACTuples of NSNumbers. Instead, received: %@", tuple); + NSCAssert(tuple.count > 0, @"-and must only be used on a signal of RACTuples of NSNumbers, with at least 1 value in the tuple"); + + return @([tuple.rac_sequence all:^(NSNumber *number) { + NSCAssert([number isKindOfClass:NSNumber.class], @"-and must only be used on a signal of RACTuples of NSNumbers. Instead, tuple contains a non-NSNumber value: %@", tuple); + + return number.boolValue; + }]); + }] setNameWithFormat:@"[%@] -and", self.name]; +} + +- (RACSignal *)or { + return [[self map:^(RACTuple *tuple) { + NSCAssert([tuple isKindOfClass:RACTuple.class], @"-or must only be used on a signal of RACTuples of NSNumbers. Instead, received: %@", tuple); + NSCAssert(tuple.count > 0, @"-or must only be used on a signal of RACTuples of NSNumbers, with at least 1 value in the tuple"); + + return @([tuple.rac_sequence any:^(NSNumber *number) { + NSCAssert([number isKindOfClass:NSNumber.class], @"-or must only be used on a signal of RACTuples of NSNumbers. Instead, tuple contains a non-NSNumber value: %@", tuple); + + return number.boolValue; + }]); + }] setNameWithFormat:@"[%@] -or", self.name]; +} + +@end + +@implementation RACSignal (OperationsDeprecated) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" + +- (RACSignal *)windowWithStart:(RACSignal *)openSignal close:(RACSignal * (^)(RACSignal *start))closeBlock { + NSCParameterAssert(openSignal != nil); + NSCParameterAssert(closeBlock != NULL); + + return [[RACSignal createSignal:^(id subscriber) { + __block RACSubject *currentWindow = nil; + __block RACSignal *currentCloseWindow = nil; + __block RACDisposable *closeObserverDisposable = NULL; + + void (^closeCurrentWindow)(void) = ^{ + [currentWindow sendCompleted]; + currentWindow = nil; + currentCloseWindow = nil; + [closeObserverDisposable dispose], closeObserverDisposable = nil; + }; + + RACDisposable *openObserverDisposable = [openSignal subscribe:[RACSubscriber subscriberWithNext:^(id x) { + if(currentWindow == nil) { + currentWindow = [RACSubject subject]; + [subscriber sendNext:currentWindow]; + + currentCloseWindow = closeBlock(currentWindow); + closeObserverDisposable = [currentCloseWindow subscribe:[RACSubscriber subscriberWithNext:^(id x) { + closeCurrentWindow(); + } error:^(NSError *error) { + closeCurrentWindow(); + } completed:^{ + closeCurrentWindow(); + }]]; + } + } error:^(NSError *error) { + + } completed:^{ + + }]]; + + RACDisposable *selfObserverDisposable = [self subscribeNext:^(id x) { + [currentWindow sendNext:x]; + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + [subscriber sendCompleted]; + }]; + + return [RACDisposable disposableWithBlock:^{ + [closeObserverDisposable dispose]; + [openObserverDisposable dispose]; + [selfObserverDisposable dispose]; + }]; + }] setNameWithFormat:@"[%@] -windowWithStart: %@ close:", self.name, openSignal]; +} + +- (RACSignal *)buffer:(NSUInteger)bufferCount { + NSCParameterAssert(bufferCount > 0); + return [[RACSignal createSignal:^(id subscriber) { + NSMutableArray *values = [NSMutableArray arrayWithCapacity:bufferCount]; + RACSubject *windowCloseSubject = [RACSubject subject]; + + RACDisposable *closeDisposable = [windowCloseSubject subscribeNext:^(id x) { + [subscriber sendNext:[RACTuple tupleWithObjectsFromArray:values convertNullsToNils:NO]]; + [values removeAllObjects]; + }]; + + __block RACDisposable *innerDisposable = nil; + RACDisposable *outerDisposable = [[self windowWithStart:self close:^(RACSignal *start) { + return windowCloseSubject; + }] subscribeNext:^(id x) { + innerDisposable = [x subscribeNext:^(id x) { + [values addObject:x ? : [RACTupleNil tupleNil]]; + if(values.count % bufferCount == 0) { + [windowCloseSubject sendNext:[RACUnit defaultUnit]]; + } + }]; + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + [subscriber sendCompleted]; + }]; + + return [RACDisposable disposableWithBlock:^{ + [innerDisposable dispose]; + [outerDisposable dispose]; + [closeDisposable dispose]; + }]; + }] setNameWithFormat:@"[%@] -buffer: %lu", self.name, (unsigned long)bufferCount]; +} + +- (RACSignal *)let:(RACSignal * (^)(RACSignal *sharedSignal))letBlock { + NSCParameterAssert(letBlock != NULL); + + return [[RACSignal createSignal:^(id subscriber) { + RACMulticastConnection *connection = [self publish]; + RACDisposable *finalDisposable = [letBlock(connection.signal) subscribeNext:^(id x) { + [subscriber sendNext:x]; + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + [subscriber sendCompleted]; + }]; + + RACDisposable *connectionDisposable = [connection connect]; + + return [RACDisposable disposableWithBlock:^{ + [connectionDisposable dispose]; + [finalDisposable dispose]; + }]; + }] setNameWithFormat:@"[%@] -let:", self.name]; +} + ++ (RACSignal *)interval:(NSTimeInterval)interval { + return [RACSignal interval:interval onScheduler:[RACScheduler schedulerWithPriority:RACSchedulerPriorityHigh]]; +} + ++ (RACSignal *)interval:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway { + return [RACSignal interval:interval onScheduler:[RACScheduler schedulerWithPriority:RACSchedulerPriorityHigh] withLeeway:leeway]; +} + +- (RACSignal *)timeout:(NSTimeInterval)interval { + return [self timeout:interval onScheduler:[RACScheduler schedulerWithPriority:RACSchedulerPriorityHigh]]; +} + +- (RACSignal *)bufferWithTime:(NSTimeInterval)interval { + return [self bufferWithTime:interval onScheduler:[RACScheduler schedulerWithPriority:RACSchedulerPriorityHigh]]; +} + +- (RACDisposable *)toProperty:(NSString *)keyPath onObject:(NSObject *)object { + return [self setKeyPath:keyPath onObject:object]; +} + +- (RACSignal *)ignoreElements { + return [self ignoreValues]; +} + +- (RACSignal *)sequenceNext:(RACSignal * (^)(void))block { + return [self then:block]; +} + +- (RACSignal *)aggregateWithStart:(id)start combine:(id (^)(id running, id next))combineBlock { + return [self aggregateWithStart:start reduce:combineBlock]; +} + +- (RACSignal *)aggregateWithStartFactory:(id (^)(void))startFactory combine:(id (^)(id running, id next))combineBlock { + return [self aggregateWithStartFactory:startFactory reduce:combineBlock]; +} + +- (RACDisposable *)executeCommand:(RACCommand *)command { + NSCParameterAssert(command != nil); + + return [self subscribeNext:^(id x) { + [command execute:x]; + }]; +} + +#pragma clang diagnostic pop + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.h new file mode 100644 index 00000000..ed644cf0 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.h @@ -0,0 +1,219 @@ +// +// RACSignal.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/1/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import "RACStream.h" + +@class RACDisposable; +@class RACScheduler; +@class RACSubject; +@protocol RACSubscriber; + +@interface RACSignal : RACStream + +/// Creates a new signal. This is the preferred way to create a new signal +/// operation or behavior. +/// +/// Events can be sent to new subscribers immediately in the `didSubscribe` +/// block, but the subscriber will not be able to dispose of the signal until +/// a RACDisposable is returned from `didSubscribe`. In the case of infinite +/// signals, this won't _ever_ happen if events are sent immediately. +/// +/// To ensure that the signal is disposable, events can be scheduled on the +/// +[RACScheduler currentScheduler] (so that they're deferred, not sent +/// immediately), or they can be sent in the background. The RACDisposable +/// returned by the `didSubscribe` block should cancel any such scheduling or +/// asynchronous work. +/// +/// didSubscribe - Called when the signal is subscribed to. The new subscriber is +/// passed in. You can then manually control the by +/// sending it -sendNext:, -sendError:, and -sendCompleted, +/// as defined by the operation you're implementing. This block +/// should return a RACDisposable which cancels any ongoing work +/// triggered by the subscription, and cleans up any resources or +/// disposables created as part of it. When the disposable is +/// disposed of, the signal must not send any more events to the +/// `subscriber`. If no cleanup is necessary, return nil. +/// +/// **Note:** The `didSubscribe` block is called every time a new subscriber +/// subscribes. Any side effects within the block will thus execute once for each +/// subscription, not necessarily on one thread, and possibly even +/// simultaneously! ++ (RACSignal *)createSignal:(RACDisposable * (^)(id subscriber))didSubscribe; + +/// Returns a signal that immediately sends the given error. ++ (RACSignal *)error:(NSError *)error; + +/// Returns a signal that never completes. ++ (RACSignal *)never; + +/// Immediately schedules the given block on the given scheduler. The block is +/// given a subscriber to which it can send events. +/// +/// scheduler - The scheduler on which `block` will be scheduled and results +/// delivered. Cannot be nil. +/// block - The block to invoke. Cannot be NULL. +/// +/// Returns a signal which will send all events sent on the subscriber given to +/// `block`. All events will be sent on `scheduler` and it will replay any missed +/// events to new subscribers. ++ (RACSignal *)startEagerlyWithScheduler:(RACScheduler *)scheduler block:(void (^)(id subscriber))block; + +/// Invokes the given block only on the first subscription. The block is given a +/// subscriber to which it can send events. +/// +/// Note that disposing of the subscription to the returned signal will *not* +/// dispose of the underlying subscription. If you need that behavior, see +/// -[RACMulticastConnection autoconnect]. The underlying subscription will never +/// be disposed of. Because of this, `block` should never return an infinite +/// signal since there would be no way of ending it. +/// +/// scheduler - The scheduler on which the block should be scheduled. Note that +/// if given +[RACScheduler immediateScheduler], the block will be +/// invoked synchronously on the first subscription. Cannot be nil. +/// block - The block to invoke on the first subscription. Cannot be NULL. +/// +/// Returns a signal which will pass through the events sent to the subscriber +/// given to `block` and replay any missed events to new subscribers. ++ (RACSignal *)startLazilyWithScheduler:(RACScheduler *)scheduler block:(void (^)(id subscriber))block; + +@end + +@interface RACSignal (RACStream) + +/// Returns a signal that immediately sends the given value and then completes. ++ (RACSignal *)return:(id)value; + +/// Returns a signal that immediately completes. ++ (RACSignal *)empty; + +/// Subscribes to `signal` when the source signal completes. +- (RACSignal *)concat:(RACSignal *)signal; + +/// Zips the values in the receiver with those of the given signal to create +/// RACTuples. +/// +/// The first `next` of each stream will be combined, then the second `next`, and +/// so forth, until either signal completes or errors. +/// +/// signal - The signal to zip with. This must not be `nil`. +/// +/// Returns a new signal of RACTuples, representing the combined values of the +/// two signals. Any error from one of the original signals will be forwarded on +/// the returned signal. +- (RACSignal *)zipWith:(RACSignal *)signal; + +@end + +@interface RACSignal (Subscription) + +/// Subscribes `subscriber` to changes on the receiver. The receiver defines which +/// events it actually sends and in what situations the events are sent. +/// +/// Subscription will always happen on a valid RACScheduler. If the +/// +[RACScheduler currentScheduler] cannot be determined at the time of +/// subscription (e.g., because the calling code is running on a GCD queue or +/// NSOperationQueue), subscription will occur on a private background scheduler. +/// On the main thread, subscriptions will always occur immediately, with a +/// +[RACScheduler currentScheduler] of +[RACScheduler mainThreadScheduler]. +/// +/// This method must be overridden by any subclasses. +/// +/// Returns nil or a disposable. You can call -[RACDisposable dispose] if you +/// need to end your subscription before it would "naturally" end, either by +/// completing or erroring. Once the disposable has been disposed, the subscriber +/// won't receive any more events from the subscription. +- (RACDisposable *)subscribe:(id)subscriber; + +/// Convenience method to subscribe to the `next` event. +/// +/// This corresponds to `IObserver.OnNext` in Rx. +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock; + +/// Convenience method to subscribe to the `next` and `completed` events. +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock completed:(void (^)(void))completedBlock; + +/// Convenience method to subscribe to the `next`, `completed`, and `error` events. +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock error:(void (^)(NSError *error))errorBlock completed:(void (^)(void))completedBlock; + +/// Convenience method to subscribe to `error` events. +/// +/// This corresponds to the `IObserver.OnError` in Rx. +- (RACDisposable *)subscribeError:(void (^)(NSError *error))errorBlock; + +/// Convenience method to subscribe to `completed` events. +/// +/// This corresponds to the `IObserver.OnCompleted` in Rx. +- (RACDisposable *)subscribeCompleted:(void (^)(void))completedBlock; + +/// Convenience method to subscribe to `next` and `error` events. +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock error:(void (^)(NSError *error))errorBlock; + +/// Convenience method to subscribe to `error` and `completed` events. +- (RACDisposable *)subscribeError:(void (^)(NSError *error))errorBlock completed:(void (^)(void))completedBlock; + +@end + +/// Additional methods to assist with debugging. +@interface RACSignal (Debugging) + +/// Logs all events that the receiver sends. +- (RACSignal *)logAll; + +/// Logs each `next` that the receiver sends. +- (RACSignal *)logNext; + +/// Logs any error that the receiver sends. +- (RACSignal *)logError; + +/// Logs any `completed` event that the receiver sends. +- (RACSignal *)logCompleted; + +@end + +/// Additional methods to assist with unit testing. +/// +/// **These methods should never ship in production code.** +@interface RACSignal (Testing) + +/// Spins the main run loop for a short while, waiting for the receiver to send a `next`. +/// +/// **Because this method executes the run loop recursively, it should only be used +/// on the main thread, and only from a unit test.** +/// +/// defaultValue - Returned if the receiver completes or errors before sending +/// a `next`, or if the method times out. This argument may be +/// nil. +/// success - If not NULL, set to whether the receiver completed +/// successfully. +/// error - If not NULL, set to any error that occurred. +/// +/// Returns the first value received, or `defaultValue` if no value is received +/// before the signal finishes or the method times out. +- (id)asynchronousFirstOrDefault:(id)defaultValue success:(BOOL *)success error:(NSError **)error; + +/// Spins the main run loop for a short while, waiting for the receiver to complete. +/// +/// **Because this method executes the run loop recursively, it should only be used +/// on the main thread, and only from a unit test.** +/// +/// error - If not NULL, set to any error that occurs. +/// +/// Returns whether the signal completed successfully before timing out. If NO, +/// `error` will be set to any error that occurred. +- (BOOL)asynchronouslyWaitUntilCompleted:(NSError **)error; + +@end + +@interface RACSignal (Deprecated) + ++ (RACSignal *)start:(id (^)(BOOL *success, NSError **error))block __attribute__((deprecated("Use +startEagerlyWithScheduler:block: instead"))); ++ (RACSignal *)startWithScheduler:(RACScheduler *)scheduler subjectBlock:(void (^)(RACSubject *subject))block __attribute__((deprecated("Use +startEagerlyWithScheduler:block: instead"))); ++ (RACSignal *)startWithScheduler:(RACScheduler *)scheduler block:(id (^)(BOOL *success, NSError **error))block __attribute__((deprecated("Use +startEagerlyWithScheduler:block: instead"))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.m new file mode 100644 index 00000000..69d9700c --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignal.m @@ -0,0 +1,447 @@ +// +// RACSignal.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/15/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSignal.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACDynamicSignal.h" +#import "RACEmptySignal.h" +#import "RACErrorSignal.h" +#import "RACMulticastConnection.h" +#import "RACReplaySubject.h" +#import "RACReturnSignal.h" +#import "RACScheduler.h" +#import "RACSerialDisposable.h" +#import "RACSignal+Operations.h" +#import "RACSubject.h" +#import "RACSubscriber+Private.h" +#import "RACTuple.h" + +@implementation RACSignal + +#pragma mark Lifecycle + ++ (RACSignal *)createSignal:(RACDisposable * (^)(id subscriber))didSubscribe { + return [RACDynamicSignal createSignal:didSubscribe]; +} + ++ (RACSignal *)error:(NSError *)error { + return [RACErrorSignal error:error]; +} + ++ (RACSignal *)never { + return [[self createSignal:^ RACDisposable * (id subscriber) { + return nil; + }] setNameWithFormat:@"+never"]; +} + ++ (RACSignal *)startEagerlyWithScheduler:(RACScheduler *)scheduler block:(void (^)(id subscriber))block { + NSCParameterAssert(scheduler != nil); + NSCParameterAssert(block != NULL); + + RACSignal *signal = [self startLazilyWithScheduler:scheduler block:block]; + // Subscribe to force the lazy signal to call its block. + [[signal publish] connect]; + return [signal setNameWithFormat:@"+startEagerlyWithScheduler:%@ block:", scheduler]; +} + ++ (RACSignal *)startLazilyWithScheduler:(RACScheduler *)scheduler block:(void (^)(id subscriber))block { + NSCParameterAssert(scheduler != nil); + NSCParameterAssert(block != NULL); + + RACMulticastConnection *connection = [[RACSignal + createSignal:^ id (id subscriber) { + block(subscriber); + return nil; + }] + multicast:[RACReplaySubject subject]]; + + return [[[RACSignal + createSignal:^ id (id subscriber) { + [connection.signal subscribe:subscriber]; + [connection connect]; + return nil; + }] + subscribeOn:scheduler] + setNameWithFormat:@"+startLazilyWithScheduler:%@ block:", scheduler]; +} + +#pragma mark NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p> name: %@", self.class, self, self.name]; +} + +@end + +@implementation RACSignal (RACStream) + ++ (RACSignal *)empty { + return [RACEmptySignal empty]; +} + ++ (RACSignal *)return:(id)value { + return [RACReturnSignal return:value]; +} + +- (RACSignal *)bind:(RACStreamBindBlock (^)(void))block { + NSCParameterAssert(block != NULL); + + /* + * -bind: should: + * + * 1. Subscribe to the original signal of values. + * 2. Any time the original signal sends a value, transform it using the binding block. + * 3. If the binding block returns a signal, subscribe to it, and pass all of its values through to the subscriber as they're received. + * 4. If the binding block asks the bind to terminate, complete the _original_ signal. + * 5. When _all_ signals complete, send completed to the subscriber. + * + * If any signal sends an error at any point, send that to the subscriber. + */ + + return [[RACSignal createSignal:^(id subscriber) { + RACStreamBindBlock bindingBlock = block(); + + NSMutableArray *signals = [NSMutableArray arrayWithObject:self]; + + RACCompoundDisposable *compoundDisposable = [RACCompoundDisposable compoundDisposable]; + + void (^completeSignal)(RACSignal *, RACDisposable *) = ^(RACSignal *signal, RACDisposable *finishedDisposable) { + BOOL removeDisposable = NO; + + @synchronized (signals) { + [signals removeObject:signal]; + + if (signals.count == 0) { + [subscriber sendCompleted]; + [compoundDisposable dispose]; + } else { + removeDisposable = YES; + } + } + + if (removeDisposable) [compoundDisposable removeDisposable:finishedDisposable]; + }; + + void (^addSignal)(RACSignal *) = ^(RACSignal *signal) { + @synchronized (signals) { + [signals addObject:signal]; + } + + RACSerialDisposable *selfDisposable = [[RACSerialDisposable alloc] init]; + [compoundDisposable addDisposable:selfDisposable]; + + RACDisposable *disposable = [signal subscribeNext:^(id x) { + [subscriber sendNext:x]; + } error:^(NSError *error) { + [compoundDisposable dispose]; + [subscriber sendError:error]; + } completed:^{ + @autoreleasepool { + completeSignal(signal, selfDisposable); + } + }]; + + selfDisposable.disposable = disposable; + }; + + @autoreleasepool { + RACSerialDisposable *selfDisposable = [[RACSerialDisposable alloc] init]; + [compoundDisposable addDisposable:selfDisposable]; + + RACDisposable *bindingDisposable = [self subscribeNext:^(id x) { + BOOL stop = NO; + id signal = bindingBlock(x, &stop); + + @autoreleasepool { + if (signal != nil) addSignal(signal); + if (signal == nil || stop) { + [selfDisposable dispose]; + completeSignal(self, selfDisposable); + } + } + } error:^(NSError *error) { + [compoundDisposable dispose]; + [subscriber sendError:error]; + } completed:^{ + @autoreleasepool { + completeSignal(self, selfDisposable); + } + }]; + + selfDisposable.disposable = bindingDisposable; + } + + return compoundDisposable; + }] setNameWithFormat:@"[%@] -bind:", self.name]; +} + +- (RACSignal *)concat:(RACSignal *)signal { + return [[RACSignal createSignal:^(id subscriber) { + RACSerialDisposable *serialDisposable = [[RACSerialDisposable alloc] init]; + + RACDisposable *sourceDisposable = [self subscribeNext:^(id x) { + [subscriber sendNext:x]; + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + RACDisposable *concattedDisposable = [signal subscribe:subscriber]; + serialDisposable.disposable = concattedDisposable; + }]; + + serialDisposable.disposable = sourceDisposable; + return serialDisposable; + }] setNameWithFormat:@"[%@] -concat: %@", self.name, signal]; +} + +- (RACSignal *)zipWith:(RACSignal *)signal { + NSCParameterAssert(signal != nil); + + return [[RACSignal createSignal:^(id subscriber) { + __block BOOL selfCompleted = NO; + NSMutableArray *selfValues = [NSMutableArray array]; + + __block BOOL otherCompleted = NO; + NSMutableArray *otherValues = [NSMutableArray array]; + + void (^sendCompletedIfNecessary)(void) = ^{ + @synchronized (selfValues) { + BOOL selfEmpty = (selfCompleted && selfValues.count == 0); + BOOL otherEmpty = (otherCompleted && otherValues.count == 0); + if (selfEmpty || otherEmpty) [subscriber sendCompleted]; + } + }; + + void (^sendNext)(void) = ^{ + @synchronized (selfValues) { + if (selfValues.count == 0) return; + if (otherValues.count == 0) return; + + RACTuple *tuple = [RACTuple tupleWithObjects:selfValues[0], otherValues[0], nil]; + [selfValues removeObjectAtIndex:0]; + [otherValues removeObjectAtIndex:0]; + + [subscriber sendNext:tuple]; + sendCompletedIfNecessary(); + } + }; + + RACDisposable *selfDisposable = [self subscribeNext:^(id x) { + @synchronized (selfValues) { + [selfValues addObject:x ?: RACTupleNil.tupleNil]; + sendNext(); + } + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + @synchronized (selfValues) { + selfCompleted = YES; + sendCompletedIfNecessary(); + } + }]; + + RACDisposable *otherDisposable = [signal subscribeNext:^(id x) { + @synchronized (selfValues) { + [otherValues addObject:x ?: RACTupleNil.tupleNil]; + sendNext(); + } + } error:^(NSError *error) { + [subscriber sendError:error]; + } completed:^{ + @synchronized (selfValues) { + otherCompleted = YES; + sendCompletedIfNecessary(); + } + }]; + + return [RACDisposable disposableWithBlock:^{ + [selfDisposable dispose]; + [otherDisposable dispose]; + }]; + }] setNameWithFormat:@"[%@] -zipWith: %@", self.name, signal]; +} + +@end + +@implementation RACSignal (Subscription) + +- (RACDisposable *)subscribe:(id)subscriber { + NSCAssert(NO, @"This method must be overridden by subclasses"); + return nil; +} + +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock { + NSCParameterAssert(nextBlock != NULL); + + RACSubscriber *o = [RACSubscriber subscriberWithNext:nextBlock error:NULL completed:NULL]; + return [self subscribe:o]; +} + +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock completed:(void (^)(void))completedBlock { + NSCParameterAssert(nextBlock != NULL); + NSCParameterAssert(completedBlock != NULL); + + RACSubscriber *o = [RACSubscriber subscriberWithNext:nextBlock error:NULL completed:completedBlock]; + return [self subscribe:o]; +} + +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock error:(void (^)(NSError *error))errorBlock completed:(void (^)(void))completedBlock { + NSCParameterAssert(nextBlock != NULL); + NSCParameterAssert(errorBlock != NULL); + NSCParameterAssert(completedBlock != NULL); + + RACSubscriber *o = [RACSubscriber subscriberWithNext:nextBlock error:errorBlock completed:completedBlock]; + return [self subscribe:o]; +} + +- (RACDisposable *)subscribeError:(void (^)(NSError *error))errorBlock { + NSCParameterAssert(errorBlock != NULL); + + RACSubscriber *o = [RACSubscriber subscriberWithNext:NULL error:errorBlock completed:NULL]; + return [self subscribe:o]; +} + +- (RACDisposable *)subscribeCompleted:(void (^)(void))completedBlock { + NSCParameterAssert(completedBlock != NULL); + + RACSubscriber *o = [RACSubscriber subscriberWithNext:NULL error:NULL completed:completedBlock]; + return [self subscribe:o]; +} + +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock error:(void (^)(NSError *error))errorBlock { + NSCParameterAssert(nextBlock != NULL); + NSCParameterAssert(errorBlock != NULL); + + RACSubscriber *o = [RACSubscriber subscriberWithNext:nextBlock error:errorBlock completed:NULL]; + return [self subscribe:o]; +} + +- (RACDisposable *)subscribeError:(void (^)(NSError *))errorBlock completed:(void (^)(void))completedBlock { + NSCParameterAssert(completedBlock != NULL); + NSCParameterAssert(errorBlock != NULL); + + RACSubscriber *o = [RACSubscriber subscriberWithNext:NULL error:errorBlock completed:completedBlock]; + return [self subscribe:o]; +} + +@end + +@implementation RACSignal (Debugging) + +- (RACSignal *)logAll { + return [[[self logNext] logError] logCompleted]; +} + +- (RACSignal *)logNext { + return [[self doNext:^(id x) { + NSLog(@"%@ next: %@", self, x); + }] setNameWithFormat:@"%@", self.name]; +} + +- (RACSignal *)logError { + return [[self doError:^(NSError *error) { + NSLog(@"%@ error: %@", self, error); + }] setNameWithFormat:@"%@", self.name]; +} + +- (RACSignal *)logCompleted { + return [[self doCompleted:^{ + NSLog(@"%@ completed", self); + }] setNameWithFormat:@"%@", self.name]; +} + +@end + +@implementation RACSignal (Testing) + +static const NSTimeInterval RACSignalAsynchronousWaitTimeout = 10; + +- (id)asynchronousFirstOrDefault:(id)defaultValue success:(BOOL *)success error:(NSError **)error { + NSCAssert([NSThread isMainThread], @"%s should only be used from the main thread", __func__); + + __block id result = defaultValue; + __block BOOL done = NO; + + // Ensures that we don't pass values across thread boundaries by reference. + __block NSError *localError; + __block BOOL localSuccess = YES; + + [[[[self + take:1] + timeout:RACSignalAsynchronousWaitTimeout onScheduler:[RACScheduler scheduler]] + deliverOn:RACScheduler.mainThreadScheduler] + subscribeNext:^(id x) { + result = x; + done = YES; + } error:^(NSError *e) { + if (!done) { + localSuccess = NO; + localError = e; + done = YES; + } + } completed:^{ + done = YES; + }]; + + do { + [NSRunLoop.mainRunLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + } while (!done); + + if (success != NULL) *success = localSuccess; + if (error != NULL) *error = localError; + + return result; +} + +- (BOOL)asynchronouslyWaitUntilCompleted:(NSError **)error { + BOOL success = NO; + [[self ignoreValues] asynchronousFirstOrDefault:nil success:&success error:error]; + return success; +} + +@end + +@implementation RACSignal (Deprecated) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" + ++ (RACSignal *)startWithScheduler:(RACScheduler *)scheduler subjectBlock:(void (^)(RACSubject *subject))block { + NSCParameterAssert(block != NULL); + + RACReplaySubject *subject = [[RACReplaySubject subject] setNameWithFormat:@"+startWithScheduler:subjectBlock:"]; + + [scheduler schedule:^{ + block(subject); + }]; + + return subject; +} + ++ (RACSignal *)start:(id (^)(BOOL *success, NSError **error))block { + return [[self startWithScheduler:[RACScheduler scheduler] block:block] setNameWithFormat:@"+start:"]; +} + ++ (RACSignal *)startWithScheduler:(RACScheduler *)scheduler block:(id (^)(BOOL *success, NSError **error))block { + return [[self startWithScheduler:scheduler subjectBlock:^(id subscriber) { + BOOL success = YES; + NSError *error = nil; + id returned = block(&success, &error); + + if (!success) { + [subscriber sendError:error]; + } else { + [subscriber sendNext:returned]; + [subscriber sendCompleted]; + } + }] setNameWithFormat:@"+startWithScheduler:block:"]; +} + +#pragma clang diagnostic pop + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalProvider.d b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalProvider.d new file mode 100644 index 00000000..8add9a10 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalProvider.d @@ -0,0 +1,5 @@ +provider RACSignal { + probe next(char *signal, char *subscriber, char *valueDescription); + probe completed(char *signal, char *subscriber); + probe error(char *signal, char *subscriber, char *errorDescription); +}; diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalSequence.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalSequence.h new file mode 100644 index 00000000..9666285d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalSequence.h @@ -0,0 +1,19 @@ +// +// RACSignalSequence.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-11-09. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSequence.h" + +@class RACSignal; + +/// Private class that adapts a RACSignal to the RACSequence interface. +@interface RACSignalSequence : RACSequence + +/// Returns a sequence for enumerating over the given signal. ++ (RACSequence *)sequenceWithSignal:(RACSignal *)signal; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalSequence.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalSequence.m new file mode 100644 index 00000000..52ea1b91 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalSequence.m @@ -0,0 +1,79 @@ +// +// RACSignalSequence.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-11-09. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSignalSequence.h" +#import "RACDisposable.h" +#import "RACReplaySubject.h" +#import "RACSignal+Operations.h" + +@interface RACSignalSequence () + +// Replays the signal given on initialization. +@property (nonatomic, strong, readonly) RACReplaySubject *subject; + +@end + +@implementation RACSignalSequence + +#pragma mark Lifecycle + ++ (RACSequence *)sequenceWithSignal:(RACSignal *)signal { + RACSignalSequence *seq = [[self alloc] init]; + + RACReplaySubject *subject = [RACReplaySubject subject]; + [signal subscribeNext:^(id value) { + [subject sendNext:value]; + } error:^(NSError *error) { + [subject sendError:error]; + } completed:^{ + [subject sendCompleted]; + }]; + + seq->_subject = subject; + return seq; +} + +#pragma mark RACSequence + +- (id)head { + id value = [self.subject firstOrDefault:self]; + + if (value == self) { + return nil; + } else { + return value ?: NSNull.null; + } +} + +- (RACSequence *)tail { + RACSequence *sequence = [self.class sequenceWithSignal:[self.subject skip:1]]; + sequence.name = self.name; + return sequence; +} + +- (NSArray *)array { + return self.subject.toArray; +} + +#pragma mark NSObject + +- (NSString *)description { + // Synchronously accumulate the values that have been sent so far. + NSMutableArray *values = [NSMutableArray array]; + RACDisposable *disposable = [self.subject subscribeNext:^(id value) { + @synchronized (values) { + [values addObject:value ?: NSNull.null]; + } + }]; + + [disposable dispose]; + + return [NSString stringWithFormat:@"<%@: %p>{ name = %@, values = %@ … }", self.class, self, self.name, values]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream+Private.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream+Private.h new file mode 100644 index 00000000..41e63697 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream+Private.h @@ -0,0 +1,23 @@ +// +// RACStream+Private.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-07-22. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACStream.h" + +@interface RACStream () + +/// Combines a list of streams using the logic of the given block. +/// +/// streams - The streams to combine. +/// block - An operator that combines two streams and returns a new one. The +/// returned stream should contain 2-tuples of the streams' combined +/// values. +/// +/// Returns a combined stream. ++ (instancetype)join:(id)streams block:(RACStream * (^)(id, id))block; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream.h new file mode 100644 index 00000000..da7f39c2 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream.h @@ -0,0 +1,320 @@ +// +// RACStream.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-31. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACStream; + +/// A block which accepts a value from a RACStream and returns a new instance +/// of the same stream class. +/// +/// Setting `stop` to `YES` will cause the bind to terminate after the returned +/// value. Returning `nil` will result in immediate termination. +typedef RACStream * (^RACStreamBindBlock)(id value, BOOL *stop); + +/// An abstract class representing any stream of values. +/// +/// This class represents a monad, upon which many stream-based operations can +/// be built. +/// +/// When subclassing RACStream, only the methods in the main @interface body need +/// to be overridden. +@interface RACStream : NSObject + +/// Returns an empty stream. ++ (instancetype)empty; + +/// Lifts `value` into the stream monad. +/// +/// Returns a stream containing only the given value. ++ (instancetype)return:(id)value; + +/// Lazily binds a block to the values in the receiver. +/// +/// This should only be used if you need to terminate the bind early, or close +/// over some state. -flattenMap: is more appropriate for all other cases. +/// +/// block - A block returning a RACStreamBindBlock. This block will be invoked +/// each time the bound stream is re-evaluated. This block must not be +/// nil or return nil. +/// +/// Returns a new stream which represents the combined result of all lazy +/// applications of `block`. +- (instancetype)bind:(RACStreamBindBlock (^)(void))block; + +/// Appends the values of `stream` to the values in the receiver. +/// +/// stream - A stream to concatenate. This must be an instance of the same +/// concrete class as the receiver, and should not be `nil`. +/// +/// Returns a new stream representing the receiver followed by `stream`. +- (instancetype)concat:(RACStream *)stream; + +/// Zips the values in the receiver with those of the given stream to create +/// RACTuples. +/// +/// The first value of each stream will be combined, then the second value, and +/// so forth, until at least one of the streams is exhausted. +/// +/// stream - The stream to zip with. This must be an instance of the same +/// concrete class as the receiver, and should not be `nil`. +/// +/// Returns a new stream of RACTuples, representing the zipped values of the +/// two streams. +- (instancetype)zipWith:(RACStream *)stream; + +@end + +/// This extension contains functionality to support naming streams for +/// debugging. +/// +/// Subclasses do not need to override the methods here. +@interface RACStream () + +/// The name of the stream. This is for debugging/human purposes only. +@property (copy) NSString *name; + +/// Sets the name of the receiver to the given format string. +/// +/// This is for debugging purposes only, and won't do anything unless the DEBUG +/// preprocessor macro is defined. +/// +/// Returns the receiver, for easy method chaining. +- (instancetype)setNameWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2); + +@end + +/// Operations built on the RACStream primitives. +/// +/// These methods do not need to be overridden, although subclasses may +/// occasionally gain better performance from doing so. +@interface RACStream (Operations) + +/// Maps `block` across the values in the receiver and flattens the result. +/// +/// Note that operators applied _after_ -flattenMap: behave differently from +/// operators _within_ -flattenMap:. See the Examples section below. +/// +/// This corresponds to the `SelectMany` method in Rx. +/// +/// block - A block which accepts the values in the receiver and returns a new +/// instance of the receiver's class. This block should not return `nil`. +/// +/// Examples +/// +/// [signal flattenMap:^(id x) { +/// // Logs each time a returned signal completes. +/// return [[RACSignal return:x] logCompleted]; +/// }]; +/// +/// [[signal +/// flattenMap:^(id x) { +/// return [RACSignal return:x]; +/// }] +/// // Logs only once, when all of the signals complete. +/// logCompleted]; +/// +/// Returns a new stream which represents the combined streams resulting from +/// mapping `block`. +- (instancetype)flattenMap:(RACStream * (^)(id value))block; + +/// Flattens a stream of streams. +/// +/// This corresponds to the `Merge` method in Rx. +/// +/// Returns a stream consisting of the combined streams obtained from the +/// receiver. +- (instancetype)flatten; + +/// Maps `block` across the values in the receiver. +/// +/// This corresponds to the `Select` method in Rx. +/// +/// Returns a new stream with the mapped values. +- (instancetype)map:(id (^)(id value))block; + +/// Replace each value in the receiver with the given object. +/// +/// Returns a new stream which includes the given object once for each value in +/// the receiver. +- (instancetype)mapReplace:(id)object; + +/// Filters out values in the receiver that don't pass the given test. +/// +/// This corresponds to the `Where` method in Rx. +/// +/// Returns a new stream with only those values that passed. +- (instancetype)filter:(BOOL (^)(id value))block; + +/// Filters out values in the receiver that equal (via -isEqual:) the provided value. +/// +/// value - The value can be `nil`, in which case it ignores `nil` values. +/// +/// Returns a new stream containing only the values which did not compare equal +/// to `value`. +- (instancetype)ignore:(id)value; + +/// Unpacks each RACTuple in the receiver and maps the values to a new value. +/// +/// reduceBlock - The block which reduces each RACTuple's values into one value. +/// It must take as many arguments as the number of tuple elements +/// to process. Each argument will be an object argument. The +/// return value must be an object. This argument cannot be nil. +/// +/// Returns a new stream of reduced tuple values. +- (instancetype)reduceEach:(id (^)())reduceBlock; + +/// Returns a stream consisting of `value`, followed by the values in the +/// receiver. +- (instancetype)startWith:(id)value; + +/// Skips the first `skipCount` values in the receiver. +/// +/// Returns the receiver after skipping the first `skipCount` values. If +/// `skipCount` is greater than the number of values in the stream, an empty +/// stream is returned. +- (instancetype)skip:(NSUInteger)skipCount; + +/// Returns a stream of the first `count` values in the receiver. If `count` is +/// greater than or equal to the number of values in the stream, a stream +/// equivalent to the receiver is returned. +- (instancetype)take:(NSUInteger)count; + +/// Zips the values in the given streams to create RACTuples. +/// +/// The first value of each stream will be combined, then the second value, and +/// so forth, until at least one of the streams is exhausted. +/// +/// streams - The streams to combine. These must all be instances of the same +/// concrete class implementing the protocol. If this collection is +/// empty, the returned stream will be empty. +/// +/// Returns a new stream containing RACTuples of the zipped values from the +/// streams. ++ (instancetype)zip:(id)streams; + +/// Zips streams using +zip:, then reduces the resulting tuples into a single +/// value using -reduceEach: +/// +/// streams - The streams to combine. These must all be instances of the +/// same concrete class implementing the protocol. If this +/// collection is empty, the returned stream will be empty. +/// reduceBlock - The block which reduces the values from all the streams +/// into one value. It must take as many arguments as the +/// number of streams given. Each argument will be an object +/// argument. The return value must be an object. This argument +/// must not be nil. +/// +/// Example: +/// +/// [RACStream zip:@[ stringSignal, intSignal ] reduce:^(NSString *string, NSNumber *number) { +/// return [NSString stringWithFormat:@"%@: %@", string, number]; +/// }]; +/// +/// Returns a new stream containing the results from each invocation of +/// `reduceBlock`. ++ (instancetype)zip:(id)streams reduce:(id (^)())reduceBlock; + +/// Returns a stream obtained by concatenating `streams` in order. ++ (instancetype)concat:(id)streams; + +/// Combines values in the receiver from left to right using the given block. +/// +/// The algorithm proceeds as follows: +/// +/// 1. `startingValue` is passed into the block as the `running` value, and the +/// first element of the receiver is passed into the block as the `next` value. +/// 2. The result of the invocation is added to the returned stream. +/// 3. The result of the invocation (`running`) and the next element of the +/// receiver (`next`) is passed into `block`. +/// 4. Steps 2 and 3 are repeated until all values have been processed. +/// +/// startingValue - The value to be combined with the first element of the +/// receiver. This value may be `nil`. +/// block - A block that describes how to combine values of the +/// receiver. If the receiver is empty, this block will never be +/// invoked. +/// +/// Examples +/// +/// RACSequence *numbers = @[ @1, @2, @3, @4 ].rac_sequence; +/// +/// // Contains 1, 3, 6, 10 +/// RACSequence *sums = [numbers scanWithStart:@0 reduce:^(NSNumber *sum, NSNumber *next) { +/// return @(sum.integerValue + next.integerValue); +/// }]; +/// +/// Returns a new stream that consists of each application of `block`. If the +/// receiver is empty, an empty stream is returned. +- (instancetype)scanWithStart:(id)startingValue reduce:(id (^)(id running, id next))block; + +/// Combines each previous and current value into one object. +/// +/// This method is similar to -scanWithStart:reduce:, but only ever operates on +/// the previous and current values (instead of the whole stream), and does not +/// pass the return value of `reduceBlock` into the next invocation of it. +/// +/// start - The value passed into `reduceBlock` as `previous` for the +/// first value. +/// reduceBlock - The block that combines the previous value and the current +/// value to create the reduced value. Cannot be nil. +/// +/// Examples +/// +/// RACSequence *numbers = @[ @1, @2, @3, @4 ].rac_sequence; +/// +/// // Contains 1, 3, 5, 7 +/// RACSequence *sums = [numbers combinePreviousWithStart:@0 reduce:^(NSNumber *previous, NSNumber *next) { +/// return @(previous.integerValue + next.integerValue); +/// }]; +/// +/// Returns a new stream consisting of the return values from each application of +/// `reduceBlock`. +- (instancetype)combinePreviousWithStart:(id)start reduce:(id (^)(id previous, id current))reduceBlock; + +/// Takes values until the given block returns `YES`. +/// +/// Returns a stream of the initial values in the receiver that fail `predicate`. +/// If `predicate` never returns `YES`, a stream equivalent to the receiver is +/// returned. +- (instancetype)takeUntilBlock:(BOOL (^)(id x))predicate; + +/// Takes values until the given block returns `NO`. +/// +/// Returns a stream of the initial values in the receiver that pass `predicate`. +/// If `predicate` never returns `NO`, a stream equivalent to the receiver is +/// returned. +- (instancetype)takeWhileBlock:(BOOL (^)(id x))predicate; + +/// Skips values until the given block returns `YES`. +/// +/// Returns a stream containing the values of the receiver that follow any +/// initial values failing `predicate`. If `predicate` never returns `YES`, +/// an empty stream is returned. +- (instancetype)skipUntilBlock:(BOOL (^)(id x))predicate; + +/// Skips values until the given block returns `NO`. +/// +/// Returns a stream containing the values of the receiver that follow any +/// initial values passing `predicate`. If `predicate` never returns `NO`, an +/// empty stream is returned. +- (instancetype)skipWhileBlock:(BOOL (^)(id x))predicate; + +/// Returns a stream of values for which -isEqual: returns NO when compared to the +/// previous value. +- (instancetype)distinctUntilChanged; + +@end + +@interface RACStream (Deprecated) + +- (instancetype)sequenceMany:(RACStream * (^)(void))block __attribute__((deprecated("Use -flattenMap: instead"))); +- (instancetype)scanWithStart:(id)startingValue combine:(id (^)(id running, id next))block __attribute__((deprecated("Renamed to -scanWithStart:reduce:"))); +- (instancetype)mapPreviousWithStart:(id)start reduce:(id (^)(id previous, id current))combineBlock __attribute__((deprecated("Renamed to -combinePreviousWithStart:reduce:"))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream.m new file mode 100644 index 00000000..791a5ccd --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStream.m @@ -0,0 +1,359 @@ +// +// RACStream.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-31. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACStream.h" +#import "NSObject+RACDescription.h" +#import "RACBlockTrampoline.h" +#import "RACTuple.h" + +@implementation RACStream + +#pragma mark Lifecycle + +- (id)init { + self = [super init]; + if (self == nil) return nil; + + self.name = @""; + return self; +} + +#pragma mark Abstract methods + ++ (instancetype)empty { + return nil; +} + +- (instancetype)bind:(RACStreamBindBlock (^)(void))block { + return nil; +} + ++ (instancetype)return:(id)value { + return nil; +} + +- (instancetype)concat:(RACStream *)stream { + return nil; +} + +- (instancetype)zipWith:(RACStream *)stream { + return nil; +} + +#pragma mark Naming + +- (instancetype)setNameWithFormat:(NSString *)format, ... { +#ifdef DEBUG + NSCParameterAssert(format != nil); + + va_list args; + va_start(args, format); + + NSString *str = [[NSString alloc] initWithFormat:format arguments:args]; + va_end(args); + + self.name = str; +#endif + + return self; +} + +@end + +@implementation RACStream (Operations) + +- (instancetype)flattenMap:(RACStream * (^)(id value))block { + return [[self bind:^{ + return ^(id value, BOOL *stop) { + return block(value); + }; + }] setNameWithFormat:@"[%@] -flattenMap:", self.name]; +} + +- (instancetype)flatten { + __weak RACStream *stream __attribute__((unused)) = self; + return [[self flattenMap:^(id value) { + NSCAssert([value isKindOfClass:RACStream.class], @"Stream %@ being flattened contains an object that is not a stream: %@", stream, value); + return value; + }] setNameWithFormat:@"[%@] -flatten", self.name]; +} + +- (instancetype)map:(id (^)(id value))block { + NSCParameterAssert(block != nil); + + Class class = self.class; + + return [[self flattenMap:^(id value) { + return [class return:block(value)]; + }] setNameWithFormat:@"[%@] -map:", self.name]; +} + +- (instancetype)mapReplace:(id)object { + return [[self map:^(id _) { + return object; + }] setNameWithFormat:@"[%@] -mapReplace: %@", self.name, [object rac_description]]; +} + +- (instancetype)combinePreviousWithStart:(id)start reduce:(id (^)(id previous, id next))reduceBlock { + NSCParameterAssert(reduceBlock != NULL); + return [[[self + scanWithStart:[RACTuple tupleWithObjects:start, nil] + reduce:^(RACTuple *previousTuple, id next) { + id value = reduceBlock(previousTuple[0], next); + return [RACTuple tupleWithObjects:next ?: RACTupleNil.tupleNil, value ?: RACTupleNil.tupleNil, nil]; + }] + map:^(RACTuple *tuple) { + return tuple[1]; + }] + setNameWithFormat:@"[%@] -combinePreviousWithStart: %@ reduce:", self.name, [start rac_description]]; +} + +- (instancetype)filter:(BOOL (^)(id value))block { + NSCParameterAssert(block != nil); + + Class class = self.class; + + return [[self flattenMap:^ id (id value) { + if (block(value)) { + return [class return:value]; + } else { + return class.empty; + } + }] setNameWithFormat:@"[%@] -filter:", self.name]; +} + +- (instancetype)ignore:(id)value { + return [[self filter:^ BOOL (id innerValue) { + return innerValue != value && ![innerValue isEqual:value]; + }] setNameWithFormat:@"[%@] -ignore: %@", self.name, [value rac_description]]; +} + +- (instancetype)reduceEach:(id (^)())reduceBlock { + NSCParameterAssert(reduceBlock != nil); + + __weak RACStream *stream __attribute__((unused)) = self; + return [[self map:^(RACTuple *t) { + NSCAssert([t isKindOfClass:RACTuple.class], @"Value from stream %@ is not a tuple: %@", stream, t); + return [RACBlockTrampoline invokeBlock:reduceBlock withArguments:t]; + }] setNameWithFormat:@"[%@] -reduceEach:", self.name]; +} + +- (instancetype)startWith:(id)value { + return [[[self.class return:value] + concat:self] + setNameWithFormat:@"[%@] -startWith: %@", self.name, [value rac_description]]; +} + +- (instancetype)skip:(NSUInteger)skipCount { + Class class = self.class; + + return [[self bind:^{ + __block NSUInteger skipped = 0; + + return ^(id value, BOOL *stop) { + if (skipped >= skipCount) return [class return:value]; + + skipped++; + return class.empty; + }; + }] setNameWithFormat:@"[%@] -skip: %lu", self.name, (unsigned long)skipCount]; +} + +- (instancetype)take:(NSUInteger)count { + Class class = self.class; + + return [[self bind:^{ + __block NSUInteger taken = 0; + + return ^ id (id value, BOOL *stop) { + RACStream *result = class.empty; + + if (taken < count) result = [class return:value]; + if (++taken >= count) *stop = YES; + + return result; + }; + }] setNameWithFormat:@"[%@] -take: %lu", self.name, (unsigned long)count]; +} + ++ (instancetype)join:(id)streams block:(RACStream * (^)(id, id))block { + RACStream *current = nil; + + // Creates streams of successively larger tuples by combining the input + // streams one-by-one. + for (RACStream *stream in streams) { + // For the first stream, just wrap its values in a RACTuple. That way, + // if only one stream is given, the result is still a stream of tuples. + if (current == nil) { + current = [stream map:^(id x) { + return RACTuplePack(x); + }]; + + continue; + } + + current = block(current, stream); + } + + if (current == nil) return [self empty]; + + return [current map:^(RACTuple *xs) { + // Right now, each value is contained in its own tuple, sorta like: + // + // (((1), 2), 3) + // + // We need to unwrap all the layers and create a tuple out of the result. + NSMutableArray *values = [[NSMutableArray alloc] init]; + + while (xs != nil) { + [values insertObject:xs.last ?: RACTupleNil.tupleNil atIndex:0]; + xs = (xs.count > 1 ? xs.first : nil); + } + + return [RACTuple tupleWithObjectsFromArray:values]; + }]; +} + ++ (instancetype)zip:(id)streams { + return [[self join:streams block:^(RACStream *left, RACStream *right) { + return [left zipWith:right]; + }] setNameWithFormat:@"+zip: %@", streams]; +} + ++ (instancetype)zip:(id)streams reduce:(id (^)())reduceBlock { + NSCParameterAssert(reduceBlock != nil); + + RACStream *result = [self zip:streams]; + + // Although we assert this condition above, older versions of this method + // supported this argument being nil. Avoid crashing Release builds of + // apps that depended on that. + if (reduceBlock != nil) result = [result reduceEach:reduceBlock]; + + return [result setNameWithFormat:@"+zip: %@ reduce:", streams]; +} + ++ (instancetype)concat:(id)streams { + RACStream *result = self.empty; + for (RACStream *stream in streams) { + result = [result concat:stream]; + } + + return [result setNameWithFormat:@"+concat: %@", streams]; +} + +- (instancetype)scanWithStart:(id)startingValue reduce:(id (^)(id running, id next))block { + NSCParameterAssert(block != nil); + + Class class = self.class; + + return [[self bind:^{ + __block id running = startingValue; + + return ^(id value, BOOL *stop) { + running = block(running, value); + return [class return:running]; + }; + }] setNameWithFormat:@"[%@] -scanWithStart: %@ reduce:", self.name, [startingValue rac_description]]; +} + +- (instancetype)takeUntilBlock:(BOOL (^)(id x))predicate { + NSCParameterAssert(predicate != nil); + + Class class = self.class; + + return [[self bind:^{ + return ^ id (id value, BOOL *stop) { + if (predicate(value)) return nil; + + return [class return:value]; + }; + }] setNameWithFormat:@"[%@] -takeUntilBlock:", self.name]; +} + +- (instancetype)takeWhileBlock:(BOOL (^)(id x))predicate { + NSCParameterAssert(predicate != nil); + + return [[self takeUntilBlock:^ BOOL (id x) { + return !predicate(x); + }] setNameWithFormat:@"[%@] -takeWhileBlock:", self.name]; +} + +- (instancetype)skipUntilBlock:(BOOL (^)(id x))predicate { + NSCParameterAssert(predicate != nil); + + Class class = self.class; + + return [[self bind:^{ + __block BOOL skipping = YES; + + return ^ id (id value, BOOL *stop) { + if (skipping) { + if (predicate(value)) { + skipping = NO; + } else { + return class.empty; + } + } + + return [class return:value]; + }; + }] setNameWithFormat:@"[%@] -skipUntilBlock:", self.name]; +} + +- (instancetype)skipWhileBlock:(BOOL (^)(id x))predicate { + NSCParameterAssert(predicate != nil); + + return [[self skipUntilBlock:^ BOOL (id x) { + return !predicate(x); + }] setNameWithFormat:@"[%@] -skipUntilBlock:", self.name]; +} + +- (instancetype)distinctUntilChanged { + Class class = self.class; + + return [[self bind:^{ + __block id lastValue = nil; + __block BOOL initial = YES; + + return ^(id x, BOOL *stop) { + if (!initial && (lastValue == x || [x isEqual:lastValue])) return [class empty]; + + initial = NO; + lastValue = x; + return [class return:x]; + }; + }] setNameWithFormat:@"[%@] -distinctUntilChanged", self.name]; +} + +@end + +@implementation RACStream (Deprecated) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" + +- (instancetype)sequenceMany:(RACStream * (^)(void))block { + NSCParameterAssert(block != NULL); + + return [[self flattenMap:^(id _) { + return block(); + }] setNameWithFormat:@"[%@] -sequenceMany:", self.name]; +} + +- (instancetype)scanWithStart:(id)startingValue combine:(id (^)(id running, id next))block { + return [self scanWithStart:startingValue reduce:block]; +} + +- (instancetype)mapPreviousWithStart:(id)start reduce:(id (^)(id previous, id current))combineBlock { + return [self combinePreviousWithStart:start reduce:combineBlock]; +} + +#pragma clang diagnostic pop + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStringSequence.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStringSequence.h new file mode 100644 index 00000000..0d121e0e --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStringSequence.h @@ -0,0 +1,18 @@ +// +// RACStringSequence.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "RACSequence.h" + +/// Private class that adapts a string to the RACSequence interface. +@interface RACStringSequence : RACSequence + +/// Returns a sequence for enumerating over the given string, starting from the +/// given character offset. The string will be copied to prevent mutation. ++ (RACSequence *)sequenceWithString:(NSString *)string offset:(NSUInteger)offset; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStringSequence.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStringSequence.m new file mode 100644 index 00000000..dd10f3c3 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACStringSequence.m @@ -0,0 +1,65 @@ +// +// RACStringSequence.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import "RACStringSequence.h" + +@interface RACStringSequence () + +// The string being sequenced. +@property (nonatomic, copy, readonly) NSString *string; + +// The index in the string from which the sequence starts. +@property (nonatomic, assign, readonly) NSUInteger offset; + +@end + +@implementation RACStringSequence + +#pragma mark Lifecycle + ++ (RACSequence *)sequenceWithString:(NSString *)string offset:(NSUInteger)offset { + NSCParameterAssert(offset <= string.length); + + if (offset == string.length) return self.empty; + + RACStringSequence *seq = [[self alloc] init]; + seq->_string = [string copy]; + seq->_offset = offset; + return seq; +} + +#pragma mark RACSequence + +- (id)head { + return [self.string substringWithRange:NSMakeRange(self.offset, 1)]; +} + +- (RACSequence *)tail { + RACSequence *sequence = [self.class sequenceWithString:self.string offset:self.offset + 1]; + sequence.name = self.name; + return sequence; +} + +- (NSArray *)array { + NSUInteger substringLength = self.string.length - self.offset; + NSMutableArray *array = [NSMutableArray arrayWithCapacity:substringLength]; + + [self.string enumerateSubstringsInRange:NSMakeRange(self.offset, substringLength) options:NSStringEnumerationByComposedCharacterSequences usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { + [array addObject:substring]; + }]; + + return [array copy]; +} + +#pragma mark NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p>{ name = %@, string = %@ }", self.class, self, self.name, [self.string substringFromIndex:self.offset]]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubject.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubject.h new file mode 100644 index 00000000..30c100bf --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubject.h @@ -0,0 +1,22 @@ +// +// RACSubject.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/9/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSignal.h" +#import "RACSubscriber.h" + +/// A subject can be thought of as a signal that you can manually control by +/// sending next, completed, and error. +/// +/// They're most helpful in bridging the non-RAC world to RAC, since they let you +/// manually control the sending of events. +@interface RACSubject : RACSignal + +/// Returns a new subject. ++ (instancetype)subject; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubject.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubject.m new file mode 100644 index 00000000..9bae48be --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubject.m @@ -0,0 +1,117 @@ +// +// RACSubject.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/9/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSubject.h" +#import "RACEXTScope.h" +#import "RACCompoundDisposable.h" +#import "RACPassthroughSubscriber.h" + +@interface RACSubject () + +// Contains all current subscribers to the receiver. +// +// This should only be used while synchronized on `self`. +@property (nonatomic, strong, readonly) NSMutableArray *subscribers; + +// Contains all of the receiver's subscriptions to other signals. +@property (nonatomic, strong, readonly) RACCompoundDisposable *disposable; + +// Enumerates over each of the receiver's `subscribers` and invokes `block` for +// each. +- (void)enumerateSubscribersUsingBlock:(void (^)(id subscriber))block; + +@end + +@implementation RACSubject + +#pragma mark Lifecycle + ++ (instancetype)subject { + return [[self alloc] init]; +} + +- (id)init { + self = [super init]; + if (self == nil) return nil; + + _disposable = [RACCompoundDisposable compoundDisposable]; + _subscribers = [[NSMutableArray alloc] initWithCapacity:1]; + + return self; +} + +- (void)dealloc { + [self.disposable dispose]; +} + +#pragma mark Subscription + +- (RACDisposable *)subscribe:(id)subscriber { + NSCParameterAssert(subscriber != nil); + + RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; + subscriber = [[RACPassthroughSubscriber alloc] initWithSubscriber:subscriber signal:self disposable:disposable]; + + NSMutableArray *subscribers = self.subscribers; + @synchronized (subscribers) { + [subscribers addObject:subscriber]; + } + + return [RACDisposable disposableWithBlock:^{ + @synchronized (subscribers) { + // Since newer subscribers are generally shorter-lived, search + // starting from the end of the list. + NSUInteger index = [subscribers indexOfObjectWithOptions:NSEnumerationReverse passingTest:^ BOOL (id obj, NSUInteger index, BOOL *stop) { + return obj == subscriber; + }]; + + if (index != NSNotFound) [subscribers removeObjectAtIndex:index]; + } + }]; +} + +- (void)enumerateSubscribersUsingBlock:(void (^)(id subscriber))block { + NSArray *subscribers; + @synchronized (self.subscribers) { + subscribers = [self.subscribers copy]; + } + + for (id subscriber in subscribers) { + block(subscriber); + } +} + +#pragma mark RACSubscriber + +- (void)sendNext:(id)value { + [self enumerateSubscribersUsingBlock:^(id subscriber) { + [subscriber sendNext:value]; + }]; +} + +- (void)sendError:(NSError *)error { + [self.disposable dispose]; + + [self enumerateSubscribersUsingBlock:^(id subscriber) { + [subscriber sendError:error]; + }]; +} + +- (void)sendCompleted { + [self.disposable dispose]; + + [self enumerateSubscribersUsingBlock:^(id subscriber) { + [subscriber sendCompleted]; + }]; +} + +- (void)didSubscribeWithDisposable:(RACDisposable *)d { + [self.disposable addDisposable:d]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber+Private.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber+Private.h new file mode 100644 index 00000000..2c3cedc9 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber+Private.h @@ -0,0 +1,17 @@ +// +// RACSubscriber+Private.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-06-13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACSubscriber.h" + +/// A simple block-based subscriber. +@interface RACSubscriber : NSObject + +/// Creates a new subscriber with the given blocks. ++ (instancetype)subscriberWithNext:(void (^)(id x))next error:(void (^)(NSError *error))error completed:(void (^)(void))completed; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.h new file mode 100644 index 00000000..34826e6c --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.h @@ -0,0 +1,51 @@ +// +// RACSubscriber.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/1/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACDisposable; + +/// Represents any object which can directly receive values from a RACSignal. +/// +/// You generally shouldn't need to implement this protocol. +[RACSignal +/// createSignal:], RACSignal's subscription methods, or RACSubject should work +/// for most uses. +/// +/// Implementors of this protocol may receive messages and values from multiple +/// threads simultaneously, and so should be thread-safe. Subscribers will also +/// be weakly referenced so implementations must allow that. +@protocol RACSubscriber +@required + +/// Send the next value to subscribers. +/// +/// value - The value to send. This can be `nil`. +- (void)sendNext:(id)value; + +/// Send the error to subscribers. +/// +/// error - The error to send. This can be `nil`. +/// +/// This terminates the subscription, and invalidates the subscriber (such that +/// it cannot subscribe to anything else in the future). +- (void)sendError:(NSError *)error; + +/// Send completed to subscribers. +/// +/// This terminates the subscription, and invalidates the subscriber (such that +/// it cannot subscribe to anything else in the future). +- (void)sendCompleted; + +/// Sends the subscriber a disposable that represents one of its subscriptions. +/// +/// A subscriber may receive multiple disposables if it gets subscribed to +/// multiple signals; however, any error or completed events must terminate _all_ +/// subscriptions. +- (void)didSubscribeWithDisposable:(RACDisposable *)disposable; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.m new file mode 100644 index 00000000..6e912194 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriber.m @@ -0,0 +1,101 @@ +// +// RACSubscriber.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/1/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSubscriber.h" +#import "RACSubscriber+Private.h" +#import "RACEXTScope.h" +#import "RACCompoundDisposable.h" + +@interface RACSubscriber () + +// These callbacks should only be accessed while synchronized on self. +@property (nonatomic, copy) void (^next)(id value); +@property (nonatomic, copy) void (^error)(NSError *error); +@property (nonatomic, copy) void (^completed)(void); + +@property (nonatomic, strong, readonly) RACCompoundDisposable *disposable; + +@end + +@implementation RACSubscriber + +#pragma mark Lifecycle + ++ (instancetype)subscriberWithNext:(void (^)(id x))next error:(void (^)(NSError *error))error completed:(void (^)(void))completed { + RACSubscriber *subscriber = [[self alloc] init]; + + subscriber->_next = [next copy]; + subscriber->_error = [error copy]; + subscriber->_completed = [completed copy]; + + return subscriber; +} + +- (id)init { + self = [super init]; + if (self == nil) return nil; + + @weakify(self); + + RACDisposable *selfDisposable = [RACDisposable disposableWithBlock:^{ + @strongify(self); + if (self == nil) return; + + @synchronized (self) { + self.next = nil; + self.error = nil; + self.completed = nil; + } + }]; + + _disposable = [RACCompoundDisposable compoundDisposable]; + [_disposable addDisposable:selfDisposable]; + + return self; +} + +- (void)dealloc { + [self.disposable dispose]; +} + +#pragma mark RACSubscriber + +- (void)sendNext:(id)value { + @synchronized (self) { + void (^nextBlock)(id) = [self.next copy]; + if (nextBlock == nil) return; + + nextBlock(value); + } +} + +- (void)sendError:(NSError *)e { + @synchronized (self) { + void (^errorBlock)(NSError *) = [self.error copy]; + [self.disposable dispose]; + + if (errorBlock == nil) return; + errorBlock(e); + } +} + +- (void)sendCompleted { + @synchronized (self) { + void (^completedBlock)(void) = [self.completed copy]; + [self.disposable dispose]; + + if (completedBlock == nil) return; + completedBlock(); + } +} + +- (void)didSubscribeWithDisposable:(RACDisposable *)d { + [self.disposable addDisposable:d]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h new file mode 100644 index 00000000..5c8467ae --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h @@ -0,0 +1,51 @@ +// +// RACSubscriptingAssignmentTrampoline.h +// iOSDemo +// +// Created by Josh Abernathy on 9/24/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import "RACEXTKeyPathCoding.h" + +@class RACSignal; + +/// Assigns a signal to an object property, automatically setting the given key +/// path on every `next`. When the signal completes, the binding is automatically +/// disposed of. +/// +/// There are two different versions of this macro: +/// +/// - RAC(TARGET, KEYPATH, NILVALUE) will bind the `KEYPATH` of `TARGET` to the +/// given signal. If the signal ever sends a `nil` value, the property will be +/// set to `NILVALUE` instead. `NILVALUE` may itself be `nil` for object +/// properties, but an NSValue should be used for primitive properties, to +/// avoid an exception if `nil` is sent (which might occur if an intermediate +/// object is set to `nil`). +/// - RAC(TARGET, KEYPATH) is the same as the above, but `NILVALUE` defaults to +/// `nil`. +/// +/// See -[RACSignal setKeyPath:onObject:nilValue:] for more information about the +/// binding's semantics. +/// +/// Examples +/// +/// RAC(self, objectProperty) = objectSignal; +/// RAC(self, stringProperty, @"foobar") = stringSignal; +/// RAC(self, integerProperty, @42) = integerSignal; +#define RAC(TARGET, ...) \ + metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__)) \ + (RAC_(TARGET, __VA_ARGS__, nil)) \ + (RAC_(TARGET, __VA_ARGS__)) + +/// Do not use this directly. Use the RAC macro above. +#define RAC_(TARGET, KEYPATH, NILVALUE) \ + [[RACSubscriptingAssignmentTrampoline alloc] initWithTarget:(TARGET) nilValue:(NILVALUE)][@keypath(TARGET, KEYPATH)] + +@interface RACSubscriptingAssignmentTrampoline : NSObject + +- (id)initWithTarget:(id)target nilValue:(id)nilValue; +- (void)setObject:(RACSignal *)signal forKeyedSubscript:(NSString *)keyPath; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.m new file mode 100644 index 00000000..2ab8cd3d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.m @@ -0,0 +1,42 @@ +// +// RACSubscriptingAssignmentTrampoline.m +// iOSDemo +// +// Created by Josh Abernathy on 9/24/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSubscriptingAssignmentTrampoline.h" +#import "RACSignal+Operations.h" + +@interface RACSubscriptingAssignmentTrampoline () + +// The object to bind to. +@property (nonatomic, strong, readonly) id target; + +// A value to use when `nil` is sent on the bound signal. +@property (nonatomic, strong, readonly) id nilValue; + +@end + +@implementation RACSubscriptingAssignmentTrampoline + +- (id)initWithTarget:(id)target nilValue:(id)nilValue { + // This is often a programmer error, but this prevents crashes if the target + // object has unexpectedly deallocated. + if (target == nil) return nil; + + self = [super init]; + if (self == nil) return nil; + + _target = target; + _nilValue = nilValue; + + return self; +} + +- (void)setObject:(RACSignal *)signal forKeyedSubscript:(NSString *)keyPath { + [signal setKeyPath:keyPath onObject:self.target nilValue:self.nilValue]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptionScheduler.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptionScheduler.h new file mode 100644 index 00000000..b333ec62 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptionScheduler.h @@ -0,0 +1,14 @@ +// +// RACSubscriptionScheduler.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/30/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACScheduler.h" + +/// A private scheduler used only for subscriptions. See the private +/// +[RACScheduler subscriptionScheduler] method for more information. +@interface RACSubscriptionScheduler : RACScheduler +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptionScheduler.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptionScheduler.m new file mode 100644 index 00000000..2aab9c3e --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSubscriptionScheduler.m @@ -0,0 +1,54 @@ +// +// RACSubscriptionScheduler.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/30/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSubscriptionScheduler.h" +#import "RACScheduler+Private.h" + +@interface RACSubscriptionScheduler () + +// A private background scheduler on which to subscribe if the +currentScheduler +// is unknown. +@property (nonatomic, strong, readonly) RACScheduler *backgroundScheduler; + +@end + +@implementation RACSubscriptionScheduler + +#pragma mark Lifecycle + +- (id)init { + self = [super initWithName:@"com.ReactiveCocoa.RACScheduler.subscriptionScheduler"]; + if (self == nil) return nil; + + _backgroundScheduler = [RACScheduler scheduler]; + + return self; +} + +#pragma mark RACScheduler + +- (RACDisposable *)schedule:(void (^)(void))block { + NSCParameterAssert(block != NULL); + + if (RACScheduler.currentScheduler == nil) return [self.backgroundScheduler schedule:block]; + + block(); + return nil; +} + +- (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block { + RACScheduler *scheduler = RACScheduler.currentScheduler ?: self.backgroundScheduler; + return [scheduler after:date schedule:block]; +} + +- (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block { + RACScheduler *scheduler = RACScheduler.currentScheduler ?: self.backgroundScheduler; + return [scheduler after:date repeatingEvery:interval withLeeway:leeway schedule:block]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTargetQueueScheduler.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTargetQueueScheduler.h new file mode 100644 index 00000000..429e5955 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTargetQueueScheduler.h @@ -0,0 +1,24 @@ +// +// RACTargetQueueScheduler.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 6/6/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACQueueScheduler.h" + +/// A scheduler that enqueues blocks on a private serial queue, targeting an +/// arbitrary GCD queue. +@interface RACTargetQueueScheduler : RACQueueScheduler + +/// Initializes the receiver with a serial queue that will target the given +/// `targetQueue`. +/// +/// name - The name of the scheduler. If nil, a default name will be used. +/// targetQueue - The queue to target. Cannot be NULL. +/// +/// Returns the initialized object. +- (id)initWithName:(NSString *)name targetQueue:(dispatch_queue_t)targetQueue; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTargetQueueScheduler.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTargetQueueScheduler.m new file mode 100644 index 00000000..65114d3c --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTargetQueueScheduler.m @@ -0,0 +1,37 @@ +// +// RACTargetQueueScheduler.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 6/6/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACTargetQueueScheduler.h" +#import "RACBacktrace.h" +#import "RACQueueScheduler+Subclass.h" + +@implementation RACTargetQueueScheduler + +#pragma mark Lifecycle + +- (id)initWithName:(NSString *)name targetQueue:(dispatch_queue_t)targetQueue { + NSCParameterAssert(targetQueue != NULL); + + if (name == nil) { + name = [NSString stringWithFormat:@"com.ReactiveCocoa.RACTargetQueueScheduler(%s)", dispatch_queue_get_label(targetQueue)]; + } + + dispatch_queue_t queue = dispatch_queue_create(name.UTF8String, DISPATCH_QUEUE_SERIAL); + if (queue == NULL) return nil; + + dispatch_set_target_queue(queue, targetQueue); + + self = [super initWithName:name queue:queue]; + if (self == nil) return nil; + + dispatch_release(queue); + + return self; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTestScheduler.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTestScheduler.h new file mode 100644 index 00000000..a790f5bb --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTestScheduler.h @@ -0,0 +1,42 @@ +// +// RACTestScheduler.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-07-06. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACScheduler.h" + +/// A special kind of scheduler that steps through virtualized time. +/// +/// This scheduler class can be used in unit tests to verify asynchronous +/// behaviors without spending significant time waiting. +/// +/// This class can be used from multiple threads, but only one thread can `step` +/// through the enqueued actions at a time. Other threads will wait while the +/// scheduled blocks are being executed. +@interface RACTestScheduler : RACScheduler + +/// Initializes a new test scheduler. +- (instancetype)init; + +/// Executes the next scheduled block, if any. +/// +/// This method will block until the scheduled action has completed. +- (void)step; + +/// Executes up to the next `ticks` scheduled blocks. +/// +/// This method will block until the scheduled actions have completed. +/// +/// ticks - The number of scheduled blocks to execute. If there aren't this many +/// blocks enqueued, all scheduled blocks are executed. +- (void)step:(NSUInteger)ticks; + +/// Executes all of the scheduled blocks on the receiver. +/// +/// This method will block until the scheduled actions have completed. +- (void)stepAll; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTestScheduler.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTestScheduler.m new file mode 100644 index 00000000..374fbe24 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTestScheduler.m @@ -0,0 +1,223 @@ +// +// RACTestScheduler.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-07-06. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACTestScheduler.h" +#import "RACEXTScope.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACScheduler+Private.h" + +@interface RACTestSchedulerAction : NSObject + +// The date at which the action should be executed. +// +// This absolute time will not actually be honored. This date is only used for +// comparison, to determine which block should be run _next_. +@property (nonatomic, copy, readonly) NSDate *date; + +// The scheduled block. +@property (nonatomic, copy, readonly) void (^block)(void); + +// A disposable for this action. +// +// When disposed, the action should not start executing if it hasn't already. +@property (nonatomic, strong, readonly) RACDisposable *disposable; + +// Initializes a new scheduler action. +- (id)initWithDate:(NSDate *)date block:(void (^)(void))block; + +@end + +static CFComparisonResult RACCompareScheduledActions(const void *ptr1, const void *ptr2, void *info) { + RACTestSchedulerAction *action1 = (__bridge id)ptr1; + RACTestSchedulerAction *action2 = (__bridge id)ptr2; + return CFDateCompare((__bridge CFDateRef)action1.date, (__bridge CFDateRef)action2.date, NULL); +} + +static const void *RACRetainScheduledAction(CFAllocatorRef allocator, const void *ptr) { + return CFRetain(ptr); +} + +static void RACReleaseScheduledAction(CFAllocatorRef allocator, const void *ptr) { + CFRelease(ptr); +} + +@interface RACTestScheduler () + +// All of the RACTestSchedulerActions that have been enqueued and not yet +// executed. +// +// The minimum value in the heap represents the action to execute next. +// +// This property should only be used while synchronized on self. +@property (nonatomic, assign, readonly) CFBinaryHeapRef scheduledActions; + +// The number of blocks that have been directly enqueued with -schedule: so +// far. +// +// This is used to ensure unique dates when two blocks are enqueued +// simultaneously. +// +// This property should only be used while synchronized on self. +@property (nonatomic, assign) NSUInteger numberOfDirectlyScheduledBlocks; + +@end + +@implementation RACTestScheduler + +#pragma mark Lifecycle + +- (instancetype)init { + self = [super initWithName:@"com.github.ReactiveCocoa.RACTestScheduler"]; + if (self == nil) return nil; + + CFBinaryHeapCallBacks callbacks = (CFBinaryHeapCallBacks){ + .version = 0, + .retain = &RACRetainScheduledAction, + .release = &RACReleaseScheduledAction, + .copyDescription = &CFCopyDescription, + .compare = &RACCompareScheduledActions + }; + + _scheduledActions = CFBinaryHeapCreate(NULL, 0, &callbacks, NULL); + return self; +} + +- (void)dealloc { + [self stepAll]; + + if (_scheduledActions != NULL) { + CFRelease(_scheduledActions); + _scheduledActions = NULL; + } +} + +#pragma mark Execution + +- (void)step { + [self step:1]; +} + +- (void)step:(NSUInteger)ticks { + @synchronized (self) { + for (NSUInteger i = 0; i < ticks; i++) { + const void *actionPtr = NULL; + if (!CFBinaryHeapGetMinimumIfPresent(self.scheduledActions, &actionPtr)) break; + + RACTestSchedulerAction *action = (__bridge id)actionPtr; + CFBinaryHeapRemoveMinimumValue(self.scheduledActions); + + if (action.disposable.disposed) continue; + + RACScheduler *previousScheduler = RACScheduler.currentScheduler; + NSThread.currentThread.threadDictionary[RACSchedulerCurrentSchedulerKey] = self; + + action.block(); + + if (previousScheduler != nil) { + NSThread.currentThread.threadDictionary[RACSchedulerCurrentSchedulerKey] = previousScheduler; + } else { + [NSThread.currentThread.threadDictionary removeObjectForKey:RACSchedulerCurrentSchedulerKey]; + } + } + } +} + +- (void)stepAll { + [self step:NSUIntegerMax]; +} + +#pragma mark RACScheduler + +- (RACDisposable *)schedule:(void (^)(void))block { + NSCParameterAssert(block != nil); + + @synchronized (self) { + NSDate *uniqueDate = [NSDate dateWithTimeIntervalSinceReferenceDate:self.numberOfDirectlyScheduledBlocks]; + self.numberOfDirectlyScheduledBlocks++; + + RACTestSchedulerAction *action = [[RACTestSchedulerAction alloc] initWithDate:uniqueDate block:block]; + CFBinaryHeapAddValue(self.scheduledActions, (__bridge void *)action); + + return action.disposable; + } +} + +- (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block { + NSCParameterAssert(date != nil); + NSCParameterAssert(block != nil); + + @synchronized (self) { + RACTestSchedulerAction *action = [[RACTestSchedulerAction alloc] initWithDate:date block:block]; + CFBinaryHeapAddValue(self.scheduledActions, (__bridge void *)action); + + return action.disposable; + } +} + +- (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block { + NSCParameterAssert(date != nil); + NSCParameterAssert(block != nil); + NSCParameterAssert(interval >= 0); + NSCParameterAssert(leeway >= 0); + + RACCompoundDisposable *compoundDisposable = [RACCompoundDisposable compoundDisposable]; + + @weakify(self); + @synchronized (self) { + __block RACDisposable *thisDisposable = nil; + + void (^reschedulingBlock)(void) = ^{ + @strongify(self); + + [compoundDisposable removeDisposable:thisDisposable]; + + // Schedule the next interval. + RACDisposable *schedulingDisposable = [self after:[date dateByAddingTimeInterval:interval] repeatingEvery:interval withLeeway:leeway schedule:block]; + [compoundDisposable addDisposable:schedulingDisposable]; + + block(); + }; + + RACTestSchedulerAction *action = [[RACTestSchedulerAction alloc] initWithDate:date block:reschedulingBlock]; + CFBinaryHeapAddValue(self.scheduledActions, (__bridge void *)action); + + thisDisposable = action.disposable; + [compoundDisposable addDisposable:thisDisposable]; + } + + return compoundDisposable; +} + +@end + +@implementation RACTestSchedulerAction + +#pragma mark Lifecycle + +- (id)initWithDate:(NSDate *)date block:(void (^)(void))block { + NSCParameterAssert(date != nil); + NSCParameterAssert(block != nil); + + self = [super init]; + if (self == nil) return nil; + + _date = [date copy]; + _block = [block copy]; + _disposable = [[RACDisposable alloc] init]; + + return self; +} + +#pragma mark NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p>{ date: %@ }", self.class, self, self.date]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTuple.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTuple.h new file mode 100644 index 00000000..c364630d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTuple.h @@ -0,0 +1,159 @@ +// +// RACTuple.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/12/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import "RACmetamacros.h" + +@class RACSequence; + +/// Creates a new tuple with the given values. At least one value must be given. +/// Values can be nil. +#define RACTuplePack(...) \ + RACTuplePack_(__VA_ARGS__) + +/// Declares new object variables and unpacks a RACTuple into them. +/// +/// This macro should be used on the left side of an assignment, with the +/// tuple on the right side. Nothing else should appear on the same line, and the +/// macro should not be the only statement in a conditional or loop body. +/// +/// If the tuple has more values than there are variables listed, the excess +/// values are ignored. +/// +/// If the tuple has fewer values than there are variables listed, the excess +/// variables are initialized to nil. +/// +/// Examples +/// +/// RACTupleUnpack(NSString *string, NSNumber *num) = [RACTuple tupleWithObjects:@"foo", @5, nil]; +/// NSLog(@"string: %@", string); +/// NSLog(@"num: %@", num); +/// +/// /* The above is equivalent to: */ +/// RACTuple *t = [RACTuple tupleWithObjects:@"foo", @5, nil]; +/// NSString *string = t[0]; +/// NSNumber *num = t[1]; +/// NSLog(@"string: %@", string); +/// NSLog(@"num: %@", num); +#define RACTupleUnpack(...) \ + RACTupleUnpack_(__VA_ARGS__) + +/// A sentinel object that represents nils in the tuple. +/// +/// It should never be necessary to create a tuple nil yourself. Just use +/// +tupleNil. +@interface RACTupleNil : NSObject +/// A singleton instance. ++ (RACTupleNil *)tupleNil; +@end + + +/// A tuple is an ordered collection of objects. It may contain nils, represented +/// by RACTupleNil. +@interface RACTuple : NSObject + +@property (nonatomic, readonly) NSUInteger count; + +/// These properties all return the object at that index or nil if the number of +/// objects is less than the index. +@property (nonatomic, readonly) id first; +@property (nonatomic, readonly) id second; +@property (nonatomic, readonly) id third; +@property (nonatomic, readonly) id fourth; +@property (nonatomic, readonly) id fifth; +@property (nonatomic, readonly) id last; + +/// Creates a new tuple out of the array. Does not convert nulls to nils. ++ (instancetype)tupleWithObjectsFromArray:(NSArray *)array; + +/// Creates a new tuple out of the array. If `convert` is YES, it also converts +/// every NSNull to RACTupleNil. ++ (instancetype)tupleWithObjectsFromArray:(NSArray *)array convertNullsToNils:(BOOL)convert; + +/// Creates a new tuple with the given objects. Use RACTupleNil to represent +/// nils. ++ (instancetype)tupleWithObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION; + +/// Returns the object at `index` or nil if the object is a RACTupleNil. Unlike +/// NSArray and friends, it's perfectly fine to ask for the object at an index +/// past the tuple's count - 1. It will simply return nil. +- (id)objectAtIndex:(NSUInteger)index; + +/// Returns an array of all the objects. RACTupleNils are converted to NSNulls. +- (NSArray *)allObjects; + +/// Appends `obj` to the receiver. +/// +/// obj - The object to add to the tuple. This argument may be nil. +/// +/// Returns a new tuple. +- (instancetype)tupleByAddingObject:(id)obj; + +@end + +@interface RACTuple (RACSequenceAdditions) + +/// Returns a sequence of all the objects. RACTupleNils are converted to NSNulls. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end + +@interface RACTuple (ObjectSubscripting) +/// Returns the object at that index or nil if the number of objects is less +/// than the index. +- (id)objectAtIndexedSubscript:(NSUInteger)idx; +@end + +/// This and everything below is for internal use only. +/// +/// See RACTuplePack() and RACTupleUnpack() instead. +#define RACTuplePack_(...) \ + ([RACTuple tupleWithObjectsFromArray:@[ metamacro_foreach(RACTuplePack_object_or_ractuplenil,, __VA_ARGS__) ]]) + +#define RACTuplePack_object_or_ractuplenil(INDEX, ARG) \ + (ARG) ?: RACTupleNil.tupleNil, + +#define RACTupleUnpack_(...) \ + metamacro_foreach(RACTupleUnpack_decl,, __VA_ARGS__) \ + \ + int RACTupleUnpack_state = 0; \ + \ + RACTupleUnpack_after: \ + ; \ + metamacro_foreach(RACTupleUnpack_assign,, __VA_ARGS__) \ + if (RACTupleUnpack_state != 0) RACTupleUnpack_state = 2; \ + \ + while (RACTupleUnpack_state != 2) \ + if (RACTupleUnpack_state == 1) { \ + goto RACTupleUnpack_after; \ + } else \ + for (; RACTupleUnpack_state != 1; RACTupleUnpack_state = 1) \ + [RACTupleUnpackingTrampoline trampoline][ @[ metamacro_foreach(RACTupleUnpack_value,, __VA_ARGS__) ] ] + +#define RACTupleUnpack_state metamacro_concat(RACTupleUnpack_state, __LINE__) +#define RACTupleUnpack_after metamacro_concat(RACTupleUnpack_after, __LINE__) +#define RACTupleUnpack_loop metamacro_concat(RACTupleUnpack_loop, __LINE__) + +#define RACTupleUnpack_decl_name(INDEX) \ + metamacro_concat(metamacro_concat(RACTupleUnpack, __LINE__), metamacro_concat(_var, INDEX)) + +#define RACTupleUnpack_decl(INDEX, ARG) \ + __strong id RACTupleUnpack_decl_name(INDEX); + +#define RACTupleUnpack_assign(INDEX, ARG) \ + __strong ARG = RACTupleUnpack_decl_name(INDEX); + +#define RACTupleUnpack_value(INDEX, ARG) \ + [NSValue valueWithPointer:&RACTupleUnpack_decl_name(INDEX)], + +@interface RACTupleUnpackingTrampoline : NSObject + ++ (instancetype)trampoline; +- (void)setObject:(RACTuple *)tuple forKeyedSubscript:(NSArray *)variables; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTuple.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTuple.m new file mode 100644 index 00000000..c3e979c0 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTuple.m @@ -0,0 +1,252 @@ +// +// RACTuple.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/12/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACTuple.h" +#import "RACEXTKeyPathCoding.h" +#import "RACTupleSequence.h" + +@implementation RACTupleNil + ++ (RACTupleNil *)tupleNil { + static dispatch_once_t onceToken; + static RACTupleNil *tupleNil = nil; + dispatch_once(&onceToken, ^{ + tupleNil = [[self alloc] init]; + }); + + return tupleNil; +} + +#pragma mark NSCopying + +- (id)copyWithZone:(NSZone *)zone { + return self; +} + +#pragma mark NSCoding + +- (id)initWithCoder:(NSCoder *)coder { + // Always return the singleton. + return self.class.tupleNil; +} + +- (void)encodeWithCoder:(NSCoder *)coder { +} + +@end + + +@interface RACTuple () +@property (nonatomic, strong) NSArray *backingArray; +@end + + +@implementation RACTuple + +- (instancetype)init { + self = [super init]; + if (self == nil) return nil; + + self.backingArray = [NSArray array]; + + return self; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p> %@", self.class, self, self.allObjects]; +} + +- (BOOL)isEqual:(RACTuple *)object { + if (object == self) return YES; + if (![object isKindOfClass:self.class]) return NO; + + return [self.backingArray isEqual:object.backingArray]; +} + +- (NSUInteger)hash { + return self.backingArray.hash; +} + + +#pragma mark NSFastEnumeration + +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id __unsafe_unretained [])buffer count:(NSUInteger)len { + return [self.backingArray countByEnumeratingWithState:state objects:buffer count:len]; +} + + +#pragma mark NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + // we're immutable, bitches! + return self; +} + + +#pragma mark NSCoding + +- (id)initWithCoder:(NSCoder *)coder { + self = [self init]; + if (self == nil) return nil; + + self.backingArray = [coder decodeObjectForKey:@keypath(self.backingArray)]; + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + if (self.backingArray != nil) [coder encodeObject:self.backingArray forKey:@keypath(self.backingArray)]; +} + + +#pragma mark API + ++ (instancetype)tupleWithObjectsFromArray:(NSArray *)array { + return [self tupleWithObjectsFromArray:array convertNullsToNils:NO]; +} + ++ (instancetype)tupleWithObjectsFromArray:(NSArray *)array convertNullsToNils:(BOOL)convert { + RACTuple *tuple = [[self alloc] init]; + + if (convert) { + NSMutableArray *newArray = [NSMutableArray arrayWithCapacity:array.count]; + for (id object in array) { + [newArray addObject:(object == NSNull.null ? RACTupleNil.tupleNil : object)]; + } + + tuple.backingArray = newArray; + } else { + tuple.backingArray = [array copy]; + } + + return tuple; +} + ++ (instancetype)tupleWithObjects:(id)object, ... { + RACTuple *tuple = [[self alloc] init]; + + va_list args; + va_start(args, object); + + NSUInteger count = 0; + for (id currentObject = object; currentObject != nil; currentObject = va_arg(args, id)) { + ++count; + } + + va_end(args); + + if (count == 0) { + tuple.backingArray = @[]; + return tuple; + } + + NSMutableArray *objects = [[NSMutableArray alloc] initWithCapacity:count]; + + va_start(args, object); + for (id currentObject = object; currentObject != nil; currentObject = va_arg(args, id)) { + [objects addObject:currentObject]; + } + + va_end(args); + + tuple.backingArray = objects; + return tuple; +} + +- (id)objectAtIndex:(NSUInteger)index { + if (index >= self.count) return nil; + + id object = [self.backingArray objectAtIndex:index]; + return (object == RACTupleNil.tupleNil ? nil : object); +} + +- (NSArray *)allObjects { + NSMutableArray *newArray = [NSMutableArray arrayWithCapacity:self.backingArray.count]; + for (id object in self.backingArray) { + [newArray addObject:(object == RACTupleNil.tupleNil ? NSNull.null : object)]; + } + + return newArray; +} + +- (instancetype)tupleByAddingObject:(id)obj { + NSArray *newArray = [self.backingArray arrayByAddingObject:obj ?: RACTupleNil.tupleNil]; + return [self.class tupleWithObjectsFromArray:newArray convertNullsToNils:NO]; +} + +- (NSUInteger)count { + return self.backingArray.count; +} + +- (id)first { + return [self objectAtIndex:0]; +} + +- (id)second { + return [self objectAtIndex:1]; +} + +- (id)third { + return [self objectAtIndex:2]; +} + +- (id)fourth { + return [self objectAtIndex:3]; +} + +- (id)fifth { + return [self objectAtIndex:4]; +} + +- (id)last { + return [self objectAtIndex:self.count - 1]; +} + +@end + + +@implementation RACTuple (RACSequenceAdditions) + +- (RACSequence *)rac_sequence { + return [RACTupleSequence sequenceWithTupleBackingArray:self.backingArray offset:0]; +} + +@end + +@implementation RACTuple (ObjectSubscripting) + +- (id)objectAtIndexedSubscript:(NSUInteger)idx { + return [self objectAtIndex:idx]; +} + +@end + + +@implementation RACTupleUnpackingTrampoline + +#pragma mark Lifecycle + ++ (instancetype)trampoline { + static dispatch_once_t onceToken; + static id trampoline = nil; + dispatch_once(&onceToken, ^{ + trampoline = [[self alloc] init]; + }); + + return trampoline; +} + +- (void)setObject:(RACTuple *)tuple forKeyedSubscript:(NSArray *)variables { + NSCParameterAssert(variables != nil); + + [variables enumerateObjectsUsingBlock:^(NSValue *value, NSUInteger index, BOOL *stop) { + __strong id *ptr = (__strong id *)value.pointerValue; + *ptr = tuple[index]; + }]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTupleSequence.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTupleSequence.h new file mode 100644 index 00000000..6d1bd506 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTupleSequence.h @@ -0,0 +1,18 @@ +// +// RACTupleSequence.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-05-01. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACSequence.h" + +/// Private class that adapts a RACTuple to the RACSequence interface. +@interface RACTupleSequence : RACSequence + +/// Returns a sequence for enumerating over the given backing array (from +/// a RACTuple), starting from the given offset. ++ (instancetype)sequenceWithTupleBackingArray:(NSArray *)backingArray offset:(NSUInteger)offset; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTupleSequence.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTupleSequence.m new file mode 100644 index 00000000..ba268f5d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACTupleSequence.m @@ -0,0 +1,68 @@ +// +// RACTupleSequence.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-05-01. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACTupleSequence.h" +#import "RACTuple.h" + +@interface RACTupleSequence () + +// The array being sequenced, as taken from RACTuple.backingArray. +@property (nonatomic, strong, readonly) NSArray *tupleBackingArray; + +// The index in the array from which the sequence starts. +@property (nonatomic, assign, readonly) NSUInteger offset; + +@end + +@implementation RACTupleSequence + +#pragma mark Lifecycle + ++ (instancetype)sequenceWithTupleBackingArray:(NSArray *)backingArray offset:(NSUInteger)offset { + NSCParameterAssert(offset <= backingArray.count); + + if (offset == backingArray.count) return self.empty; + + RACTupleSequence *seq = [[self alloc] init]; + seq->_tupleBackingArray = backingArray; + seq->_offset = offset; + return seq; +} + +#pragma mark RACSequence + +- (id)head { + id object = [self.tupleBackingArray objectAtIndex:self.offset]; + return (object == RACTupleNil.tupleNil ? NSNull.null : object); +} + +- (RACSequence *)tail { + RACSequence *sequence = [self.class sequenceWithTupleBackingArray:self.tupleBackingArray offset:self.offset + 1]; + sequence.name = self.name; + return sequence; +} + +- (NSArray *)array { + NSRange range = NSMakeRange(self.offset, self.tupleBackingArray.count - self.offset); + NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:range.length]; + + [self.tupleBackingArray enumerateObjectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:range] options:0 usingBlock:^(id object, NSUInteger index, BOOL *stop) { + id mappedObject = (object == RACTupleNil.tupleNil ? NSNull.null : object); + [array addObject:mappedObject]; + }]; + + return array; +} + +#pragma mark NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p>{ name = %@, tuple = %@ }", self.class, self, self.name, self.tupleBackingArray]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnarySequence.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnarySequence.h new file mode 100644 index 00000000..74192adb --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnarySequence.h @@ -0,0 +1,13 @@ +// +// RACUnarySequence.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-05-01. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACSequence.h" + +/// Private class representing a sequence of exactly one value. +@interface RACUnarySequence : RACSequence +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnarySequence.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnarySequence.m new file mode 100644 index 00000000..fefca84e --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnarySequence.m @@ -0,0 +1,81 @@ +// +// RACUnarySequence.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-05-01. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACUnarySequence.h" +#import "RACEXTKeyPathCoding.h" +#import "NSObject+RACDescription.h" + +@interface RACUnarySequence () + +// The single value stored in this sequence. +@property (nonatomic, strong, readwrite) id head; + +@end + +@implementation RACUnarySequence + +#pragma mark Properties + +@synthesize head = _head; + +#pragma mark Lifecycle + ++ (instancetype)return:(id)value { + RACUnarySequence *sequence = [[self alloc] init]; + sequence.head = value; + return [sequence setNameWithFormat:@"+return: %@", [value rac_description]]; +} + +#pragma mark RACSequence + +- (RACSequence *)tail { + return nil; +} + +- (instancetype)bind:(RACStreamBindBlock (^)(void))block { + RACStreamBindBlock bindBlock = block(); + BOOL stop = NO; + + RACSequence *result = (id)[bindBlock(self.head, &stop) setNameWithFormat:@"[%@] -bind:", self.name]; + return result ?: self.class.empty; +} + +#pragma mark NSCoding + +- (Class)classForCoder { + // Unary sequences should be encoded as themselves, not array sequences. + return self.class; +} + +- (id)initWithCoder:(NSCoder *)coder { + id value = [coder decodeObjectForKey:@keypath(self.head)]; + return [self.class return:value]; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + if (self.head != nil) [coder encodeObject:self.head forKey:@keypath(self.head)]; +} + +#pragma mark NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p>{ name = %@, head = %@ }", self.class, self, self.name, self.head]; +} + +- (NSUInteger)hash { + return [self.head hash]; +} + +- (BOOL)isEqual:(RACUnarySequence *)seq { + if (self == seq) return YES; + if (![seq isKindOfClass:RACUnarySequence.class]) return NO; + + return self.head == seq.head || [(NSObject *)self.head isEqual:seq.head]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnit.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnit.h new file mode 100644 index 00000000..7713e1dd --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnit.h @@ -0,0 +1,20 @@ +// +// RACUnit.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/27/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + + +/// A unit represents an empty value. +/// +/// It should never be necessary to create a unit yourself. Just use +defaultUnit. +@interface RACUnit : NSObject + +/// A singleton instance. ++ (RACUnit *)defaultUnit; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnit.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnit.m new file mode 100644 index 00000000..76b8425c --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACUnit.m @@ -0,0 +1,27 @@ +// +// RACUnit.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/27/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACUnit.h" + + +@implementation RACUnit + + +#pragma mark API + ++ (RACUnit *)defaultUnit { + static dispatch_once_t onceToken; + static RACUnit *defaultUnit = nil; + dispatch_once(&onceToken, ^{ + defaultUnit = [[self alloc] init]; + }); + + return defaultUnit; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACValueTransformer.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACValueTransformer.h new file mode 100644 index 00000000..9b078457 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACValueTransformer.h @@ -0,0 +1,16 @@ +// +// RACValueTransformer.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/6/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + + +@interface RACValueTransformer : NSValueTransformer + ++ (instancetype)transformerWithBlock:(id (^)(id value))block; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACValueTransformer.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACValueTransformer.m new file mode 100644 index 00000000..ccec07d4 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACValueTransformer.m @@ -0,0 +1,42 @@ +// +// RACValueTransformer.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/6/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACValueTransformer.h" + +@interface RACValueTransformer () +@property (nonatomic, copy) id (^transformBlock)(id value); +@end + + +@implementation RACValueTransformer + + +#pragma mark NSValueTransformer + ++ (BOOL)allowsReverseTransformation { + return NO; +} + +- (id)transformedValue:(id)value { + return self.transformBlock(value); +} + + +#pragma mark API + +@synthesize transformBlock; + ++ (instancetype)transformerWithBlock:(id (^)(id value))block { + NSCParameterAssert(block != NULL); + + RACValueTransformer *transformer = [[self alloc] init]; + transformer.transformBlock = block; + return transformer; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/ReactiveCocoa.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/ReactiveCocoa.h new file mode 100644 index 00000000..df0d4a92 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/ReactiveCocoa.h @@ -0,0 +1,71 @@ +// +// ReactiveCocoa.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/5/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACEXTKeyPathCoding.h" +#import "NSArray+RACSequenceAdditions.h" +#import "NSData+RACSupport.h" +#import "NSDictionary+RACSequenceAdditions.h" +#import "NSEnumerator+RACSequenceAdditions.h" +#import "NSFileHandle+RACSupport.h" +#import "NSNotificationCenter+RACSupport.h" +#import "NSObject+RACDeallocating.h" +#import "NSObject+RACLifting.h" +#import "NSObject+RACPropertySubscribing.h" +#import "NSObject+RACSelectorSignal.h" +#import "NSOrderedSet+RACSequenceAdditions.h" +#import "NSSet+RACSequenceAdditions.h" +#import "NSString+RACSequenceAdditions.h" +#import "NSString+RACSupport.h" +#import "NSURLConnection+RACSupport.h" +#import "RACBehaviorSubject.h" +#import "RACChannel.h" +#import "RACCommand.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACEvent.h" +#import "RACGroupedSignal.h" +#import "RACKVOChannel.h" +#import "RACMulticastConnection.h" +#import "RACQueueScheduler.h" +#import "RACReplaySubject.h" +#import "RACScheduler.h" +#import "RACScopedDisposable.h" +#import "RACSequence.h" +#import "RACSerialDisposable.h" +#import "RACSignal+Operations.h" +#import "RACSignal.h" +#import "RACStream.h" +#import "RACSubject.h" +#import "RACSubscriber.h" +#import "RACSubscriptingAssignmentTrampoline.h" +#import "RACTargetQueueScheduler.h" +#import "RACTestScheduler.h" +#import "RACTuple.h" +#import "RACUnit.h" + +#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED + #import "UIActionSheet+RACSignalSupport.h" + #import "UIAlertView+RACSignalSupport.h" + #import "UIBarButtonItem+RACCommandSupport.h" + #import "UIButton+RACCommandSupport.h" + #import "UIControl+RACSignalSupport.h" + #import "UIDatePicker+RACSignalSupport.h" + #import "UIGestureRecognizer+RACSignalSupport.h" + #import "UISegmentedControl+RACSignalSupport.h" + #import "UISlider+RACSignalSupport.h" + #import "UIStepper+RACSignalSupport.h" + #import "UISwitch+RACSignalSupport.h" + #import "UITableViewCell+RACSignalSupport.h" + #import "UITextField+RACSignalSupport.h" + #import "UITextView+RACSignalSupport.h" +#elif TARGET_OS_MAC + #import "NSControl+RACCommandSupport.h" + #import "NSControl+RACTextSignalSupport.h" + #import "NSObject+RACAppKitBindings.h" + #import "NSText+RACSignalSupport.h" +#endif diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.h new file mode 100644 index 00000000..3d667e95 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.h @@ -0,0 +1,32 @@ +// +// UIActionSheet+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Dave Lee on 2013-06-22. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACDelegateProxy; +@class RACSignal; + +@interface UIActionSheet (RACSignalSupport) + +/// A delegate proxy which will be set as the receiver's delegate when any of the +/// methods in this category are used. +@property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; + +/// Creates a signal for button clicks on the receiver. +/// +/// When this method is invoked, the `rac_delegateProxy` will become the +/// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy +/// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't +/// know how to handle. Setting the receiver's `delegate` afterward is +/// considered undefined behavior. +/// +/// Returns a signal which will send the index of the specific button clicked. +/// The signal will complete when the receiver is deallocated. +- (RACSignal *)rac_buttonClickedSignal; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.m new file mode 100644 index 00000000..6198797a --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.m @@ -0,0 +1,50 @@ +// +// UIActionSheet+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Dave Lee on 2013-06-22. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UIActionSheet+RACSignalSupport.h" +#import "RACDelegateProxy.h" +#import "RACSignal+Operations.h" +#import "NSObject+RACDeallocating.h" +#import "RACTuple.h" +#import "NSObject+RACDescription.h" +#import + +@implementation UIActionSheet (RACSignalSupport) + +static void RACUseDelegateProxy(UIActionSheet *self) { + if (self.delegate == self.rac_delegateProxy) return; + + self.rac_delegateProxy.rac_proxiedDelegate = self.delegate; + self.delegate = (id)self.rac_delegateProxy; +} + +- (RACDelegateProxy *)rac_delegateProxy { + RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd); + if (proxy == nil) { + proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIActionSheetDelegate)]; + objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + + return proxy; +} + +- (RACSignal *)rac_buttonClickedSignal { + RACSignal *signal = [[[[self.rac_delegateProxy + signalForSelector:@selector(actionSheet:clickedButtonAtIndex:)] + reduceEach:^(UIActionSheet *actionSheet, NSNumber *buttonIndex) { + return buttonIndex; + }] + takeUntil:self.rac_willDeallocSignal] + setNameWithFormat:@"%@ -rac_buttonClickedSignal", [self rac_description]]; + + RACUseDelegateProxy(self); + + return signal; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIAlertView+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIAlertView+RACSignalSupport.h new file mode 100644 index 00000000..45864606 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIAlertView+RACSignalSupport.h @@ -0,0 +1,32 @@ +// +// UIAlertView+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Henrik Hodne on 6/16/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACDelegateProxy; +@class RACSignal; + +@interface UIAlertView (RACSignalSupport) + +/// A delegate proxy which will be set as the receiver's delegate when any of the +/// methods in this category are used. +@property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; + +/// Creates a signal for button clicks on the receiver. +/// +/// When this method is invoked, the `rac_delegateProxy` will become the +/// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy +/// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't +/// know how to handle. Setting the receiver's `delegate` afterward is considered +/// undefined behavior. +/// +/// Returns a signal which will send the index of the specific button clicked. +/// The signal will complete itself when the receiver is deallocated. +- (RACSignal *)rac_buttonClickedSignal; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIAlertView+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIAlertView+RACSignalSupport.m new file mode 100644 index 00000000..bf15b27a --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIAlertView+RACSignalSupport.m @@ -0,0 +1,50 @@ +// +// UIAlertView+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Henrik Hodne on 6/16/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UIAlertView+RACSignalSupport.h" +#import "RACDelegateProxy.h" +#import "RACSignal+Operations.h" +#import "NSObject+RACDeallocating.h" +#import "NSObject+RACDescription.h" +#import "RACTuple.h" +#import + +@implementation UIAlertView (RACSignalSupport) + +static void RACUseDelegateProxy(UIAlertView *self) { + if (self.delegate == self.rac_delegateProxy) return; + + self.rac_delegateProxy.rac_proxiedDelegate = self.delegate; + self.delegate = (id)self.rac_delegateProxy; +} + +- (RACDelegateProxy *)rac_delegateProxy { + RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd); + if (proxy == nil) { + proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIAlertViewDelegate)]; + objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + + return proxy; +} + +- (RACSignal *)rac_buttonClickedSignal { + RACSignal *signal = [[[[self.rac_delegateProxy + signalForSelector:@selector(alertView:clickedButtonAtIndex:)] + reduceEach:^(UIAlertView *alertView, NSNumber *buttonIndex) { + return buttonIndex; + }] + takeUntil:self.rac_willDeallocSignal] + setNameWithFormat:@"%@ -rac_buttonClickedSignal", [self rac_description]]; + + RACUseDelegateProxy(self); + + return signal; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h new file mode 100644 index 00000000..c04648af --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h @@ -0,0 +1,22 @@ +// +// UIBarButtonItem+RACCommandSupport.h +// ReactiveCocoa +// +// Created by Kyle LeNeau on 3/27/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACCommand; + +@interface UIBarButtonItem (RACCommandSupport) + +/// Sets the control's command. When the control is clicked, the command is +/// executed with the sender of the event. The control's enabledness is bound +/// to the command's `canExecute`. +/// +/// Note: this will reset the control's target and action. +@property (nonatomic, strong) RACCommand *rac_command; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.m new file mode 100644 index 00000000..7370af2e --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.m @@ -0,0 +1,55 @@ +// +// UIBarButtonItem+RACCommandSupport.m +// ReactiveCocoa +// +// Created by Kyle LeNeau on 3/27/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UIBarButtonItem+RACCommandSupport.h" +#import "RACEXTKeyPathCoding.h" +#import "NSObject+RACPropertySubscribing.h" +#import "RACCommand.h" +#import "RACDisposable.h" +#import "RACSignal+Operations.h" +#import + +static void *UIControlRACCommandKey = &UIControlRACCommandKey; +static void *UIControlEnabledDisposableKey = &UIControlEnabledDisposableKey; + +@implementation UIBarButtonItem (RACCommandSupport) + +- (RACCommand *)rac_command { + return objc_getAssociatedObject(self, UIControlRACCommandKey); +} + +- (void)setRac_command:(RACCommand *)command { + objc_setAssociatedObject(self, UIControlRACCommandKey, command, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + // Check for stored signal in order to remove it and add a new one + RACDisposable *disposable = objc_getAssociatedObject(self, UIControlEnabledDisposableKey); + [disposable dispose]; + + if (command == nil) return; + + disposable = [command.enabled setKeyPath:@keypath(self.enabled) onObject:self]; + objc_setAssociatedObject(self, UIControlEnabledDisposableKey, disposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + [self rac_hijackActionAndTargetIfNeeded]; +} + +- (void)rac_hijackActionAndTargetIfNeeded { + SEL hijackSelector = @selector(rac_commandPerformAction:); + if (self.target == self && self.action == hijackSelector) return; + + if (self.target != nil) NSLog(@"WARNING: UIBarButtonItem.rac_command hijacks the control's existing target and action."); + + self.target = self; + self.action = hijackSelector; +} + +- (void)rac_commandPerformAction:(id)sender { + [self.rac_command execute:sender]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIButton+RACCommandSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIButton+RACCommandSupport.h new file mode 100644 index 00000000..642ba8e5 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIButton+RACCommandSupport.h @@ -0,0 +1,20 @@ +// +// UIButton+RACCommandSupport.h +// ReactiveCocoa +// +// Created by Ash Furrow on 2013-06-06. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACCommand; + +@interface UIButton (RACCommandSupport) + +/// Sets the button's command. When the button is clicked, the command is +/// executed with the sender of the event. The button's enabledness is bound +/// to the command's `canExecute`. +@property (nonatomic, strong) RACCommand *rac_command; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIButton+RACCommandSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIButton+RACCommandSupport.m new file mode 100644 index 00000000..38fd470f --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIButton+RACCommandSupport.m @@ -0,0 +1,57 @@ +// +// UIButton+RACCommandSupport.m +// ReactiveCocoa +// +// Created by Ash Furrow on 2013-06-06. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UIButton+RACCommandSupport.h" +#import "RACEXTKeyPathCoding.h" +#import "NSObject+RACPropertySubscribing.h" +#import "RACCommand.h" +#import "RACDisposable.h" +#import "RACSignal+Operations.h" +#import + +static void *UIButtonRACCommandKey = &UIButtonRACCommandKey; +static void *UIButtonEnabledDisposableKey = &UIButtonEnabledDisposableKey; + +@implementation UIButton (RACCommandSupport) + +- (RACCommand *)rac_command { + return objc_getAssociatedObject(self, UIButtonRACCommandKey); +} + +- (void)setRac_command:(RACCommand *)command { + objc_setAssociatedObject(self, UIButtonRACCommandKey, command, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + // Check for stored signal in order to remove it and add a new one + RACDisposable *disposable = objc_getAssociatedObject(self, UIButtonEnabledDisposableKey); + [disposable dispose]; + + if (command == nil) return; + + disposable = [command.enabled setKeyPath:@keypath(self.enabled) onObject:self]; + objc_setAssociatedObject(self, UIButtonEnabledDisposableKey, disposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + [self rac_hijackActionAndTargetIfNeeded]; +} + +- (void)rac_hijackActionAndTargetIfNeeded { + SEL hijackSelector = @selector(rac_commandPerformAction:); + + for (NSString *selector in [self actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) { + if (hijackSelector == NSSelectorFromString(selector)) { + return; + } + } + + [self addTarget:self action:hijackSelector forControlEvents:UIControlEventTouchUpInside]; +} + +- (void)rac_commandPerformAction:(id)sender { + [self.rac_command execute:sender]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h new file mode 100644 index 00000000..0e3d3898 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.h @@ -0,0 +1,29 @@ +// +// UICollectionViewCell+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Kent Wong on 2013-10-04. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +// This category is only applicable to iOS >= 6.0. +@interface UICollectionViewCell (RACSignalSupport) + +/// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon +/// the receiver. +/// +/// Examples +/// +/// [[[self.cancelButton +/// rac_signalForControlEvents:UIControlEventTouchUpInside] +/// takeUntil:self.rac_prepareForReuseSignal] +/// subscribeNext:^(UIButton *x) { +/// // do other things +/// }]; +@property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.m new file mode 100644 index 00000000..a3600a0a --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UICollectionViewCell+RACSignalSupport.m @@ -0,0 +1,31 @@ +// +// UICollectionViewCell+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Kent Wong on 2013-10-04. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UICollectionViewCell+RACSignalSupport.h" +#import "NSObject+RACDescription.h" +#import "NSObject+RACSelectorSignal.h" +#import "RACSignal+Operations.h" +#import "RACUnit.h" +#import + +@implementation UICollectionViewCell (RACSignalSupport) + +- (RACSignal *)rac_prepareForReuseSignal { + RACSignal *signal = objc_getAssociatedObject(self, _cmd); + if (signal != nil) return signal; + + signal = [[[self + rac_signalForSelector:@selector(prepareForReuse)] + mapReplace:RACUnit.defaultUnit] + setNameWithFormat:@"%@ -rac_prepareForReuseSignal", self.rac_description]; + + objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + return signal; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupport.h new file mode 100644 index 00000000..2de86cf8 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupport.h @@ -0,0 +1,19 @@ +// +// UIControl+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/17/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +@interface UIControl (RACSignalSupport) + +/// Creates and returns a signal that sends the sender of the control event +/// whenever one of the control events is triggered. +- (RACSignal *)rac_signalForControlEvents:(UIControlEvents)controlEvents; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupport.m new file mode 100644 index 00000000..3cc503ec --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupport.m @@ -0,0 +1,41 @@ +// +// UIControl+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/17/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "UIControl+RACSignalSupport.h" +#import "RACEXTScope.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACSignal.h" +#import "RACSignal+Operations.h" +#import "RACSubscriber+Private.h" +#import "NSObject+RACDeallocating.h" +#import "NSObject+RACDescription.h" + +@implementation UIControl (RACSignalSupport) + +- (RACSignal *)rac_signalForControlEvents:(UIControlEvents)controlEvents { + @weakify(self); + + return [[RACSignal + createSignal:^(id subscriber) { + @strongify(self); + + [self addTarget:subscriber action:@selector(sendNext:) forControlEvents:controlEvents]; + [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{ + [subscriber sendCompleted]; + }]]; + + return [RACDisposable disposableWithBlock:^{ + @strongify(self); + [self removeTarget:subscriber action:@selector(sendNext:) forControlEvents:controlEvents]; + }]; + }] + setNameWithFormat:@"%@ -rac_signalForControlEvents: %lx", [self rac_description], (unsigned long)controlEvents]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h new file mode 100644 index 00000000..6ba91d08 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h @@ -0,0 +1,29 @@ +// +// UIControl+RACSignalSupportPrivate.h +// ReactiveCocoa +// +// Created by Uri Baghin on 06/08/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACChannelTerminal; + +@interface UIControl (RACSignalSupportPrivate) + +/// Adds a RACChannel-based interface to the receiver for the given +/// UIControlEvents and exposes it. +/// +/// controlEvents - A mask of UIControlEvents on which to send new values. +/// key - The key whose value should be read and set when a control +/// event fires and when a value is sent to the +/// RACChannelTerminal respectively. +/// nilValue - The value to be assigned to the key when `nil` is sent to the +/// RACChannelTerminal. +/// +/// Returns a RACChannelTerminal which will send future values from the receiver, +/// and update the receiver when values are sent to the terminal. +- (RACChannelTerminal *)rac_channelForControlEvents:(UIControlEvents)controlEvents key:(NSString *)key nilValue:(id)nilValue; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupportPrivate.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupportPrivate.m new file mode 100644 index 00000000..df5c505a --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIControl+RACSignalSupportPrivate.m @@ -0,0 +1,50 @@ +// +// UIControl+RACSignalSupportPrivate.m +// ReactiveCocoa +// +// Created by Uri Baghin on 06/08/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UIControl+RACSignalSupportPrivate.h" +#import "RACEXTScope.h" +#import "NSInvocation+RACTypeParsing.h" +#import "NSObject+RACDeallocating.h" +#import "NSObject+RACLifting.h" +#import "RACChannel.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACSignal+Operations.h" +#import "UIControl+RACSignalSupport.h" + +@implementation UIControl (RACSignalSupportPrivate) + +- (RACChannelTerminal *)rac_channelForControlEvents:(UIControlEvents)controlEvents key:(NSString *)key nilValue:(id)nilValue { + NSCParameterAssert(key.length > 0); + key = [key copy]; + RACChannel *channel = [[RACChannel alloc] init]; + + [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{ + [channel.followingTerminal sendCompleted]; + }]]; + + RACSignal *eventSignal = [[[self + rac_signalForControlEvents:controlEvents] + mapReplace:key] + takeUntil:[[channel.followingTerminal + ignoreValues] + catchTo:RACSignal.empty]]; + [[self + rac_liftSelector:@selector(valueForKey:) withSignals:eventSignal, nil] + subscribe:channel.followingTerminal]; + + RACSignal *valuesSignal = [channel.followingTerminal + map:^(id value) { + return value ?: nilValue; + }]; + [self rac_liftSelector:@selector(setValue:forKey:) withSignals:valuesSignal, [RACSignal return:key], nil]; + + return channel.leadingTerminal; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIDatePicker+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIDatePicker+RACSignalSupport.h new file mode 100644 index 00000000..e620dfc3 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIDatePicker+RACSignalSupport.h @@ -0,0 +1,24 @@ +// +// UIDatePicker+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Uri Baghin on 20/07/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACChannelTerminal; + +@interface UIDatePicker (RACSignalSupport) + +/// Creates a new RACChannel-based binding to the receiver. +/// +/// nilValue - The date to set when the terminal receives `nil`. +/// +/// Returns a RACChannelTerminal that sends the receiver's date whenever the +/// UIControlEventValueChanged control event is fired, and sets the date to the +/// values it receives. +- (RACChannelTerminal *)rac_newDateChannelWithNilValue:(NSDate *)nilValue; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIDatePicker+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIDatePicker+RACSignalSupport.m new file mode 100644 index 00000000..1c110662 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIDatePicker+RACSignalSupport.m @@ -0,0 +1,20 @@ +// +// UIDatePicker+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Uri Baghin on 20/07/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UIDatePicker+RACSignalSupport.h" +#import "RACEXTKeyPathCoding.h" +#import "UIControl+RACSignalSupport.h" +#import "UIControl+RACSignalSupportPrivate.h" + +@implementation UIDatePicker (RACSignalSupport) + +- (RACChannelTerminal *)rac_newDateChannelWithNilValue:(NSDate *)nilValue { + return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.date) nilValue:nilValue]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h new file mode 100644 index 00000000..ee774fea --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h @@ -0,0 +1,18 @@ +// +// UIGestureRecognizer+RACSignalSupport.h +// Talks +// +// Created by Josh Vera on 5/5/13. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import + +@class RACSignal; + +@interface UIGestureRecognizer (RACSignalSupport) + +/// Returns a signal that sends the receiver when its gesture occurs. +- (RACSignal *)rac_gestureSignal; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.m new file mode 100644 index 00000000..510d3bad --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.m @@ -0,0 +1,40 @@ +// +// UIGestureRecognizer+RACSignalSupport.m +// Talks +// +// Created by Josh Vera on 5/5/13. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import "UIGestureRecognizer+RACSignalSupport.h" +#import "RACEXTScope.h" +#import "NSObject+RACDeallocating.h" +#import "RACCompoundDisposable.h" +#import "RACDisposable.h" +#import "RACSignal.h" +#import "RACSubscriber.h" +#import "NSObject+RACDescription.h" + +@implementation UIGestureRecognizer (RACSignalSupport) + +- (RACSignal *)rac_gestureSignal { + @weakify(self); + + return [[RACSignal + createSignal:^(id subscriber) { + @strongify(self); + + [self addTarget:subscriber action:@selector(sendNext:)]; + [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{ + [subscriber sendCompleted]; + }]]; + + return [RACDisposable disposableWithBlock:^{ + @strongify(self); + [self removeTarget:subscriber action:@selector(sendNext:)]; + }]; + }] + setNameWithFormat:@"%@ -rac_gestureSignal", [self rac_description]]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h new file mode 100644 index 00000000..0bd1bf1b --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h @@ -0,0 +1,22 @@ +// +// UIRefreshControl+RACCommandSupport.h +// ReactiveCocoa +// +// Created by Dave Lee on 2013-10-17. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACCommand; + +@interface UIRefreshControl (RACCommandSupport) + +/// Manipulate the RACCommand property associated with this refresh control. +/// +/// When this refresh control is activated by the user, the command will be +/// executed. Upon completion or error of the execution signal, -endRefreshing +/// will be invoked. +@property (nonatomic, strong) RACCommand *rac_command; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIRefreshControl+RACCommandSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIRefreshControl+RACCommandSupport.m new file mode 100644 index 00000000..2b7d7a4f --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIRefreshControl+RACCommandSupport.m @@ -0,0 +1,59 @@ +// +// UIRefreshControl+RACCommandSupport.m +// ReactiveCocoa +// +// Created by Dave Lee on 2013-10-17. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UIRefreshControl+RACCommandSupport.h" +#import "RACEXTKeyPathCoding.h" +#import "NSObject+RACSelectorSignal.h" +#import "RACDisposable.h" +#import "RACCommand.h" +#import "RACCompoundDisposable.h" +#import "RACSignal.h" +#import "RACSignal+Operations.h" +#import "UIControl+RACSignalSupport.h" +#import + +static void *UIRefreshControlRACCommandKey = &UIRefreshControlRACCommandKey; +static void *UIRefreshControlDisposableKey = &UIRefreshControlDisposableKey; + +@implementation UIRefreshControl (RACCommandSupport) + +- (RACCommand *)rac_command { + return objc_getAssociatedObject(self, UIRefreshControlRACCommandKey); +} + +- (void)setRac_command:(RACCommand *)command { + objc_setAssociatedObject(self, UIRefreshControlRACCommandKey, command, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + // Dispose of any active command associations. + [objc_getAssociatedObject(self, UIRefreshControlDisposableKey) dispose]; + + if (command == nil) return; + + // Like RAC(self, enabled) = command.enabled; but with access to disposable. + RACDisposable *enabledDisposable = [command.enabled setKeyPath:@keypath(self.enabled) onObject:self]; + + RACDisposable *executionDisposable = [[[[self + rac_signalForControlEvents:UIControlEventValueChanged] + map:^(UIRefreshControl *x) { + return [[[command + execute:x] + catchTo:[RACSignal empty]] + then:^{ + return [RACSignal return:x]; + }]; + }] + concat] + subscribeNext:^(UIRefreshControl *x) { + [x endRefreshing]; + }]; + + RACDisposable *commandDisposable = [RACCompoundDisposable compoundDisposableWithDisposables:@[ enabledDisposable, executionDisposable ]]; + objc_setAssociatedObject(self, UIRefreshControlDisposableKey, commandDisposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h new file mode 100644 index 00000000..2d3c3e7a --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h @@ -0,0 +1,24 @@ +// +// UISegmentedControl+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Uri Baghin on 20/07/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACChannelTerminal; + +@interface UISegmentedControl (RACSignalSupport) + +/// Creates a new RACChannel-based binding to the receiver. +/// +/// nilValue - The segment to select when the terminal receives `nil`. +/// +/// Returns a RACChannelTerminal that sends the receiver's currently selected +/// segment's index whenever the UIControlEventValueChanged control event is +/// fired, and sets the selected segment index to the values it receives. +- (RACChannelTerminal *)rac_newSelectedSegmentIndexChannelWithNilValue:(NSNumber *)nilValue; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISegmentedControl+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISegmentedControl+RACSignalSupport.m new file mode 100644 index 00000000..96ea5563 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISegmentedControl+RACSignalSupport.m @@ -0,0 +1,20 @@ +// +// UISegmentedControl+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Uri Baghin on 20/07/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UISegmentedControl+RACSignalSupport.h" +#import "RACEXTKeyPathCoding.h" +#import "UIControl+RACSignalSupport.h" +#import "UIControl+RACSignalSupportPrivate.h" + +@implementation UISegmentedControl (RACSignalSupport) + +- (RACChannelTerminal *)rac_newSelectedSegmentIndexChannelWithNilValue:(NSNumber *)nilValue { + return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.selectedSegmentIndex) nilValue:nilValue]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISlider+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISlider+RACSignalSupport.h new file mode 100644 index 00000000..75626ad9 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISlider+RACSignalSupport.h @@ -0,0 +1,24 @@ +// +// UISlider+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Uri Baghin on 20/07/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACChannelTerminal; + +@interface UISlider (RACSignalSupport) + +/// Creates a new RACChannel-based binding to the receiver. +/// +/// nilValue - The value to set when the terminal receives `nil`. +/// +/// Returns a RACChannelTerminal that sends the receiver's value whenever the +/// UIControlEventValueChanged control event is fired, and sets the value to the +/// values it receives. +- (RACChannelTerminal *)rac_newValueChannelWithNilValue:(NSNumber *)nilValue; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISlider+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISlider+RACSignalSupport.m new file mode 100644 index 00000000..1643f46d --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISlider+RACSignalSupport.m @@ -0,0 +1,20 @@ +// +// UISlider+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Uri Baghin on 20/07/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UISlider+RACSignalSupport.h" +#import "RACEXTKeyPathCoding.h" +#import "UIControl+RACSignalSupport.h" +#import "UIControl+RACSignalSupportPrivate.h" + +@implementation UISlider (RACSignalSupport) + +- (RACChannelTerminal *)rac_newValueChannelWithNilValue:(NSNumber *)nilValue { + return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.value) nilValue:nilValue]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIStepper+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIStepper+RACSignalSupport.h new file mode 100644 index 00000000..da6d97b5 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIStepper+RACSignalSupport.h @@ -0,0 +1,24 @@ +// +// UIStepper+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Uri Baghin on 20/07/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACChannelTerminal; + +@interface UIStepper (RACSignalSupport) + +/// Creates a new RACChannel-based binding to the receiver. +/// +/// nilValue - The value to set when the terminal receives `nil`. +/// +/// Returns a RACChannelTerminal that sends the receiver's value whenever the +/// UIControlEventValueChanged control event is fired, and sets the value to the +/// values it receives. +- (RACChannelTerminal *)rac_newValueChannelWithNilValue:(NSNumber *)nilValue; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIStepper+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIStepper+RACSignalSupport.m new file mode 100644 index 00000000..c7dc6ea0 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UIStepper+RACSignalSupport.m @@ -0,0 +1,20 @@ +// +// UIStepper+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Uri Baghin on 20/07/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UIStepper+RACSignalSupport.h" +#import "RACEXTKeyPathCoding.h" +#import "UIControl+RACSignalSupport.h" +#import "UIControl+RACSignalSupportPrivate.h" + +@implementation UIStepper (RACSignalSupport) + +- (RACChannelTerminal *)rac_newValueChannelWithNilValue:(NSNumber *)nilValue { + return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.value) nilValue:nilValue]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISwitch+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISwitch+RACSignalSupport.h new file mode 100644 index 00000000..1313a2c4 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISwitch+RACSignalSupport.h @@ -0,0 +1,22 @@ +// +// UISwitch+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Uri Baghin on 20/07/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACChannelTerminal; + +@interface UISwitch (RACSignalSupport) + +/// Creates a new RACChannel-based binding to the receiver. +/// +/// Returns a RACChannelTerminal that sends whether the receiver is on whenever +/// the UIControlEventValueChanged control event is fired, and sets it on or off +/// when it receives @YES or @NO respectively. +- (RACChannelTerminal *)rac_newOnChannel; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISwitch+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISwitch+RACSignalSupport.m new file mode 100644 index 00000000..81465076 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UISwitch+RACSignalSupport.m @@ -0,0 +1,20 @@ +// +// UISwitch+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Uri Baghin on 20/07/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UISwitch+RACSignalSupport.h" +#import "RACEXTKeyPathCoding.h" +#import "UIControl+RACSignalSupport.h" +#import "UIControl+RACSignalSupportPrivate.h" + +@implementation UISwitch (RACSignalSupport) + +- (RACChannelTerminal *)rac_newOnChannel { + return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.on) nilValue:@NO]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITableViewCell+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITableViewCell+RACSignalSupport.h new file mode 100644 index 00000000..c29d47cd --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITableViewCell+RACSignalSupport.h @@ -0,0 +1,28 @@ +// +// UITableViewCell+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-07-22. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +@interface UITableViewCell (RACSignalSupport) + +/// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon +/// the receiver. +/// +/// Examples +/// +/// [[[self.cancelButton +/// rac_signalForControlEvents:UIControlEventTouchUpInside] +/// takeUntil:self.rac_prepareForReuseSignal] +/// subscribeNext:^(UIButton *x) { +/// // do other things +/// }]; +@property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITableViewCell+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITableViewCell+RACSignalSupport.m new file mode 100644 index 00000000..8a81c30a --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITableViewCell+RACSignalSupport.m @@ -0,0 +1,31 @@ +// +// UITableViewCell+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-07-22. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "UITableViewCell+RACSignalSupport.h" +#import "NSObject+RACDescription.h" +#import "NSObject+RACSelectorSignal.h" +#import "RACSignal+Operations.h" +#import "RACUnit.h" +#import + +@implementation UITableViewCell (RACSignalSupport) + +- (RACSignal *)rac_prepareForReuseSignal { + RACSignal *signal = objc_getAssociatedObject(self, _cmd); + if (signal != nil) return signal; + + signal = [[[self + rac_signalForSelector:@selector(prepareForReuse)] + mapReplace:RACUnit.defaultUnit] + setNameWithFormat:@"%@ -rac_prepareForReuseSignal", self.rac_description]; + + objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + return signal; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextField+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextField+RACSignalSupport.h new file mode 100644 index 00000000..99dbe345 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextField+RACSignalSupport.h @@ -0,0 +1,27 @@ +// +// UITextField+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/17/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal, RACChannelTerminal; + +@interface UITextField (RACSignalSupport) + +/// Creates and returns a signal for the text of the field. It always starts with +/// the current text. The signal sends next when the UIControlEventEditingChanged +/// control event is fired on the control. +- (RACSignal *)rac_textSignal; + +/// Creates a new RACChannel-based binding to the receiver. +/// +/// Returns a RACChannelTerminal that sends the receiver's text whenever the +/// UIControlEventEditingChanged control event is fired, and sets the text to the +/// values it receives. +- (RACChannelTerminal *)rac_newTextChannel; + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextField+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextField+RACSignalSupport.m new file mode 100644 index 00000000..0105ff2b --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextField+RACSignalSupport.m @@ -0,0 +1,39 @@ +// +// UITextField+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/17/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "UITextField+RACSignalSupport.h" +#import "RACEXTKeyPathCoding.h" +#import "RACEXTScope.h" +#import "NSObject+RACDeallocating.h" +#import "NSObject+RACDescription.h" +#import "RACSignal+Operations.h" +#import "UIControl+RACSignalSupport.h" +#import "UIControl+RACSignalSupportPrivate.h" + +@implementation UITextField (RACSignalSupport) + +- (RACSignal *)rac_textSignal { + @weakify(self); + return [[[[[RACSignal + defer:^{ + @strongify(self); + return [RACSignal return:self]; + }] + concat:[self rac_signalForControlEvents:UIControlEventEditingChanged]] + map:^(UITextField *x) { + return x.text; + }] + takeUntil:self.rac_willDeallocSignal] + setNameWithFormat:@"%@ -rac_textSignal", [self rac_description]]; +} + +- (RACChannelTerminal *)rac_newTextChannel { + return [self rac_channelForControlEvents:UIControlEventEditingChanged key:@keypath(self.text) nilValue:@""]; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextView+RACSignalSupport.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextView+RACSignalSupport.h new file mode 100644 index 00000000..174b1bac --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextView+RACSignalSupport.h @@ -0,0 +1,39 @@ +// +// UITextView+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Cody Krieger on 5/18/12. +// Copyright (c) 2012 Cody Krieger. All rights reserved. +// + +#import + +@class RACDelegateProxy; +@class RACSignal; + +@interface UITextView (RACSignalSupport) + +/// A delegate proxy which will be set as the receiver's delegate when any of the +/// methods in this category are used. +@property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; + +/// Creates a signal for the text of the receiver. +/// +/// When this method is invoked, the `rac_delegateProxy` will become the +/// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy +/// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't +/// know how to handle. Setting the receiver's `delegate` afterward is +/// considered undefined behavior. +/// +/// Returns a signal which will send the current text upon subscription, then +/// again whenever the receiver's text is changed. The signal will complete when +/// the receiver is deallocated. +- (RACSignal *)rac_textSignal; + +@end + +@interface UITextView (RACSignalSupportUnavailable) + +- (RACSignal *)rac_signalForDelegateMethod:(SEL)method __attribute__((unavailable("Use -rac_signalForSelector:fromProtocol: instead"))); + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextView+RACSignalSupport.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextView+RACSignalSupport.m new file mode 100644 index 00000000..72086988 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/UITextView+RACSignalSupport.m @@ -0,0 +1,56 @@ +// +// UITextView+RACSignalSupport.m +// ReactiveCocoa +// +// Created by Cody Krieger on 5/18/12. +// Copyright (c) 2012 Cody Krieger. All rights reserved. +// + +#import "UITextView+RACSignalSupport.h" +#import "RACEXTScope.h" +#import "NSObject+RACDeallocating.h" +#import "RACDelegateProxy.h" +#import "RACSignal+Operations.h" +#import "RACTuple.h" +#import "NSObject+RACDescription.h" +#import + +@implementation UITextView (RACSignalSupport) + +static void RACUseDelegateProxy(UITextView *self) { + if (self.delegate == self.rac_delegateProxy) return; + + self.rac_delegateProxy.rac_proxiedDelegate = self.delegate; + self.delegate = (id)self.rac_delegateProxy; +} + +- (RACDelegateProxy *)rac_delegateProxy { + RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd); + if (proxy == nil) { + proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UITextViewDelegate)]; + objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + + return proxy; +} + +- (RACSignal *)rac_textSignal { + @weakify(self); + RACSignal *signal = [[[[[RACSignal + defer:^{ + @strongify(self); + return [RACSignal return:RACTuplePack(self)]; + }] + concat:[self.rac_delegateProxy signalForSelector:@selector(textViewDidChange:)]] + reduceEach:^(UITextView *x) { + return x.text; + }] + takeUntil:self.rac_willDeallocSignal] + setNameWithFormat:@"%@ -rac_textSignal", [self rac_description]]; + + RACUseDelegateProxy(self); + + return signal; +} + +@end diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTKeyPathCoding.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTKeyPathCoding.h new file mode 100644 index 00000000..01063196 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTKeyPathCoding.h @@ -0,0 +1,68 @@ +// +// EXTKeyPathCoding.h +// extobjc +// +// Created by Justin Spahr-Summers on 19.06.12. +// Copyright (C) 2012 Justin Spahr-Summers. +// Released under the MIT license. +// + +#import +#import "RACmetamacros.h" + +/** + * \@keypath allows compile-time verification of key paths. Given a real object + * receiver and key path: + * + * @code + +NSString *UTF8StringPath = @keypath(str.lowercaseString.UTF8String); +// => @"lowercaseString.UTF8String" + +NSString *versionPath = @keypath(NSObject, version); +// => @"version" + +NSString *lowercaseStringPath = @keypath(NSString.new, lowercaseString); +// => @"lowercaseString" + + * @endcode + * + * ... the macro returns an \c NSString containing all but the first path + * component or argument (e.g., @"lowercaseString.UTF8String", @"version"). + * + * In addition to simply creating a key path, this macro ensures that the key + * path is valid at compile-time (causing a syntax error if not), and supports + * refactoring, such that changing the name of the property will also update any + * uses of \@keypath. + */ +#define keypath(...) \ + metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__))(keypath1(__VA_ARGS__))(keypath2(__VA_ARGS__)) + +#define keypath1(PATH) \ + (((void)(NO && ((void)PATH, NO)), strchr(# PATH, '.') + 1)) + +#define keypath2(OBJ, PATH) \ + (((void)(NO && ((void)OBJ.PATH, NO)), # PATH)) + +/** + * \@collectionKeypath allows compile-time verification of key paths across collections NSArray/NSSet etc. Given a real object + * receiver, collection object receiver and related keypaths: + * + * @code + + NSString *employessFirstNamePath = @collectionKeypath(department.employees, Employee.new, firstName) + // => @"employees.firstName" + + NSString *employessFirstNamePath = @collectionKeypath(Department.new, employees, Employee.new, firstName) + // => @"employees.firstName" + + * @endcode + * + */ +#define collectionKeypath(...) \ + metamacro_if_eq(3, metamacro_argcount(__VA_ARGS__))(collectionKeypath3(__VA_ARGS__))(collectionKeypath4(__VA_ARGS__)) + +#define collectionKeypath3(PATH, COLLECTION_OBJECT, COLLECTION_PATH) ([[NSString stringWithFormat:@"%s.%s",keypath(PATH), keypath(COLLECTION_OBJECT, COLLECTION_PATH)] UTF8String]) + +#define collectionKeypath4(OBJ, PATH, COLLECTION_OBJECT, COLLECTION_PATH) ([[NSString stringWithFormat:@"%s.%s",keypath(OBJ, PATH), keypath(COLLECTION_OBJECT, COLLECTION_PATH)] UTF8String]) + diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTRuntimeExtensions.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTRuntimeExtensions.h new file mode 100644 index 00000000..ab4e11d0 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTRuntimeExtensions.h @@ -0,0 +1,122 @@ +// +// EXTRuntimeExtensions.h +// extobjc +// +// Created by Justin Spahr-Summers on 2011-03-05. +// Copyright (C) 2012 Justin Spahr-Summers. +// Released under the MIT license. +// + +#import + +/** + * Describes the memory management policy of a property. + */ +typedef enum { + /** + * The value is assigned. + */ + rac_propertyMemoryManagementPolicyAssign = 0, + + /** + * The value is retained. + */ + rac_propertyMemoryManagementPolicyRetain, + + /** + * The value is copied. + */ + rac_propertyMemoryManagementPolicyCopy +} rac_propertyMemoryManagementPolicy; + +/** + * Describes the attributes and type information of a property. + */ +typedef struct { + /** + * Whether this property was declared with the \c readonly attribute. + */ + BOOL readonly; + + /** + * Whether this property was declared with the \c nonatomic attribute. + */ + BOOL nonatomic; + + /** + * Whether the property is a weak reference. + */ + BOOL weak; + + /** + * Whether the property is eligible for garbage collection. + */ + BOOL canBeCollected; + + /** + * Whether this property is defined with \c \@dynamic. + */ + BOOL dynamic; + + /** + * The memory management policy for this property. This will always be + * #rac_propertyMemoryManagementPolicyAssign if #readonly is \c YES. + */ + rac_propertyMemoryManagementPolicy memoryManagementPolicy; + + /** + * The selector for the getter of this property. This will reflect any + * custom \c getter= attribute provided in the property declaration, or the + * inferred getter name otherwise. + */ + SEL getter; + + /** + * The selector for the setter of this property. This will reflect any + * custom \c setter= attribute provided in the property declaration, or the + * inferred setter name otherwise. + * + * @note If #readonly is \c YES, this value will represent what the setter + * \e would be, if the property were writable. + */ + SEL setter; + + /** + * The backing instance variable for this property, or \c NULL if \c + * \c @synthesize was not used, and therefore no instance variable exists. This + * would also be the case if the property is implemented dynamically. + */ + const char *ivar; + + /** + * If this property is defined as being an instance of a specific class, + * this will be the class object representing it. + * + * This will be \c nil if the property was defined as type \c id, if the + * property is not of an object type, or if the class could not be found at + * runtime. + */ + Class objectClass; + + /** + * The type encoding for the value of this property. This is the type as it + * would be returned by the \c \@encode() directive. + */ + char type[]; +} rac_propertyAttributes; + +/** + * Finds the instance method named \a aSelector on \a aClass and returns it, or + * returns \c NULL if no such instance method exists. Unlike \c + * class_getInstanceMethod(), this does not search superclasses. + * + * @note To get class methods in this manner, use a metaclass for \a aClass. + */ +Method rac_getImmediateInstanceMethod (Class aClass, SEL aSelector); + +/** + * Returns a pointer to a structure containing information about \a property. + * You must \c free() the returned pointer. Returns \c NULL if there is an error + * obtaining information from \a property. + */ +rac_propertyAttributes *rac_copyPropertyAttributes (objc_property_t property); diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTRuntimeExtensions.m b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTRuntimeExtensions.m new file mode 100644 index 00000000..2d2010ec --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTRuntimeExtensions.m @@ -0,0 +1,232 @@ +// +// EXTRuntimeExtensions.m +// extobjc +// +// Created by Justin Spahr-Summers on 2011-03-05. +// Copyright (C) 2012 Justin Spahr-Summers. +// Released under the MIT license. +// + +#import "RACEXTRuntimeExtensions.h" +#import +#import +#import +#import +#import +#import +#import + +rac_propertyAttributes *rac_copyPropertyAttributes (objc_property_t property) { + const char * const attrString = property_getAttributes(property); + if (!attrString) { + fprintf(stderr, "ERROR: Could not get attribute string from property %s\n", property_getName(property)); + return NULL; + } + + if (attrString[0] != 'T') { + fprintf(stderr, "ERROR: Expected attribute string \"%s\" for property %s to start with 'T'\n", attrString, property_getName(property)); + return NULL; + } + + const char *typeString = attrString + 1; + const char *next = NSGetSizeAndAlignment(typeString, NULL, NULL); + if (!next) { + fprintf(stderr, "ERROR: Could not read past type in attribute string \"%s\" for property %s\n", attrString, property_getName(property)); + return NULL; + } + + size_t typeLength = (size_t)(next - typeString); + if (!typeLength) { + fprintf(stderr, "ERROR: Invalid type in attribute string \"%s\" for property %s\n", attrString, property_getName(property)); + return NULL; + } + + // allocate enough space for the structure and the type string (plus a NUL) + rac_propertyAttributes *attributes = calloc(1, sizeof(rac_propertyAttributes) + typeLength + 1); + if (!attributes) { + fprintf(stderr, "ERROR: Could not allocate rac_propertyAttributes structure for attribute string \"%s\" for property %s\n", attrString, property_getName(property)); + return NULL; + } + + // copy the type string + strncpy(attributes->type, typeString, typeLength); + attributes->type[typeLength] = '\0'; + + // if this is an object type, and immediately followed by a quoted string... + if (typeString[0] == *(@encode(id)) && typeString[1] == '"') { + // we should be able to extract a class name + const char *className = typeString + 2; + next = strchr(className, '"'); + + if (!next) { + fprintf(stderr, "ERROR: Could not read class name in attribute string \"%s\" for property %s\n", attrString, property_getName(property)); + return NULL; + } + + if (className != next) { + size_t classNameLength = (size_t)(next - className); + char trimmedName[classNameLength + 1]; + + strncpy(trimmedName, className, classNameLength); + trimmedName[classNameLength] = '\0'; + + // attempt to look up the class in the runtime + attributes->objectClass = objc_getClass(trimmedName); + } + } + + if (*next != '\0') { + // skip past any junk before the first flag + next = strchr(next, ','); + } + + while (next && *next == ',') { + char flag = next[1]; + next += 2; + + switch (flag) { + case '\0': + break; + + case 'R': + attributes->readonly = YES; + break; + + case 'C': + attributes->memoryManagementPolicy = rac_propertyMemoryManagementPolicyCopy; + break; + + case '&': + attributes->memoryManagementPolicy = rac_propertyMemoryManagementPolicyRetain; + break; + + case 'N': + attributes->nonatomic = YES; + break; + + case 'G': + case 'S': + { + const char *nextFlag = strchr(next, ','); + SEL name = NULL; + + if (!nextFlag) { + // assume that the rest of the string is the selector + const char *selectorString = next; + next = ""; + + name = sel_registerName(selectorString); + } else { + size_t selectorLength = (size_t)(nextFlag - next); + if (!selectorLength) { + fprintf(stderr, "ERROR: Found zero length selector name in attribute string \"%s\" for property %s\n", attrString, property_getName(property)); + goto errorOut; + } + + char selectorString[selectorLength + 1]; + + strncpy(selectorString, next, selectorLength); + selectorString[selectorLength] = '\0'; + + name = sel_registerName(selectorString); + next = nextFlag; + } + + if (flag == 'G') + attributes->getter = name; + else + attributes->setter = name; + } + + break; + + case 'D': + attributes->dynamic = YES; + attributes->ivar = NULL; + break; + + case 'V': + // assume that the rest of the string (if present) is the ivar name + if (*next == '\0') { + // if there's nothing there, let's assume this is dynamic + attributes->ivar = NULL; + } else { + attributes->ivar = next; + next = ""; + } + + break; + + case 'W': + attributes->weak = YES; + break; + + case 'P': + attributes->canBeCollected = YES; + break; + + case 't': + fprintf(stderr, "ERROR: Old-style type encoding is unsupported in attribute string \"%s\" for property %s\n", attrString, property_getName(property)); + + // skip over this type encoding + while (*next != ',' && *next != '\0') + ++next; + + break; + + default: + fprintf(stderr, "ERROR: Unrecognized attribute string flag '%c' in attribute string \"%s\" for property %s\n", flag, attrString, property_getName(property)); + } + } + + if (next && *next != '\0') { + fprintf(stderr, "Warning: Unparsed data \"%s\" in attribute string \"%s\" for property %s\n", next, attrString, property_getName(property)); + } + + if (!attributes->getter) { + // use the property name as the getter by default + attributes->getter = sel_registerName(property_getName(property)); + } + + if (!attributes->setter) { + const char *propertyName = property_getName(property); + size_t propertyNameLength = strlen(propertyName); + + // we want to transform the name to setProperty: style + size_t setterLength = propertyNameLength + 4; + + char setterName[setterLength + 1]; + strncpy(setterName, "set", 3); + strncpy(setterName + 3, propertyName, propertyNameLength); + + // capitalize property name for the setter + setterName[3] = (char)toupper(setterName[3]); + + setterName[setterLength - 1] = ':'; + setterName[setterLength] = '\0'; + + attributes->setter = sel_registerName(setterName); + } + + return attributes; + +errorOut: + free(attributes); + return NULL; +} + +Method rac_getImmediateInstanceMethod (Class aClass, SEL aSelector) { + unsigned methodCount = 0; + Method *methods = class_copyMethodList(aClass, &methodCount); + Method foundMethod = NULL; + + for (unsigned methodIndex = 0;methodIndex < methodCount;++methodIndex) { + if (method_getName(methods[methodIndex]) == aSelector) { + foundMethod = methods[methodIndex]; + break; + } + } + + free(methods); + return foundMethod; +} diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTScope.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTScope.h new file mode 100644 index 00000000..da24c149 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACEXTScope.h @@ -0,0 +1,101 @@ +// +// EXTScope.h +// extobjc +// +// Created by Justin Spahr-Summers on 2011-05-04. +// Copyright (C) 2012 Justin Spahr-Summers. +// Released under the MIT license. +// + +#import "RACmetamacros.h" + +/** + * \@onExit defines some code to be executed when the current scope exits. The + * code must be enclosed in braces and terminated with a semicolon, and will be + * executed regardless of how the scope is exited, including from exceptions, + * \c goto, \c return, \c break, and \c continue. + * + * Provided code will go into a block to be executed later. Keep this in mind as + * it pertains to memory management, restrictions on assignment, etc. Because + * the code is used within a block, \c return is a legal (though perhaps + * confusing) way to exit the cleanup block early. + * + * Multiple \@onExit statements in the same scope are executed in reverse + * lexical order. This helps when pairing resource acquisition with \@onExit + * statements, as it guarantees teardown in the opposite order of acquisition. + * + * @note This statement cannot be used within scopes defined without braces + * (like a one line \c if). In practice, this is not an issue, since \@onExit is + * a useless construct in such a case anyways. + */ +#define onExit \ + try {} @finally {} \ + __strong rac_cleanupBlock_t metamacro_concat(rac_exitBlock_, __LINE__) __attribute__((cleanup(rac_executeCleanupBlock), unused)) = ^ + +/** + * Creates \c __weak shadow variables for each of the variables provided as + * arguments, which can later be made strong again with #strongify. + * + * This is typically used to weakly reference variables in a block, but then + * ensure that the variables stay alive during the actual execution of the block + * (if they were live upon entry). + * + * See #strongify for an example of usage. + */ +#define weakify(...) \ + try {} @finally {} \ + metamacro_foreach_cxt(rac_weakify_,, __weak, __VA_ARGS__) + +/** + * Like #weakify, but uses \c __unsafe_unretained instead, for targets or + * classes that do not support weak references. + */ +#define unsafeify(...) \ + try {} @finally {} \ + metamacro_foreach_cxt(rac_weakify_,, __unsafe_unretained, __VA_ARGS__) + +/** + * Strongly references each of the variables provided as arguments, which must + * have previously been passed to #weakify. + * + * The strong references created will shadow the original variable names, such + * that the original names can be used without issue (and a significantly + * reduced risk of retain cycles) in the current scope. + * + * @code + + id foo = [[NSObject alloc] init]; + id bar = [[NSObject alloc] init]; + + @weakify(foo, bar); + + // this block will not keep 'foo' or 'bar' alive + BOOL (^matchesFooOrBar)(id) = ^ BOOL (id obj){ + // but now, upon entry, 'foo' and 'bar' will stay alive until the block has + // finished executing + @strongify(foo, bar); + + return [foo isEqual:obj] || [bar isEqual:obj]; + }; + + * @endcode + */ +#define strongify(...) \ + try {} @finally {} \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wshadow\"") \ + metamacro_foreach(rac_strongify_,, __VA_ARGS__) \ + _Pragma("clang diagnostic pop") + +/*** implementation details follow ***/ +typedef void (^rac_cleanupBlock_t)(); + +static inline void rac_executeCleanupBlock (__strong rac_cleanupBlock_t *block) { + (*block)(); +} + +#define rac_weakify_(INDEX, CONTEXT, VAR) \ + CONTEXT __typeof__(VAR) metamacro_concat(VAR, _weak_) = (VAR); + +#define rac_strongify_(INDEX, VAR) \ + __strong __typeof__(VAR) VAR = metamacro_concat(VAR, _weak_); diff --git a/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACmetamacros.h b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACmetamacros.h new file mode 100644 index 00000000..dc741009 --- /dev/null +++ b/Pods/ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/extobjc/RACmetamacros.h @@ -0,0 +1,670 @@ +/** + * Macros for metaprogramming + * ExtendedC + * + * Copyright (C) 2012 Justin Spahr-Summers + * Released under the MIT license + */ + +#ifndef EXTC_METAMACROS_H +#define EXTC_METAMACROS_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/** + * Executes one or more expressions (which may have a void type, such as a call + * to a function that returns no value) and always returns true. + */ +#define metamacro_exprify(...) \ + ((__VA_ARGS__), true) + +/** + * Returns a string representation of VALUE after full macro expansion. + */ +#define metamacro_stringify(VALUE) \ + metamacro_stringify_(VALUE) + +/** + * Returns A and B concatenated after full macro expansion. + */ +#define metamacro_concat(A, B) \ + metamacro_concat_(A, B) + +/** + * Returns the Nth variadic argument (starting from zero). At least + * N + 1 variadic arguments must be given. N must be between zero and twenty, + * inclusive. + */ +#define metamacro_at(N, ...) \ + metamacro_concat(metamacro_at, N)(__VA_ARGS__) + +/** + * Returns the number of arguments (up to twenty) provided to the macro. At + * least one argument must be provided. + * + * Inspired by P99: http://p99.gforge.inria.fr + */ +#define metamacro_argcount(...) \ + metamacro_at(20, __VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) + +/** + * Identical to #metamacro_foreach_cxt, except that no CONTEXT argument is + * given. Only the index and current argument will thus be passed to MACRO. + */ +#define metamacro_foreach(MACRO, SEP, ...) \ + metamacro_foreach_cxt(metamacro_foreach_iter, SEP, MACRO, __VA_ARGS__) + +/** + * For each consecutive variadic argument (up to twenty), MACRO is passed the + * zero-based index of the current argument, CONTEXT, and then the argument + * itself. The results of adjoining invocations of MACRO are then separated by + * SEP. + * + * Inspired by P99: http://p99.gforge.inria.fr + */ +#define metamacro_foreach_cxt(MACRO, SEP, CONTEXT, ...) \ + metamacro_concat(metamacro_foreach_cxt, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) + +/** + * Identical to #metamacro_foreach_cxt. This can be used when the former would + * fail due to recursive macro expansion. + */ +#define metamacro_foreach_cxt_recursive(MACRO, SEP, CONTEXT, ...) \ + metamacro_concat(metamacro_foreach_cxt_recursive, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) + +/** + * In consecutive order, appends each variadic argument (up to twenty) onto + * BASE. The resulting concatenations are then separated by SEP. + * + * This is primarily useful to manipulate a list of macro invocations into instead + * invoking a different, possibly related macro. + */ +#define metamacro_foreach_concat(BASE, SEP, ...) \ + metamacro_foreach_cxt(metamacro_foreach_concat_iter, SEP, BASE, __VA_ARGS__) + +/** + * Iterates COUNT times, each time invoking MACRO with the current index + * (starting at zero) and CONTEXT. The results of adjoining invocations of MACRO + * are then separated by SEP. + * + * COUNT must be an integer between zero and twenty, inclusive. + */ +#define metamacro_for_cxt(COUNT, MACRO, SEP, CONTEXT) \ + metamacro_concat(metamacro_for_cxt, COUNT)(MACRO, SEP, CONTEXT) + +/** + * Returns the first argument given. At least one argument must be provided. + * + * This is useful when implementing a variadic macro, where you may have only + * one variadic argument, but no way to retrieve it (for example, because \c ... + * always needs to match at least one argument). + * + * @code + +#define varmacro(...) \ + metamacro_head(__VA_ARGS__) + + * @endcode + */ +#define metamacro_head(...) \ + metamacro_head_(__VA_ARGS__, 0) + +/** + * Returns every argument except the first. At least two arguments must be + * provided. + */ +#define metamacro_tail(...) \ + metamacro_tail_(__VA_ARGS__) + +/** + * Returns the first N (up to twenty) variadic arguments as a new argument list. + * At least N variadic arguments must be provided. + */ +#define metamacro_take(N, ...) \ + metamacro_concat(metamacro_take, N)(__VA_ARGS__) + +/** + * Removes the first N (up to twenty) variadic arguments from the given argument + * list. At least N variadic arguments must be provided. + */ +#define metamacro_drop(N, ...) \ + metamacro_concat(metamacro_drop, N)(__VA_ARGS__) + +/** + * Decrements VAL, which must be a number between zero and twenty, inclusive. + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_dec(VAL) \ + metamacro_at(VAL, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) + +/** + * Increments VAL, which must be a number between zero and twenty, inclusive. + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_inc(VAL) \ + metamacro_at(VAL, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) + +/** + * If A is equal to B, the next argument list is expanded; otherwise, the + * argument list after that is expanded. A and B must be numbers between zero + * and twenty, inclusive. Additionally, B must be greater than or equal to A. + * + * @code + +// expands to true +metamacro_if_eq(0, 0)(true)(false) + +// expands to false +metamacro_if_eq(0, 1)(true)(false) + + * @endcode + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_if_eq(A, B) \ + metamacro_concat(metamacro_if_eq, A)(B) + +/** + * Identical to #metamacro_if_eq. This can be used when the former would fail + * due to recursive macro expansion. + */ +#define metamacro_if_eq_recursive(A, B) \ + metamacro_concat(metamacro_if_eq_recursive, A)(B) + +/** + * Returns 1 if N is an even number, or 0 otherwise. N must be between zero and + * twenty, inclusive. + * + * For the purposes of this test, zero is considered even. + */ +#define metamacro_is_even(N) \ + metamacro_at(N, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1) + +/** + * Returns the logical NOT of B, which must be the number zero or one. + */ +#define metamacro_not(B) \ + metamacro_at(B, 1, 0) + +// IMPLEMENTATION DETAILS FOLLOW! +// Do not write code that depends on anything below this line. +#define metamacro_stringify_(VALUE) # VALUE +#define metamacro_concat_(A, B) A ## B +#define metamacro_foreach_iter(INDEX, MACRO, ARG) MACRO(INDEX, ARG) +#define metamacro_head_(FIRST, ...) FIRST +#define metamacro_tail_(FIRST, ...) __VA_ARGS__ +#define metamacro_consume_(...) +#define metamacro_expand_(...) __VA_ARGS__ + +// implemented from scratch so that metamacro_concat() doesn't end up nesting +#define metamacro_foreach_concat_iter(INDEX, BASE, ARG) metamacro_foreach_concat_iter_(BASE, ARG) +#define metamacro_foreach_concat_iter_(BASE, ARG) BASE ## ARG + +// metamacro_at expansions +#define metamacro_at0(...) metamacro_head(__VA_ARGS__) +#define metamacro_at1(_0, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at2(_0, _1, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at3(_0, _1, _2, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at4(_0, _1, _2, _3, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at5(_0, _1, _2, _3, _4, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at6(_0, _1, _2, _3, _4, _5, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at7(_0, _1, _2, _3, _4, _5, _6, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at8(_0, _1, _2, _3, _4, _5, _6, _7, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at9(_0, _1, _2, _3, _4, _5, _6, _7, _8, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at10(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at11(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at12(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at13(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at14(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at15(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at17(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at18(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at19(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at20(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, ...) metamacro_head(__VA_ARGS__) + +// metamacro_foreach_cxt expansions +#define metamacro_foreach_cxt0(MACRO, SEP, CONTEXT) +#define metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) + +#define metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ + metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) \ + SEP \ + MACRO(1, CONTEXT, _1) + +#define metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ + metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ + SEP \ + MACRO(2, CONTEXT, _2) + +#define metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ + metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ + SEP \ + MACRO(3, CONTEXT, _3) + +#define metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ + metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ + SEP \ + MACRO(4, CONTEXT, _4) + +#define metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ + metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ + SEP \ + MACRO(5, CONTEXT, _5) + +#define metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ + metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ + SEP \ + MACRO(6, CONTEXT, _6) + +#define metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ + metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ + SEP \ + MACRO(7, CONTEXT, _7) + +#define metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ + metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ + SEP \ + MACRO(8, CONTEXT, _8) + +#define metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ + metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ + SEP \ + MACRO(9, CONTEXT, _9) + +#define metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ + metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ + SEP \ + MACRO(10, CONTEXT, _10) + +#define metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ + metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ + SEP \ + MACRO(11, CONTEXT, _11) + +#define metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ + metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ + SEP \ + MACRO(12, CONTEXT, _12) + +#define metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ + metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ + SEP \ + MACRO(13, CONTEXT, _13) + +#define metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ + metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ + SEP \ + MACRO(14, CONTEXT, _14) + +#define metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ + metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ + SEP \ + MACRO(15, CONTEXT, _15) + +#define metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ + metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ + SEP \ + MACRO(16, CONTEXT, _16) + +#define metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ + metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ + SEP \ + MACRO(17, CONTEXT, _17) + +#define metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ + metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ + SEP \ + MACRO(18, CONTEXT, _18) + +#define metamacro_foreach_cxt20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ + metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ + SEP \ + MACRO(19, CONTEXT, _19) + +// metamacro_foreach_cxt_recursive expansions +#define metamacro_foreach_cxt_recursive0(MACRO, SEP, CONTEXT) +#define metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) + +#define metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ + metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) \ + SEP \ + MACRO(1, CONTEXT, _1) + +#define metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ + metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ + SEP \ + MACRO(2, CONTEXT, _2) + +#define metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ + metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ + SEP \ + MACRO(3, CONTEXT, _3) + +#define metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ + metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ + SEP \ + MACRO(4, CONTEXT, _4) + +#define metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ + metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ + SEP \ + MACRO(5, CONTEXT, _5) + +#define metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ + metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ + SEP \ + MACRO(6, CONTEXT, _6) + +#define metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ + metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ + SEP \ + MACRO(7, CONTEXT, _7) + +#define metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ + metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ + SEP \ + MACRO(8, CONTEXT, _8) + +#define metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ + metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ + SEP \ + MACRO(9, CONTEXT, _9) + +#define metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ + metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ + SEP \ + MACRO(10, CONTEXT, _10) + +#define metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ + metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ + SEP \ + MACRO(11, CONTEXT, _11) + +#define metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ + metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ + SEP \ + MACRO(12, CONTEXT, _12) + +#define metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ + metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ + SEP \ + MACRO(13, CONTEXT, _13) + +#define metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ + metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ + SEP \ + MACRO(14, CONTEXT, _14) + +#define metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ + metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ + SEP \ + MACRO(15, CONTEXT, _15) + +#define metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ + metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ + SEP \ + MACRO(16, CONTEXT, _16) + +#define metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ + metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ + SEP \ + MACRO(17, CONTEXT, _17) + +#define metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ + metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ + SEP \ + MACRO(18, CONTEXT, _18) + +#define metamacro_foreach_cxt_recursive20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ + metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ + SEP \ + MACRO(19, CONTEXT, _19) + +// metamacro_for_cxt expansions +#define metamacro_for_cxt0(MACRO, SEP, CONTEXT) +#define metamacro_for_cxt1(MACRO, SEP, CONTEXT) MACRO(0, CONTEXT) + +#define metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt1(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(1, CONTEXT) + +#define metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(2, CONTEXT) + +#define metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(3, CONTEXT) + +#define metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(4, CONTEXT) + +#define metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(5, CONTEXT) + +#define metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(6, CONTEXT) + +#define metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(7, CONTEXT) + +#define metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(8, CONTEXT) + +#define metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(9, CONTEXT) + +#define metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(10, CONTEXT) + +#define metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(11, CONTEXT) + +#define metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(12, CONTEXT) + +#define metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(13, CONTEXT) + +#define metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(14, CONTEXT) + +#define metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(15, CONTEXT) + +#define metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(16, CONTEXT) + +#define metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(17, CONTEXT) + +#define metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(18, CONTEXT) + +#define metamacro_for_cxt20(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(19, CONTEXT) + +// metamacro_if_eq expansions +#define metamacro_if_eq0(VALUE) \ + metamacro_concat(metamacro_if_eq0_, VALUE) + +#define metamacro_if_eq0_0(...) __VA_ARGS__ metamacro_consume_ +#define metamacro_if_eq0_1(...) metamacro_expand_ +#define metamacro_if_eq0_2(...) metamacro_expand_ +#define metamacro_if_eq0_3(...) metamacro_expand_ +#define metamacro_if_eq0_4(...) metamacro_expand_ +#define metamacro_if_eq0_5(...) metamacro_expand_ +#define metamacro_if_eq0_6(...) metamacro_expand_ +#define metamacro_if_eq0_7(...) metamacro_expand_ +#define metamacro_if_eq0_8(...) metamacro_expand_ +#define metamacro_if_eq0_9(...) metamacro_expand_ +#define metamacro_if_eq0_10(...) metamacro_expand_ +#define metamacro_if_eq0_11(...) metamacro_expand_ +#define metamacro_if_eq0_12(...) metamacro_expand_ +#define metamacro_if_eq0_13(...) metamacro_expand_ +#define metamacro_if_eq0_14(...) metamacro_expand_ +#define metamacro_if_eq0_15(...) metamacro_expand_ +#define metamacro_if_eq0_16(...) metamacro_expand_ +#define metamacro_if_eq0_17(...) metamacro_expand_ +#define metamacro_if_eq0_18(...) metamacro_expand_ +#define metamacro_if_eq0_19(...) metamacro_expand_ +#define metamacro_if_eq0_20(...) metamacro_expand_ + +#define metamacro_if_eq1(VALUE) metamacro_if_eq0(metamacro_dec(VALUE)) +#define metamacro_if_eq2(VALUE) metamacro_if_eq1(metamacro_dec(VALUE)) +#define metamacro_if_eq3(VALUE) metamacro_if_eq2(metamacro_dec(VALUE)) +#define metamacro_if_eq4(VALUE) metamacro_if_eq3(metamacro_dec(VALUE)) +#define metamacro_if_eq5(VALUE) metamacro_if_eq4(metamacro_dec(VALUE)) +#define metamacro_if_eq6(VALUE) metamacro_if_eq5(metamacro_dec(VALUE)) +#define metamacro_if_eq7(VALUE) metamacro_if_eq6(metamacro_dec(VALUE)) +#define metamacro_if_eq8(VALUE) metamacro_if_eq7(metamacro_dec(VALUE)) +#define metamacro_if_eq9(VALUE) metamacro_if_eq8(metamacro_dec(VALUE)) +#define metamacro_if_eq10(VALUE) metamacro_if_eq9(metamacro_dec(VALUE)) +#define metamacro_if_eq11(VALUE) metamacro_if_eq10(metamacro_dec(VALUE)) +#define metamacro_if_eq12(VALUE) metamacro_if_eq11(metamacro_dec(VALUE)) +#define metamacro_if_eq13(VALUE) metamacro_if_eq12(metamacro_dec(VALUE)) +#define metamacro_if_eq14(VALUE) metamacro_if_eq13(metamacro_dec(VALUE)) +#define metamacro_if_eq15(VALUE) metamacro_if_eq14(metamacro_dec(VALUE)) +#define metamacro_if_eq16(VALUE) metamacro_if_eq15(metamacro_dec(VALUE)) +#define metamacro_if_eq17(VALUE) metamacro_if_eq16(metamacro_dec(VALUE)) +#define metamacro_if_eq18(VALUE) metamacro_if_eq17(metamacro_dec(VALUE)) +#define metamacro_if_eq19(VALUE) metamacro_if_eq18(metamacro_dec(VALUE)) +#define metamacro_if_eq20(VALUE) metamacro_if_eq19(metamacro_dec(VALUE)) + +// metamacro_if_eq_recursive expansions +#define metamacro_if_eq_recursive0(VALUE) \ + metamacro_concat(metamacro_if_eq_recursive0_, VALUE) + +#define metamacro_if_eq_recursive0_0(...) __VA_ARGS__ metamacro_consume_ +#define metamacro_if_eq_recursive0_1(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_2(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_3(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_4(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_5(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_6(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_7(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_8(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_9(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_10(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_11(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_12(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_13(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_14(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_15(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_16(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_17(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_18(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_19(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_20(...) metamacro_expand_ + +#define metamacro_if_eq_recursive1(VALUE) metamacro_if_eq_recursive0(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive2(VALUE) metamacro_if_eq_recursive1(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive3(VALUE) metamacro_if_eq_recursive2(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive4(VALUE) metamacro_if_eq_recursive3(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive5(VALUE) metamacro_if_eq_recursive4(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive6(VALUE) metamacro_if_eq_recursive5(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive7(VALUE) metamacro_if_eq_recursive6(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive8(VALUE) metamacro_if_eq_recursive7(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive9(VALUE) metamacro_if_eq_recursive8(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive10(VALUE) metamacro_if_eq_recursive9(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive11(VALUE) metamacro_if_eq_recursive10(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive12(VALUE) metamacro_if_eq_recursive11(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive13(VALUE) metamacro_if_eq_recursive12(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive14(VALUE) metamacro_if_eq_recursive13(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive15(VALUE) metamacro_if_eq_recursive14(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive16(VALUE) metamacro_if_eq_recursive15(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive17(VALUE) metamacro_if_eq_recursive16(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive18(VALUE) metamacro_if_eq_recursive17(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive19(VALUE) metamacro_if_eq_recursive18(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive20(VALUE) metamacro_if_eq_recursive19(metamacro_dec(VALUE)) + +// metamacro_take expansions +#define metamacro_take0(...) +#define metamacro_take1(...) metamacro_head(__VA_ARGS__) +#define metamacro_take2(...) metamacro_head(__VA_ARGS__), metamacro_take1(metamacro_tail(__VA_ARGS__)) +#define metamacro_take3(...) metamacro_head(__VA_ARGS__), metamacro_take2(metamacro_tail(__VA_ARGS__)) +#define metamacro_take4(...) metamacro_head(__VA_ARGS__), metamacro_take3(metamacro_tail(__VA_ARGS__)) +#define metamacro_take5(...) metamacro_head(__VA_ARGS__), metamacro_take4(metamacro_tail(__VA_ARGS__)) +#define metamacro_take6(...) metamacro_head(__VA_ARGS__), metamacro_take5(metamacro_tail(__VA_ARGS__)) +#define metamacro_take7(...) metamacro_head(__VA_ARGS__), metamacro_take6(metamacro_tail(__VA_ARGS__)) +#define metamacro_take8(...) metamacro_head(__VA_ARGS__), metamacro_take7(metamacro_tail(__VA_ARGS__)) +#define metamacro_take9(...) metamacro_head(__VA_ARGS__), metamacro_take8(metamacro_tail(__VA_ARGS__)) +#define metamacro_take10(...) metamacro_head(__VA_ARGS__), metamacro_take9(metamacro_tail(__VA_ARGS__)) +#define metamacro_take11(...) metamacro_head(__VA_ARGS__), metamacro_take10(metamacro_tail(__VA_ARGS__)) +#define metamacro_take12(...) metamacro_head(__VA_ARGS__), metamacro_take11(metamacro_tail(__VA_ARGS__)) +#define metamacro_take13(...) metamacro_head(__VA_ARGS__), metamacro_take12(metamacro_tail(__VA_ARGS__)) +#define metamacro_take14(...) metamacro_head(__VA_ARGS__), metamacro_take13(metamacro_tail(__VA_ARGS__)) +#define metamacro_take15(...) metamacro_head(__VA_ARGS__), metamacro_take14(metamacro_tail(__VA_ARGS__)) +#define metamacro_take16(...) metamacro_head(__VA_ARGS__), metamacro_take15(metamacro_tail(__VA_ARGS__)) +#define metamacro_take17(...) metamacro_head(__VA_ARGS__), metamacro_take16(metamacro_tail(__VA_ARGS__)) +#define metamacro_take18(...) metamacro_head(__VA_ARGS__), metamacro_take17(metamacro_tail(__VA_ARGS__)) +#define metamacro_take19(...) metamacro_head(__VA_ARGS__), metamacro_take18(metamacro_tail(__VA_ARGS__)) +#define metamacro_take20(...) metamacro_head(__VA_ARGS__), metamacro_take19(metamacro_tail(__VA_ARGS__)) + +// metamacro_drop expansions +#define metamacro_drop0(...) __VA_ARGS__ +#define metamacro_drop1(...) metamacro_tail(__VA_ARGS__) +#define metamacro_drop2(...) metamacro_drop1(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop3(...) metamacro_drop2(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop4(...) metamacro_drop3(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop5(...) metamacro_drop4(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop6(...) metamacro_drop5(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop7(...) metamacro_drop6(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop8(...) metamacro_drop7(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop9(...) metamacro_drop8(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop10(...) metamacro_drop9(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop11(...) metamacro_drop10(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop12(...) metamacro_drop11(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop13(...) metamacro_drop12(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop14(...) metamacro_drop13(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop15(...) metamacro_drop14(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop16(...) metamacro_drop15(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop17(...) metamacro_drop16(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop18(...) metamacro_drop17(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop19(...) metamacro_drop18(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop20(...) metamacro_drop19(metamacro_tail(__VA_ARGS__)) + +#endif diff --git a/Pods/SocketRocket/SocketRocket/SRWebSocket.m b/Pods/SocketRocket/SocketRocket/SRWebSocket.m index db5039ac..3c941379 100644 --- a/Pods/SocketRocket/SocketRocket/SRWebSocket.m +++ b/Pods/SocketRocket/SocketRocket/SRWebSocket.m @@ -461,7 +461,7 @@ - (void)_HTTPHeadersDidFinish; if (responseCode >= 400) { SRFastLog(@"Request failed with response code %d", responseCode); - [self _failWithError:[NSError errorWithDomain:@"org.lolrus.SocketRocket" code:2132 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"received bad response code from server %ld", (long)responseCode] forKey:NSLocalizedDescriptionKey]]]; + [self _failWithError:[NSError errorWithDomain:@"org.lolrus.SocketRocket" code:2132 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"received bad response code from server %d", responseCode] forKey:NSLocalizedDescriptionKey]]]; return; } @@ -530,7 +530,7 @@ - (void)didConnect CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Upgrade"), CFSTR("websocket")); CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Connection"), CFSTR("Upgrade")); CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Sec-WebSocket-Key"), (__bridge CFStringRef)_secKey); - CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Sec-WebSocket-Version"), (__bridge CFStringRef)[NSString stringWithFormat:@"%ld", (long)_webSocketVersion]); + CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Sec-WebSocket-Version"), (__bridge CFStringRef)[NSString stringWithFormat:@"%d", _webSocketVersion]); CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Origin"), (__bridge CFStringRef)_url.SR_origin); @@ -876,7 +876,7 @@ - (void)_handleFrameWithData:(NSData *)frameData opCode:(NSInteger)opcode; [self handlePong]; break; default: - [self _closeWithProtocolError:[NSString stringWithFormat:@"Unknown opcode %ld", (long)opcode]]; + [self _closeWithProtocolError:[NSString stringWithFormat:@"Unknown opcode %d", opcode]]; // TODO: Handle invalid opcode break; } diff --git a/README.md b/README.md index 1d3e46bd..7b73f256 100644 --- a/README.md +++ b/README.md @@ -1,198 +1,261 @@ -# libPusher, an Objective-C client for Pusher +# libPusher -[![Build Status](https://travis-ci.org/lukeredpath/libPusher.png)](https://travis-ci.org/[YOUR_GITHUB_USERNAME]/[YOUR_PROJECT_NAME]) +[![Build Status](https://travis-ci.org/lukeredpath/libPusher.png)](https://travis-ci.org/lukeredpath/libPusher) -[Pusher](http://pusherapp.com/) is a hosted service that sits between your web application and the browser that lets you deliver events in real-time using HTML5 WebSockets. +An Objective-C client library for the [Pusher.com](http://pusher.com) real-time service. -This project was borne out of the idea that a web browser doesn't have to be the only client that receives your web app's real-time notifications. Why couldn't your iPhone, iPad or Mac OSX app receive real-time notifications either? +Pusher is a hosted service that sits between your web application and the browser that lets you deliver events in real-time using HTML5 WebSockets. -Apple provides its own push notification service which is great for getting alert-type notifications to your app's users whether or not they are using the app, but for real-time updates to data whilst they are using your app, hooking into your web app's existing event-dispatch mechanism is far less hassle (and is great if you want to be able to interact with other web services that might not have access to the APNS). +The libPusher API mirrors the Pusher Javascript client as closely as possible, with some allowances for Objective-C conventions. In particular, whilst the Javascript client uses event binding for all event handling, where events are pre-defined, libPusher uses the standard Cocoa delegation pattern. -## Installation instructions +## Example +Subscribe to the ```chat``` channel and bind to the ```new-message``` event. -The latest release is 1.4. A list of changes can be found in the [CHANGELOG](CHANGES.md). +``` +// self.client is a strong instance variable of class PTPusher +self.client = [PTPusher pusherWithKey:@"YOUR_API_KEY" delegate:self encrypted:YES]; + +// subscribe to channel and bind to event +PTPusherChannel *channel = [self.client subscribeToChannelNamed:@"chat"]; +[channel bindToEventNamed:@"new-message" handleWithBlock:^(PTPusherEvent *channelEvent) { + // channelEvent.data is a NSDictianary of the JSON object received + NSString *message = [channelEvent.data objectForKey:@"text"]; + NSLog(@"message received: %@", message); +}]; +``` -1.4 will be the final release of Pusher to support iOS 4. +## Installation -Important note: As of 1.3, libPusher no longer includes the JSONKit JSON parsing library. By default, libPusher now uses the native `NSJSONSerialization` class, only available on iOS 5.0 or OSX 10.7 and above. +Install using CocoaPods is recommended. -libPusher retains runtime support for JSONKit for those who still need to support older platforms - in order for this to work, you must manually link JSONKit yourself. +```ruby +pod 'libPusher', '~> 1.5' +``` -If you are using CocoaPods, this is as simple as explicitly adding JSONKit to your Podfile (previously, it would have been installed by CocoaPods as a libPusher dependency). +Import Pusher into the class that wants to make use of the library. -Detailed installation instructions can be found [in the wiki](https://github.com/lukeredpath/libPusher/wiki/Adding-libPusher-to-your-project). +```objc +#import +``` -## Getting started +A step-by-step guide on how to [install and setup CocoaPods]() to use libPusher without using CocoaPods is available on the wiki. -The libPusher API mirrors the [Pusher Javascript client](http://pusher.com/docs/client_api_guide) as closely as possible, with some allowances for Objective-C conventions. In particular, whilst the Javascript client uses event binding for all event handling, where events are pre-defined, libPusher uses the standard Cocoa delegation pattern. +## Usage -[Online API Documentation](http://lukeredpath.github.com/libPusher/) +**Note**: in the following examples, ```client``` is a strong property. The instance returned by the ```pusherWithKey:*:``` methods will be auto-released, according to standard Objective-C return conventions. You must retain the client otherwise it will be auto-released before anything useful happens causing silent failures and unexpected behaviour. -### Creating a new connection +### Create a client and connecting ```objc -client = [PTPusher pusherWithKey:@"YOUR-API-KEY" delegate:self]; +self.client = [PTPusher pusherWithKey:@"YOUR_API_KEY" delegate:self encrypted:YES]; + +[self.client connect]; ``` -When calling the above method, the connection will be established immediately. If you want to defer connection, you can do so: +Note that client's do not connect automatically (as of version 1.5) - you are responsible for calling connect as needed. + +It is recommended to implement the PTPusherDelegate protocol in order to be notified when significant connection events happen such as connection errors, disconnects and retries. + +---------- + +### Subscribe to channels + +Channels are a way of filtering the events you want your application to receive. In addition, private and presence channels can be used to control access to events and in the case of presence channels, see who else is subscribing to events. For more information on channels, see the Pusher documentation. + +There is no need to wait for the client to establish a connection before subscribing. You can subscribe to a channel immediately and any subscriptions will be created once the connection has connected. + +#### Subscribing to public channels ```objc -client = [PTPusher pusherWithKey:@"YOUR-API-KEY" connectAutomatically:NO]; +PTPusherChannel *channel = [self.client subscribeToChannelNamed:@"chat"]; ``` -When you are ready to connect: +#### Subscribing to private channels + +This method will add the appropriate ```private-``` prefix to the channel name for you and return a channel cast to the correct PTPusherChannel subclass PTPusherPrivateChannel. + +Subscribing to private channels needs server-side authorisation. See section [Channel Authorisation](#channel-auth) for details. ```objc -[client connect] +// subscribe to private-chat channel +PTPusherPrivateChannel *private = [self.client subscribeToPrivateChannelNamed:@"chat"]; ``` -Note: in the above examples, `client` is a `strong` instance variable. The instance returned by `pusherWithKey:*:` factory methods will be auto-released, according to standard Objective-C return conventions. You *must* retain the client otherwise it will be auto-released before anything useful happens causing silent failures and unexpected behaviour. +#### Subscribing to presence channels -It is recommend you assign a delegate to the Pusher client as this will enable you to be notified when significant connection events happen such as connection errors, disconnects and retries. +This method will add the appropriate ```presence-``` prefix to the channel name for you and return a channel cast to the correct PTPusherChannel subclass PTPusherPresenceChannel. -### Binding to events +Subscribing to presence channels needs server-side authorisation. See section [Channel Authorisation](#channel-auth) for details. + +```objc +// subscribe to presence-chat channel +PTPusherPresenceChannel *presence = [client subscribeToPresenceChannelNamed:@"chat" delegate:self]; +``` -Once you have created an instance of the Pusher client, you can set up event bindings; there is no need to wait for the connection to be established. +It is recommended to implement ```PTPusherPresenceChannelDelegate``` protocol, to receive notifications for members subscribing or unsubscribing from the presence channel. -When you bind to events on the client, you will receive all events with that name, regardless of the channel from which they originated. +### Accessing subscribed channels -There are two ways of creating bindings to events. You can bind to events using the standard target/action mechanism: +You can use the `channelNamed:` method to retrieve an existing subscribed channel. If you have not subscribed to the requested channel, it will return `nil`. ```objc -[client bindToEventNamed:@"something-happened" target:self action:@selector(handleEvent:)]; +// get the 'chat' channel that you've already subscribed to +PTPusherChannel *channel = [self.client channelNamed:@"chat"]; ``` -Or you can bind to events using blocks: +### Unsubscribe from channels + +If you no longer want to receive event over a channel, you can unsubscribe. ```objc -[client bindToEventNamed:@"something-happened" handleWithBlock:^(PTPusherEvent *event) { - // do something with event -}]; +PTPusherChannel *channel = [self.client channelNamed:@"chat"]; +[channel unsubscribe]; ``` -### Removing bindings +### Channel object lifetime + +When the Pusher client disconnects, all subscribed channels are implicitly unsubscribed (`isSubscribed` will return NO), however the channel objects will persist and so will any event bindings. -Prior to 1.2, there was no way of removing bindings. This resulted in a potential memory issue as when a binding was created a special event listener object was created internally which would, in the case of target/action bindings, retain the target. There was no way of getting at this listener object - the listener was retained by the event dispatcher of either the `PTPusherChannel` or `PTPusher` instance that you had binded to. +When the client reconnects, all previously subscribed channels will be resubcribed (which might involve another authentication request for any private/presence channels) and your existing event bindings will continue working as they did prior to the disconnection. -In 1.2, the way listeners were retained was changed. Now, each binding creates a `PTPusherEventBinding` object and it is this object that retains the event listener object and the event dispatcher would retain a collection of binding objects instead. Additionally, all binding methods now return the `PTPusherEventBinding` instance, which means an object can keep track of all of it's bindings and remove them at a later date (for instance, in `dealloc`). +If you explicitly unsubscribe from a channel, **all event bindings will be removed and the client will remove the channel object from it's list of subscribed channels**. If no other code has a strong reference to the channel object, it will be deallocated. If you resubscribe to the channel, a new channel object will be created. You should bear this in mind if you maintain any strong references to a channel object in your application code. -Removing a binding is as simple as storing a reference to the binding object, then passing that as an argument to `removeBinding:` some time later. +### Channel authorisation + +Private and presence channels require server-side authorisation before they can connect. + +**Note**: Make sure your server responds correctly to the authentication request. See the [authentication signature](http://pusher.com/docs/auth_signatures) and [user authentication](http://pusher.com/docs/authenticating_users) docs for details and examples on how to implement authorization on the server side. + +In order to connect to a private or presence channel, you first need to configure your server authorisation URL. ```objc -- (void)viewDidLoad -{ - self.myControllerBinding = [client bindToEventNamed:@"some-event" target:self action:@selector(handleSomeEvent:)]; -{ +self.client.authorizationURL = [NSURL URLWithString:@"http://www.yourserver.com/authorise"]; +``` + +When you attempt to connect to a private or presence channel, libPusher will make a form-encoded POST request to the above URL, passing along the ```socket_id``` and ```channel_name``` as parameters. Prior to sending the request, the Pusher delegate will be notified, passing in the channel and the NSMutableURLRequest instance that will be sent. + +Its up to you to configure the request to handle whatever authentication mechanism you are using. In this example, we simply set a custom header with a token which the server will use to authenticate the user before proceeding with authorisation. -- (void)dealloc +```objc +- (void)pusher:(PTPusher *)pusher willAuthorizeChannel:(PTPusherChannel *)channel withRequest:(NSMutableURLRequest *)request { - if(self.myControllerBinding) { - [client removeBinding:self.myControllerBinding]; - } + [request setValue:@"some-authentication-token" forHTTPHeaderField:@"X-MyCustom-AuthTokenHeader"]; } ``` -## Working with channels - -Channels are a way of filtering the events you want your application to receive. In addition, private and presence channels can be used to control access to events and in the case of presence channels, see who else is subscribing to events. For more information on channels, [see the Pusher documentation](http://pusher.com/docs/client_api_guide/client_channels). +---------- -### Subscribing and unsubscribing +### Binding to events -Channels of any type can be subscribed to using the method `subscribeToChannelNamed:`. When subscribing to private or presence channels, it's important to remember to add the appropriate channel name prefix. +There are generally two ways to bind to events: Binding to an event on the PTPusher client itself or binding to a specific channel. -You do not need to wait for the client to establish a connection before subscribing; you can subscribe immediately and any subscriptions will be created once the connection has connected. +Two types of direct binding are supported: target/action and block-based bindings. The examples below using block-based bindings. -Subscribing to a public channel: +#### Binding to a channel -```objc -PTPusherChannel *channel = [client subscribeToChannelNamed:@"my-public-channel"]; -``` +Once you have created an instance of PTPusherChannel, you can set up event bindings. There is no need to wait for the PTPusher client connection to be established or the channel to be subscribed. -Subscribing to a private channel using the appropriate prefix: +When you bind to events on a single channel, you will only receive events with that name if they are sent over this channel. ```objc -PTPusherChannel *private = [client subscribeToChannelNamed:@"private-channel"]; +PTPusherChannel *channel = [self.client subscribeToChannelNamed:@"chat"]; +[channel bindToEventNamed:@"new-message" handleWithBlock:^(PTPusherEvent *channelEvent) { + // channelEvent.data is a NSDictionary of the JSON object received +}]; ``` -As a convenience, two methods are provided specifically for subscribing to private and presence channels. These methods will add the appropriate prefix to the channel name for you and return a channel cast to the correct PTPusherChannel sub-class. You can also set a presence delegate for presence channels using this API. +#### Binding directly to the client -Subcribing to a private channel without the prefix: +When you bind to events on the client, you will receive all events with that name, regardless of the channel from which they originated. ```objc -PTPusherPrivateChannel *private = [client subscribeToPrivateChannelNamed:@"demo"]; +[self.client bindToEventNamed:@"new-message" handleWithBlock:^(PTPusherEvent *event) { + // event.data is a NSDictionary of the JSON object received +}]; ``` -Subscribing to a presence channel without the prefix, with a presence delegate: +#### Remove bindings -```objc -PTPusherPresenceChannel *presence = [client subscribeToPresenceChannelNamed:@"chat" delegate:self]; -``` +If you no longer want to receive events with a specific name, you can remove the binding. Removing a binding is as simple as storing a reference to the binding object, then passing that as an argument to ```removeBinding:``` at a later point. -Any channel that has been previously subscribed to can be retrieved (without re-subscribing) using the `channelNamed:` method. +**Note:** Binding objects are owned by the client or channel that they relate to and will exist for the lifetime of the binding. For this reason, you generally only need to store a weak reference to the binding object in order to remove the binding. In the event that something else removes the binding (perhaps as a result of calling `removeAllBindings` or explicitly unsubscribing from the channel), the weak reference will ensure that the binding object will become nil, so you should check this before calling `removeBinding:`. ```objc -PTPusherChannel *channel = [client channelNamed:@"my-channel"]; -``` - -You can also unsubcribe from channels: +// _binding is a weak reference +_binding = [self.client bindToEventNamed:@"new-message" target:self action:@selector(handleEvent:)]; -```objc -[client unsubscribeFromChannel:channel]; +// check that nothing else has removed the binding already +if (_binding) { + [self.client removeBinding:_binding]; +} ``` -### Channel authorisation +#### Memory management considerations for block-based bindings -Private and presence channels require server-side authorisation before they can connect. Because the Javascript client library runs in the browser, it assumes the presence of an existing server-side session and simply makes an AJAX POST to the server. The server then uses the existing server session cookie to authorise the subscription request. +Similar caveats apply to block-based bindings as they do to using block based `NSNotificationCenter` observers, i.e. when referencing `self` in your event handler block, it is possible in some situations to create retain cycles or prevent `self` from being deallocated. -When using libPusher in your iOS apps, there is no existing session, so you will need an alternative means of authenticating a user; possible means of authentication could be HTTP Basic Authentication or some kind of token-based authentication. +When you reference `self` in your event handler block, the block will retain a strong reference to `self`. This means that `self` will never be deallocated until the binding (and in turn the event handler block) is destroyed by removing the binding. For this reason, you should be wary about removing event bindings in `dealloc` methods as `dealloc` will never be called if the binding references `self`. -In order to connect to a private or presence channel, you first need to configure your server authorisation URL. +For example, you might push a `UIViewController` on to a `UINavigationController` stack, then create an event binding in that view controller's `viewDidAppear:` method: ```objc -pusher.authorizationURL = [NSURL URLWithString:@"http://www.yourserver.com/authorise"]; +- (void)viewDidAppear:(BOOL)animated +{ + // _binding is a weak instance variable + _binding = [self.client bindToEventNamed:@"new-message" handleWithBlock:^(PTPusherEvent *event) { + [self doSomethingWithEvent:event]; + }]; +} ``` -When you attempt to connect to a private or presence channel, libPusher will make a form-encoded POST request to the above URL, passing along the socket ID and channel name as parameters. Prior to sending the request, the Pusher delegate will be notified, passing in the NSMutableURLRequest instance that will be sent. +If you were to then pop that view controller off the navigation stack without removing the event binding, because the binding block has a strong reference to `self`, the view controller will never be deallocated and you will have a memory leak. -It's at this point that you can configure the request to handle whatever authentication mechanism you are using. In this example, we simply set a custom header with a token which the server will use to authenticate the user before proceeding with authorisation. +You can handle this in one of two ways. The first is to ensure you remove the binding when in the corresponding `viewDidDisappear:` ```objc -- (void)pusher:(PTPusher *)pusher willAuthorizeChannelWithRequest:(NSMutableURLRequest *)request +- (void)viewDidDisappear:(BOOL)animated { - [request setValue:@"some-authentication-token" forHTTPHeaderField:@"X-MyCustom-AuthTokenHeader"]; + [self.client removeBinding:_binding]; } ``` -### Binding to channel events - -Binding to events on channels works in exactly the same way as binding to client events; the only difference is that you will only receive events with that are associated with that channel. - -```objc -PTPusherChannel *channel = [client subscribeToChannelNamed:@"demo"]; +The second, is to prevent a strong reference to `self` being captured in the first place: -[channel bindToEventNamed:@"channel-event" handleWithBlock:^(PTPusherEvent *channelEvent) { - // do something with channel event -}]; +````objc +- (void)viewDidAppear:(BOOL)animated +{ + __weak typeof(self) weakSelf = self; + + // _binding is a weak instance variable + _binding = [self.client bindToEventNamed:@"new-message" handleWithBlock:^(PTPusherEvent *event) { + __strong typeof(weakSelf) strongSelf = weakSelf; + [strongSelf doSomethingWithEvent:event]; + }]; +} ``` -## Binding to all events +Finally, if you reference `self` in a block and store a *strong* reference to the binding object, you will create a retain cycle (`self` -> `binding` -> `block` -> `self`). You should avoid keeping strong references to binding objects but if you really need to, you should ensure you only capture a weak reference to `self` in the block as in the above example. + +#### Binding to all events -Unlike the Javascript client, libPusher does not provide an explicit API for binding to all events from a client or channel. Instead, libPusher will publish a `NSNotification` for every event received. You can subscribe to all events for a client or channel by adding a notification observer. +In some cases it might be useful to bind to all events of a client or channel. +libPusher will publish a ```NSNotification``` for every event received. You can subscribe to all events for a client or channel by adding a notification observer. -Binding to all events using `NSNotificationCentre`: +Binding to all events using NSNotificationCenter: ```objc [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveEventNotification:) name:PTPusherEventReceivedNotification - object:client]; + object:self.client]; ``` Bind to all events on a single channel: ```objc -PTPusherChannel *channel = [client channelNamed:@"some-channel"]; +// get chat channel +PTPusherChannel *channel = [self.client channelNamed:@"chat"]; [[NSNotificationCenter defaultCenter] addObserver:self @@ -201,12 +264,12 @@ PTPusherChannel *channel = [client channelNamed:@"some-channel"]; object:channel]; ``` -The event can be retrieved in your callback from the notification's `userInfo` dictionary. The notification's `object` will be either the client or channel from which the event originated. +The event can be retrieved in your callback from the notification's userInfo dictionary. The notification's object will be either the client or channel from which the event originated. -```objc -- (void)didReceiveEventNotification:(NSNotification *)note +``` +- (void)didReceiveEventNotification:(NSNotification *)notification { - PTPusherEvent *event = [note.userInfo objectForKey:PTPusherEventUserInfoKey]; + PTPusherEvent *event = [notification.userInfo objectForKey:PTPusherEventUserInfoKey]; } ``` @@ -214,76 +277,102 @@ The event can be retrieved in your callback from the notification's `userInfo` d The nature of a mobile device is that connections will come and go. There are a number of things you can do do ensure that your Pusher connection remains active for as long as you have a network connection and reconnects after network connectivity has been re-established. -The following examples use Apple's Reachability class (version 2.2) to check the network reachability status. Apple recommends that in most circumstances, you do not do any pre-flight checks and simply try and open a connection. This example follows this advice. +### Automatic reconnection behaviour -You can configure libPusher to automatically try and re-connect if it disconnects or it initially fails to connect. +libPusher will generally try and do it's best to keep you connected in most cases: -```objc -PTPusher *client = [PTPusher pusherWithKey:@"YOUR-API-KEY" delegate:self]; -client.reconnectAutomatically = YES; -client.reconnectDelay = 30; // defaults to 5 seconds -``` +* If the connection fails having been previously connected, the client will try and reconnect immediately. +* If the connection disconnects with a Pusher error code in the range 4200-4299, the client will try and reconnect immediately. +* If the connection disconnects with a Pusher error code in the range 4100-4199, the client will try and reconnect with a linear back-off delay. +* If the connection disconnects for an unknown reason, the client will try and reconnect after a configured delay (defaults to 5 seconds and can be changed using the `reconnectDelay` property). + +All automatic reconnection attempts will be repeated up to a maximum limit before giving up. + +Automatic reconnection will not happen in the following situations: + +* The connection fails on the initial attempt (i.e. not previously connected) +* The connection disconnects with a Pusher error code in the range 4000-4099 (indicating a client error, normally a misconfiguration) +* The maximum number of automatic reconnection attempts have been reached + +An error code in the range 4000-4099 generally indicates a client misconfiguration (e.g. invalid API key) or rate limiting. See the [Pusher protocol documentation](http://pusher.com/docs/pusher_protocol#error-codes) for more information. + +The other scenarios generally indicate that it is not currently possible to connect to the Pusher service - this might be because of an issue with the service but more likely is that there simply isn't an internet connection. + +### Handling disconnections + +If the client fails to connect at all, the delegate method `pusher:connection:failedWithError:` will be called and no automatic reconnection will be attempted. + +If the client disconnects, the delegate method `pusher:connection:didDisconnectWithError:willAttemptReconnect:` will be called. If `willAttemptReconnect` is `YES`, you don't have any further work to do. + +If `willAttemptReconnect` is `NO`, you should first check the error to see if there is a client misconfiguration. If the client is refusing to automatically reconnect due to a Pusher error code, the `NSError` will have a domain of `PTPusherFatalErrorDomain`. -What you don't want to do is keep on blindly trying to reconnect if there is no available network and therefore no possible way a connection could be successful. You should implement the `PTPusherDelegate` methods `pusher:connectionDidDisconnect:` and `pusher:connection:didFailWithError:`. +How you handle disconnections is up to you, but the general idea is to check if there is network connectivity and if there is not, wait until there is before reconnecting. + +#### Example: handling disconnections using the Reachability library + +In this example, we first check for any fatal Pusher errors, before using Reachability to wait for an internet connection to become available before manually reconnecting. ```objc -- (void)pusher:(PTPusher *)client connectionDidDisconnect:(PTPusherConnection *)connection +- (void)pusher:(PTPusher *)pusher connection:(PTPusherConnection *)connection failedWithError:(NSError *)error { - Reachability *reachability = [Reachability reachabilityForInternetConnection]; - - if ([reachability currentReachabilityStatus] == NotReachable) { - // there is no point in trying to reconnect at this point - client.reconnectAutomatically = NO; - - // start observing the reachability status to see when we come back online - [[NSNotificationCenter defaultCenter] - addObserver:self - selector:@selector(reachabilityChanged:) - name:kReachabilityChangedNotification] - object:reachability]; - - [reachability startNotifier]; + [self handleDisconnectionWithError:error]; +} + +- (void)pusher:(PTPusher *)pusher connection:(PTPusherConnection *)connection didDisconnectWithError:(NSError *)error willAttemptReconnect:(BOOL)willAttemptReconnect +{ + if (!willAttemptReconnect) { + [self handleDisconnectionWithError:error]; } } ``` -The implementation of `pusher:connection:didFailWithError:` will look similar to the above although you may wish to do some further checking of the error. - -Now you simply need to wait for the network to become reachable again; it's no guarantee that you will be able to establish a connection but it is an indicator that it would be reasonable to try again. +The implementation of `handleDisconnectionWithError` performs the error check and waits for Reachability to change: ```objc -- (void)reachabilityChanged:(NSNotification *)note +- (void)handleDisconnectionWithError:(NSError *)error { - Reachability *reachability = note.object; + Reachability *reachability = [Reachability reachabilityWithHostname:self.client.connection.URL.host]; - if ([reachability currentReachabilityStatus] != NotReachable) { - // we seem to have some kind of network reachability, so try again - PTPusher *pusher = <# get the pusher instance #> - [pusher connect]; - - // we can stop observing reachability changes now - [[NSNotificationCenter defaultCenter] removeObserver:self]; - [reachability stopNotifier]; - - // re-enable auto-reconnect - pusher.reconnectAutomatically = YES; + if (error && [error.domain isEqualToString:PTPusherFatalErrorDomain]) { + NSLog(@"FATAL PUSHER ERROR, COULD NOT CONNECT! %@", error); + } + else { + if ([reachability isReachable]) { + // we do have reachability so let's wait for a set delay before trying again + [self.client performSelector:@selector(connect) withObject:nil afterDelay:5]; + } + else { + // we need to wait for reachability to change + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_reachabilityChanged:) + name:kReachabilityChangedNotification + object:reachability]; + + [reachability startNotifier]; + } } } -``` -Finally, you may prefer to not turn on automatic reconnection immediately, but instead wait until you've successfully connected. You could do this by implementing the `pusher:connectionDidConnect:` delegate method: -```objc -- (void)pusher:(PTPusher *)client connectionDidConnect:(PTPusherConnection *)connection +- (void)_reachabilityChanged:(NSNotification *note) { - client.reconnectAutomatically = YES; + Reachability *reachability = [note object]; + + if ([reachability isReachable]) { + // we're reachable, we can try and reconnect, otherwise keep waiting + [self.client connect]; + + // stop watching for reachability changes + [reachability stopNotifier]; + + [[NSNotificationCenter defaultCenter] + removeObserver:self + name:kReachabilityChangedNotification + object:reachability]; + } } ``` -Doing it this way means you do not need to re-enable auto-reconnect in your Reachability notification handler as it will happen automatically once you have connected. - -If Pusher disconnects but Reachability indicates that the network is reachable, it is possible that there is a problem with the Pusher service. In this situation, you would be advised to simply allow libPusher to try and reconnect automatically (if you have enabled this). - -You may want to implement the `pusher:connectionWillReconnect:afterDelay:` delegate method and keep track of the number of retry attempts and gradually back off your retry attempts by increasing the reconnect delay after a number of retry attempts have failed. This stops you from constantly trying to connect to Pusher while it is experience issues. +For a more sophisticated implementation of handling client disconnections and to see how this integrates with a real application, you could take a look at the `ClientDisconnectionHandler` class in the [official Pusher iOS Diagnostics app](https://github.com/pusher/pusher-test-iOS/). ## License diff --git a/Rakefile b/Rakefile index 49e7e2f0..cbed89ec 100644 --- a/Rakefile +++ b/Rakefile @@ -38,10 +38,9 @@ task :docs => "docs:generate" namespace :docs do def appledoc_cmd(output_dir) "appledoc \ - -t /usr/local/Cellar/appledoc/2.0.4/Templates \ + -t /usr/local/Cellar/appledoc/2.0.5/Templates \ --no-search-undocumented-doc \ --keep-intermediate-files \ - --verbose 1 \ --docset-feed-url http://lukeredpath.github.com/libPusher/%DOCSETATOMFILENAME \ --docset-package-url http://lukeredpath.github.com/libPusher/%DOCSETPACKAGEFILENAME \ --publish-docset \ @@ -233,7 +232,7 @@ namespace :test do desc "Run unit tests" task :run => 'xcode:cleanbuild' do - sh "bundle exec ios-sim-test logic --workspace=libPusher.xcworkspace --scheme=UnitTests" + sh "bundle exec ios-sim-test logic --workspace=libPusher.xcworkspace --scheme=UnitTests --configuration=Debug" end end diff --git a/ReactiveExtensions/PTPusher+ReactiveExtensions.h b/ReactiveExtensions/PTPusher+ReactiveExtensions.h new file mode 100644 index 00000000..ef1510ff --- /dev/null +++ b/ReactiveExtensions/PTPusher+ReactiveExtensions.h @@ -0,0 +1,49 @@ +// +// PTPusher+ReactiveExtensions.h +// libPusher +// +// Created by Luke Redpath on 27/11/2013. +// +// + +#import +#import "PTPusher.h" +#import "PTPusherChannel+ReactiveExtensions.h" + +/** Reactive extensions for Pusher provide an alternative means of binding to events, + * using ReactiveCocoa signals. + * + * Warning: if you are using ReactiveExtensions, you should be careful when using the method + * removeAllBindings as this will remove any underlying bindings being used by the signal, + * which means the signal will no longer emit events. + */ +@interface PTPusher (ReactiveExtensions) + +/** Returns a signal that emits events of the given type as they arrive on any channel. + * + * Each call to eventsOfType: returns a new RACSignal - you can keep a reference to a single + * signal and re-use it. + * + * Internally, an event binding (PTPusherEventBinding) is created per-subscriber. The binding + * will be safely removed when the subscription is disposed of. + */ +- (RACSignal *)eventsOfType:(NSString *)eventName; + +/** Returns a signal that emits all events on any channel. + * + * IMPORTANT NOTE: the allEvents signal is based on notifications that are fired by the + * Pusher client. Because notification signals are inifinite (i.e. they do not complete), + * there is no way for subscriptions to be disposed of automatically. + * + * If you use this method, you are responsible for keeping track of any disposables when + * subscribing and disposing of them. + * + * If you simply wish to subscribe to events until the object that owns the subscription + * is deallocated (e.g. a view controller), you could use takeUntil: and the dealloc signal, + * for example: + * + * [[[channel allEvents] takeUntil:[self rac_deallocSignal]] subscribeNext:...] + */ +- (RACSignal *)allEvents; + +@end diff --git a/ReactiveExtensions/PTPusher+ReactiveExtensions.m b/ReactiveExtensions/PTPusher+ReactiveExtensions.m new file mode 100644 index 00000000..f1460dfa --- /dev/null +++ b/ReactiveExtensions/PTPusher+ReactiveExtensions.m @@ -0,0 +1,51 @@ +// +// PTPusher+ReactiveExtensions.m +// libPusher +// +// Created by Luke Redpath on 27/11/2013. +// +// + +#import "PTPusher+ReactiveExtensions.h" +#import "PTPusher+ReactiveExtensions_Internal.h" + +@implementation PTPusher (ReactiveExtensions) + +- (RACSignal *)eventsOfType:(NSString *)eventName +{ + return [[self class] signalForEvents:eventName onBindable:self]; +} + +- (RACSignal *)allEvents +{ + return [[self class] signalForAllEventsOnBindable:self]; +} + +@end + +@implementation PTPusher (ReactiveExtensionsInternal) + ++ (RACSignal *)signalForEvents:(NSString *)eventName onBindable:(id)bindable +{ + return [[RACSignal createSignal:^RACDisposable *(id subscriber) { + PTPusherEventBinding *binding = [bindable bindToEventNamed:eventName handleWithBlock:^(PTPusherEvent *event) { + [subscriber sendNext:event]; + }]; + + return [RACDisposable disposableWithBlock:^{ + [bindable removeBinding:binding]; + }]; + + }] setNameWithFormat:@"-eventsOfType:%@ onBindable:%@", eventName, bindable]; +} + ++ (RACSignal *)signalForAllEventsOnBindable:(id)bindable +{ + RACSignal *notifications = [[NSNotificationCenter defaultCenter] rac_addObserverForName:PTPusherEventReceivedNotification object:bindable]; + + return [[notifications map:^id(NSNotification *note) { + return note.userInfo[PTPusherEventUserInfoKey]; + }] setNameWithFormat:@"-allEvents onBindable:%@", bindable]; +} + +@end diff --git a/ReactiveExtensions/PTPusher+ReactiveExtensions_Internal.h b/ReactiveExtensions/PTPusher+ReactiveExtensions_Internal.h new file mode 100644 index 00000000..ee017a5a --- /dev/null +++ b/ReactiveExtensions/PTPusher+ReactiveExtensions_Internal.h @@ -0,0 +1,17 @@ +// +// PTPusherChannel_PTPusher_ReactiveExtensions_Internal_h.h +// libPusher +// +// Created by Luke Redpath on 27/11/2013. +// +// + +#import +#import "PTPusher.h" + +@interface PTPusher (ReactiveExtensionsInternal) + ++ (RACSignal *)signalForEvents:(NSString *)eventName onBindable:(id)bindable; ++ (RACSignal *)signalForAllEventsOnBindable:(id)bindable; + +@end diff --git a/ReactiveExtensions/PTPusherChannel+ReactiveExtensions.h b/ReactiveExtensions/PTPusherChannel+ReactiveExtensions.h new file mode 100644 index 00000000..f2015aa2 --- /dev/null +++ b/ReactiveExtensions/PTPusherChannel+ReactiveExtensions.h @@ -0,0 +1,22 @@ +// +// PTPusherChannel+ReactiveExtensions.h +// libPusher +// +// Created by Luke Redpath on 27/11/2013. +// +// + +#import +#import "PTPusherChannel.h" + +@interface PTPusherChannel (ReactiveExtensions) + +/** Returns a signal that emits events as they arrive this channel. + */ +- (RACSignal *)eventsOfType:(NSString *)eventName; + +/** Returns a signal that emits all events on this channel. + */ +- (RACSignal *)allEvents; + +@end diff --git a/ReactiveExtensions/PTPusherChannel+ReactiveExtensions.m b/ReactiveExtensions/PTPusherChannel+ReactiveExtensions.m new file mode 100644 index 00000000..05ec512c --- /dev/null +++ b/ReactiveExtensions/PTPusherChannel+ReactiveExtensions.m @@ -0,0 +1,24 @@ +// +// PTPusherChannel+ReactiveExtensions.m +// libPusher +// +// Created by Luke Redpath on 27/11/2013. +// +// + +#import "PTPusherChannel+ReactiveExtensions.h" +#import "PTPusher+ReactiveExtensions_Internal.h" + +@implementation PTPusherChannel (ReactiveExtensions) + +- (RACSignal *)eventsOfType:(NSString *)eventName +{ + return [PTPusher signalForEvents:eventName onBindable:self]; +} + +- (RACSignal *)allEvents +{ + return [PTPusher signalForAllEventsOnBindable:self]; +} + +@end diff --git a/Sample/Classes/NewEventViewController.m b/Sample/Classes/NewEventViewController.m index 9a923f84..ee316a4e 100644 --- a/Sample/Classes/NewEventViewController.m +++ b/Sample/Classes/NewEventViewController.m @@ -44,7 +44,7 @@ - (IBAction)sendEvent:(id)sender; - (IBAction)cancel:(id)sender { - [self dismissModalViewControllerAnimated:YES]; + [self dismissViewControllerAnimated:YES completion:nil]; } @end diff --git a/Sample/Classes/PusherEventsAppDelegate.m b/Sample/Classes/PusherEventsAppDelegate.m index 98518b99..963180d8 100644 --- a/Sample/Classes/PusherEventsAppDelegate.m +++ b/Sample/Classes/PusherEventsAppDelegate.m @@ -11,6 +11,7 @@ #import "Pusher.h" #import "NSMutableURLRequest+BasicAuth.h" #import "Reachability.h" +#import "PTPusher+ReactiveExtensions.h" // All events will be logged #define kLOG_ALL_EVENTS @@ -29,11 +30,9 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application self.pusherClient = [PTPusher pusherWithKey:PUSHER_API_KEY delegate:self encrypted:YES]; // log all events received, regardless of which channel they come from - [[NSNotificationCenter defaultCenter] - addObserver:self - selector:@selector(handlePusherEvent:) - name:PTPusherEventReceivedNotification - object:self.pusherClient]; + [[self.pusherClient allEvents] subscribeNext:^(PTPusherEvent *event) { + NSLog(@"[pusher] Received event %@", event); + }]; self.menuViewController.pusher = self.pusherClient; self.window.rootViewController = self.navigationController; @@ -43,14 +42,34 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application [self.pusherClient connect]; } -#pragma mark - Event notifications +#pragma mark - Reachability -- (void)handlePusherEvent:(NSNotification *)note +- (void)startReachabilityCheck { -#ifdef kLOG_ALL_EVENTS - PTPusherEvent *event = [note.userInfo objectForKey:PTPusherEventUserInfoKey]; - NSLog(@"[pusher] Received event %@", event); -#endif + // we probably have no internet connection, so lets check with Reachability + Reachability *reachability = [Reachability reachabilityWithHostname:self.pusherClient.connection.URL.host]; + + if ([reachability isReachable]) { + // we appear to have a connection, so something else must have gone wrong + NSLog(@"Internet reachable, reconnecting"); + [_pusherClient connect]; + } + else { + NSLog(@"Waiting for reachability"); + + [reachability setReachableBlock:^(Reachability *reachability) { + if ([reachability isReachable]) { + NSLog(@"Internet is now reachable"); + [reachability stopNotifier]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self.pusherClient connect]; + }); + } + }]; + + [reachability startNotifier]; + } } #pragma mark - PTPusherDelegate methods @@ -69,35 +88,11 @@ - (void)pusher:(PTPusher *)pusher connectionDidConnect:(PTPusherConnection *)con - (void)pusher:(PTPusher *)pusher connection:(PTPusherConnection *)connection failedWithError:(NSError *)error { NSLog(@"[pusher] Pusher Connection failed with error: %@", error); - if ([error.domain isEqualToString:(NSString *)kCFErrorDomainCFNetwork]) { - // we probably have no internet connection, so lets check with Reachability - Reachability *reachability = [Reachability reachabilityForInternetConnection]; - - if ([reachability isReachable]) { - // we appear to have a connection, so something else must have gone wrong - NSLog(@"Internet reachable, is Pusher down?"); - } - else { - NSLog(@"Waiting for reachability"); - - [reachability setReachableBlock:^(Reachability *reachability) { - if ([reachability isReachable]) { - NSLog(@"Internet is now reachable"); - [reachability stopNotifier]; - - dispatch_async(dispatch_get_main_queue(), ^{ - [pusher connect]; - }); - } - }]; - - [reachability startNotifier]; - } + [self startReachabilityCheck]; } } - - (void)pusher:(PTPusher *)pusher connection:(PTPusherConnection *)connection didDisconnectWithError:(NSError *)error willAttemptReconnect:(BOOL)willAttemptReconnect { NSLog(@"[pusher-%@] Pusher Connection disconnected with error: %@", pusher.connection.socketID, error); @@ -105,6 +100,11 @@ - (void)pusher:(PTPusher *)pusher connection:(PTPusherConnection *)connection di if (willAttemptReconnect) { NSLog(@"[pusher-%@] Client will attempt to reconnect automatically", pusher.connection.socketID); } + else { + if (![error.domain isEqualToString:PTPusherErrorDomain]) { + [self startReachabilityCheck]; + } + } } - (BOOL)pusher:(PTPusher *)pusher connectionWillAutomaticallyReconnect:(PTPusherConnection *)connection afterDelay:(NSTimeInterval)delay diff --git a/Sample/Classes/PusherEventsViewController.m b/Sample/Classes/PusherEventsViewController.m index db20f90e..001106c7 100644 --- a/Sample/Classes/PusherEventsViewController.m +++ b/Sample/Classes/PusherEventsViewController.m @@ -73,7 +73,7 @@ - (void)presentNewEventScreen; { NewEventViewController *newEventController = [[NewEventViewController alloc] init]; newEventController.delegate = self; - [self presentModalViewController:newEventController animated:YES]; + [self presentViewController:newEventController animated:YES completion:nil]; } - (void)sendEventWithMessage:(NSString *)message; @@ -83,7 +83,7 @@ - (void)sendEventWithMessage:(NSString *)message; // send the event after a short delay, wait for modal view to disappear [self performSelector:@selector(sendEvent:) withObject:payload afterDelay:0.3]; - [self dismissModalViewControllerAnimated:YES]; + [self dismissViewControllerAnimated:YES completion:nil]; } - (void)sendEvent:(id)payload; diff --git a/Sample/Classes/PusherExampleMenuViewController.m b/Sample/Classes/PusherExampleMenuViewController.m index ff3a2dfc..a7e93504 100644 --- a/Sample/Classes/PusherExampleMenuViewController.m +++ b/Sample/Classes/PusherExampleMenuViewController.m @@ -28,6 +28,12 @@ - (void)awakeFromNib [exampleTwo setObject:@"PusherPresenceEventsViewController" forKey:@"controllerClass"]; [options addObject:exampleTwo]; + NSMutableDictionary *exampleThree = [NSMutableDictionary dictionary]; + [exampleThree setObject:@"Reactive events" forKey:@"name"]; + [exampleThree setObject:@"Demonstrates using the ReactiveExtensions API." forKey:@"description"]; + [exampleThree setObject:@"ReactiveEventsViewController" forKey:@"controllerClass"]; + [options addObject:exampleThree]; + menuOptions = [options copy]; } diff --git a/Sample/Classes/PusherPresenceEventsViewController.m b/Sample/Classes/PusherPresenceEventsViewController.m index 2a2fb7eb..6a665b34 100644 --- a/Sample/Classes/PusherPresenceEventsViewController.m +++ b/Sample/Classes/PusherPresenceEventsViewController.m @@ -18,6 +18,9 @@ #import "PusherEventsAppDelegate.h" @interface PusherPresenceEventsViewController () +@property (nonatomic, strong) UIBarButtonItem *joinButtonItem; +@property (nonatomic, strong) UIBarButtonItem *leaveButtonItem; +@property (nonatomic, strong) NSMutableArray *members; @end @implementation PusherPresenceEventsViewController @@ -31,31 +34,48 @@ - (void)viewDidLoad self.title = @"Presence"; self.tableView.rowHeight = 55; + self.members = [NSMutableArray array]; - UIBarButtonItem *newClientButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Add Client" style:UIBarButtonItemStyleBordered target:self action:@selector(connectClient)]; - UIBarButtonItem *disconnectClientButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Remove Client" style:UIBarButtonItemStyleBordered target:self action:@selector(disconnectLastClient)]; - self.toolbarItems = [NSArray arrayWithObjects:newClientButtonItem, disconnectClientButtonItem, nil]; + self.joinButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Join" + style:UIBarButtonItemStyleBordered + target:self + action:@selector(joinChannel:)]; + + self.leaveButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Leave" + style:UIBarButtonItemStyleBordered + target:self + action:@selector(leaveChannel:)]; + + self.navigationItem.rightBarButtonItem = self.joinButtonItem; // configure the auth URL for private/presence channels self.pusher.authorizationURL = [NSURL URLWithString:@"http://localhost:9292/presence/auth"]; } -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - [self subscribeToPresenceChannel:@"demo"]; -} - - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; if ([self.currentChannel isSubscribed]) { - // unsubscribe before we go back to the main menu [self.currentChannel unsubscribe]; } } +- (void)joinChannel:(id)sender +{ + [self subscribeToPresenceChannel:@"demo"]; +} + +- (void)leaveChannel:(id)sender +{ + [self.currentChannel unsubscribe]; + self.currentChannel = nil; + + self.navigationItem.rightBarButtonItem = self.joinButtonItem; + + [self.members removeAllObjects]; + [self.tableView reloadData]; +} #pragma mark - Subscribing @@ -66,28 +86,40 @@ - (void)subscribeToPresenceChannel:(NSString *)channelName #pragma mark - Presence channel events -- (void)presenceChannel:(PTPusherPresenceChannel *)channel didSubscribeWithMemberList:(NSArray *)members +- (void)presenceChannelDidSubscribe:(PTPusherPresenceChannel *)channel { - NSLog(@"[pusher] Channel members: %@", members); + NSLog(@"[pusher] Channel members: %@", channel.members); + + self.navigationItem.rightBarButtonItem = self.leaveButtonItem; + + [channel.members enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { + [self.members addObject:obj]; + }]; + [self.tableView reloadData]; } -- (void)presenceChannel:(PTPusherPresenceChannel *)channel memberAddedWithID:(NSString *)memberID memberInfo:(NSDictionary *)memberInfo +- (void)presenceChannel:(PTPusherPresenceChannel *)channel memberAdded:(PTPusherChannelMember *)member { - NSLog(@"[pusher] Member joined channel: %@", memberInfo); + NSLog(@"[pusher] Member joined channel: %@", member); + + [self.members addObject:member]; [self.tableView beginUpdates]; - [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:[channel.memberIDs indexOfObject:memberID] inSection:0]] + [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:self.members.count-1 inSection:0]] withRowAnimation:UITableViewRowAnimationTop]; [self.tableView endUpdates]; } -- (void)presenceChannel:(PTPusherPresenceChannel *)channel memberRemovedWithID:(NSString *)memberID atIndex:(NSInteger)index +- (void)presenceChannel:(PTPusherPresenceChannel *)channel memberRemoved:(PTPusherChannelMember *)member { - NSLog(@"[pusher] Member left channel: %@", memberID); + NSLog(@"[pusher] Member left channel: %@", member); + + NSInteger memberIndex = [self.members indexOfObject:member]; + [self.members removeObject:member]; [self.tableView beginUpdates]; - [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:index inSection:0]] + [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:memberIndex inSection:0]] withRowAnimation:UITableViewRowAnimationTop]; [self.tableView endUpdates]; } @@ -96,7 +128,7 @@ - (void)presenceChannel:(PTPusherPresenceChannel *)channel memberRemovedWithID:( - (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section; { - return self.currentChannel.memberCount; + return self.currentChannel.members.count; } static NSString *EventCellIdentifier = @"EventCell"; @@ -107,11 +139,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:EventCellIdentifier]; } - NSString *memberID = [self.currentChannel.memberIDs objectAtIndex:indexPath.row]; - NSDictionary *memberInfo = [self.currentChannel infoForMemberWithID:memberID]; + PTPusherChannelMember *member = self.members[indexPath.row]; - cell.textLabel.text = [NSString stringWithFormat:@"Member: %@", memberID]; - cell.detailTextLabel.text = [NSString stringWithFormat:@"Name: %@ Email: %@", [memberInfo objectForKey:@"name"], [memberInfo objectForKey:@"email"]]; + cell.textLabel.text = [NSString stringWithFormat:@"Member: %@", member.userID]; + cell.detailTextLabel.text = [NSString stringWithFormat:@"Name: %@ Email: %@", member.userInfo[@"name"], member.userInfo[@"email"]]; return cell; } diff --git a/Sample/Classes/ReactiveEventsViewController.h b/Sample/Classes/ReactiveEventsViewController.h new file mode 100644 index 00000000..cc7d1693 --- /dev/null +++ b/Sample/Classes/ReactiveEventsViewController.h @@ -0,0 +1,17 @@ +// +// ReactiveEventsViewController.h +// libPusher +// +// Created by Luke Redpath on 27/11/2013. +// +// + +#import + +@class PTPusher; + +@interface ReactiveEventsViewController : UIViewController + +@property (nonatomic) PTPusher *pusher; + +@end diff --git a/Sample/Classes/ReactiveEventsViewController.m b/Sample/Classes/ReactiveEventsViewController.m new file mode 100644 index 00000000..11110e6b --- /dev/null +++ b/Sample/Classes/ReactiveEventsViewController.m @@ -0,0 +1,60 @@ +// +// ReactiveEventsViewController.m +// libPusher +// +// Created by Luke Redpath on 27/11/2013. +// +// + +#import "ReactiveEventsViewController.h" +#import "PTPusherAPI.h" +#import "Constants.h" +#import "Pusher.h" +#import "PTPusherChannel+ReactiveExtensions.h" + +#define UIColorFromRGBHexValue(rgbValue) [UIColor \ +colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ +green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ +blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] + +@interface ReactiveEventsViewController () +@property (nonatomic, weak) IBOutlet UITextField *textField; +@property (nonatomic, strong) PTPusherAPI *api; +@end + +@implementation ReactiveEventsViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + self.api = [[PTPusherAPI alloc] initWithKey:PUSHER_API_KEY appID:PUSHER_APP_ID secretKey:PUSHER_API_SECRET]; + + // subscribe to the channel + PTPusherChannel *colorChannel = [self.pusher subscribeToChannelNamed:@"colors"]; + + // Create a signal by mapping a channel events to a UIColor, converting the color string then a UIColor value + RACSignal *colorSignal = [[colorChannel eventsOfType:@"color"] map:^id(PTPusherEvent *event) { + NSScanner *scanner = [NSScanner scannerWithString:event.data[@"color"]]; + unsigned long long hexValue; + [scanner scanHexLongLong:&hexValue]; + return UIColorFromRGBHexValue(hexValue); + }]; + + // Bind the view's background color to colors as the arrivecol + RAC(self.view, backgroundColor) = colorSignal; + + + // log all events received on the channel using the allEvents signal + [[[colorChannel allEvents] takeUntil:[self rac_willDeallocSignal]] subscribeNext:^(PTPusherEvent *event) { + NSLog(@"[pusher] Received color event %@", event); + }]; +} + +- (IBAction)tappedSendButton:(id)sender +{ + // we set the socket ID to nil here as we want to receive our own events + [self.api triggerEvent:@"color" onChannel:@"colors" data:@{@"color": self.textField.text} socketID:nil]; +} + +@end diff --git a/Sample/ReactiveEventsViewController.xib b/Sample/ReactiveEventsViewController.xib new file mode 100644 index 00000000..4c9db76a --- /dev/null +++ b/Sample/ReactiveEventsViewController.xib @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Unit Tests/PTPusherChannelAuthorizationOperationSpec.m b/Unit Tests/PTPusherChannelAuthorizationOperationSpec.m index 7b58027a..307c0dbc 100644 --- a/Unit Tests/PTPusherChannelAuthorizationOperationSpec.m +++ b/Unit Tests/PTPusherChannelAuthorizationOperationSpec.m @@ -21,10 +21,12 @@ beforeEach(^{ NSURL *authURL = [NSURL URLWithString:@"http://example.com/authorize"]; - [OHHTTPStubs addRequestHandler:^OHHTTPStubsResponse *(NSURLRequest *request, BOOL onlyCheck) { + [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + return [request.URL isEqual:authURL]; + + } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { return [OHHTTPStubsResponse responseWithData:[NSJSONSerialization dataWithJSONObject:@{@"channel": @"test-channel"} options:0 error:nil] statusCode:200 - responseTime:0 headers:nil]; }]; @@ -58,10 +60,12 @@ beforeEach(^{ NSURL *authURL = [NSURL URLWithString:@"http://example.com/authorize"]; - [OHHTTPStubs addRequestHandler:^OHHTTPStubsResponse *(NSURLRequest *request, BOOL onlyCheck) { + [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + return [request.URL isEqual:authURL]; + + } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { return [OHHTTPStubsResponse responseWithData:nil statusCode:400 - responseTime:0 headers:nil]; }]; @@ -95,10 +99,12 @@ beforeEach(^{ NSURL *authURL = [NSURL URLWithString:@"http://example.com/authorize"]; - [OHHTTPStubs addRequestHandler:^OHHTTPStubsResponse *(NSURLRequest *request, BOOL onlyCheck) { + [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + return [request.URL isEqual:authURL]; + + } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { return [OHHTTPStubsResponse responseWithData:nil statusCode:200 - responseTime:0 headers:nil]; }]; @@ -136,10 +142,12 @@ beforeEach(^{ NSURL *authURL = [NSURL URLWithString:@"http://example.com/authorize"]; - [OHHTTPStubs addRequestHandler:^OHHTTPStubsResponse *(NSURLRequest *request, BOOL onlyCheck) { + [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + return [request.URL isEqual:authURL]; + + } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { return [OHHTTPStubsResponse responseWithData:[@"{malformed json" dataUsingEncoding:NSUTF8StringEncoding] statusCode:200 - responseTime:0 headers:nil]; }]; @@ -177,7 +185,10 @@ beforeEach(^{ NSURL *authURL = [NSURL URLWithString:@"http://example.com/authorize"]; - [OHHTTPStubs addRequestHandler:^OHHTTPStubsResponse *(NSURLRequest *request, BOOL onlyCheck) { + [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + return [request.URL isEqual:authURL]; + + } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { return [OHHTTPStubsResponse responseWithError:[NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCannotFindHost userInfo:nil]]; }]; diff --git a/Unit Tests/PTPusherMockConnectionSpec.m b/Unit Tests/PTPusherMockConnectionSpec.m index 7e4a4c04..8c581953 100644 --- a/Unit Tests/PTPusherMockConnectionSpec.m +++ b/Unit Tests/PTPusherMockConnectionSpec.m @@ -19,7 +19,7 @@ __block PTPusher *pusher; beforeEach(^{ - pusher = [[PTPusher alloc] initWithConnection:connection connectAutomatically:NO]; + pusher = [[PTPusher alloc] initWithConnection:connection]; }); it(@"handles connections and reports connected", ^{ @@ -48,7 +48,7 @@ it(@"simulates the correct response when subscribing to a private channel when auth bypass is enabled", ^{ [pusher enableChannelAuthorizationBypassMode]; [pusher connect]; - PTPusherChannel *channel = [pusher subscribeToPresenceChannelNamed:@"test-channel"]; + PTPusherChannel *channel = [pusher subscribeToPrivateChannelNamed:@"test-channel"]; [[theReturnValueOfBlock(^{ return theValue(channel.isSubscribed); }) shouldEventually] beTrue]; }); diff --git a/Unit Tests/PTPusherPresenceChannelSpec.m b/Unit Tests/PTPusherPresenceChannelSpec.m index 98bdecd7..498fc9c8 100644 --- a/Unit Tests/PTPusherPresenceChannelSpec.m +++ b/Unit Tests/PTPusherPresenceChannelSpec.m @@ -8,7 +8,9 @@ #import "SpecHelper.h" #import "PTPusherChannel.h" +#import "PTPusherChannel_Private.h" #import "PTPusherEvent.h" +#import "PTJSON.h" SPEC_BEGIN(PTPusherPresenceChannelSpec) @@ -23,29 +25,65 @@ [[channel.members should] beEmpty]; }); - context(@"when a memberAdded event is received", ^{ - it(@"adds the member from the event to its members", ^{ - NSDictionary *eventData = [NSDictionary dictionaryWithObjectsAndKeys:@"123", @"user_id", [NSDictionary dictionaryWithObject:@"Joe Bloggs" forKey:@"name"], @"user_info", nil]; - - PTPusherEvent *event = [[PTPusherEvent alloc] initWithEventName:@"pusher_internal:member_added" channel:channel.name data:eventData]; - - [channel dispatchEvent:event]; - - [[theReturnValueOfBlock(^{ return theValue(channel.memberCount); }) shouldEventually] equal:[NSNumber numberWithInt:1]]; + it(@"stores a reference to the subscriber's user ID on authorization", ^{ + NSDictionary *authData = @{@"channel_data": [[PTJSON JSONParser] JSONStringFromObject:@{@"user_id": @"12345"}]}; + [channel subscribeWithAuthorization:authData]; + [[channel.members.myID should] equal:@"12345"]; + }); + + it(@"updates the member list on subscribe", ^{ + NSDictionary *subscribeEventData = @{@"presence": @{ + @"count": @1, + @"hash": @{ + @"user-1": @{@"name": @"Joe"} + } + }}; - [[channel.memberIDs should] contain:@"123"]; - [[[[channel infoForMemberWithID:@"123"] objectForKey:@"name"] should] equal:@"Joe Bloggs"]; - }); - - it(@"adds an empty dictionary for the member if it has no info", ^{ - NSDictionary *eventData = [NSDictionary dictionaryWithObjectsAndKeys:@"123", @"user_id", nil]; - - PTPusherEvent *event = [[PTPusherEvent alloc] initWithEventName:@"pusher_internal:member_added" channel:channel.name data:eventData]; - - [channel dispatchEvent:event]; - - [[[channel infoForMemberWithID:@"123"] shouldEventually] equal:[NSDictionary dictionary]]; - }); + PTPusherEvent *subscribeEvent = [[PTPusherEvent alloc] initWithEventName:@"pusher_internal:subscription_succeeded" channel:channel.name data:subscribeEventData]; + [channel dispatchEvent:subscribeEvent]; + + [[theReturnValueOfBlock(^{ return theValue(channel.members.count); }) shouldEventually] equal:@1]; + }); + + it(@"can return the subscribed member after authorising and subscribing", ^{ + NSDictionary *authData = @{@"channel_data": [[PTJSON JSONParser] JSONStringFromObject:@{@"user_id": @"user-1"}]}; + [channel subscribeWithAuthorization:authData]; + + NSDictionary *subscribeEventData = @{@"presence": @{ + @"count": @1, + @"hash": @{ + @"user-1": @{@"name": @"Joe"} + } + }}; + + PTPusherEvent *subscribeEvent = [[PTPusherEvent alloc] initWithEventName:@"pusher_internal:subscription_succeeded" channel:channel.name data:subscribeEventData]; + [channel dispatchEvent:subscribeEvent]; + + [[theReturnValueOfBlock(^{ return channel.members.me; }) shouldEventually] haveValue:@"user-1" forKey:@"userID"]; + }); + + it(@"handles member_added events", ^{ + NSDictionary *eventData = @{@"user_id": @"123", @"user_info": @{@"name": @"Joe Bloggs"}}; + + PTPusherEvent *event = [[PTPusherEvent alloc] initWithEventName:@"pusher_internal:member_added" channel:channel.name data:eventData]; + [channel dispatchEvent:event]; + + [[theReturnValueOfBlock(^{ return theValue(channel.members.count); }) shouldEventually] equal:@1]; + [[[channel.members[@"123"] userInfo][@"name"] should] equal:@"Joe Bloggs"]; + }); + + it(@"handles member_removed events", ^{ + PTPusherEvent *memberAddedEvent = [[PTPusherEvent alloc] initWithEventName:@"pusher_internal:member_added" channel:channel.name data:@{@"user_id": @"123", @"user_info": @{@"name": @"Joe Bloggs"}}]; + [channel dispatchEvent:memberAddedEvent]; + + [[theReturnValueOfBlock(^{ return theValue(channel.members.count); }) shouldEventually] equal:@1]; + + PTPusherEvent *memberRemovedEvent = [[PTPusherEvent alloc] initWithEventName:@"pusher_internal:member_removed" channel:channel.name data:@{@"user_id": @"123"}]; + [channel dispatchEvent:memberRemovedEvent]; + + [[theReturnValueOfBlock(^{ return theValue(channel.members.count); }) shouldEventually] equal:@0]; + + [[channel.members[@"123"] should] beNil]; }); }); diff --git a/Unit Tests/PTPusherSpec.m b/Unit Tests/PTPusherSpec.m new file mode 100644 index 00000000..75bf1966 --- /dev/null +++ b/Unit Tests/PTPusherSpec.m @@ -0,0 +1,37 @@ +// +// PTPusherSpec.m +// libPusher +// +// Created by Luke Redpath on 26/11/2013. +// Copyright 2013 __MyCompanyName__. All rights reserved. +// + +#import "SpecHelper.h" +#import "PTPusher.h" +#import "PTPusherMockConnection.h" + +SPEC_BEGIN(PTPusherSpec) + +describe(@"PTPusher", ^{ + + __block PTPusher *pusher; + __block PTPusherConnection *mockConnection = [[PTPusherMockConnection alloc] init]; + + beforeEach(^{ + pusher = [[PTPusher alloc] initWithConnection:mockConnection]; + }); + + it(@"it allows the reconnectDelay to be configured but not less than 1 second", ^{ + pusher.reconnectDelay = 1; + [[@(pusher.reconnectDelay) should] equal:@1]; + + pusher.reconnectDelay = 5; + [[@(pusher.reconnectDelay) should] equal:@5]; + + pusher.reconnectDelay = 0; + [[@(pusher.reconnectDelay) should] equal:@1]; + }); + +}); + +SPEC_END diff --git a/libPusher-OSX/PusherSampleOSX/LRAppDelegate.h b/libPusher-OSX/PusherSampleOSX/LRAppDelegate.h deleted file mode 100644 index 29fc36f6..00000000 --- a/libPusher-OSX/PusherSampleOSX/LRAppDelegate.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// LRAppDelegate.h -// PusherSampleOSX -// -// Created by Luke Redpath on 05/02/2012. -// Copyright (c) 2012 LJR Software Limited. All rights reserved. -// - -#import -#import - -@class PTPusher; - -@interface LRAppDelegate : NSObject - -@property (assign) IBOutlet NSWindow *window; -@property (weak) IBOutlet NSTableView *eventsTableView; -@property (weak) IBOutlet NSArrayController *eventsController; -@property (weak) IBOutlet NSTextField *connectionStatus; - -@property (nonatomic, strong) NSMutableArray *events; -@property (nonatomic, strong) PTPusher *pusher; - -@end diff --git a/libPusher-OSX/PusherSampleOSX/LRAppDelegate.m b/libPusher-OSX/PusherSampleOSX/LRAppDelegate.m deleted file mode 100644 index 7f1f9696..00000000 --- a/libPusher-OSX/PusherSampleOSX/LRAppDelegate.m +++ /dev/null @@ -1,63 +0,0 @@ -// -// LRAppDelegate.m -// PusherSampleOSX -// -// Created by Luke Redpath on 05/02/2012. -// Copyright (c) 2012 LJR Software Limited. All rights reserved. -// - -#import "LRAppDelegate.h" -#import "Constants.h" -#import -#import -#import - -@implementation LRAppDelegate - -@synthesize window = _window; -@synthesize eventsTableView = _eventsTableView; -@synthesize events = _events; -@synthesize eventsController = _eventsController; -@synthesize connectionStatus = _connectionStatus; -@synthesize pusher; - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - _events = [[NSMutableArray alloc] init]; -} - -- (IBAction)connect:(id)sender -{ - [sender setEnabled:NO]; - - self.pusher = [PTPusher pusherWithKey:PUSHER_API_KEY delegate:self encrypted:NO]; - - PTPusherChannel *channel = [self.pusher subscribeToChannelNamed:@"messages"]; - - [[NSNotificationCenter defaultCenter] addObserverForName:PTPusherEventReceivedNotification object:channel queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { - - [self.eventsController addObject:[note.userInfo objectForKey:PTPusherEventUserInfoKey]]; - }]; -} - -#pragma mark - PTPusherEventDelegate methods - -- (void)pusher:(PTPusher *)pusher connectionDidConnect:(PTPusherConnection *)connection -{ - NSLog(@"Connected!"); - [self.connectionStatus setStringValue:@"Connected."]; -} - -- (void)pusher:(PTPusher *)pusher connectionDidDisconnect:(PTPusherConnection *)connection -{ - NSLog(@"Disconnected!"); - [self.connectionStatus setStringValue:@"Disconnected."]; -} - -- (void)pusher:(PTPusher *)pusher connection:(PTPusherConnection *)connection failedWithError:(NSError *)error -{ - NSLog(@"Connection Failed! %@", error); - [self.connectionStatus setStringValue:[NSString stringWithFormat:@"Connection Failed (%@)", [error localizedDescription]]]; -} - -@end diff --git a/libPusher-OSX/PusherSampleOSX/PusherSampleOSX-Info.plist b/libPusher-OSX/PusherSampleOSX/PusherSampleOSX-Info.plist deleted file mode 100644 index 98e3ccbd..00000000 --- a/libPusher-OSX/PusherSampleOSX/PusherSampleOSX-Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - co.uk.lukeredpath.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2012 LJR Software Limited. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/libPusher-OSX/PusherSampleOSX/PusherSampleOSX-Prefix.pch b/libPusher-OSX/PusherSampleOSX/PusherSampleOSX-Prefix.pch deleted file mode 100644 index 175fa7f8..00000000 --- a/libPusher-OSX/PusherSampleOSX/PusherSampleOSX-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'PusherSampleOSX' target in the 'PusherSampleOSX' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/libPusher-OSX/PusherSampleOSX/en.lproj/Credits.rtf b/libPusher-OSX/PusherSampleOSX/en.lproj/Credits.rtf deleted file mode 100644 index 46576ef2..00000000 --- a/libPusher-OSX/PusherSampleOSX/en.lproj/Credits.rtf +++ /dev/null @@ -1,29 +0,0 @@ -{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} -{\colortbl;\red255\green255\blue255;} -\paperw9840\paperh8400 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\b\fs24 \cf0 Engineering: -\b0 \ - Some people\ -\ - -\b Human Interface Design: -\b0 \ - Some other people\ -\ - -\b Testing: -\b0 \ - Hopefully not nobody\ -\ - -\b Documentation: -\b0 \ - Whoever\ -\ - -\b With special thanks to: -\b0 \ - Mom\ -} diff --git a/libPusher-OSX/PusherSampleOSX/en.lproj/InfoPlist.strings b/libPusher-OSX/PusherSampleOSX/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/libPusher-OSX/PusherSampleOSX/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/libPusher-OSX/PusherSampleOSX/en.lproj/MainMenu.xib b/libPusher-OSX/PusherSampleOSX/en.lproj/MainMenu.xib deleted file mode 100644 index a98f423d..00000000 --- a/libPusher-OSX/PusherSampleOSX/en.lproj/MainMenu.xib +++ /dev/null @@ -1,4170 +0,0 @@ - - - - 1070 - 11C73 - 1938 - 1138.23 - 567.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 1938 - - - NSUserDefaultsController - NSScroller - NSTableHeaderView - NSMenuItem - NSMenu - NSScrollView - NSTextFieldCell - NSButton - NSButtonCell - NSArrayController - NSTableView - NSTableCellView - NSDateFormatter - NSCustomObject - NSView - NSWindowTemplate - NSTextField - NSTableColumn - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - - - Pusher Debug Console - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - Pusher Debug Console - - - - About PusherSampleOSX - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide PusherSampleOSX - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit PusherSampleOSX - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - - - New - n - 1048576 - 2147483647 - - - - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save… - s - 1048576 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find and Replace… - f - 1572864 - 2147483647 - - - 12 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - - - - - Transformations - - 2147483647 - - - submenuAction: - - Transformations - - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - - - Font - - 2147483647 - - - submenuAction: - - Font - - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - - - PusherSampleOSX Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - 15 - 2 - {{335, 390}, {687, 518}} - 1954021376 - Pusher Debug Console - NSWindow - - - - - 256 - - - - 4382 - - - - 2304 - - - - 256 - {645, 426} - - - - _NS:1828 - YES - - - 256 - {645, 17} - - - - - - - - -2147483392 - {{224, 0}, {16, 17}} - _NS:1833 - - - - timestamp - 126.42578125 - 40 - 1000 - - 75628096 - 2048 - Timestamp - - LucidaGrande - 11 - 3100 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - 3 - MAA - - - - - 337772096 - 2048 - Text Cell - - LucidaGrande - 13 - 1044 - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - - - 3 - YES - - - - event - 137.421875 - 40 - 1000 - - 75628096 - 2048 - Event - - - - - - 337772096 - 2048 - Text Cell - - - - - - 3 - YES - - - - channel - 131 - 10 - 3.4028234663852886e+38 - - 75628096 - 2048 - Channel - - - 6 - System - headerColor - - 3 - MQA - - - - - - 337772096 - 2048 - Text Cell - - - - - - 3 - YES - - - - data - 239.2578125 - 10 - 3.4028234663852886e+38 - - 75628096 - 2048 - Event Data - - - - - - 337772096 - 2048 - Text Cell - - - - - - 3 - YES - - - - 3 - 2 - - - 6 - System - gridColor - - 3 - MC41AA - - - 17 - -700416000 - - - 1 - 15 - 0 - YES - 0 - 1 - - - {{1, 17}, {645, 426}} - - - - _NS:1826 - - - 4 - - - - -2147483392 - {{224, 17}, {15, 102}} - - - - _NS:1845 - - _doScroller: - 0.99765807962529274 - - - - -2147483392 - {{1, 428}, {645, 15}} - - - - _NS:1847 - 1 - - _doScroller: - 0.99383667180277346 - - - - 2304 - - - - {{1, 0}, {645, 17}} - - - - - - 4 - - - {{20, 54}, {647, 444}} - - - - _NS:1824 - 133682 - - - - - QSAAAEEgAABBmAAAQZgAAA - - - - 292 - {{17, 20}, {57, 17}} - - - - _NS:3944 - YES - - 68288064 - 272630784 - Status: - - LucidaGrande-Bold - 13 - 2072 - - _NS:3944 - - - 6 - System - controlColor - - - - - - - - 292 - {{70, 20}, {90, 17}} - - - - _NS:3944 - YES - - 68288064 - 272630784 - Disconnected - - _NS:3944 - - - - - - - - 289 - {{581, 9}, {92, 32}} - - - - _NS:687 - YES - - 67239424 - 134217728 - Connect - - _NS:687 - - -2038284033 - 129 - - - 200 - 25 - - - - {687, 518} - - - - - {{0, 0}, {1680, 1028}} - {10000000000000, 10000000000000} - YES - - - LRAppDelegate - - - NSFontManager - - - YES - - YES - YES - YES - YES - YES - - - YES - - - - - - - terminate: - - - - 449 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - delegate - - - - 495 - - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - saveDocument: - - - - 362 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - performFindPanelAction: - - - - 535 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - window - - - - 532 - - - - eventsTableView - - - - 556 - - - - eventsController - - - - 602 - - - - connect: - - - - 604 - - - - connectionStatus - - - - 605 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 587 - - - - textField - - - 274 - - - - 266 - {126, 17} - - - YES - - 67239488 - -1874851840 - Table View Cell - - - - - - - - HH:mm:ss - NO - - - - - - - - {{1, 1}, {126, 17}} - - - - - 560 - - - - value: objectValue.timeReceived - - - - - - value: objectValue.timeReceived - value - objectValue.timeReceived - 2 - - - 589 - - - - textField - - - 274 - - - - 266 - {137, 17} - - - YES - - 67239488 - 272631808 - Table View Cell - - - - - - - - {{130, 1}, {137, 17}} - - - - - 564 - - - - value: objectValue.name - - - - - - value: objectValue.name - value - objectValue.name - 2 - - - 597 - - - - textField - - - 274 - - - - 266 - {239, 17} - - - YES - - 67239488 - 272631808 - Table View Cell - - - - - - - - {{404, 1}, {239, 17}} - - - - - 568 - - - - value: objectValue.data - - - - - - value: objectValue.data - value - objectValue.data - 2 - - - 600 - - - - contentArray: events - - - - - - contentArray: events - contentArray - events - 2 - - - 586 - - - - textField - - - 274 - - - - 266 - {131, 17} - - - YES - - 67239488 - 272631808 - Table View Cell - - - - - - - - {{270, 1}, {131, 17}} - - - - - 595 - - - - value: objectValue.channel - - - - - - value: objectValue.channel - value - objectValue.channel - 2 - - - 599 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - - - - - - - - - - - - 19 - - - - - - - - 56 - - - - - - - - 217 - - - - - - - - 83 - - - - - - - - 81 - - - - - - - - - - - - - - - - - 75 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - - - - - - 126 - - - - - 205 - - - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - - - - - - 216 - - - - - - - - 200 - - - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - - - - - - 296 - - - - - - - - - 297 - - - - - 298 - - - - - 211 - - - - - - - - 212 - - - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - - - - - - 349 - - - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 371 - - - - - - - - 372 - - - - - - - - - - - 375 - - - - - - - - 376 - - - - - - - - - 377 - - - - - - - - 388 - - - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - - - - - - 398 - - - - - - - - 399 - - - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - - - - - - 451 - - - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - - - - - - 491 - - - - - - - - 492 - - - - - 494 - - - - - 496 - - - - - - - - 497 - - - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - 534 - - - - - 536 - - - - - - - - - - - 537 - - - - - - - - - - - 538 - - - - - 540 - - - - - 541 - - - - - - - - - 542 - - - - - - - - - 543 - - - - - 544 - - - - - 545 - - - - - - - - 546 - - - - - 547 - - - - - - - - 548 - - - - - 551 - - - - - - - - 552 - - - - - 553 - - - - - 554 - - - - - - - - - 555 - - - - - 557 - - - - - - - - 558 - - - - - - - - 559 - - - - - - - - 561 - - - - - - - - 562 - - - - - - - - 563 - - - - - 565 - - - - - - - - 566 - - - - - - - - 567 - - - - - 582 - - - - - 583 - - - - - 590 - - - - - - - - - 591 - - - - - 592 - - - - - - - - 593 - - - - - - - - 594 - - - - - 603 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{380, 496}, {480, 360}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - 605 - - - - - LRAppDelegate - NSObject - - NSTextField - NSArrayController - NSTableView - NSWindow - - - - connectionStatus - NSTextField - - - eventsController - NSArrayController - - - eventsTableView - NSTableView - - - window - NSWindow - - - - IBProjectSource - ./Classes/LRAppDelegate.h - - - - NSDocument - - id - id - id - id - id - id - - - - printDocument: - id - - - revertDocumentToSaved: - id - - - runPageLayout: - id - - - saveDocument: - id - - - saveDocumentAs: - id - - - saveDocumentTo: - id - - - - IBProjectSource - ./Classes/NSDocument.h - - - - - 0 - IBCocoaFramework - YES - 3 - - {9, 8} - {7, 2} - - - diff --git a/libPusher-OSX/PusherSampleOSX/main.m b/libPusher-OSX/PusherSampleOSX/main.m deleted file mode 100644 index 2a477b84..00000000 --- a/libPusher-OSX/PusherSampleOSX/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// PusherSampleOSX -// -// Created by Luke Redpath on 05/02/2012. -// Copyright (c) 2012 LJR Software Limited. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **)argv); -} diff --git a/libPusher-OSX/libPusher-OSX.xcodeproj/project.pbxproj b/libPusher-OSX/libPusher-OSX.xcodeproj/project.pbxproj index d420f682..334423a0 100644 --- a/libPusher-OSX/libPusher-OSX.xcodeproj/project.pbxproj +++ b/libPusher-OSX/libPusher-OSX.xcodeproj/project.pbxproj @@ -7,18 +7,15 @@ objects = { /* Begin PBXBuildFile section */ - A3141C4A176F2F4A008330D7 /* Pusher.h in Headers */ = {isa = PBXBuildFile; fileRef = A3141C49176F2F4A008330D7 /* Pusher.h */; }; - A3382DFA1525D0AF0025550D /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = A3382DF91525D0AB0025550D /* JSONKit.h */; }; - A3382DFE1525D0C90025550D /* PTJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = A3382DFB1525D0C90025550D /* PTJSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3141C4A176F2F4A008330D7 /* Pusher.h in Headers */ = {isa = PBXBuildFile; fileRef = A3141C49176F2F4A008330D7 /* Pusher.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3382DFF1525D0C90025550D /* PTJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = A3382DFC1525D0C90025550D /* PTJSON.m */; }; - A3382E001525D0C90025550D /* PTJSONParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A3382DFD1525D0C90025550D /* PTJSONParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A373A2831562D3B000BFAECE /* PTPusher+Testing.h in Headers */ = {isa = PBXBuildFile; fileRef = A373A2811562D3B000BFAECE /* PTPusher+Testing.h */; }; + A373A2831562D3B000BFAECE /* PTPusher+Testing.h in Headers */ = {isa = PBXBuildFile; fileRef = A373A2811562D3B000BFAECE /* PTPusher+Testing.h */; settings = {ATTRIBUTES = (Public, ); }; }; A373A2841562D3B000BFAECE /* PTPusher+Testing.m in Sources */ = {isa = PBXBuildFile; fileRef = A373A2821562D3B000BFAECE /* PTPusher+Testing.m */; }; A37E161214E4C95C00DCA3A6 /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = A37E160B14E4C95B00DCA3A6 /* base64.c */; }; A37E161314E4C95C00DCA3A6 /* base64.h in Headers */ = {isa = PBXBuildFile; fileRef = A37E160C14E4C95B00DCA3A6 /* base64.h */; }; A37E161414E4C95C00DCA3A6 /* NSData+SRB64Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = A37E160D14E4C95B00DCA3A6 /* NSData+SRB64Additions.h */; }; A37E161514E4C95C00DCA3A6 /* NSData+SRB64Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = A37E160E14E4C95C00DCA3A6 /* NSData+SRB64Additions.m */; }; - A37E161714E4C95C00DCA3A6 /* SRWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = A37E161014E4C95C00DCA3A6 /* SRWebSocket.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A37E161714E4C95C00DCA3A6 /* SRWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = A37E161014E4C95C00DCA3A6 /* SRWebSocket.h */; }; A37E161814E4C95C00DCA3A6 /* SRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = A37E161114E4C95C00DCA3A6 /* SRWebSocket.m */; }; A37E161C14E4C9CC00DCA3A6 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A37E161B14E4C9CC00DCA3A6 /* Security.framework */; }; A37E162014E4CA6400DCA3A6 /* libicucore.A.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A37E161F14E4CA6400DCA3A6 /* libicucore.A.dylib */; }; @@ -26,11 +23,8 @@ A37E168214E5736300DCA3A6 /* PTPusherMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = A37E168114E5736300DCA3A6 /* PTPusherMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3CA675914DBCB2D003E2F1E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3CA675814DBCB2D003E2F1E /* Cocoa.framework */; }; A3CA676314DBCB2D003E2F1E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A3CA676114DBCB2D003E2F1E /* InfoPlist.strings */; }; - A3CA678C14DBCB95003E2F1E /* NSDictionary+QueryString.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA676D14DBCB94003E2F1E /* NSDictionary+QueryString.h */; }; A3CA678D14DBCB95003E2F1E /* NSDictionary+QueryString.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CA676E14DBCB94003E2F1E /* NSDictionary+QueryString.m */; }; - A3CA678E14DBCB95003E2F1E /* NSString+Hashing.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA676F14DBCB94003E2F1E /* NSString+Hashing.h */; }; A3CA678F14DBCB95003E2F1E /* NSString+Hashing.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CA677014DBCB94003E2F1E /* NSString+Hashing.m */; }; - A3CA679014DBCB95003E2F1E /* PTBlockEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA677114DBCB94003E2F1E /* PTBlockEventListener.h */; }; A3CA679114DBCB95003E2F1E /* PTBlockEventListener.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CA677214DBCB94003E2F1E /* PTBlockEventListener.m */; }; A3CA679214DBCB95003E2F1E /* PTEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA677314DBCB95003E2F1E /* PTEventListener.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3CA679314DBCB95003E2F1E /* PTPusher.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA677414DBCB95003E2F1E /* PTPusher.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -39,7 +33,6 @@ A3CA679614DBCB95003E2F1E /* PTPusherAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CA677714DBCB95003E2F1E /* PTPusherAPI.m */; }; A3CA679714DBCB95003E2F1E /* PTPusherChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA677814DBCB95003E2F1E /* PTPusherChannel.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3CA679814DBCB95003E2F1E /* PTPusherChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CA677914DBCB95003E2F1E /* PTPusherChannel.m */; }; - A3CA679914DBCB95003E2F1E /* PTPusherChannelAuthorizationOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA677A14DBCB95003E2F1E /* PTPusherChannelAuthorizationOperation.h */; }; A3CA679A14DBCB95003E2F1E /* PTPusherChannelAuthorizationOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CA677B14DBCB95003E2F1E /* PTPusherChannelAuthorizationOperation.m */; }; A3CA679B14DBCB95003E2F1E /* PTPusherConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA677C14DBCB95003E2F1E /* PTPusherConnection.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3CA679C14DBCB95003E2F1E /* PTPusherConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CA677D14DBCB95003E2F1E /* PTPusherConnection.m */; }; @@ -51,25 +44,21 @@ A3CA67A414DBCB95003E2F1E /* PTPusherEventDispatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CA678514DBCB95003E2F1E /* PTPusherEventDispatcher.m */; }; A3CA67A514DBCB95003E2F1E /* PTPusherEventPublisher.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA678614DBCB95003E2F1E /* PTPusherEventPublisher.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3CA67A614DBCB95003E2F1E /* PTPusherPresenceChannelDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA678714DBCB95003E2F1E /* PTPusherPresenceChannelDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A3CA67A714DBCB95003E2F1E /* PTTargetActionEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA678814DBCB95003E2F1E /* PTTargetActionEventListener.h */; }; A3CA67A814DBCB95003E2F1E /* PTTargetActionEventListener.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CA678914DBCB95003E2F1E /* PTTargetActionEventListener.m */; }; - A3CA67A914DBCB95003E2F1E /* PTURLRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = A3CA678A14DBCB95003E2F1E /* PTURLRequestOperation.h */; }; A3CA67AA14DBCB95003E2F1E /* PTURLRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CA678B14DBCB95003E2F1E /* PTURLRequestOperation.m */; }; - A3F203C814DEF36C0093C793 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3CA675814DBCB2D003E2F1E /* Cocoa.framework */; }; - A3F203D214DEF36C0093C793 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A3F203D014DEF36C0093C793 /* InfoPlist.strings */; }; - A3F203D414DEF36C0093C793 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A3F203D314DEF36C0093C793 /* main.m */; }; - A3F203D814DEF36C0093C793 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = A3F203D614DEF36C0093C793 /* Credits.rtf */; }; - A3F203DB14DEF36C0093C793 /* LRAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A3F203DA14DEF36C0093C793 /* LRAppDelegate.m */; }; - A3F203DE14DEF36C0093C793 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = A3F203DC14DEF36C0093C793 /* MainMenu.xib */; }; - A3F203E314DEF37A0093C793 /* Pusher.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3CA675514DBCB2D003E2F1E /* Pusher.framework */; }; + A3E5CC5618467337006A54DD /* NSDictionary+QueryString.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC4E18467337006A54DD /* NSDictionary+QueryString.h */; }; + A3E5CC5718467337006A54DD /* NSString+Hashing.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC4F18467337006A54DD /* NSString+Hashing.h */; }; + A3E5CC5818467337006A54DD /* PTBlockEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC5018467337006A54DD /* PTBlockEventListener.h */; }; + A3E5CC5918467337006A54DD /* PTJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC5118467337006A54DD /* PTJSON.h */; }; + A3E5CC5A18467337006A54DD /* PTPusherChannel_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC5218467337006A54DD /* PTPusherChannel_Private.h */; }; + A3E5CC5B18467337006A54DD /* PTPusherChannelAuthorizationOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC5318467337006A54DD /* PTPusherChannelAuthorizationOperation.h */; }; + A3E5CC5C18467337006A54DD /* PTTargetActionEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC5418467337006A54DD /* PTTargetActionEventListener.h */; }; + A3E5CC5D18467337006A54DD /* PTURLRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC5518467337006A54DD /* PTURLRequestOperation.h */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ A3141C49176F2F4A008330D7 /* Pusher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pusher.h; sourceTree = ""; }; - A3382DF91525D0AB0025550D /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONKit.h; path = ../../Library/JSONKit.h; sourceTree = ""; }; - A3382DFB1525D0C90025550D /* PTJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTJSON.h; path = ../../Library/PTJSON.h; sourceTree = ""; }; A3382DFC1525D0C90025550D /* PTJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PTJSON.m; path = ../../Library/PTJSON.m; sourceTree = ""; }; - A3382DFD1525D0C90025550D /* PTJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTJSONParser.h; path = ../../Library/PTJSONParser.h; sourceTree = ""; }; A373A2811562D3B000BFAECE /* PTPusher+Testing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "PTPusher+Testing.h"; path = "../../Library/PTPusher+Testing.h"; sourceTree = ""; }; A373A2821562D3B000BFAECE /* PTPusher+Testing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "PTPusher+Testing.m"; path = "../../Library/PTPusher+Testing.m"; sourceTree = ""; }; A37E160B14E4C95B00DCA3A6 /* base64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = base64.c; path = ../../Pods/SocketRocket/SocketRocket/base64.c; sourceTree = ""; }; @@ -87,11 +76,8 @@ A3CA676014DBCB2D003E2F1E /* libPusher-OSX-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "libPusher-OSX-Info.plist"; sourceTree = ""; }; A3CA676214DBCB2D003E2F1E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; A3CA676414DBCB2D003E2F1E /* libPusher-OSX-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "libPusher-OSX-Prefix.pch"; sourceTree = ""; }; - A3CA676D14DBCB94003E2F1E /* NSDictionary+QueryString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+QueryString.h"; path = "../../Library/NSDictionary+QueryString.h"; sourceTree = ""; }; A3CA676E14DBCB94003E2F1E /* NSDictionary+QueryString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+QueryString.m"; path = "../../Library/NSDictionary+QueryString.m"; sourceTree = ""; }; - A3CA676F14DBCB94003E2F1E /* NSString+Hashing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+Hashing.h"; path = "../../Library/NSString+Hashing.h"; sourceTree = ""; }; A3CA677014DBCB94003E2F1E /* NSString+Hashing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+Hashing.m"; path = "../../Library/NSString+Hashing.m"; sourceTree = ""; }; - A3CA677114DBCB94003E2F1E /* PTBlockEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTBlockEventListener.h; path = ../../Library/PTBlockEventListener.h; sourceTree = ""; }; A3CA677214DBCB94003E2F1E /* PTBlockEventListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PTBlockEventListener.m; path = ../../Library/PTBlockEventListener.m; sourceTree = ""; }; A3CA677314DBCB95003E2F1E /* PTEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTEventListener.h; path = ../../Library/PTEventListener.h; sourceTree = ""; }; A3CA677414DBCB95003E2F1E /* PTPusher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTPusher.h; path = ../../Library/PTPusher.h; sourceTree = ""; }; @@ -100,7 +86,6 @@ A3CA677714DBCB95003E2F1E /* PTPusherAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PTPusherAPI.m; path = ../../Library/PTPusherAPI.m; sourceTree = ""; }; A3CA677814DBCB95003E2F1E /* PTPusherChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTPusherChannel.h; path = ../../Library/PTPusherChannel.h; sourceTree = ""; }; A3CA677914DBCB95003E2F1E /* PTPusherChannel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PTPusherChannel.m; path = ../../Library/PTPusherChannel.m; sourceTree = ""; }; - A3CA677A14DBCB95003E2F1E /* PTPusherChannelAuthorizationOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTPusherChannelAuthorizationOperation.h; path = ../../Library/PTPusherChannelAuthorizationOperation.h; sourceTree = ""; }; A3CA677B14DBCB95003E2F1E /* PTPusherChannelAuthorizationOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PTPusherChannelAuthorizationOperation.m; path = ../../Library/PTPusherChannelAuthorizationOperation.m; sourceTree = ""; }; A3CA677C14DBCB95003E2F1E /* PTPusherConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTPusherConnection.h; path = ../../Library/PTPusherConnection.h; sourceTree = ""; }; A3CA677D14DBCB95003E2F1E /* PTPusherConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PTPusherConnection.m; path = ../../Library/PTPusherConnection.m; sourceTree = ""; }; @@ -112,23 +97,19 @@ A3CA678514DBCB95003E2F1E /* PTPusherEventDispatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PTPusherEventDispatcher.m; path = ../../Library/PTPusherEventDispatcher.m; sourceTree = ""; }; A3CA678614DBCB95003E2F1E /* PTPusherEventPublisher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTPusherEventPublisher.h; path = ../../Library/PTPusherEventPublisher.h; sourceTree = ""; }; A3CA678714DBCB95003E2F1E /* PTPusherPresenceChannelDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTPusherPresenceChannelDelegate.h; path = ../../Library/PTPusherPresenceChannelDelegate.h; sourceTree = ""; }; - A3CA678814DBCB95003E2F1E /* PTTargetActionEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTTargetActionEventListener.h; path = ../../Library/PTTargetActionEventListener.h; sourceTree = ""; }; A3CA678914DBCB95003E2F1E /* PTTargetActionEventListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PTTargetActionEventListener.m; path = ../../Library/PTTargetActionEventListener.m; sourceTree = ""; }; - A3CA678A14DBCB95003E2F1E /* PTURLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PTURLRequestOperation.h; path = ../../Library/PTURLRequestOperation.h; sourceTree = ""; }; A3CA678B14DBCB95003E2F1E /* PTURLRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PTURLRequestOperation.m; path = ../../Library/PTURLRequestOperation.m; sourceTree = ""; }; - A3F203C614DEF36C0093C793 /* PusherSampleOSX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PusherSampleOSX.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A3E5CC4E18467337006A54DD /* NSDictionary+QueryString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+QueryString.h"; sourceTree = ""; }; + A3E5CC4F18467337006A54DD /* NSString+Hashing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Hashing.h"; sourceTree = ""; }; + A3E5CC5018467337006A54DD /* PTBlockEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTBlockEventListener.h; sourceTree = ""; }; + A3E5CC5118467337006A54DD /* PTJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTJSON.h; sourceTree = ""; }; + A3E5CC5218467337006A54DD /* PTPusherChannel_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherChannel_Private.h; sourceTree = ""; }; + A3E5CC5318467337006A54DD /* PTPusherChannelAuthorizationOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherChannelAuthorizationOperation.h; sourceTree = ""; }; + A3E5CC5418467337006A54DD /* PTTargetActionEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTTargetActionEventListener.h; sourceTree = ""; }; + A3E5CC5518467337006A54DD /* PTURLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTURLRequestOperation.h; sourceTree = ""; }; A3F203CA14DEF36C0093C793 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; A3F203CB14DEF36C0093C793 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; A3F203CC14DEF36C0093C793 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - A3F203CF14DEF36C0093C793 /* PusherSampleOSX-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PusherSampleOSX-Info.plist"; sourceTree = ""; }; - A3F203D114DEF36C0093C793 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - A3F203D314DEF36C0093C793 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - A3F203D514DEF36C0093C793 /* PusherSampleOSX-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PusherSampleOSX-Prefix.pch"; sourceTree = ""; }; - A3F203D714DEF36C0093C793 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; - A3F203D914DEF36C0093C793 /* LRAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LRAppDelegate.h; sourceTree = ""; }; - A3F203DA14DEF36C0093C793 /* LRAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LRAppDelegate.m; sourceTree = ""; }; - A3F203DD14DEF36C0093C793 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; - A3F203E514DF05410093C793 /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Constants.h; path = ../../Sample/Constants.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -143,15 +124,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A3F203C314DEF36C0093C793 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A3F203E314DEF37A0093C793 /* Pusher.framework in Frameworks */, - A3F203C814DEF36C0093C793 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -159,7 +131,6 @@ isa = PBXGroup; children = ( A3CA675E14DBCB2D003E2F1E /* libPusher-OSX */, - A3F203CD14DEF36C0093C793 /* PusherSampleOSX */, A3CA675714DBCB2D003E2F1E /* Frameworks */, A3CA675614DBCB2D003E2F1E /* Products */, ); @@ -169,7 +140,6 @@ isa = PBXGroup; children = ( A3CA675514DBCB2D003E2F1E /* Pusher.framework */, - A3F203C614DEF36C0093C793 /* PusherSampleOSX.app */, ); name = Products; sourceTree = ""; @@ -189,13 +159,11 @@ A3CA675E14DBCB2D003E2F1E /* libPusher-OSX */ = { isa = PBXGroup; children = ( + A3E5CC4D18467337006A54DD /* Private Headers */, A3141C49176F2F4A008330D7 /* Pusher.h */, A373A2811562D3B000BFAECE /* PTPusher+Testing.h */, A373A2821562D3B000BFAECE /* PTPusher+Testing.m */, - A3382DFB1525D0C90025550D /* PTJSON.h */, A3382DFC1525D0C90025550D /* PTJSON.m */, - A3382DFD1525D0C90025550D /* PTJSONParser.h */, - A3382DF91525D0AB0025550D /* JSONKit.h */, A37E168114E5736300DCA3A6 /* PTPusherMacros.h */, A37E160B14E4C95B00DCA3A6 /* base64.c */, A37E160C14E4C95B00DCA3A6 /* base64.h */, @@ -203,11 +171,8 @@ A37E160E14E4C95C00DCA3A6 /* NSData+SRB64Additions.m */, A37E161014E4C95C00DCA3A6 /* SRWebSocket.h */, A37E161114E4C95C00DCA3A6 /* SRWebSocket.m */, - A3CA676D14DBCB94003E2F1E /* NSDictionary+QueryString.h */, A3CA676E14DBCB94003E2F1E /* NSDictionary+QueryString.m */, - A3CA676F14DBCB94003E2F1E /* NSString+Hashing.h */, A3CA677014DBCB94003E2F1E /* NSString+Hashing.m */, - A3CA677114DBCB94003E2F1E /* PTBlockEventListener.h */, A3CA677214DBCB94003E2F1E /* PTBlockEventListener.m */, A3CA677314DBCB95003E2F1E /* PTEventListener.h */, A3CA677414DBCB95003E2F1E /* PTPusher.h */, @@ -216,7 +181,6 @@ A3CA677714DBCB95003E2F1E /* PTPusherAPI.m */, A3CA677814DBCB95003E2F1E /* PTPusherChannel.h */, A3CA677914DBCB95003E2F1E /* PTPusherChannel.m */, - A3CA677A14DBCB95003E2F1E /* PTPusherChannelAuthorizationOperation.h */, A3CA677B14DBCB95003E2F1E /* PTPusherChannelAuthorizationOperation.m */, A3CA677C14DBCB95003E2F1E /* PTPusherConnection.h */, A3CA677D14DBCB95003E2F1E /* PTPusherConnection.m */, @@ -228,9 +192,7 @@ A3CA678514DBCB95003E2F1E /* PTPusherEventDispatcher.m */, A3CA678614DBCB95003E2F1E /* PTPusherEventPublisher.h */, A3CA678714DBCB95003E2F1E /* PTPusherPresenceChannelDelegate.h */, - A3CA678814DBCB95003E2F1E /* PTTargetActionEventListener.h */, A3CA678914DBCB95003E2F1E /* PTTargetActionEventListener.m */, - A3CA678A14DBCB95003E2F1E /* PTURLRequestOperation.h */, A3CA678B14DBCB95003E2F1E /* PTURLRequestOperation.m */, A3CA675F14DBCB2D003E2F1E /* Supporting Files */, ); @@ -247,6 +209,22 @@ name = "Supporting Files"; sourceTree = ""; }; + A3E5CC4D18467337006A54DD /* Private Headers */ = { + isa = PBXGroup; + children = ( + A3E5CC4E18467337006A54DD /* NSDictionary+QueryString.h */, + A3E5CC4F18467337006A54DD /* NSString+Hashing.h */, + A3E5CC5018467337006A54DD /* PTBlockEventListener.h */, + A3E5CC5118467337006A54DD /* PTJSON.h */, + A3E5CC5218467337006A54DD /* PTPusherChannel_Private.h */, + A3E5CC5318467337006A54DD /* PTPusherChannelAuthorizationOperation.h */, + A3E5CC5418467337006A54DD /* PTTargetActionEventListener.h */, + A3E5CC5518467337006A54DD /* PTURLRequestOperation.h */, + ); + name = "Private Headers"; + path = "../../Library/Private Headers"; + sourceTree = ""; + }; A3F203C914DEF36C0093C793 /* Other Frameworks */ = { isa = PBXGroup; children = ( @@ -257,30 +235,6 @@ name = "Other Frameworks"; sourceTree = ""; }; - A3F203CD14DEF36C0093C793 /* PusherSampleOSX */ = { - isa = PBXGroup; - children = ( - A3F203E514DF05410093C793 /* Constants.h */, - A3F203DA14DEF36C0093C793 /* LRAppDelegate.m */, - A3F203D914DEF36C0093C793 /* LRAppDelegate.h */, - A3F203DC14DEF36C0093C793 /* MainMenu.xib */, - A3F203CE14DEF36C0093C793 /* Supporting Files */, - ); - path = PusherSampleOSX; - sourceTree = ""; - }; - A3F203CE14DEF36C0093C793 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - A3F203CF14DEF36C0093C793 /* PusherSampleOSX-Info.plist */, - A3F203D014DEF36C0093C793 /* InfoPlist.strings */, - A3F203D314DEF36C0093C793 /* main.m */, - A3F203D514DEF36C0093C793 /* PusherSampleOSX-Prefix.pch */, - A3F203D614DEF36C0093C793 /* Credits.rtf */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -288,32 +242,31 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A3CA678C14DBCB95003E2F1E /* NSDictionary+QueryString.h in Headers */, - A3CA678E14DBCB95003E2F1E /* NSString+Hashing.h in Headers */, - A3CA679014DBCB95003E2F1E /* PTBlockEventListener.h in Headers */, A3CA679214DBCB95003E2F1E /* PTEventListener.h in Headers */, A3CA679314DBCB95003E2F1E /* PTPusher.h in Headers */, A3CA679514DBCB95003E2F1E /* PTPusherAPI.h in Headers */, + A3E5CC5B18467337006A54DD /* PTPusherChannelAuthorizationOperation.h in Headers */, + A3E5CC5C18467337006A54DD /* PTTargetActionEventListener.h in Headers */, A3CA679714DBCB95003E2F1E /* PTPusherChannel.h in Headers */, - A3CA679914DBCB95003E2F1E /* PTPusherChannelAuthorizationOperation.h in Headers */, A3CA679B14DBCB95003E2F1E /* PTPusherConnection.h in Headers */, + A3E5CC5918467337006A54DD /* PTJSON.h in Headers */, A3CA679F14DBCB95003E2F1E /* PTPusherDelegate.h in Headers */, + A373A2831562D3B000BFAECE /* PTPusher+Testing.h in Headers */, + A3E5CC5618467337006A54DD /* NSDictionary+QueryString.h in Headers */, A3CA67A014DBCB95003E2F1E /* PTPusherErrors.h in Headers */, A3CA67A114DBCB95003E2F1E /* PTPusherEvent.h in Headers */, + A3141C4A176F2F4A008330D7 /* Pusher.h in Headers */, A3CA67A314DBCB95003E2F1E /* PTPusherEventDispatcher.h in Headers */, + A3E5CC5D18467337006A54DD /* PTURLRequestOperation.h in Headers */, A3CA67A514DBCB95003E2F1E /* PTPusherEventPublisher.h in Headers */, A3CA67A614DBCB95003E2F1E /* PTPusherPresenceChannelDelegate.h in Headers */, - A3CA67A714DBCB95003E2F1E /* PTTargetActionEventListener.h in Headers */, - A3CA67A914DBCB95003E2F1E /* PTURLRequestOperation.h in Headers */, + A37E161714E4C95C00DCA3A6 /* SRWebSocket.h in Headers */, + A3E5CC5818467337006A54DD /* PTBlockEventListener.h in Headers */, + A3E5CC5A18467337006A54DD /* PTPusherChannel_Private.h in Headers */, A37E161314E4C95C00DCA3A6 /* base64.h in Headers */, A37E161414E4C95C00DCA3A6 /* NSData+SRB64Additions.h in Headers */, - A37E161714E4C95C00DCA3A6 /* SRWebSocket.h in Headers */, + A3E5CC5718467337006A54DD /* NSString+Hashing.h in Headers */, A37E168214E5736300DCA3A6 /* PTPusherMacros.h in Headers */, - A3382DFA1525D0AF0025550D /* JSONKit.h in Headers */, - A3382DFE1525D0C90025550D /* PTJSON.h in Headers */, - A3382E001525D0C90025550D /* PTJSONParser.h in Headers */, - A373A2831562D3B000BFAECE /* PTPusher+Testing.h in Headers */, - A3141C4A176F2F4A008330D7 /* Pusher.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -339,30 +292,13 @@ productReference = A3CA675514DBCB2D003E2F1E /* Pusher.framework */; productType = "com.apple.product-type.framework"; }; - A3F203C514DEF36C0093C793 /* PusherSampleOSX */ = { - isa = PBXNativeTarget; - buildConfigurationList = A3F203E114DEF36C0093C793 /* Build configuration list for PBXNativeTarget "PusherSampleOSX" */; - buildPhases = ( - A3F203C214DEF36C0093C793 /* Sources */, - A3F203C314DEF36C0093C793 /* Frameworks */, - A3F203C414DEF36C0093C793 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PusherSampleOSX; - productName = PusherSampleOSX; - productReference = A3F203C614DEF36C0093C793 /* PusherSampleOSX.app */; - productType = "com.apple.product-type.application"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ A3CA674B14DBCB2D003E2F1E /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0420; + LastUpgradeCheck = 0500; ORGANIZATIONNAME = "LJR Software Limited"; }; buildConfigurationList = A3CA674E14DBCB2D003E2F1E /* Build configuration list for PBXProject "libPusher-OSX" */; @@ -378,7 +314,6 @@ projectRoot = ""; targets = ( A3CA675414DBCB2D003E2F1E /* Pusher */, - A3F203C514DEF36C0093C793 /* PusherSampleOSX */, ); }; /* End PBXProject section */ @@ -392,16 +327,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A3F203C414DEF36C0093C793 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A3F203D214DEF36C0093C793 /* InfoPlist.strings in Resources */, - A3F203D814DEF36C0093C793 /* Credits.rtf in Resources */, - A3F203DE14DEF36C0093C793 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -446,15 +371,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A3F203C214DEF36C0093C793 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A3F203D414DEF36C0093C793 /* main.m in Sources */, - A3F203DB14DEF36C0093C793 /* LRAppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ @@ -466,30 +382,6 @@ name = InfoPlist.strings; sourceTree = ""; }; - A3F203D014DEF36C0093C793 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - A3F203D114DEF36C0093C793 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - A3F203D614DEF36C0093C793 /* Credits.rtf */ = { - isa = PBXVariantGroup; - children = ( - A3F203D714DEF36C0093C793 /* en */, - ); - name = Credits.rtf; - sourceTree = ""; - }; - A3F203DC14DEF36C0093C793 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - A3F203DD14DEF36C0093C793 /* en */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -497,8 +389,13 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1.5; DYLIB_COMPATIBILITY_VERSION = 1.0; @@ -516,6 +413,9 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INSTALL_PATH = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.6; @@ -529,8 +429,13 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 1.5; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -543,6 +448,9 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INSTALL_PATH = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.6; @@ -554,11 +462,13 @@ A3CA676B14DBCB2D003E2F1E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "libPusher-OSX/libPusher-OSX-Prefix.pch"; HEADER_SEARCH_PATHS = "\"$(PROJECT_DIR)/usr/include\""; INFOPLIST_FILE = "libPusher-OSX/libPusher-OSX-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.8; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = framework; }; @@ -567,40 +477,18 @@ A3CA676C14DBCB2D003E2F1E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "libPusher-OSX/libPusher-OSX-Prefix.pch"; HEADER_SEARCH_PATHS = "\"$(PROJECT_DIR)/usr/include\""; INFOPLIST_FILE = "libPusher-OSX/libPusher-OSX-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.8; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = framework; }; name = Release; }; - A3F203DF14DEF36C0093C793 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "PusherSampleOSX/PusherSampleOSX-Prefix.pch"; - INFOPLIST_FILE = "PusherSampleOSX/PusherSampleOSX-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.7; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - A3F203E014DEF36C0093C793 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "PusherSampleOSX/PusherSampleOSX-Prefix.pch"; - INFOPLIST_FILE = "PusherSampleOSX/PusherSampleOSX-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.7; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -622,15 +510,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A3F203E114DEF36C0093C793 /* Build configuration list for PBXNativeTarget "PusherSampleOSX" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A3F203DF14DEF36C0093C793 /* Debug */, - A3F203E014DEF36C0093C793 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = A3CA674B14DBCB2D003E2F1E /* Project object */; diff --git a/libPusher-OSX/libPusher-OSX.xcodeproj/xcshareddata/xcschemes/libPusher-OSX.xcscheme b/libPusher-OSX/libPusher-OSX.xcodeproj/xcshareddata/xcschemes/libPusher-OSX.xcscheme index b0e98700..f9e88e12 100644 --- a/libPusher-OSX/libPusher-OSX.xcodeproj/xcshareddata/xcschemes/libPusher-OSX.xcscheme +++ b/libPusher-OSX/libPusher-OSX.xcodeproj/xcshareddata/xcschemes/libPusher-OSX.xcscheme @@ -1,6 +1,6 @@ 'git://github.com/lukeredpath/libPusher.git', :tag => 'v1.4' } - s.source_files = 'Library/*' - s.clean_paths = ["Frameworks", "Functional Specs", "Sample", "Scripts", "Unit Tests", "*.xcodeproj", "*.xcworkspace"] - s.requires_arc = true - s.dependency 'SocketRocket', "0.2" - s.compiler_flags = '-Wno-arc-performSelector-leaks', '-Wno-format' + s.name = 'libPusher' + s.version = '1.5' + s.license = 'MIT' + s.summary = 'An Objective-C client for the Pusher.com service' + s.homepage = 'https://github.com/lukeredpath/libPusher' + s.author = 'Luke Redpath' + s.source = { :git => 'https://github.com/lukeredpath/libPusher.git', :tag => 'v1.5' } + s.requires_arc = true + s.header_dir = 'Pusher' + s.default_subspec = 'Core' + + s.ios.deployment_target = '5.0' + s.osx.deployment_target = '10.8' + + s.subspec 'Core' do |subspec| + subspec.dependency 'SocketRocket', "0.3.1-beta2" + + subspec.source_files = 'Library/**/*.{h,m}' + subspec.private_header_files = 'Library/Private Headers/*' + subspec.xcconfig = { + 'GCC_PREPROCESSOR_DEFINITIONS' => 'kPTPusherClientLibraryVersion=@\"1.5\"' + } + end + + s.subspec 'ReactiveExtensions' do |subspec| + subspec.dependency 'ReactiveCocoa', '~> 2.1' + + subspec.source_files = 'ReactiveExtensions/*' + subspec.private_header_files = '*_Internal.h' + end end diff --git a/libPusher.xcodeproj/project.pbxproj b/libPusher.xcodeproj/project.pbxproj index 6a022861..c47e413a 100755 --- a/libPusher.xcodeproj/project.pbxproj +++ b/libPusher.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - 4D81597F1712C6CA0013A485 /* Pusher.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D81597E1712C6CA0013A485 /* Pusher.h */; }; + 4D81597F1712C6CA0013A485 /* Pusher.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D81597E1712C6CA0013A485 /* Pusher.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5D5C4E7E0F2A4C92B9D85932 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F700C4637DC43EFA335D40F /* libPods.a */; }; 6D926C9364F64493B0A7BE5A /* libPods-specs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 34CD0B6EB8B94D28B0AEC265 /* libPods-specs.a */; }; A304896C1667AAB4009511CB /* PTPusherChannelAuthorizationOperationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A304895E1667A8A6009511CB /* PTPusherChannelAuthorizationOperationSpec.m */; }; @@ -22,17 +22,12 @@ A3173760155D38C4007E4BBA /* PTPusher+Testing.m in Sources */ = {isa = PBXBuildFile; fileRef = A317375E155D38C4007E4BBA /* PTPusher+Testing.m */; }; A3226317155D481C00A46067 /* PTPusherMockConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A3173758155D2D21007E4BBA /* PTPusherMockConnection.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3382DE31525C3F70025550D /* PTJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = A30950121525C272008F695B /* PTJSON.m */; }; - A3382DE41525C3FA0025550D /* PTJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = A30950111525C272008F695B /* PTJSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A3382DF61525D06C0025550D /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = A3382DEA1525D01B0025550D /* JSONKit.h */; }; - A3382E011525D0D50025550D /* PTJSONParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A309500F1525C236008F695B /* PTJSONParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; A35281D013F721A8000687C0 /* PTPusherConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281CE13F721A8000687C0 /* PTPusherConnection.h */; settings = {ATTRIBUTES = (Public, ); }; }; A35281D113F721A8000687C0 /* PTPusherConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = A35281CF13F721A8000687C0 /* PTPusherConnection.m */; }; A35281D313F72E03000687C0 /* PTPusherEventPublisher.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281D213F72E03000687C0 /* PTPusherEventPublisher.h */; settings = {ATTRIBUTES = (Public, ); }; }; A35281D613F736DF000687C0 /* PTPusherEventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281D413F736DF000687C0 /* PTPusherEventDispatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; A35281D713F736DF000687C0 /* PTPusherEventDispatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = A35281D513F736DF000687C0 /* PTPusherEventDispatcher.m */; }; - A35281DB13F73C54000687C0 /* PTTargetActionEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281D913F73C54000687C0 /* PTTargetActionEventListener.h */; }; A35281DC13F73C54000687C0 /* PTTargetActionEventListener.m in Sources */ = {isa = PBXBuildFile; fileRef = A35281DA13F73C54000687C0 /* PTTargetActionEventListener.m */; }; - A35281E413F75010000687C0 /* PTBlockEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281E213F75010000687C0 /* PTBlockEventListener.h */; }; A35281E513F75010000687C0 /* PTBlockEventListener.m in Sources */ = {isa = PBXBuildFile; fileRef = A35281E313F75010000687C0 /* PTBlockEventListener.m */; }; A35281E913F75265000687C0 /* PTPusherAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281E713F75265000687C0 /* PTPusherAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; A35281EA13F75265000687C0 /* PTPusherAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = A35281E813F75265000687C0 /* PTPusherAPI.m */; }; @@ -50,10 +45,11 @@ A373A2CA1565248C00BFAECE /* PusherClientSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A373A2C91565248C00BFAECE /* PusherClientSpec.m */; }; A37E158914E4997700DCA3A6 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A37E158814E4997700DCA3A6 /* Security.framework */; }; A37E158D14E499E000DCA3A6 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A37E158814E4997700DCA3A6 /* Security.framework */; }; - A37E158F14E49F2D00DCA3A6 /* SRWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = A37E158E14E49F2D00DCA3A6 /* SRWebSocket.h */; settings = {ATTRIBUTES = (Public, ); }; }; A37E15EA14E4BBBA00DCA3A6 /* PusherExampleMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A3AC28BD13F75BF1001C4808 /* PusherExampleMenuViewController.m */; }; A37E160814E4C87500DCA3A6 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A37E160714E4C87500DCA3A6 /* libicucore.dylib */; }; A37E167414E572C900DCA3A6 /* PTPusherMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = A37E167314E572C900DCA3A6 /* PTPusherMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A394E6F118451CD3004C70A2 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3A9F9591496E96100F83617 /* SenTestingKit.framework */; }; + A394E6F218451CFE004C70A2 /* PTPusherSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A394E6EF18451C99004C70A2 /* PTPusherSpec.m */; }; A39E238913F7E6AB0083CAD7 /* PusherPresenceEventsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A39E238813F7E6AB0083CAD7 /* PusherPresenceEventsViewController.m */; }; A3A1A149115814F7001EF877 /* OCHamcrest.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A3A1A111115814D0001EF877 /* OCHamcrest.framework */; }; A3A1A20111581782001EF877 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D1D0B51157CCDE009A12AD /* CFNetwork.framework */; }; @@ -70,17 +66,13 @@ A3A9FA491496EC0C00F83617 /* BasicEventHandlingSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A3A9F96A1496E9C300F83617 /* BasicEventHandlingSpec.m */; }; A3A9FA4D1496EEB300F83617 /* SpecHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A3A9F96D1496E9E500F83617 /* SpecHelper.m */; }; A3A9FA4F1496EEE000F83617 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D1D0B51157CCDE009A12AD /* CFNetwork.framework */; }; - A3AC28B613F75530001C4808 /* PTURLRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = A3AC28B413F75530001C4808 /* PTURLRequestOperation.h */; }; A3AC28B713F75530001C4808 /* PTURLRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = A3AC28B513F75530001C4808 /* PTURLRequestOperation.m */; }; - A3AC28BF13F75BF1001C4808 /* PusherExampleMenuViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = A3AC28BC13F75BF1001C4808 /* PusherExampleMenuViewController.h */; }; - A3AC28C313F76C51001C4808 /* PTPusherChannelAuthorizationOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = A3AC28C113F76C50001C4808 /* PTPusherChannelAuthorizationOperation.h */; }; A3AC28C413F76C51001C4808 /* PTPusherChannelAuthorizationOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = A3AC28C213F76C50001C4808 /* PTPusherChannelAuthorizationOperation.m */; }; A3B2931F14D8D96900C6B79F /* PTPusherPresenceChannelDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = A39E238A13F7E85C0083CAD7 /* PTPusherPresenceChannelDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3B7E4EB1581672A00CDA6DA /* ClientEventsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A3B7E4EA1581672A00CDA6DA /* ClientEventsSpec.m */; }; A3C32D9B14D083C10017FAED /* PTPusherEventSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A3C32D9A14D083C10017FAED /* PTPusherEventSpec.m */; }; A3CA666914D96814003E2F1E /* PTPusherChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = A3FE42181181173B009CF5D7 /* PTPusherChannel.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3CA670E14DBBAA1003E2F1E /* PTPusherErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = A39E238613F7E3FD0083CAD7 /* PTPusherErrors.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A3CA671514DBBAE1003E2F1E /* NSDictionary+QueryString.h in Headers */ = {isa = PBXBuildFile; fileRef = A3FE42FF11812541009CF5D7 /* NSDictionary+QueryString.h */; }; A3D1D0B61157CCDE009A12AD /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D1D0B51157CCDE009A12AD /* CFNetwork.framework */; }; A3D1D2861157FA30009A12AD /* PusherEventsAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A3D1D27E1157FA30009A12AD /* PusherEventsAppDelegate.m */; }; A3D1D2871157FA30009A12AD /* PusherEventsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A3D1D2801157FA30009A12AD /* PusherEventsViewController.m */; }; @@ -92,9 +84,41 @@ A3D1D2CA11580162009A12AD /* PTPusher.m in Sources */ = {isa = PBXBuildFile; fileRef = A3D1D28F1157FA4C009A12AD /* PTPusher.m */; }; A3D1D2CB11580162009A12AD /* PTPusherEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A3D1D2901157FA4C009A12AD /* PTPusherEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; A3D1D2CC11580162009A12AD /* PTPusherEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = A3D1D2911157FA4C009A12AD /* PTPusherEvent.m */; }; + A3E5CBF5184640C3006A54DD /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A3E5CBF4184640C3006A54DD /* Default-568h@2x.png */; }; + A3E5CBF818464164006A54DD /* ReactiveEventsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A3E5CBF718464164006A54DD /* ReactiveEventsViewController.m */; }; + A3E5CBFA18464227006A54DD /* ReactiveEventsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A3E5CBF918464227006A54DD /* ReactiveEventsViewController.xib */; }; + A3E5CC0518466879006A54DD /* PTPusherDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = A3A1A41611582DC3001EF877 /* PTPusherDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC0618466879006A54DD /* PTPusher.h in Headers */ = {isa = PBXBuildFile; fileRef = A3D1D28E1157FA4C009A12AD /* PTPusher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC0718466879006A54DD /* PTPusherEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A3D1D2901157FA4C009A12AD /* PTPusherEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC0918466879006A54DD /* PTPusherChannel+ReactiveExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = A394E6F718463DFA004C70A2 /* PTPusherChannel+ReactiveExtensions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC0A18466879006A54DD /* PTPusherConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281CE13F721A8000687C0 /* PTPusherConnection.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC0B18466879006A54DD /* PTPusherEventPublisher.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281D213F72E03000687C0 /* PTPusherEventPublisher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC0C18466879006A54DD /* PTPusherEventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281D413F736DF000687C0 /* PTPusherEventDispatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC0F18466879006A54DD /* PTPusherAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281E713F75265000687C0 /* PTPusherAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC1018466879006A54DD /* PTEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A3D1D28C1157FA4C009A12AD /* PTEventListener.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC1318466879006A54DD /* PTPusher+ReactiveExtensions_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC0118464959006A54DD /* PTPusher+ReactiveExtensions_Internal.h */; }; + A3E5CC1518466879006A54DD /* PTPusherPresenceChannelDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = A39E238A13F7E85C0083CAD7 /* PTPusherPresenceChannelDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC1718466879006A54DD /* PTPusherChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = A3FE42181181173B009CF5D7 /* PTPusherChannel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC1818466879006A54DD /* PTPusher+ReactiveExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CBFB1846461A006A54DD /* PTPusher+ReactiveExtensions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC1918466879006A54DD /* PTPusherErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = A39E238613F7E3FD0083CAD7 /* PTPusherErrors.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC1B18466879006A54DD /* PTPusherMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = A37E167314E572C900DCA3A6 /* PTPusherMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC1C18466879006A54DD /* PTPusher+Testing.h in Headers */ = {isa = PBXBuildFile; fileRef = A317375D155D38C4007E4BBA /* PTPusher+Testing.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC1D18466879006A54DD /* PTPusherMockConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A3173758155D2D21007E4BBA /* PTPusherMockConnection.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC1E18466879006A54DD /* Pusher.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D81597E1712C6CA0013A485 /* Pusher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A3E5CC2118466879006A54DD /* PTPusherChannel+ReactiveExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A394E6F818463DFA004C70A2 /* PTPusherChannel+ReactiveExtensions.m */; }; + A3E5CC2A18466879006A54DD /* PTPusher+ReactiveExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A3E5CBFC1846461A006A54DD /* PTPusher+ReactiveExtensions.m */; }; + A3E5CC3818466915006A54DD /* libPusher_ReactiveExtensions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A3E5CC3718466879006A54DD /* libPusher_ReactiveExtensions.a */; }; + A3E5CC4518466CD5006A54DD /* NSDictionary+QueryString.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC3D18466CD5006A54DD /* NSDictionary+QueryString.h */; }; + A3E5CC4618466CD5006A54DD /* NSString+Hashing.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC3E18466CD5006A54DD /* NSString+Hashing.h */; }; + A3E5CC4718466CD5006A54DD /* PTBlockEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC3F18466CD5006A54DD /* PTBlockEventListener.h */; }; + A3E5CC4818466CD5006A54DD /* PTJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC4018466CD5006A54DD /* PTJSON.h */; }; + A3E5CC4918466CD5006A54DD /* PTPusherChannel_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC4118466CD5006A54DD /* PTPusherChannel_Private.h */; }; + A3E5CC4A18466CD5006A54DD /* PTPusherChannelAuthorizationOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC4218466CD5006A54DD /* PTPusherChannelAuthorizationOperation.h */; }; + A3E5CC4B18466CD5006A54DD /* PTTargetActionEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC4318466CD5006A54DD /* PTTargetActionEventListener.h */; }; + A3E5CC4C18466CD5006A54DD /* PTURLRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = A3E5CC4418466CD5006A54DD /* PTURLRequestOperation.h */; }; + A3F032471822CC8A00976DA0 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F700C4637DC43EFA335D40F /* libPods.a */; }; A3FE41CB11811161009CF5D7 /* NewEventViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A3FE41C911811161009CF5D7 /* NewEventViewController.m */; }; A3FE41CC11811161009CF5D7 /* NewEventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A3FE41CA11811161009CF5D7 /* NewEventViewController.xib */; }; - A3FE429E11811EEE009CF5D7 /* NSString+Hashing.h in Headers */ = {isa = PBXBuildFile; fileRef = A3FE429B11811EE8009CF5D7 /* NSString+Hashing.h */; }; A3FE429F11811EEE009CF5D7 /* NSString+Hashing.m in Sources */ = {isa = PBXBuildFile; fileRef = A3FE429C11811EE8009CF5D7 /* NSString+Hashing.m */; }; A3FE44761181B7FE009CF5D7 /* PTPusherChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = A3FE42191181173B009CF5D7 /* PTPusherChannel.m */; }; A3FE44E71181C3C5009CF5D7 /* NSDictionary+QueryString.m in Sources */ = {isa = PBXBuildFile; fileRef = A3FE430011812541009CF5D7 /* NSDictionary+QueryString.m */; }; @@ -108,6 +132,13 @@ remoteGlobalIDString = A3D1D2B61158013F009A12AD; remoteInfo = libPusher; }; + A3E5CC3918466956006A54DD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; + proxyType = 1; + remoteGlobalIDString = A3E5CC0318466879006A54DD; + remoteInfo = libPusher_ReactiveExtensions.a; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -136,8 +167,6 @@ A304895E1667A8A6009511CB /* PTPusherChannelAuthorizationOperationSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherChannelAuthorizationOperationSpec.m; sourceTree = ""; }; A30575CE15233C1200DA19BD /* PTPusherPresenceChannelSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherPresenceChannelSpec.m; sourceTree = ""; }; A30790D911583B7200EBFFF8 /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; }; - A309500F1525C236008F695B /* PTJSONParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PTJSONParser.h; sourceTree = ""; }; - A30950111525C272008F695B /* PTJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTJSON.h; sourceTree = ""; }; A30950121525C272008F695B /* PTJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTJSON.m; sourceTree = ""; }; A31577F714D0731B000136A9 /* Pods-specs.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Pods-specs.xcconfig"; path = "Pods/Pods-specs.xcconfig"; sourceTree = ""; }; A315780A14D0751C000136A9 /* Pods.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = ""; }; @@ -146,15 +175,12 @@ A3173759155D2D21007E4BBA /* PTPusherMockConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherMockConnection.m; sourceTree = ""; }; A317375D155D38C4007E4BBA /* PTPusher+Testing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PTPusher+Testing.h"; sourceTree = ""; }; A317375E155D38C4007E4BBA /* PTPusher+Testing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PTPusher+Testing.m"; sourceTree = ""; }; - A3382DEA1525D01B0025550D /* JSONKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSONKit.h; path = Library/JSONKit.h; sourceTree = SOURCE_ROOT; }; A35281CE13F721A8000687C0 /* PTPusherConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherConnection.h; sourceTree = ""; }; A35281CF13F721A8000687C0 /* PTPusherConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherConnection.m; sourceTree = ""; }; A35281D213F72E03000687C0 /* PTPusherEventPublisher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherEventPublisher.h; sourceTree = ""; }; A35281D413F736DF000687C0 /* PTPusherEventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherEventDispatcher.h; sourceTree = ""; }; A35281D513F736DF000687C0 /* PTPusherEventDispatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherEventDispatcher.m; sourceTree = ""; }; - A35281D913F73C54000687C0 /* PTTargetActionEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTTargetActionEventListener.h; sourceTree = ""; }; A35281DA13F73C54000687C0 /* PTTargetActionEventListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTTargetActionEventListener.m; sourceTree = ""; }; - A35281E213F75010000687C0 /* PTBlockEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTBlockEventListener.h; sourceTree = ""; }; A35281E313F75010000687C0 /* PTBlockEventListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTBlockEventListener.m; sourceTree = ""; }; A35281E713F75265000687C0 /* PTPusherAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherAPI.h; sourceTree = ""; }; A35281E813F75265000687C0 /* PTPusherAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherAPI.m; sourceTree = ""; }; @@ -169,9 +195,11 @@ A369CFE114FDAD9200A8D56B /* PrivateChannelsSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrivateChannelsSpec.m; sourceTree = ""; }; A373A2C91565248C00BFAECE /* PusherClientSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PusherClientSpec.m; sourceTree = ""; }; A37E158814E4997700DCA3A6 /* Security.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - A37E158E14E49F2D00DCA3A6 /* SRWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SRWebSocket.h; path = Pods/Headers/SocketRocket/SRWebSocket.h; sourceTree = SOURCE_ROOT; }; A37E160714E4C87500DCA3A6 /* libicucore.dylib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; }; A37E167314E572C900DCA3A6 /* PTPusherMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherMacros.h; sourceTree = ""; }; + A394E6EF18451C99004C70A2 /* PTPusherSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherSpec.m; sourceTree = ""; }; + A394E6F718463DFA004C70A2 /* PTPusherChannel+ReactiveExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PTPusherChannel+ReactiveExtensions.h"; sourceTree = ""; }; + A394E6F818463DFA004C70A2 /* PTPusherChannel+ReactiveExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PTPusherChannel+ReactiveExtensions.m"; sourceTree = ""; }; A39E238613F7E3FD0083CAD7 /* PTPusherErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherErrors.h; sourceTree = ""; }; A39E238713F7E6AB0083CAD7 /* PusherPresenceEventsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PusherPresenceEventsViewController.h; sourceTree = ""; }; A39E238813F7E6AB0083CAD7 /* PusherPresenceEventsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PusherPresenceEventsViewController.m; sourceTree = ""; }; @@ -189,11 +217,9 @@ A3A9F96A1496E9C300F83617 /* BasicEventHandlingSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BasicEventHandlingSpec.m; sourceTree = ""; }; A3A9F96C1496E9E500F83617 /* SpecHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecHelper.h; sourceTree = ""; }; A3A9F96D1496E9E500F83617 /* SpecHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecHelper.m; sourceTree = ""; }; - A3AC28B413F75530001C4808 /* PTURLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTURLRequestOperation.h; sourceTree = ""; }; A3AC28B513F75530001C4808 /* PTURLRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTURLRequestOperation.m; sourceTree = ""; }; A3AC28BC13F75BF1001C4808 /* PusherExampleMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PusherExampleMenuViewController.h; sourceTree = ""; }; A3AC28BD13F75BF1001C4808 /* PusherExampleMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PusherExampleMenuViewController.m; sourceTree = ""; }; - A3AC28C113F76C50001C4808 /* PTPusherChannelAuthorizationOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherChannelAuthorizationOperation.h; sourceTree = ""; }; A3AC28C213F76C50001C4808 /* PTPusherChannelAuthorizationOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherChannelAuthorizationOperation.m; sourceTree = ""; }; A3B7E4EA1581672A00CDA6DA /* ClientEventsSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClientEventsSpec.m; sourceTree = ""; }; A3C32D9A14D083C10017FAED /* PTPusherEventSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherEventSpec.m; sourceTree = ""; }; @@ -213,14 +239,28 @@ A3D1D2911157FA4C009A12AD /* PTPusherEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherEvent.m; sourceTree = ""; }; A3D1D29B1157FA80009A12AD /* libPusher-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "libPusher-Info.plist"; sourceTree = ""; }; A3D1D2B71158013F009A12AD /* libPusher.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPusher.a; sourceTree = BUILT_PRODUCTS_DIR; }; + A3E5CBF4184640C3006A54DD /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + A3E5CBF618464164006A54DD /* ReactiveEventsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReactiveEventsViewController.h; sourceTree = ""; }; + A3E5CBF718464164006A54DD /* ReactiveEventsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReactiveEventsViewController.m; sourceTree = ""; }; + A3E5CBF918464227006A54DD /* ReactiveEventsViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ReactiveEventsViewController.xib; path = Sample/ReactiveEventsViewController.xib; sourceTree = ""; }; + A3E5CBFB1846461A006A54DD /* PTPusher+ReactiveExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PTPusher+ReactiveExtensions.h"; sourceTree = ""; }; + A3E5CBFC1846461A006A54DD /* PTPusher+ReactiveExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PTPusher+ReactiveExtensions.m"; sourceTree = ""; }; + A3E5CC0118464959006A54DD /* PTPusher+ReactiveExtensions_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PTPusher+ReactiveExtensions_Internal.h"; sourceTree = ""; }; + A3E5CC3718466879006A54DD /* libPusher_ReactiveExtensions.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPusher_ReactiveExtensions.a; sourceTree = BUILT_PRODUCTS_DIR; }; + A3E5CC3D18466CD5006A54DD /* NSDictionary+QueryString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+QueryString.h"; sourceTree = ""; }; + A3E5CC3E18466CD5006A54DD /* NSString+Hashing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Hashing.h"; sourceTree = ""; }; + A3E5CC3F18466CD5006A54DD /* PTBlockEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTBlockEventListener.h; sourceTree = ""; }; + A3E5CC4018466CD5006A54DD /* PTJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTJSON.h; sourceTree = ""; }; + A3E5CC4118466CD5006A54DD /* PTPusherChannel_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherChannel_Private.h; sourceTree = ""; }; + A3E5CC4218466CD5006A54DD /* PTPusherChannelAuthorizationOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherChannelAuthorizationOperation.h; sourceTree = ""; }; + A3E5CC4318466CD5006A54DD /* PTTargetActionEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTTargetActionEventListener.h; sourceTree = ""; }; + A3E5CC4418466CD5006A54DD /* PTURLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTURLRequestOperation.h; sourceTree = ""; }; A3FE41C811811161009CF5D7 /* NewEventViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewEventViewController.h; sourceTree = ""; }; A3FE41C911811161009CF5D7 /* NewEventViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewEventViewController.m; sourceTree = ""; }; A3FE41CA11811161009CF5D7 /* NewEventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = NewEventViewController.xib; path = Sample/Classes/NewEventViewController.xib; sourceTree = ""; }; A3FE42181181173B009CF5D7 /* PTPusherChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTPusherChannel.h; sourceTree = ""; }; A3FE42191181173B009CF5D7 /* PTPusherChannel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PTPusherChannel.m; sourceTree = ""; }; - A3FE429B11811EE8009CF5D7 /* NSString+Hashing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Hashing.h"; sourceTree = ""; }; A3FE429C11811EE8009CF5D7 /* NSString+Hashing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Hashing.m"; sourceTree = ""; }; - A3FE42FF11812541009CF5D7 /* NSDictionary+QueryString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+QueryString.h"; sourceTree = ""; }; A3FE430011812541009CF5D7 /* NSDictionary+QueryString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+QueryString.m"; sourceTree = ""; }; F1A8F1FD27B9464DAC1AADB5 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -235,6 +275,7 @@ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, A3D1D0B61157CCDE009A12AD /* CFNetwork.framework in Frameworks */, + A3E5CC3818466915006A54DD /* libPusher_ReactiveExtensions.a in Frameworks */, A3A297DB17368BE200BD956D /* libPusher.a in Frameworks */, 5D5C4E7E0F2A4C92B9D85932 /* libPods.a in Frameworks */, ); @@ -249,6 +290,7 @@ A37E158914E4997700DCA3A6 /* Security.framework in Frameworks */, A3A1A20111581782001EF877 /* CFNetwork.framework in Frameworks */, A3A1A20211581782001EF877 /* Foundation.framework in Frameworks */, + A394E6F118451CD3004C70A2 /* SenTestingKit.framework in Frameworks */, 009E68D1E15E43B3BDAB74B0 /* libPods-specs.a in Frameworks */, A3A297DC17368BE300BD956D /* libPusher.a in Frameworks */, A3A2DECF179C202100349728 /* libPods.a in Frameworks */, @@ -264,6 +306,7 @@ A3A9F95A1496E96100F83617 /* SenTestingKit.framework in Frameworks */, A3A9F95B1496E96100F83617 /* UIKit.framework in Frameworks */, A3A9F95C1496E96100F83617 /* Foundation.framework in Frameworks */, + A3F032471822CC8A00976DA0 /* libPods.a in Frameworks */, A3A9FA4F1496EEE000F83617 /* CFNetwork.framework in Frameworks */, A37E158D14E499E000DCA3A6 /* Security.framework in Frameworks */, 6D926C9364F64493B0A7BE5A /* libPods-specs.a in Frameworks */, @@ -278,12 +321,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A3E5CC3118466879006A54DD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 080E96DDFE201D6D7F000001 /* Library */ = { isa = PBXGroup; children = ( + A3E5CC3C18466CD5006A54DD /* Private Headers */, A3173757155D2D12007E4BBA /* Testing */, A35281E613F7524C000687C0 /* REST API Client */, A35281D813F73C42000687C0 /* Event Listeners */, @@ -300,7 +351,6 @@ A3A1A41611582DC3001EF877 /* PTPusherDelegate.h */, A3FE42181181173B009CF5D7 /* PTPusherChannel.h */, A3FE42191181173B009CF5D7 /* PTPusherChannel.m */, - A3AC28C113F76C50001C4808 /* PTPusherChannelAuthorizationOperation.h */, A3AC28C213F76C50001C4808 /* PTPusherChannelAuthorizationOperation.m */, A35281CE13F721A8000687C0 /* PTPusherConnection.h */, A35281CF13F721A8000687C0 /* PTPusherConnection.m */, @@ -317,6 +367,7 @@ A3D1D2B71158013F009A12AD /* libPusher.a */, A3A1A0EB115813E2001EF877 /* UnitTests.octest */, A3A9F9581496E96100F83617 /* Functional Specs.octest */, + A3E5CC3718466879006A54DD /* libPusher_ReactiveExtensions.a */, ); name = Products; sourceTree = ""; @@ -324,8 +375,9 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + A3E5CBF4184640C3006A54DD /* Default-568h@2x.png */, A3D1D2711157F961009A12AD /* Sample Application */, - A3D1D0991157CC3F009A12AD /* Vendor */, + A394E6F318463D9C004C70A2 /* ReactiveExtensions */, 080E96DDFE201D6D7F000001 /* Library */, A3A19FB211580DC8001EF877 /* Specs */, A3A9F95D1496E96100F83617 /* Functional Specs */, @@ -384,9 +436,7 @@ A35281D813F73C42000687C0 /* Event Listeners */ = { isa = PBXGroup; children = ( - A35281D913F73C54000687C0 /* PTTargetActionEventListener.h */, A35281DA13F73C54000687C0 /* PTTargetActionEventListener.m */, - A35281E213F75010000687C0 /* PTBlockEventListener.h */, A35281E313F75010000687C0 /* PTBlockEventListener.m */, ); name = "Event Listeners"; @@ -401,6 +451,18 @@ name = "REST API Client"; sourceTree = ""; }; + A394E6F318463D9C004C70A2 /* ReactiveExtensions */ = { + isa = PBXGroup; + children = ( + A394E6F718463DFA004C70A2 /* PTPusherChannel+ReactiveExtensions.h */, + A394E6F818463DFA004C70A2 /* PTPusherChannel+ReactiveExtensions.m */, + A3E5CBFB1846461A006A54DD /* PTPusher+ReactiveExtensions.h */, + A3E5CBFC1846461A006A54DD /* PTPusher+ReactiveExtensions.m */, + A3E5CC0118464959006A54DD /* PTPusher+ReactiveExtensions_Internal.h */, + ); + path = ReactiveExtensions; + sourceTree = ""; + }; A3A19FB211580DC8001EF877 /* Specs */ = { isa = PBXGroup; children = ( @@ -409,6 +471,7 @@ A30575CE15233C1200DA19BD /* PTPusherPresenceChannelSpec.m */, A304895E1667A8A6009511CB /* PTPusherChannelAuthorizationOperationSpec.m */, A3173754155D2CDF007E4BBA /* PTPusherMockConnectionSpec.m */, + A394E6EF18451C99004C70A2 /* PTPusherSpec.m */, A3C32D9C14D083D60017FAED /* SpecHelper.h */, A366E53914FD88B3002F0C39 /* SpecHelper.m */, ); @@ -440,15 +503,6 @@ name = "Supporting Files"; sourceTree = ""; }; - A3D1D0991157CC3F009A12AD /* Vendor */ = { - isa = PBXGroup; - children = ( - A3382DEA1525D01B0025550D /* JSONKit.h */, - A37E158E14E49F2D00DCA3A6 /* SRWebSocket.h */, - ); - path = Vendor; - sourceTree = ""; - }; A3D1D2711157F961009A12AD /* Sample Application */ = { isa = PBXGroup; children = ( @@ -478,16 +532,34 @@ A3698FED13FF0868005CF130 /* NSMutableURLRequest+BasicAuth.m */, A3698FFD13FF200C005CF130 /* NSData+Base64.h */, A3698FFE13FF200C005CF130 /* NSData+Base64.m */, + A3E5CBF618464164006A54DD /* ReactiveEventsViewController.h */, + A3E5CBF718464164006A54DD /* ReactiveEventsViewController.m */, ); path = Classes; sourceTree = ""; }; + A3E5CC3C18466CD5006A54DD /* Private Headers */ = { + isa = PBXGroup; + children = ( + A3E5CC3D18466CD5006A54DD /* NSDictionary+QueryString.h */, + A3E5CC3E18466CD5006A54DD /* NSString+Hashing.h */, + A3E5CC3F18466CD5006A54DD /* PTBlockEventListener.h */, + A3E5CC4018466CD5006A54DD /* PTJSON.h */, + A3E5CC4118466CD5006A54DD /* PTPusherChannel_Private.h */, + A3E5CC4218466CD5006A54DD /* PTPusherChannelAuthorizationOperation.h */, + A3E5CC4318466CD5006A54DD /* PTTargetActionEventListener.h */, + A3E5CC4418466CD5006A54DD /* PTURLRequestOperation.h */, + ); + path = "Private Headers"; + sourceTree = ""; + }; A3FE41CD1181116C009CF5D7 /* Resources */ = { isa = PBXGroup; children = ( A3FE41CA11811161009CF5D7 /* NewEventViewController.xib */, A3D1D2831157FA30009A12AD /* MainWindow.xib */, A3D1D2851157FA30009A12AD /* PusherEventsViewController.xib */, + A3E5CBF918464227006A54DD /* ReactiveEventsViewController.xib */, ); name = Resources; path = ..; @@ -496,14 +568,9 @@ A3FE429311811ED6009CF5D7 /* Utility */ = { isa = PBXGroup; children = ( - A3AC28B413F75530001C4808 /* PTURLRequestOperation.h */, A3AC28B513F75530001C4808 /* PTURLRequestOperation.m */, - A30950111525C272008F695B /* PTJSON.h */, A30950121525C272008F695B /* PTJSON.m */, - A309500F1525C236008F695B /* PTJSONParser.h */, - A3FE429B11811EE8009CF5D7 /* NSString+Hashing.h */, A3FE429C11811EE8009CF5D7 /* NSString+Hashing.m */, - A3FE42FF11812541009CF5D7 /* NSDictionary+QueryString.h */, A3FE430011812541009CF5D7 /* NSDictionary+QueryString.m */, A37E167314E572C900DCA3A6 /* PTPusherMacros.h */, ); @@ -517,32 +584,54 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + A3E5CC4B18466CD5006A54DD /* PTTargetActionEventListener.h in Headers */, + A3E5CC4A18466CD5006A54DD /* PTPusherChannelAuthorizationOperation.h in Headers */, A3A1A42A11582F26001EF877 /* PTPusherDelegate.h in Headers */, A3D1D2C911580162009A12AD /* PTPusher.h in Headers */, + A3E5CC4618466CD5006A54DD /* NSString+Hashing.h in Headers */, + A3E5CC4818466CD5006A54DD /* PTJSON.h in Headers */, A3D1D2CB11580162009A12AD /* PTPusherEvent.h in Headers */, - A3FE429E11811EEE009CF5D7 /* NSString+Hashing.h in Headers */, A35281D013F721A8000687C0 /* PTPusherConnection.h in Headers */, A35281D313F72E03000687C0 /* PTPusherEventPublisher.h in Headers */, A35281D613F736DF000687C0 /* PTPusherEventDispatcher.h in Headers */, - A35281DB13F73C54000687C0 /* PTTargetActionEventListener.h in Headers */, - A35281E413F75010000687C0 /* PTBlockEventListener.h in Headers */, + A3E5CC4C18466CD5006A54DD /* PTURLRequestOperation.h in Headers */, + A3E5CC4718466CD5006A54DD /* PTBlockEventListener.h in Headers */, A35281E913F75265000687C0 /* PTPusherAPI.h in Headers */, A3D1D2C711580162009A12AD /* PTEventListener.h in Headers */, - A3AC28B613F75530001C4808 /* PTURLRequestOperation.h in Headers */, - A3AC28BF13F75BF1001C4808 /* PusherExampleMenuViewController.h in Headers */, - A3AC28C313F76C51001C4808 /* PTPusherChannelAuthorizationOperation.h in Headers */, A3B2931F14D8D96900C6B79F /* PTPusherPresenceChannelDelegate.h in Headers */, A3CA666914D96814003E2F1E /* PTPusherChannel.h in Headers */, + A3E5CC4918466CD5006A54DD /* PTPusherChannel_Private.h in Headers */, A3CA670E14DBBAA1003E2F1E /* PTPusherErrors.h in Headers */, - A3CA671514DBBAE1003E2F1E /* NSDictionary+QueryString.h in Headers */, - A37E158F14E49F2D00DCA3A6 /* SRWebSocket.h in Headers */, A37E167414E572C900DCA3A6 /* PTPusherMacros.h in Headers */, - A3382DE41525C3FA0025550D /* PTJSON.h in Headers */, - A3382DF61525D06C0025550D /* JSONKit.h in Headers */, - A3382E011525D0D50025550D /* PTJSONParser.h in Headers */, A317375F155D38C4007E4BBA /* PTPusher+Testing.h in Headers */, A3226317155D481C00A46067 /* PTPusherMockConnection.h in Headers */, 4D81597F1712C6CA0013A485 /* Pusher.h in Headers */, + A3E5CC4518466CD5006A54DD /* NSDictionary+QueryString.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A3E5CC0418466879006A54DD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A3E5CC0518466879006A54DD /* PTPusherDelegate.h in Headers */, + A3E5CC0618466879006A54DD /* PTPusher.h in Headers */, + A3E5CC0718466879006A54DD /* PTPusherEvent.h in Headers */, + A3E5CC0918466879006A54DD /* PTPusherChannel+ReactiveExtensions.h in Headers */, + A3E5CC0A18466879006A54DD /* PTPusherConnection.h in Headers */, + A3E5CC0B18466879006A54DD /* PTPusherEventPublisher.h in Headers */, + A3E5CC0C18466879006A54DD /* PTPusherEventDispatcher.h in Headers */, + A3E5CC0F18466879006A54DD /* PTPusherAPI.h in Headers */, + A3E5CC1018466879006A54DD /* PTEventListener.h in Headers */, + A3E5CC1318466879006A54DD /* PTPusher+ReactiveExtensions_Internal.h in Headers */, + A3E5CC1518466879006A54DD /* PTPusherPresenceChannelDelegate.h in Headers */, + A3E5CC1718466879006A54DD /* PTPusherChannel.h in Headers */, + A3E5CC1818466879006A54DD /* PTPusher+ReactiveExtensions.h in Headers */, + A3E5CC1918466879006A54DD /* PTPusherErrors.h in Headers */, + A3E5CC1B18466879006A54DD /* PTPusherMacros.h in Headers */, + A3E5CC1C18466879006A54DD /* PTPusher+Testing.h in Headers */, + A3E5CC1D18466879006A54DD /* PTPusherMockConnection.h in Headers */, + A3E5CC1E18466879006A54DD /* Pusher.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -565,6 +654,7 @@ buildRules = ( ); dependencies = ( + A3E5CC3A18466956006A54DD /* PBXTargetDependency */, A3D1D3031158029F009A12AD /* PBXTargetDependency */, ); name = SampleApp; @@ -632,13 +722,32 @@ productReference = A3D1D2B71158013F009A12AD /* libPusher.a */; productType = "com.apple.product-type.library.static"; }; + A3E5CC0318466879006A54DD /* libPusher_ReactiveExtensions.a */ = { + isa = PBXNativeTarget; + buildConfigurationList = A3E5CC3418466879006A54DD /* Build configuration list for PBXNativeTarget "libPusher_ReactiveExtensions.a" */; + buildPhases = ( + A3E5CC0418466879006A54DD /* Headers */, + A3E5CC1F18466879006A54DD /* Sources */, + A3E5CC3118466879006A54DD /* Frameworks */, + A3E5CC3218466879006A54DD /* Copy Pods Resources */, + A3E5CC3318466879006A54DD /* Just here to export ENV for Rake */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = libPusher_ReactiveExtensions.a; + productName = libPusher; + productReference = A3E5CC3718466879006A54DD /* libPusher_ReactiveExtensions.a */; + productType = "com.apple.product-type.library.static"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0450; + LastUpgradeCheck = 0500; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "libPusher" */; compatibilityVersion = "Xcode 3.2"; @@ -653,6 +762,7 @@ targets = ( 1D6058900D05DD3D006BFB54 /* SampleApp */, A3D1D2B61158013F009A12AD /* libPusher */, + A3E5CC0318466879006A54DD /* libPusher_ReactiveExtensions.a */, A3A1A0EA115813E2001EF877 /* UnitTests */, A3A9F9571496E96100F83617 /* Functional Specs */, ); @@ -664,7 +774,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + A3E5CBFA18464227006A54DD /* ReactiveEventsViewController.xib in Resources */, A3D1D2891157FA30009A12AD /* MainWindow.xib in Resources */, + A3E5CBF5184640C3006A54DD /* Default-568h@2x.png in Resources */, A3D1D28B1157FA30009A12AD /* PusherEventsViewController.xib in Resources */, A3FE41CC11811161009CF5D7 /* NewEventViewController.xib in Resources */, ); @@ -828,6 +940,35 @@ shellPath = /bin/sh; shellScript = ""; }; + A3E5CC3218466879006A54DD /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + A3E5CC3318466879006A54DD /* Just here to export ENV for Rake */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Just here to export ENV for Rake"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ""; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -842,6 +983,7 @@ A39E238913F7E6AB0083CAD7 /* PusherPresenceEventsViewController.m in Sources */, A3698FF213FF0A7A005CF130 /* NSMutableURLRequest+BasicAuth.m in Sources */, A3698FFF13FF200C005CF130 /* NSData+Base64.m in Sources */, + A3E5CBF818464164006A54DD /* ReactiveEventsViewController.m in Sources */, A37E15EA14E4BBBA00DCA3A6 /* PusherExampleMenuViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -852,6 +994,7 @@ files = ( A3C32D9B14D083C10017FAED /* PTPusherEventSpec.m in Sources */, A366E53814FD87F5002F0C39 /* PTPusherEventDispatcherSpec.m in Sources */, + A394E6F218451CFE004C70A2 /* PTPusherSpec.m in Sources */, A366E53A14FD88B3002F0C39 /* SpecHelper.m in Sources */, A30575D115233CC800DA19BD /* PTPusherPresenceChannelSpec.m in Sources */, A317375B155D2D7D007E4BBA /* PTPusherMockConnectionSpec.m in Sources */, @@ -895,6 +1038,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A3E5CC1F18466879006A54DD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A3E5CC2118466879006A54DD /* PTPusherChannel+ReactiveExtensions.m in Sources */, + A3E5CC2A18466879006A54DD /* PTPusher+ReactiveExtensions.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -903,6 +1055,11 @@ target = A3D1D2B61158013F009A12AD /* libPusher */; targetProxy = A3D1D3021158029F009A12AD /* PBXContainerItemProxy */; }; + A3E5CC3A18466956006A54DD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A3E5CC0318466879006A54DD /* libPusher_ReactiveExtensions.a */; + targetProxy = A3E5CC3918466956006A54DD /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -931,6 +1088,7 @@ GCC_PREFIX_HEADER = libPusher_Prefix.pch; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "libPusher-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; PRODUCT_NAME = SampleApp; SKIP_INSTALL = YES; }; @@ -948,6 +1106,7 @@ GCC_PREFIX_HEADER = libPusher_Prefix.pch; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "libPusher-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; PRODUCT_NAME = SampleApp; SKIP_INSTALL = YES; }; @@ -960,11 +1119,6 @@ ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; DSTROOT = /tmp/xcodeproj.dst; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - "\"$(SRCROOT)/Frameworks\"", - ); GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -996,11 +1150,6 @@ COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DSTROOT = /tmp/xcodeproj.dst; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - "\"$(SRCROOT)/Frameworks\"", - ); GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; @@ -1092,7 +1241,10 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = libPusher_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = "kPTPusherClientLibraryVersion=@\"$(CURRENT_PROJECT_VERSION)\""; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "kPTPusherClientLibraryVersion=@\"$(CURRENT_PROJECT_VERSION)\"", + ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; OTHER_LDFLAGS = "$(inherited)"; PRODUCT_NAME = Pusher; @@ -1112,7 +1264,10 @@ DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = libPusher_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = "kPTPusherClientLibraryVersion=@\"$(CURRENT_PROJECT_VERSION)\""; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "kPTPusherClientLibraryVersion=@\"$(CURRENT_PROJECT_VERSION)\"", + ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; OTHER_LDFLAGS = "$(inherited)"; PRODUCT_NAME = Pusher; @@ -1122,19 +1277,72 @@ }; name = Release; }; + A3E5CC3518466879006A54DD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1.5; + DSTROOT = /tmp/xcodeproj.dst; + DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = libPusher_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "kPTPusherClientLibraryVersion=@\"$(CURRENT_PROJECT_VERSION)\"", + ); + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + OTHER_LDFLAGS = "$(inherited)"; + PRODUCT_NAME = Pusher_ReactiveExtensions; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + A3E5CC3618466879006A54DD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + CURRENT_PROJECT_VERSION = 1.5; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DSTROOT = /tmp/xcodeproj.dst; + DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = libPusher_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "kPTPusherClientLibraryVersion=@\"$(CURRENT_PROJECT_VERSION)\"", + ); + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + OTHER_LDFLAGS = "$(inherited)"; + PRODUCT_NAME = Pusher_ReactiveExtensions; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + ZERO_LINK = NO; + }; + name = Release; + }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = A315780A14D0751C000136A9 /* Pods.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1.1; DYLIB_CURRENT_VERSION = 1.1; GCC_C_LANGUAGE_STANDARD = c99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "COCOAPODS=1", + DEBUG, + ); GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "$(inherited)"; SDKROOT = iphoneos; WARNING_CFLAGS = "-Wno-arc-performSelector-leaks"; @@ -1145,7 +1353,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = A315780A14D0751C000136A9 /* Pods.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1.1; DYLIB_CURRENT_VERSION = 1.1; @@ -1153,7 +1360,7 @@ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; OTHER_LDFLAGS = "$(inherited)"; SDKROOT = iphoneos; WARNING_CFLAGS = "-Wno-arc-performSelector-leaks"; @@ -1199,6 +1406,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + A3E5CC3418466879006A54DD /* Build configuration list for PBXNativeTarget "libPusher_ReactiveExtensions.a" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A3E5CC3518466879006A54DD /* Debug */, + A3E5CC3618466879006A54DD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "libPusher" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/libPusher.xcodeproj/xcshareddata/xcschemes/Functional Specs.xcscheme b/libPusher.xcodeproj/xcshareddata/xcschemes/Functional Specs.xcscheme index a7c60459..45f5f8c0 100644 --- a/libPusher.xcodeproj/xcshareddata/xcschemes/Functional Specs.xcscheme +++ b/libPusher.xcodeproj/xcshareddata/xcschemes/Functional Specs.xcscheme @@ -1,6 +1,6 @@ + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> @@ -24,20 +24,10 @@ - - - -