├── _Pods.xcodeproj ├── Example ├── Tests │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── Tests-Prefix.pch │ └── Tests-Info.plist ├── KVOMutableArray │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── KVOViewController.h │ ├── KVOAppDelegate.h │ ├── KVOMutableArray-Prefix.pch │ ├── main.m │ ├── KVOViewController.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── KVOMutableArray-Info.plist │ ├── Main.storyboard │ └── KVOAppDelegate.m ├── Pods │ ├── Target Support Files │ │ ├── ReactiveObjC │ │ │ ├── ReactiveObjC.modulemap │ │ │ ├── ReactiveObjC-dummy.m │ │ │ ├── ReactiveObjC-prefix.pch │ │ │ ├── ReactiveObjC.xcconfig │ │ │ └── Info.plist │ │ ├── KVOMutableArray │ │ │ ├── KVOMutableArray.modulemap │ │ │ ├── KVOMutableArray-dummy.m │ │ │ ├── KVOMutableArray-prefix.pch │ │ │ ├── KVOMutableArray-umbrella.h │ │ │ ├── KVOMutableArray.xcconfig │ │ │ └── Info.plist │ │ ├── Pods-KVOMutableArray_Tests │ │ │ ├── Pods-KVOMutableArray_Tests.modulemap │ │ │ ├── Pods-KVOMutableArray_Tests-dummy.m │ │ │ ├── Pods-KVOMutableArray_Tests-umbrella.h │ │ │ ├── Pods-KVOMutableArray_Tests.debug.xcconfig │ │ │ ├── Pods-KVOMutableArray_Tests.release.xcconfig │ │ │ ├── Info.plist │ │ │ └── Pods-KVOMutableArray_Tests-acknowledgements.markdown │ │ └── Pods-KVOMutableArray_Example │ │ │ ├── Pods-KVOMutableArray_Example.modulemap │ │ │ ├── Pods-KVOMutableArray_Example-dummy.m │ │ │ ├── Pods-KVOMutableArray_Example-umbrella.h │ │ │ ├── Pods-KVOMutableArray_Example.debug.xcconfig │ │ │ ├── Pods-KVOMutableArray_Example.release.xcconfig │ │ │ └── Info.plist │ ├── ReactiveObjC │ │ ├── ReactiveObjC │ │ │ ├── RACCompoundDisposableProvider.d │ │ │ ├── RACSignalProvider.d │ │ │ ├── RACEagerSequence.h │ │ │ ├── RACEmptySequence.h │ │ │ ├── RACImmediateScheduler.h │ │ │ ├── RACUnarySequence.h │ │ │ ├── RACEmptySignal.h │ │ │ ├── RACValueTransformer.h │ │ │ ├── RACErrorSignal.h │ │ │ ├── RACIndexSetSequence.h │ │ │ ├── RACMulticastConnection+Private.h │ │ │ ├── RACReturnSignal.h │ │ │ ├── NSArray+RACSequenceAdditions.m │ │ │ ├── NSString+RACSequenceAdditions.m │ │ │ ├── NSIndexSet+RACSequenceAdditions.m │ │ │ ├── RACDynamicSignal.h │ │ │ ├── NSSet+RACSequenceAdditions.m │ │ │ ├── RACUnit.m │ │ │ ├── RACSubscriptionScheduler.h │ │ │ ├── RACUnit.h │ │ │ ├── NSOrderedSet+RACSequenceAdditions.m │ │ │ ├── RACSubscriber+Private.h │ │ │ ├── RACSignalSequence.h │ │ │ ├── NSEnumerator+RACSequenceAdditions.m │ │ │ ├── RACGroupedSignal.m │ │ │ ├── NSFileHandle+RACSupport.h │ │ │ ├── RACGroupedSignal.h │ │ │ ├── UISwitch+RACSignalSupport.m │ │ │ ├── NSObject+RACDescription.h │ │ │ ├── UIGestureRecognizer+RACSignalSupport.h │ │ │ ├── RACArraySequence.h │ │ │ ├── RACTupleSequence.h │ │ │ ├── RACStringSequence.h │ │ │ ├── UISlider+RACSignalSupport.m │ │ │ ├── UIStepper+RACSignalSupport.m │ │ │ ├── NSNotificationCenter+RACSupport.h │ │ │ ├── RACScopedDisposable.h │ │ │ ├── UIDatePicker+RACSignalSupport.m │ │ │ ├── UIControl+RACSignalSupport.h │ │ │ ├── RACQueueScheduler.h │ │ │ ├── RACBehaviorSubject.h │ │ │ ├── NSEnumerator+RACSequenceAdditions.h │ │ │ ├── UISegmentedControl+RACSignalSupport.m │ │ │ ├── RACScopedDisposable.m │ │ │ ├── NSSet+RACSequenceAdditions.h │ │ │ ├── RACSubject.h │ │ │ ├── NSArray+RACSequenceAdditions.h │ │ │ ├── NSOrderedSet+RACSequenceAdditions.h │ │ │ ├── NSIndexSet+RACSequenceAdditions.h │ │ │ ├── RACStream+Private.h │ │ │ ├── UIButton+RACCommandSupport.h │ │ │ ├── NSData+RACSupport.h │ │ │ ├── UISwitch+RACSignalSupport.h │ │ │ ├── NSString+RACSequenceAdditions.h │ │ │ ├── RACDynamicSequence.h │ │ │ ├── NSString+RACSupport.h │ │ │ ├── RACReplaySubject.h │ │ │ ├── UIBarButtonItem+RACCommandSupport.h │ │ │ ├── UISlider+RACSignalSupport.h │ │ │ ├── UIStepper+RACSignalSupport.h │ │ │ ├── UIDatePicker+RACSignalSupport.h │ │ │ ├── UIRefreshControl+RACCommandSupport.h │ │ │ ├── RACTargetQueueScheduler.h │ │ │ ├── NSObject+RACDeallocating.h │ │ │ ├── UISegmentedControl+RACSignalSupport.h │ │ │ ├── NSDictionary+RACSequenceAdditions.m │ │ │ ├── UITableViewCell+RACSignalSupport.h │ │ │ ├── RACValueTransformer.m │ │ │ ├── RACTargetQueueScheduler.m │ │ │ ├── MKAnnotationView+RACSignalSupport.h │ │ │ ├── NSURLConnection+RACSupport.h │ │ │ ├── MKAnnotationView+RACSignalSupport.m │ │ │ ├── UITableViewCell+RACSignalSupport.m │ │ │ ├── NSUserDefaults+RACSupport.h │ │ │ ├── RACDelegateProxy.h │ │ │ ├── UICollectionReusableView+RACSignalSupport.h │ │ │ ├── UICollectionReusableView+RACSignalSupport.m │ │ │ ├── UITableViewHeaderFooterView+RACSignalSupport.h │ │ │ ├── NSString+RACKeyPathUtilities.m │ │ │ ├── UITableViewHeaderFooterView+RACSignalSupport.m │ │ │ ├── UITextField+RACSignalSupport.h │ │ │ ├── NSData+RACSupport.m │ │ │ ├── NSNotificationCenter+RACSupport.m │ │ │ ├── RACBlockTrampoline.h │ │ │ ├── RACErrorSignal.m │ │ │ ├── RACPassthroughSubscriber.h │ │ │ ├── RACScheduler+Subclass.h │ │ │ ├── NSString+RACKeyPathUtilities.h │ │ │ ├── NSString+RACSupport.m │ │ │ ├── RACDisposable.h │ │ │ ├── UIControl+RACSignalSupportPrivate.h │ │ │ ├── NSObject+RACDescription.m │ │ │ ├── UIGestureRecognizer+RACSignalSupport.m │ │ │ ├── RACScheduler+Private.h │ │ │ ├── RACSubscriptingAssignmentTrampoline.m │ │ │ ├── UITextField+RACSignalSupport.m │ │ │ ├── RACKVOTrampoline.h │ │ │ ├── NSFileHandle+RACSupport.m │ │ │ ├── UIActionSheet+RACSignalSupport.h │ │ │ ├── UITextView+RACSignalSupport.h │ │ │ ├── NSDictionary+RACSequenceAdditions.h │ │ │ ├── RACKVOProxy.h │ │ │ ├── UIImagePickerController+RACSignalSupport.h │ │ │ ├── RACBehaviorSubject.m │ │ │ ├── RACEmptySignal.m │ │ │ ├── UIControl+RACSignalSupport.m │ │ │ ├── RACImmediateScheduler.m │ │ │ ├── RACQueueScheduler+Subclass.h │ │ │ ├── RACTestScheduler.h │ │ │ ├── UIActionSheet+RACSignalSupport.m │ │ │ ├── UIControl+RACSignalSupportPrivate.m │ │ │ ├── RACEmptySequence.m │ │ │ ├── RACSubscriptionScheduler.m │ │ │ ├── UITextView+RACSignalSupport.m │ │ │ ├── NSUserDefaults+RACSupport.m │ │ │ ├── RACDynamicSignal.m │ │ │ ├── UIImagePickerController+RACSignalSupport.m │ │ │ ├── RACSerialDisposable.h │ │ │ ├── UIBarButtonItem+RACCommandSupport.m │ │ │ ├── UIButton+RACCommandSupport.m │ │ │ ├── RACSubscriber.h │ │ │ ├── RACKVOProxy.m │ │ │ ├── RACEvent.h │ │ │ ├── RACCompoundDisposable.h │ │ │ ├── RACStringSequence.m │ │ │ ├── NSInvocation+RACTypeParsing.h │ │ │ ├── UIAlertView+RACSignalSupport.m │ │ │ ├── RACMulticastConnection.h │ │ │ ├── RACSignalSequence.m │ │ │ ├── NSURLConnection+RACSupport.m │ │ │ ├── RACEagerSequence.m │ │ │ ├── UIAlertView+RACSignalSupport.h │ │ │ ├── NSObject+RACLifting.h │ │ │ ├── NSObject+RACKVOWrapper.h │ │ │ ├── UIRefreshControl+RACCommandSupport.m │ │ │ ├── RACDisposable.m │ │ │ ├── RACTupleSequence.m │ │ │ ├── RACDelegateProxy.m │ │ │ ├── RACReturnSignal.m │ │ │ ├── RACUnarySequence.m │ │ │ ├── RACSubscriptingAssignmentTrampoline.h │ │ │ └── RACMulticastConnection.m │ │ └── LICENSE.md │ ├── Manifest.lock │ └── Local Podspecs │ │ └── KVOMutableArray.podspec.json ├── KVOMutableArray.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── Podfile ├── KVOMutableArray.xcworkspace │ └── contents.xcworkspacedata └── Podfile.lock ├── .codecov.yml ├── KVOMutableArray └── Classes │ ├── KVOMutableArray+ReactiveCocoaSupport.h │ ├── NSObject+BlockObservation.h │ ├── KVOMutableArray.h │ ├── KVOMutableArray+ReactiveCocoaSupport.m │ ├── KVOMutableArrayObserver.h │ └── KVOMutableArrayObserver.m ├── .slather.yml ├── .gitignore ├── .travis.yml ├── LICENSE └── KVOMutableArray.podspec /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /.codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | branch: master 3 | 4 | coverage: 5 | ignore: # files and folders that will be removed during processing 6 | - "Example/*" 7 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReactiveObjC/ReactiveObjC.modulemap: -------------------------------------------------------------------------------- 1 | framework module ReactiveObjC { 2 | umbrella header "ReactiveObjC-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReactiveObjC/ReactiveObjC-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ReactiveObjC : NSObject 3 | @end 4 | @implementation PodsDummy_ReactiveObjC 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/KVOMutableArray/KVOMutableArray.modulemap: -------------------------------------------------------------------------------- 1 | framework module KVOMutableArray { 2 | umbrella header "KVOMutableArray-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/KVOMutableArray/KVOMutableArray-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_KVOMutableArray : NSObject 3 | @end 4 | @implementation PodsDummy_KVOMutableArray 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Tests/Pods-KVOMutableArray_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_KVOMutableArray_Tests { 2 | umbrella header "Pods-KVOMutableArray_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/KVOMutableArray.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Example/Pods-KVOMutableArray_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_KVOMutableArray_Example { 2 | umbrella header "Pods-KVOMutableArray_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Tests/Pods-KVOMutableArray_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_KVOMutableArray_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_KVOMutableArray_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACCompoundDisposableProvider.d: -------------------------------------------------------------------------------- 1 | provider RACCompoundDisposable { 2 | probe added(char *compoundDisposable, char *disposable, long newTotal); 3 | probe removed(char *compoundDisposable, char *disposable, long newTotal); 4 | }; 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Example/Pods-KVOMutableArray_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_KVOMutableArray_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_KVOMutableArray_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSignalProvider.d: -------------------------------------------------------------------------------- 1 | provider RACSignal { 2 | probe next(char *signal, char *subscriber, char *valueDescription); 3 | probe completed(char *signal, char *subscriber); 4 | probe error(char *signal, char *subscriber, char *errorDescription); 5 | }; 6 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'KVOMutableArray_Example' do 4 | pod 'KVOMutableArray/ReactiveCocoaSupport', :path => '../' 5 | 6 | target 'KVOMutableArray_Tests' do 7 | inherit! :search_paths 8 | pod 'KVOMutableArray/ReactiveCocoaSupport', :path => '../' 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReactiveObjC/ReactiveObjC-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/KVOMutableArray/KVOMutableArray-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/KVOViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // KVOViewController.h 3 | // KVOMutableArray 4 | // 5 | // Created by Hai Feng Kao on 12/08/2016. 6 | // Copyright (c) 2016 Hai Feng Kao. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface KVOViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/KVOMutableArray.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /KVOMutableArray/Classes/KVOMutableArray+ReactiveCocoaSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // KVOMutableArray+ReactiveCocoaSupport.h 3 | // Pods 4 | // 5 | // Created by Hai Feng Kao on 2015/6/1. 6 | // 7 | // 8 | 9 | #import "KVOMutableArray.h" 10 | 11 | @class RACSignal; 12 | @interface KVOMutableArray (ReactiveCocoaSupport) 13 | - (RACSignal*)changeSignal; 14 | @end 15 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/KVOAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // KVOAppDelegate.h 3 | // KVOMutableArray 4 | // 5 | // Created by Hai Feng Kao on 12/08/2016. 6 | // Copyright (c) 2016 Hai Feng Kao. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface KVOAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACEagerSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACEagerSequence.h 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 02/01/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACArraySequence.h" 10 | 11 | // Private class that implements an eager sequence. 12 | @interface RACEagerSequence : RACArraySequence 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACEmptySequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACEmptySequence.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "RACSequence.h" 10 | 11 | // Private class representing an empty sequence. 12 | @interface RACEmptySequence : RACSequence 13 | 14 | + (RACEmptySequence *)empty; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACImmediateScheduler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACImmediateScheduler.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 11/30/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACScheduler.h" 10 | 11 | // A private scheduler which immediately executes its scheduled blocks. 12 | @interface RACImmediateScheduler : RACScheduler 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/KVOMutableArray-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // KVOMutableArray 4 | // 5 | // Created by Hai Feng Kao on 12/08/2016. 6 | // Copyright (c) 2016 Hai Feng Kao. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "KVOAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([KVOAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACUnarySequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACUnarySequence.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-05-01. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSequence.h" 10 | 11 | // Private class representing a sequence of exactly one value. 12 | @interface RACUnarySequence : RACSequence 13 | 14 | + (RACUnarySequence *)return:(id)value; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /.slather.yml: -------------------------------------------------------------------------------- 1 | # .slather.yml 2 | # 3 | coverage_service: coveralls 4 | xcodeproj: Example/KVOMutableArray.xcodeproj 5 | workspace: Example/KVOMutableArray.xcworkspace 6 | scheme: KVOMutableArray-Example 7 | source_directory: Pod/Classes 8 | 9 | # if you want to invoke slather on the local machine 10 | # gem i slather 11 | # slather coverage -s --scheme KVOMutableArray-Example --workspace ./Example/KVOMutableArray.xcworkspace ./Example/KVOMutableArray.xcodeproj 12 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACEmptySignal.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACEmptySignal.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-10-10. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSignal.h" 10 | 11 | // A private `RACSignal` subclasses that synchronously sends completed to any 12 | // subscribers. 13 | @interface RACEmptySignal : RACSignal 14 | 15 | + (RACSignal *)empty; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACValueTransformer.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACValueTransformer.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/6/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // A private block based transformer. 12 | @interface RACValueTransformer : NSValueTransformer 13 | 14 | + (instancetype)transformerWithBlock:(id (^)(id value))block; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACErrorSignal.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACErrorSignal.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-10-10. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSignal.h" 10 | 11 | // A private `RACSignal` subclasses that synchronously sends an error to any 12 | // subscribers. 13 | @interface RACErrorSignal : RACSignal 14 | 15 | + (RACSignal *)error:(NSError *)error; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACIndexSetSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACIndexSetSequence.h 3 | // ReactiveObjC 4 | // 5 | // Created by Sergey Gavrilyuk on 12/18/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSequence.h" 10 | 11 | // Private class that adapts an array to the RACSequence interface. 12 | @interface RACIndexSetSequence : RACSequence 13 | 14 | + (RACSequence *)sequenceWithIndexSet:(NSIndexSet *)indexSet; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACMulticastConnection+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACMulticastConnection+Private.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 4/11/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACMulticastConnection.h" 10 | 11 | @class RACSubject; 12 | 13 | @interface RACMulticastConnection () 14 | 15 | - (instancetype)initWithSourceSignal:(RACSignal *)source subject:(RACSubject *)subject; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACReturnSignal.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACReturnSignal.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-10-10. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSignal.h" 10 | 11 | // A private `RACSignal` subclasses that synchronously sends a value to any 12 | // subscribers, then completes. 13 | @interface RACReturnSignal : RACSignal 14 | 15 | + (RACSignal *)return:(id)value; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Tests/Pods-KVOMutableArray_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_KVOMutableArray_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_KVOMutableArray_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Example/Pods-KVOMutableArray_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_KVOMutableArray_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_KVOMutableArray_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSArray+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+RACSequenceAdditions.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSArray+RACSequenceAdditions.h" 10 | #import "RACArraySequence.h" 11 | 12 | @implementation NSArray (RACSequenceAdditions) 13 | 14 | - (RACSequence *)rac_sequence { 15 | return [RACArraySequence sequenceWithArray:self offset:0]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSString+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACSequenceAdditions.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSString+RACSequenceAdditions.h" 10 | #import "RACStringSequence.h" 11 | 12 | @implementation NSString (RACSequenceAdditions) 13 | 14 | - (RACSequence *)rac_sequence { 15 | return [RACStringSequence sequenceWithString:self offset:0]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSIndexSet+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSIndexSet+RACSequenceAdditions.m 3 | // ReactiveObjC 4 | // 5 | // Created by Sergey Gavrilyuk on 12/17/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "NSIndexSet+RACSequenceAdditions.h" 10 | #import "RACIndexSetSequence.h" 11 | 12 | @implementation NSIndexSet (RACSequenceAdditions) 13 | 14 | - (RACSequence *)rac_sequence { 15 | return [RACIndexSetSequence sequenceWithIndexSet:self]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACDynamicSignal.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACDynamicSignal.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-10-10. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSignal.h" 10 | 11 | // A private `RACSignal` subclasses that implements its subscription behavior 12 | // using a block. 13 | @interface RACDynamicSignal : RACSignal 14 | 15 | + (RACSignal *)createSignal:(RACDisposable * (^)(id subscriber))didSubscribe; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSSet+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+RACSequenceAdditions.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSSet+RACSequenceAdditions.h" 10 | #import "NSArray+RACSequenceAdditions.h" 11 | 12 | @implementation NSSet (RACSequenceAdditions) 13 | 14 | - (RACSequence *)rac_sequence { 15 | // TODO: First class support for set sequences. 16 | return self.allObjects.rac_sequence; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACUnit.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACUnit.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/27/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACUnit.h" 10 | 11 | @implementation RACUnit 12 | 13 | #pragma mark API 14 | 15 | + (RACUnit *)defaultUnit { 16 | static dispatch_once_t onceToken; 17 | static RACUnit *defaultUnit = nil; 18 | dispatch_once(&onceToken, ^{ 19 | defaultUnit = [[self alloc] init]; 20 | }); 21 | 22 | return defaultUnit; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSubscriptionScheduler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubscriptionScheduler.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 11/30/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACScheduler.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | // A private scheduler used only for subscriptions. See the private 14 | // +[RACScheduler subscriptionScheduler] method for more information. 15 | @interface RACSubscriptionScheduler : RACScheduler 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACUnit.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/27/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A unit represents an empty value. 14 | /// 15 | /// It should never be necessary to create a unit yourself. Just use +defaultUnit. 16 | @interface RACUnit : NSObject 17 | 18 | /// A singleton instance. 19 | + (RACUnit *)defaultUnit; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSOrderedSet+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSOrderedSet+RACSequenceAdditions.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSOrderedSet+RACSequenceAdditions.h" 10 | #import "NSArray+RACSequenceAdditions.h" 11 | 12 | @implementation NSOrderedSet (RACSequenceAdditions) 13 | 14 | - (RACSequence *)rac_sequence { 15 | // TODO: First class support for ordered set sequences. 16 | return self.array.rac_sequence; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/KVOMutableArray/KVOMutableArray-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "KVOMutableArray.h" 14 | #import "NSObject+BlockObservation.h" 15 | #import "KVOMutableArray+ReactiveCocoaSupport.h" 16 | 17 | FOUNDATION_EXPORT double KVOMutableArrayVersionNumber; 18 | FOUNDATION_EXPORT const unsigned char KVOMutableArrayVersionString[]; 19 | 20 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSubscriber+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubscriber+Private.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-06-13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSubscriber.h" 10 | 11 | // A simple block-based subscriber. 12 | @interface RACSubscriber : NSObject 13 | 14 | // Creates a new subscriber with the given blocks. 15 | + (instancetype)subscriberWithNext:(void (^)(id x))next error:(void (^)(NSError *error))error completed:(void (^)(void))completed; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - KVOMutableArray/Core (2.2.0) 3 | - KVOMutableArray/ReactiveCocoaSupport (2.2.0): 4 | - KVOMutableArray/Core 5 | - ReactiveObjC 6 | - ReactiveObjC (2.1.0) 7 | 8 | DEPENDENCIES: 9 | - KVOMutableArray/ReactiveCocoaSupport (from `../`) 10 | 11 | EXTERNAL SOURCES: 12 | KVOMutableArray: 13 | :path: ../ 14 | 15 | SPEC CHECKSUMS: 16 | KVOMutableArray: 53f2b2722c4c6dc370d3db016c1515cc2ff17738 17 | ReactiveObjC: 2edae120982d8e6d5407503a10edcfdd87eb8639 18 | 19 | PODFILE CHECKSUM: 05054bd84f4d86aa51a4f54490e17b48ef2ca700 20 | 21 | COCOAPODS: 1.2.1 22 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSignalSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSignalSequence.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-11-09. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSequence.h" 10 | 11 | @class RACSignal<__covariant ValueType>; 12 | 13 | // Private class that adapts a RACSignal to the RACSequence interface. 14 | @interface RACSignalSequence : RACSequence 15 | 16 | // Returns a sequence for enumerating over the given signal. 17 | + (RACSequence *)sequenceWithSignal:(RACSignal *)signal; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - KVOMutableArray/Core (2.2.0) 3 | - KVOMutableArray/ReactiveCocoaSupport (2.2.0): 4 | - KVOMutableArray/Core 5 | - ReactiveObjC 6 | - ReactiveObjC (2.1.0) 7 | 8 | DEPENDENCIES: 9 | - KVOMutableArray/ReactiveCocoaSupport (from `../`) 10 | 11 | EXTERNAL SOURCES: 12 | KVOMutableArray: 13 | :path: ../ 14 | 15 | SPEC CHECKSUMS: 16 | KVOMutableArray: 53f2b2722c4c6dc370d3db016c1515cc2ff17738 17 | ReactiveObjC: 2edae120982d8e6d5407503a10edcfdd87eb8639 18 | 19 | PODFILE CHECKSUM: 05054bd84f4d86aa51a4f54490e17b48ef2ca700 20 | 21 | COCOAPODS: 1.2.1 22 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSEnumerator+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSEnumerator+RACSequenceAdditions.m 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 07/01/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "NSEnumerator+RACSequenceAdditions.h" 10 | #import "RACSequence.h" 11 | 12 | @implementation NSEnumerator (RACSequenceAdditions) 13 | 14 | - (RACSequence *)rac_sequence { 15 | return [RACSequence sequenceWithHeadBlock:^{ 16 | return [self nextObject]; 17 | } tailBlock:^{ 18 | return self.rac_sequence; 19 | }]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACGroupedSignal.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACGroupedSignal.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 5/2/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACGroupedSignal.h" 10 | 11 | @interface RACGroupedSignal () 12 | @property (nonatomic, copy) id key; 13 | @end 14 | 15 | @implementation RACGroupedSignal 16 | 17 | #pragma mark API 18 | 19 | + (instancetype)signalWithKey:(id)key { 20 | RACGroupedSignal *subject = [self subject]; 21 | subject.key = key; 22 | return subject; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | #Pods/ 27 | .clang 28 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSFileHandle+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileHandle+RACSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 5/10/12. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSignal<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSFileHandle (RACSupport) 16 | 17 | // Read any available data in the background and send it. Completes when data 18 | // length is <= 0. 19 | - (RACSignal *)rac_readInBackground; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACGroupedSignal.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACGroupedSignal.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 5/2/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSubject.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A grouped signal is used by -[RACSignal groupBy:transform:]. 14 | @interface RACGroupedSignal : RACSubject 15 | 16 | /// The key shared by the group. 17 | @property (nonatomic, readonly, copy) id key; 18 | 19 | + (instancetype)signalWithKey:(id)key; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UISwitch+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UISwitch+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 20/07/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UISwitch+RACSignalSupport.h" 10 | #import 11 | #import "UIControl+RACSignalSupportPrivate.h" 12 | 13 | @implementation UISwitch (RACSignalSupport) 14 | 15 | - (RACChannelTerminal *)rac_newOnChannel { 16 | return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.on) nilValue:@NO]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReactiveObjC/ReactiveObjC.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "Foundation" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ReactiveObjC 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSObject+RACDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+RACDescription.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-05-13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // A simplified description of the object, which does not invoke -description 12 | // (and thus should be much faster in many cases). 13 | // 14 | // This is for debugging purposes only, and will return a constant string 15 | // unless the RAC_DEBUG_SIGNAL_NAMES environment variable is set. 16 | NSString *RACDescription(id object); 17 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIGestureRecognizer+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIGestureRecognizer+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Vera on 5/5/13. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSignal<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIGestureRecognizer (RACSignalSupport) 16 | 17 | /// Returns a signal that sends the receiver when its gesture occurs. 18 | - (RACSignal<__kindof UIGestureRecognizer *> *)rac_gestureSignal; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACArraySequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACArraySequence.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "RACSequence.h" 10 | 11 | // Private class that adapts an array to the RACSequence interface. 12 | @interface RACArraySequence : RACSequence 13 | 14 | // Returns a sequence for enumerating over the given array, starting from the 15 | // given offset. The array will be copied to prevent mutation. 16 | + (RACSequence *)sequenceWithArray:(NSArray *)array offset:(NSUInteger)offset; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACTupleSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACTupleSequence.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-05-01. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSequence.h" 10 | 11 | // Private class that adapts a RACTuple to the RACSequence interface. 12 | @interface RACTupleSequence : RACSequence 13 | 14 | // Returns a sequence for enumerating over the given backing array (from a 15 | // RACTuple), starting from the given offset. 16 | + (RACSequence *)sequenceWithTupleBackingArray:(NSArray *)backingArray offset:(NSUInteger)offset; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACStringSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACStringSequence.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "RACSequence.h" 10 | 11 | // Private class that adapts a string to the RACSequence interface. 12 | @interface RACStringSequence : RACSequence 13 | 14 | // Returns a sequence for enumerating over the given string, starting from the 15 | // given character offset. The string will be copied to prevent mutation. 16 | + (RACSequence *)sequenceWithString:(NSString *)string offset:(NSUInteger)offset; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UISlider+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UISlider+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 20/07/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UISlider+RACSignalSupport.h" 10 | #import 11 | #import "UIControl+RACSignalSupportPrivate.h" 12 | 13 | @implementation UISlider (RACSignalSupport) 14 | 15 | - (RACChannelTerminal *)rac_newValueChannelWithNilValue:(NSNumber *)nilValue { 16 | return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.value) nilValue:nilValue]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/KVOMutableArray/KVOMutableArray.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/KVOMutableArray 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | language: objective-c 6 | 7 | install: 8 | # too slow 9 | #- bundle exec pod repo update --silent 10 | - pod install --project-directory=Example 11 | 12 | script: 13 | - set -o pipefail && xcodebuild test -workspace Example/KVOMutableArray.xcworkspace -scheme KVOMutableArray-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6' ONLY_ACTIVE_ARCH=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c 14 | 15 | after_success: 16 | - bash <(curl -s https://codecov.io/bash) 17 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIStepper+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIStepper+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 20/07/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UIStepper+RACSignalSupport.h" 10 | #import 11 | #import "UIControl+RACSignalSupportPrivate.h" 12 | 13 | @implementation UIStepper (RACSignalSupport) 14 | 15 | - (RACChannelTerminal *)rac_newValueChannelWithNilValue:(NSNumber *)nilValue { 16 | return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.value) nilValue:nilValue]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/KVOViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // KVOViewController.m 3 | // KVOMutableArray 4 | // 5 | // Created by Hai Feng Kao on 12/08/2016. 6 | // Copyright (c) 2016 Hai Feng Kao. All rights reserved. 7 | // 8 | 9 | #import "KVOViewController.h" 10 | 11 | @interface KVOViewController () 12 | 13 | @end 14 | 15 | @implementation KVOViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view, typically from a nib. 21 | } 22 | 23 | - (void)didReceiveMemoryWarning 24 | { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSNotificationCenter+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNotificationCenter+RACSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 5/10/12. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSignal<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSNotificationCenter (RACSupport) 16 | 17 | // Sends the NSNotification every time the notification is posted. 18 | - (RACSignal *)rac_addObserverForName:(nullable NSString *)notificationName object:(nullable id)object; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACScopedDisposable.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACScopedDisposable.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/28/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACDisposable.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A disposable that calls its own -dispose when it is dealloc'd. 14 | @interface RACScopedDisposable : RACDisposable 15 | 16 | /// Creates a new scoped disposable that will also dispose of the given 17 | /// disposable when it is dealloc'd. 18 | + (instancetype)scopedDisposableWithDisposable:(RACDisposable *)disposable; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIDatePicker+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIDatePicker+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 20/07/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UIDatePicker+RACSignalSupport.h" 10 | #import 11 | #import "UIControl+RACSignalSupportPrivate.h" 12 | 13 | @implementation UIDatePicker (RACSignalSupport) 14 | 15 | - (RACChannelTerminal *)rac_newDateChannelWithNilValue:(NSDate *)nilValue { 16 | return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.date) nilValue:nilValue]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 4/17/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSignal<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIControl (RACSignalSupport) 16 | 17 | /// Creates and returns a signal that sends the sender of the control event 18 | /// whenever one of the control events is triggered. 19 | - (RACSignal<__kindof UIControl *> *)rac_signalForControlEvents:(UIControlEvents)controlEvents; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACQueueScheduler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACQueueScheduler.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 11/30/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACScheduler.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// An abstract scheduler which asynchronously enqueues all its work to a Grand 14 | /// Central Dispatch queue. 15 | /// 16 | /// Because RACQueueScheduler is abstract, it should not be instantiated 17 | /// directly. Create a subclass using the `RACQueueScheduler+Subclass.h` 18 | /// interface and use that instead. 19 | @interface RACQueueScheduler : RACScheduler 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACBehaviorSubject.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACBehaviorSubject.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/16/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSubject.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A behavior subject sends the last value it received when it is subscribed to. 14 | @interface RACBehaviorSubject : RACSubject 15 | 16 | /// Creates a new behavior subject with a default value. If it hasn't received 17 | /// any values when it gets subscribed to, it sends the default value. 18 | + (instancetype)behaviorSubjectWithDefaultValue:(nullable id)value; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSEnumerator+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSEnumerator+RACSequenceAdditions.h 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 07/01/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSequence<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSEnumerator (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence corresponding to the receiver. 18 | /// 19 | /// The receiver is exhausted lazily as the sequence is enumerated. 20 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UISegmentedControl+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UISegmentedControl+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 20/07/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UISegmentedControl+RACSignalSupport.h" 10 | #import 11 | #import "UIControl+RACSignalSupportPrivate.h" 12 | 13 | @implementation UISegmentedControl (RACSignalSupport) 14 | 15 | - (RACChannelTerminal *)rac_newSelectedSegmentIndexChannelWithNilValue:(NSNumber *)nilValue { 16 | return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.selectedSegmentIndex) nilValue:nilValue]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACScopedDisposable.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACScopedDisposable.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/28/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACScopedDisposable.h" 10 | 11 | @implementation RACScopedDisposable 12 | 13 | #pragma mark Lifecycle 14 | 15 | + (instancetype)scopedDisposableWithDisposable:(RACDisposable *)disposable { 16 | return [self disposableWithBlock:^{ 17 | [disposable dispose]; 18 | }]; 19 | } 20 | 21 | - (void)dealloc { 22 | [self dispose]; 23 | } 24 | 25 | #pragma mark RACDisposable 26 | 27 | - (RACScopedDisposable *)asScopedDisposable { 28 | // totally already are 29 | return self; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+RACSequenceAdditions.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSequence<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSSet<__covariant ObjectType> (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence corresponding to the receiver. 18 | /// 19 | /// Mutating the receiver will not affect the sequence after it's been created. 20 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSubject.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubject.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/9/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSignal.h" 10 | #import "RACSubscriber.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /// A subject can be thought of as a signal that you can manually control by 15 | /// sending next, completed, and error. 16 | /// 17 | /// They're most helpful in bridging the non-RAC world to RAC, since they let you 18 | /// manually control the sending of events. 19 | @interface RACSubject : RACSignal 20 | 21 | /// Returns a new subject. 22 | + (instancetype)subject; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSArray+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+RACSequenceAdditions.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSequence<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSArray<__covariant ObjectType> (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence corresponding to the receiver. 18 | /// 19 | /// Mutating the receiver will not affect the sequence after it's been created. 20 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSOrderedSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSOrderedSet+RACSequenceAdditions.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSequence<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSOrderedSet<__covariant ObjectType> (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence corresponding to the receiver. 18 | /// 19 | /// Mutating the receiver will not affect the sequence after it's been created. 20 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSIndexSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSIndexSet+RACSequenceAdditions.h 3 | // ReactiveObjC 4 | // 5 | // Created by Sergey Gavrilyuk on 12/17/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSequence<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSIndexSet (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence of indexes (as `NSNumber`s) corresponding to 18 | /// the receiver. 19 | /// 20 | /// Mutating the receiver will not affect the sequence after it's been created. 21 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACStream+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACStream+Private.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-07-22. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACStream.h" 10 | 11 | @interface RACStream () 12 | 13 | // Combines a list of streams using the logic of the given block. 14 | // 15 | // streams - The streams to combine. 16 | // block - An operator that combines two streams and returns a new one. The 17 | // returned stream should contain 2-tuples of the streams' combined 18 | // values. 19 | // 20 | // Returns a combined stream. 21 | + (__kindof RACStream *)join:(id)streams block:(RACStream * (^)(id, id))block; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIButton+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+RACCommandSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Ash Furrow on 2013-06-06. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACCommand<__contravariant InputType, __covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIButton (RACCommandSupport) 16 | 17 | /// Sets the button's command. When the button is clicked, the command is 18 | /// executed with the sender of the event. The button's enabledness is bound 19 | /// to the command's `canExecute`. 20 | @property (nonatomic, strong, nullable) RACCommand<__kindof UIButton *, id> *rac_command; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSData+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+RACSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 5/11/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACScheduler; 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface NSData (RACSupport) 17 | 18 | // Read the data at the URL using -[NSData initWithContentsOfURL:options:error:]. 19 | // Sends the data or the error. 20 | // 21 | // scheduler - cannot be nil. 22 | + (RACSignal *)rac_readContentsOfURL:(nullable NSURL *)URL options:(NSDataReadingOptions)options scheduler:(RACScheduler *)scheduler; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UISwitch+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISwitch+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 20/07/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACChannelTerminal; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UISwitch (RACSignalSupport) 16 | 17 | /// Creates a new RACChannel-based binding to the receiver. 18 | /// 19 | /// Returns a RACChannelTerminal that sends whether the receiver is on whenever 20 | /// the UIControlEventValueChanged control event is fired, and sets it on or off 21 | /// when it receives @YES or @NO respectively. 22 | - (RACChannelTerminal *)rac_newOnChannel; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSString+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACSequenceAdditions.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSequence<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSString (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence containing strings corresponding to each 18 | /// composed character sequence in the receiver. 19 | /// 20 | /// Mutating the receiver will not affect the sequence after it's been created. 21 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACDynamicSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACDynamicSequence.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "RACSequence.h" 10 | 11 | // Private class that implements a sequence dynamically using blocks. 12 | @interface RACDynamicSequence : RACSequence 13 | 14 | // Returns a sequence which evaluates `dependencyBlock` only once, the first 15 | // time either `headBlock` or `tailBlock` is evaluated. The result of 16 | // `dependencyBlock` will be passed into `headBlock` and `tailBlock` when 17 | // invoked. 18 | + (RACSequence *)sequenceWithLazyDependency:(id (^)(void))dependencyBlock headBlock:(id (^)(id dependency))headBlock tailBlock:(RACSequence *(^)(id dependency))tailBlock; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSString+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 5/11/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACScheduler; 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface NSString (RACSupport) 17 | 18 | // Reads in the contents of the file using +[NSString stringWithContentsOfURL:usedEncoding:error:]. 19 | // Note that encoding won't be valid until the signal completes successfully. 20 | // 21 | // scheduler - cannot be nil. 22 | + (RACSignal *)rac_readContentsOfURL:(NSURL *)URL usedEncoding:(NSStringEncoding *)encoding scheduler:(RACScheduler *)scheduler; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACReplaySubject.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACReplaySubject.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/14/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSubject.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | extern const NSUInteger RACReplaySubjectUnlimitedCapacity; 14 | 15 | /// A replay subject saves the values it is sent (up to its defined capacity) 16 | /// and resends those to new subscribers. It will also replay an error or 17 | /// completion. 18 | @interface RACReplaySubject : RACSubject 19 | 20 | /// Creates a new replay subject with the given capacity. A capacity of 21 | /// RACReplaySubjectUnlimitedCapacity means values are never trimmed. 22 | + (instancetype)replaySubjectWithCapacity:(NSUInteger)capacity; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Example/Pods-KVOMutableArray_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/KVOMutableArray" "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/KVOMutableArray/KVOMutableArray.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC/ReactiveObjC.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "KVOMutableArray" -framework "ReactiveObjC" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Tests/Pods-KVOMutableArray_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/KVOMutableArray" "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/KVOMutableArray/KVOMutableArray.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC/ReactiveObjC.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "KVOMutableArray" -framework "ReactiveObjC" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Tests/Pods-KVOMutableArray_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/KVOMutableArray" "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/KVOMutableArray/KVOMutableArray.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC/ReactiveObjC.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "KVOMutableArray" -framework "ReactiveObjC" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /KVOMutableArray/Classes/NSObject+BlockObservation.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+BlockObservation.h 3 | // Version 1.0 4 | // 5 | // Andy Matuschak 6 | // andy@andymatuschak.org 7 | // Public domain because I love you. Let me know how you use it. 8 | // 9 | 10 | #import 11 | 12 | @interface AMBlockToken : NSObject 13 | - (instancetype)initWithObject:(NSObject*)obj uuid:(NSString*)uuid NS_DESIGNATED_INITIALIZER; 14 | - (void)removeObserver; 15 | @end 16 | 17 | typedef BOOL (^AMBlockTask)(id obj, NSDictionary *change); //return NO if observer wants to unsubscribe the event 18 | 19 | @interface NSObject (AMBlockObservation) 20 | - (AMBlockToken *)addObserverForKeyPath:(NSString *)keyPath task:(AMBlockTask)task; 21 | - (AMBlockToken *)addObserverForKeyPath:(NSString *)keyPath onQueue:(NSOperationQueue *)queue task:(AMBlockTask)task; 22 | @end 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Example/Pods-KVOMutableArray_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/KVOMutableArray" "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/KVOMutableArray/KVOMutableArray.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC/ReactiveObjC.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "KVOMutableArray" -framework "ReactiveObjC" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIBarButtonItem+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItem+RACCommandSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Kyle LeNeau on 3/27/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACCommand<__contravariant InputType, __covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIBarButtonItem (RACCommandSupport) 16 | 17 | /// Sets the control's command. When the control is clicked, the command is 18 | /// executed with the sender of the event. The control's enabledness is bound 19 | /// to the command's `canExecute`. 20 | /// 21 | /// Note: this will reset the control's target and action. 22 | @property (nonatomic, strong, nullable) RACCommand<__kindof UIBarButtonItem *, id> *rac_command; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UISlider+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISlider+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 20/07/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACChannelTerminal; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UISlider (RACSignalSupport) 16 | 17 | /// Creates a new RACChannel-based binding to the receiver. 18 | /// 19 | /// nilValue - The value to set when the terminal receives `nil`. 20 | /// 21 | /// Returns a RACChannelTerminal that sends the receiver's value whenever the 22 | /// UIControlEventValueChanged control event is fired, and sets the value to the 23 | /// values it receives. 24 | - (RACChannelTerminal *)rac_newValueChannelWithNilValue:(nullable NSNumber *)nilValue; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIStepper+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIStepper+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 20/07/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACChannelTerminal; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIStepper (RACSignalSupport) 16 | 17 | /// Creates a new RACChannel-based binding to the receiver. 18 | /// 19 | /// nilValue - The value to set when the terminal receives `nil`. 20 | /// 21 | /// Returns a RACChannelTerminal that sends the receiver's value whenever the 22 | /// UIControlEventValueChanged control event is fired, and sets the value to the 23 | /// values it receives. 24 | - (RACChannelTerminal *)rac_newValueChannelWithNilValue:(nullable NSNumber *)nilValue; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIDatePicker+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDatePicker+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 20/07/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACChannelTerminal; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIDatePicker (RACSignalSupport) 16 | 17 | /// Creates a new RACChannel-based binding to the receiver. 18 | /// 19 | /// nilValue - The date to set when the terminal receives `nil`. 20 | /// 21 | /// Returns a RACChannelTerminal that sends the receiver's date whenever the 22 | /// UIControlEventValueChanged control event is fired, and sets the date to the 23 | /// values it receives. 24 | - (RACChannelTerminal *)rac_newDateChannelWithNilValue:(nullable NSDate *)nilValue; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIRefreshControl+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIRefreshControl+RACCommandSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Dave Lee on 2013-10-17. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACCommand<__contravariant InputType, __covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIRefreshControl (RACCommandSupport) 16 | 17 | /// Manipulate the RACCommand property associated with this refresh control. 18 | /// 19 | /// When this refresh control is activated by the user, the command will be 20 | /// executed. Upon completion or error of the execution signal, -endRefreshing 21 | /// will be invoked. 22 | @property (nonatomic, strong, nullable) RACCommand<__kindof UIRefreshControl *, id> *rac_command; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /KVOMutableArray/Classes/KVOMutableArray.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NSObject+BlockObservation.h" 3 | 4 | @interface KVOMutableArray : NSMutableArray 5 | 6 | - (NSMutableArray*)arr; 7 | 8 | - (instancetype)init; 9 | - (instancetype)initWithMutableArray:(NSMutableArray*)array NS_DESIGNATED_INITIALIZER; 10 | - (BOOL)isEqualToArray:(KVOMutableArray*)array; 11 | - (AMBlockToken*)addObserverWithTask:(AMBlockTask)task; 12 | 13 | // Warning!! [NSKeyedUnarchiver unarchiveObject] will return NSMutableArray 14 | // see http://stackoverflow.com/questions/18874493/nsmutablearray-subclass-not-calling-subclasss-initwithcoder-when-unarchiving 15 | - (void)encodeWithCoder:(NSCoder *)encoder; 16 | 17 | // Warning!! [kvoMutableArray copy] may return NSArray 18 | - (id)copyWithZone:(NSZone *)zone; 19 | @end 20 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACTargetQueueScheduler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACTargetQueueScheduler.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 6/6/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACQueueScheduler.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A scheduler that enqueues blocks on a private serial queue, targeting an 14 | /// arbitrary GCD queue. 15 | @interface RACTargetQueueScheduler : RACQueueScheduler 16 | 17 | /// Initializes the receiver with a serial queue that will target the given 18 | /// `targetQueue`. 19 | /// 20 | /// name - The name of the scheduler. If nil, a default name will be used. 21 | /// targetQueue - The queue to target. Cannot be NULL. 22 | /// 23 | /// Returns the initialized object. 24 | - (instancetype)initWithName:(nullable NSString *)name targetQueue:(dispatch_queue_t)targetQueue; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSObject+RACDeallocating.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+RACDeallocating.h 3 | // ReactiveObjC 4 | // 5 | // Created by Kazuo Koga on 2013/03/15. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACCompoundDisposable; 12 | @class RACDisposable; 13 | @class RACSignal<__covariant ValueType>; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @interface NSObject (RACDeallocating) 18 | 19 | /// The compound disposable which will be disposed of when the receiver is 20 | /// deallocated. 21 | @property (atomic, readonly, strong) RACCompoundDisposable *rac_deallocDisposable; 22 | 23 | /// Returns a signal that will complete immediately before the receiver is fully 24 | /// deallocated. If already deallocated when the signal is subscribed to, 25 | /// a `completed` event will be sent immediately. 26 | - (RACSignal *)rac_willDeallocSignal; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UISegmentedControl+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISegmentedControl+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 20/07/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACChannelTerminal; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UISegmentedControl (RACSignalSupport) 16 | 17 | /// Creates a new RACChannel-based binding to the receiver. 18 | /// 19 | /// nilValue - The segment to select when the terminal receives `nil`. 20 | /// 21 | /// Returns a RACChannelTerminal that sends the receiver's currently selected 22 | /// segment's index whenever the UIControlEventValueChanged control event is 23 | /// fired, and sets the selected segment index to the values it receives. 24 | - (RACChannelTerminal *)rac_newSelectedSegmentIndexChannelWithNilValue:(nullable NSNumber *)nilValue; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ReactiveObjC/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/KVOMutableArray/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSDictionary+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+RACSequenceAdditions.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+RACSequenceAdditions.h" 10 | #import "NSArray+RACSequenceAdditions.h" 11 | #import "RACSequence.h" 12 | #import "RACTuple.h" 13 | 14 | @implementation NSDictionary (RACSequenceAdditions) 15 | 16 | - (RACSequence *)rac_sequence { 17 | NSDictionary *immutableDict = [self copy]; 18 | 19 | // TODO: First class support for dictionary sequences. 20 | return [immutableDict.allKeys.rac_sequence map:^(id key) { 21 | id value = immutableDict[key]; 22 | return RACTuplePack(key, value); 23 | }]; 24 | } 25 | 26 | - (RACSequence *)rac_keySequence { 27 | return self.allKeys.rac_sequence; 28 | } 29 | 30 | - (RACSequence *)rac_valueSequence { 31 | return self.allValues.rac_sequence; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UITableViewCell+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-07-22. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSignal<__covariant ValueType>; 12 | @class RACUnit; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface UITableViewCell (RACSignalSupport) 17 | 18 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon 19 | /// the receiver. 20 | /// 21 | /// Examples 22 | /// 23 | /// [[[self.cancelButton 24 | /// rac_signalForControlEvents:UIControlEventTouchUpInside] 25 | /// takeUntil:self.rac_prepareForReuseSignal] 26 | /// subscribeNext:^(UIButton *x) { 27 | /// // do other things 28 | /// }]; 29 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACValueTransformer.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACValueTransformer.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/6/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACValueTransformer.h" 10 | 11 | @interface RACValueTransformer () 12 | @property (nonatomic, copy) id (^transformBlock)(id value); 13 | @end 14 | 15 | 16 | @implementation RACValueTransformer 17 | 18 | 19 | #pragma mark NSValueTransformer 20 | 21 | + (BOOL)allowsReverseTransformation { 22 | return NO; 23 | } 24 | 25 | - (id)transformedValue:(id)value { 26 | return self.transformBlock(value); 27 | } 28 | 29 | 30 | #pragma mark API 31 | 32 | @synthesize transformBlock; 33 | 34 | + (instancetype)transformerWithBlock:(id (^)(id value))block { 35 | NSCParameterAssert(block != NULL); 36 | 37 | RACValueTransformer *transformer = [[self alloc] init]; 38 | transformer.transformBlock = block; 39 | return transformer; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /KVOMutableArray/Classes/KVOMutableArray+ReactiveCocoaSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // KVOMutableArray+ReactiveCocoaSupport.m 3 | // Pods 4 | // 5 | // Created by Hai Feng Kao on 2015/6/1. 6 | // 7 | // 8 | 9 | #import "KVOMutableArray+ReactiveCocoaSupport.h" 10 | #import "RACEXTKeyPathCoding.h" 11 | #import "NSObject+RACPropertySubscribing.h" 12 | #import "KVOMutableArrayObserver.h" 13 | 14 | @interface KVOMutableArray (ReactiveCocoaSupportInternal) 15 | - (KVOMutableArrayObserver*)observer; 16 | @end 17 | 18 | @implementation KVOMutableArray (ReactiveCocoaSupport) 19 | 20 | - (RACSignal*)changeSignal 21 | { 22 | 23 | KVOMutableArrayObserver* observer = [self observer]; 24 | RACSignal* signal = [observer rac_valuesAndChangesForKeyPath:@keypath(observer, arr) 25 | options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld 26 | observer:observer]; 27 | return signal; 28 | } 29 | @end 30 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACTargetQueueScheduler.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACTargetQueueScheduler.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 6/6/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACTargetQueueScheduler.h" 10 | #import "RACQueueScheduler+Subclass.h" 11 | 12 | @implementation RACTargetQueueScheduler 13 | 14 | #pragma mark Lifecycle 15 | 16 | - (instancetype)initWithName:(NSString *)name targetQueue:(dispatch_queue_t)targetQueue { 17 | NSCParameterAssert(targetQueue != NULL); 18 | 19 | if (name == nil) { 20 | name = [NSString stringWithFormat:@"org.reactivecocoa.ReactiveObjC.RACTargetQueueScheduler(%s)", dispatch_queue_get_label(targetQueue)]; 21 | } 22 | 23 | dispatch_queue_t queue = dispatch_queue_create(name.UTF8String, DISPATCH_QUEUE_SERIAL); 24 | if (queue == NULL) return nil; 25 | 26 | dispatch_set_target_queue(queue, targetQueue); 27 | 28 | return [super initWithName:name queue:queue]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/MKAnnotationView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKAnnotationView+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Zak Remer on 3/31/15. 6 | // Copyright (c) 2015 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class RACSignal<__covariant ValueType>; 13 | @class RACUnit; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @interface MKAnnotationView (RACSignalSupport) 18 | 19 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon 20 | /// the receiver. 21 | /// 22 | /// Examples 23 | /// 24 | /// [[[self.cancelButton 25 | /// rac_signalForControlEvents:UIControlEventTouchUpInside] 26 | /// takeUntil:self.rac_prepareForReuseSignal] 27 | /// subscribeNext:^(UIButton *x) { 28 | /// // do other things 29 | /// }]; 30 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSURLConnection+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLConnection+RACSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-10-01. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACTuple; 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface NSURLConnection (RACSupport) 17 | 18 | // Lazily loads data for the given request in the background. 19 | // 20 | // request - The URL request to load. This must not be nil. 21 | // 22 | // Returns a signal which will begin loading the request upon each subscription, 23 | // then send a `RACTuple` of the received `NSURLResponse` and downloaded 24 | // `NSData`, and complete on a background thread. If any errors occur, the 25 | // returned signal will error out. 26 | + (RACSignal *)rac_sendAsynchronousRequest:(NSURLRequest *)request; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/MKAnnotationView+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKAnnotationView+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Zak Remer on 3/31/15. 6 | // Copyright (c) 2015 GitHub. All rights reserved. 7 | // 8 | 9 | #import "MKAnnotationView+RACSignalSupport.h" 10 | #import "NSObject+RACDescription.h" 11 | #import "NSObject+RACSelectorSignal.h" 12 | #import "RACSignal+Operations.h" 13 | #import "RACUnit.h" 14 | #import 15 | 16 | @implementation MKAnnotationView (RACSignalSupport) 17 | 18 | - (RACSignal *)rac_prepareForReuseSignal { 19 | RACSignal *signal = objc_getAssociatedObject(self, _cmd); 20 | if (signal != nil) return signal; 21 | 22 | signal = [[[self 23 | rac_signalForSelector:@selector(prepareForReuse)] 24 | mapReplace:RACUnit.defaultUnit] 25 | setNameWithFormat:@"%@ -rac_prepareForReuseSignal", RACDescription(self)]; 26 | 27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 28 | return signal; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UITableViewCell+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-07-22. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UITableViewCell+RACSignalSupport.h" 10 | #import "NSObject+RACDescription.h" 11 | #import "NSObject+RACSelectorSignal.h" 12 | #import "RACSignal+Operations.h" 13 | #import "RACUnit.h" 14 | #import 15 | 16 | @implementation UITableViewCell (RACSignalSupport) 17 | 18 | - (RACSignal *)rac_prepareForReuseSignal { 19 | RACSignal *signal = objc_getAssociatedObject(self, _cmd); 20 | if (signal != nil) return signal; 21 | 22 | signal = [[[self 23 | rac_signalForSelector:@selector(prepareForReuse)] 24 | mapReplace:RACUnit.defaultUnit] 25 | setNameWithFormat:@"%@ -rac_prepareForReuseSignal", RACDescription(self)]; 26 | 27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 28 | return signal; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSUserDefaults+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSUserDefaults+RACSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Matt Diephouse on 12/19/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACChannelTerminal; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSUserDefaults (RACSupport) 16 | 17 | /// Creates and returns a terminal for binding the user defaults key. 18 | /// 19 | /// **Note:** The value in the user defaults is *asynchronously* updated with 20 | /// values sent to the channel. 21 | /// 22 | /// key - The user defaults key to create the channel terminal for. 23 | /// 24 | /// Returns a channel terminal that sends the value of the user defaults key 25 | /// upon subscription, sends an updated value whenever the default changes, and 26 | /// updates the default asynchronously with values it receives. 27 | - (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key; 28 | 29 | @end 30 | 31 | NS_ASSUME_NONNULL_END 32 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACDelegateProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACDelegateProxy.h 3 | // ReactiveObjC 4 | // 5 | // Created by Cody Krieger on 5/19/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSignal<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | // A private delegate object suitable for using 16 | // -rac_signalForSelector:fromProtocol: upon. 17 | @interface RACDelegateProxy : NSObject 18 | 19 | // The delegate to which messages should be forwarded if not handled by 20 | // any -signalForSelector: applications. 21 | @property (nonatomic, unsafe_unretained) id rac_proxiedDelegate; 22 | 23 | // Creates a delegate proxy capable of responding to selectors from `protocol`. 24 | - (instancetype)initWithProtocol:(Protocol *)protocol; 25 | 26 | // Calls -rac_signalForSelector:fromProtocol: using the `protocol` specified 27 | // during initialization. 28 | - (RACSignal *)signalForSelector:(SEL)selector; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UICollectionReusableView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionReusableView+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Kent Wong on 2013-10-04. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSignal<__covariant ValueType>; 12 | @class RACUnit; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | // This category is only applicable to iOS >= 6.0. 17 | @interface UICollectionReusableView (RACSignalSupport) 18 | 19 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon 20 | /// the receiver. 21 | /// 22 | /// Examples 23 | /// 24 | /// [[[self.cancelButton 25 | /// rac_signalForControlEvents:UIControlEventTouchUpInside] 26 | /// takeUntil:self.rac_prepareForReuseSignal] 27 | /// subscribeNext:^(UIButton *x) { 28 | /// // do other things 29 | /// }]; 30 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UICollectionReusableView+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionReusableView+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Kent Wong on 2013-10-04. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UICollectionReusableView+RACSignalSupport.h" 10 | #import "NSObject+RACDescription.h" 11 | #import "NSObject+RACSelectorSignal.h" 12 | #import "RACSignal+Operations.h" 13 | #import "RACUnit.h" 14 | #import 15 | 16 | @implementation UICollectionReusableView (RACSignalSupport) 17 | 18 | - (RACSignal *)rac_prepareForReuseSignal { 19 | RACSignal *signal = objc_getAssociatedObject(self, _cmd); 20 | if (signal != nil) return signal; 21 | 22 | signal = [[[self 23 | rac_signalForSelector:@selector(prepareForReuse)] 24 | mapReplace:RACUnit.defaultUnit] 25 | setNameWithFormat:@"%@ -rac_prepareForReuseSignal", RACDescription(self)]; 26 | 27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 28 | return signal; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UITableViewHeaderFooterView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewHeaderFooterView+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Syo Ikeda on 12/30/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSignal<__covariant ValueType>; 12 | @class RACUnit; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | // This category is only applicable to iOS >= 6.0. 17 | @interface UITableViewHeaderFooterView (RACSignalSupport) 18 | 19 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon 20 | /// the receiver. 21 | /// 22 | /// Examples 23 | /// 24 | /// [[[self.cancelButton 25 | /// rac_signalForControlEvents:UIControlEventTouchUpInside] 26 | /// takeUntil:self.rac_prepareForReuseSignal] 27 | /// subscribeNext:^(UIButton *x) { 28 | /// // do other things 29 | /// }]; 30 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSString+RACKeyPathUtilities.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACKeyPathUtilities.m 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 05/05/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "NSString+RACKeyPathUtilities.h" 10 | 11 | @implementation NSString (RACKeyPathUtilities) 12 | 13 | - (NSArray *)rac_keyPathComponents { 14 | if (self.length == 0) { 15 | return nil; 16 | } 17 | return [self componentsSeparatedByString:@"."]; 18 | } 19 | 20 | - (NSString *)rac_keyPathByDeletingLastKeyPathComponent { 21 | NSUInteger lastDotIndex = [self rangeOfString:@"." options:NSBackwardsSearch].location; 22 | if (lastDotIndex == NSNotFound) { 23 | return nil; 24 | } 25 | return [self substringToIndex:lastDotIndex]; 26 | } 27 | 28 | - (NSString *)rac_keyPathByDeletingFirstKeyPathComponent { 29 | NSUInteger firstDotIndex = [self rangeOfString:@"."].location; 30 | if (firstDotIndex == NSNotFound) { 31 | return nil; 32 | } 33 | return [self substringFromIndex:firstDotIndex + 1]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UITableViewHeaderFooterView+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewHeaderFooterView+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Syo Ikeda on 12/30/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UITableViewHeaderFooterView+RACSignalSupport.h" 10 | #import "NSObject+RACDescription.h" 11 | #import "NSObject+RACSelectorSignal.h" 12 | #import "RACSignal+Operations.h" 13 | #import "RACUnit.h" 14 | #import 15 | 16 | @implementation UITableViewHeaderFooterView (RACSignalSupport) 17 | 18 | - (RACSignal *)rac_prepareForReuseSignal { 19 | RACSignal *signal = objc_getAssociatedObject(self, _cmd); 20 | if (signal != nil) return signal; 21 | 22 | signal = [[[self 23 | rac_signalForSelector:@selector(prepareForReuse)] 24 | mapReplace:RACUnit.defaultUnit] 25 | setNameWithFormat:@"%@ -rac_prepareForReuseSignal", RACDescription(self)]; 26 | 27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 28 | return signal; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UITextField+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 4/17/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACChannelTerminal; 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface UITextField (RACSignalSupport) 17 | 18 | /// Creates and returns a signal for the text of the field. It always starts with 19 | /// the current text. The signal sends next when the UIControlEventAllEditingEvents 20 | /// control event is fired on the control. 21 | - (RACSignal *)rac_textSignal; 22 | 23 | /// Creates a new RACChannel-based binding to the receiver. 24 | /// 25 | /// Returns a RACChannelTerminal that sends the receiver's text whenever the 26 | /// UIControlEventAllEditingEvents control event is fired, and sets the text 27 | /// to the values it receives. 28 | - (RACChannelTerminal *)rac_newTextChannel; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSData+RACSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+RACSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 5/11/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "NSData+RACSupport.h" 10 | #import "RACReplaySubject.h" 11 | #import "RACScheduler.h" 12 | 13 | @implementation NSData (RACSupport) 14 | 15 | + (RACSignal *)rac_readContentsOfURL:(NSURL *)URL options:(NSDataReadingOptions)options scheduler:(RACScheduler *)scheduler { 16 | NSCParameterAssert(scheduler != nil); 17 | 18 | RACReplaySubject *subject = [RACReplaySubject subject]; 19 | [subject setNameWithFormat:@"+rac_readContentsOfURL: %@ options: %lu scheduler: %@", URL, (unsigned long)options, scheduler]; 20 | 21 | [scheduler schedule:^{ 22 | NSError *error = nil; 23 | NSData *data = [[NSData alloc] initWithContentsOfURL:URL options:options error:&error]; 24 | if (data == nil) { 25 | [subject sendError:error]; 26 | } else { 27 | [subject sendNext:data]; 28 | [subject sendCompleted]; 29 | } 30 | }]; 31 | 32 | return subject; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSNotificationCenter+RACSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSNotificationCenter+RACSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 5/10/12. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSNotificationCenter+RACSupport.h" 10 | #import 11 | #import "RACSignal.h" 12 | #import "RACSubscriber.h" 13 | #import "RACDisposable.h" 14 | 15 | @implementation NSNotificationCenter (RACSupport) 16 | 17 | - (RACSignal *)rac_addObserverForName:(NSString *)notificationName object:(id)object { 18 | @unsafeify(object); 19 | return [[RACSignal createSignal:^(id subscriber) { 20 | @strongify(object); 21 | id observer = [self addObserverForName:notificationName object:object queue:nil usingBlock:^(NSNotification *note) { 22 | [subscriber sendNext:note]; 23 | }]; 24 | 25 | return [RACDisposable disposableWithBlock:^{ 26 | [self removeObserver:observer]; 27 | }]; 28 | }] setNameWithFormat:@"-rac_addObserverForName: %@ object: <%@: %p>", notificationName, [object class], object]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACBlockTrampoline.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACBlockTrampoline.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 10/21/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACTuple; 12 | 13 | // A private class that allows a limited type of dynamic block invocation. 14 | @interface RACBlockTrampoline : NSObject 15 | 16 | // Invokes the given block with the given arguments. All of the block's 17 | // argument types must be objects and it must be typed to return an object. 18 | // 19 | // At this time, it only supports blocks that take up to 15 arguments. Any more 20 | // is just cray. 21 | // 22 | // block - The block to invoke. Must accept as many arguments as are given in 23 | // the arguments array. Cannot be nil. 24 | // arguments - The arguments with which to invoke the block. `RACTupleNil`s will 25 | // be passed as nils. 26 | // 27 | // Returns the return value of invoking the block. 28 | + (id)invokeBlock:(id)block withArguments:(RACTuple *)arguments; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACErrorSignal.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACErrorSignal.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-10-10. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACErrorSignal.h" 10 | #import "RACScheduler+Private.h" 11 | #import "RACSubscriber.h" 12 | 13 | @interface RACErrorSignal () 14 | 15 | // The error to send upon subscription. 16 | @property (nonatomic, strong, readonly) NSError *error; 17 | 18 | @end 19 | 20 | @implementation RACErrorSignal 21 | 22 | #pragma mark Lifecycle 23 | 24 | + (RACSignal *)error:(NSError *)error { 25 | RACErrorSignal *signal = [[self alloc] init]; 26 | signal->_error = error; 27 | 28 | #ifdef DEBUG 29 | [signal setNameWithFormat:@"+error: %@", error]; 30 | #else 31 | signal.name = @"+error:"; 32 | #endif 33 | 34 | return signal; 35 | } 36 | 37 | #pragma mark Subscription 38 | 39 | - (RACDisposable *)subscribe:(id)subscriber { 40 | NSCParameterAssert(subscriber != nil); 41 | 42 | return [RACScheduler.subscriptionScheduler schedule:^{ 43 | [subscriber sendError:self.error]; 44 | }]; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACPassthroughSubscriber.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACPassthroughSubscriber.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-06-13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RACSubscriber.h" 11 | 12 | @class RACCompoundDisposable; 13 | @class RACSignal<__covariant ValueType>; 14 | 15 | // A private subscriber that passes through all events to another subscriber 16 | // while not disposed. 17 | @interface RACPassthroughSubscriber : NSObject 18 | 19 | // Initializes the receiver to pass through events until disposed. 20 | // 21 | // subscriber - The subscriber to forward events to. This must not be nil. 22 | // signal - The signal that will be sending events to the receiver. 23 | // disposable - When this disposable is disposed, no more events will be 24 | // forwarded. This must not be nil. 25 | // 26 | // Returns an initialized passthrough subscriber. 27 | - (instancetype)initWithSubscriber:(id)subscriber signal:(RACSignal *)signal disposable:(RACCompoundDisposable *)disposable; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACScheduler+Subclass.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACScheduler.m 3 | // ReactiveObjC 4 | // 5 | // Created by Miķelis Vindavs on 5/27/14. 6 | // Copyright (c) 2014 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RACScheduler.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /// An interface for use by subclasses. 15 | /// 16 | /// Subclasses should use `-performAsCurrentScheduler:` to do the actual block 17 | /// invocation so that +[RACScheduler currentScheduler] behaves as expected. 18 | /// 19 | /// **Note that RACSchedulers are expected to be serial**. Subclasses must honor 20 | /// that contract. See `RACTargetQueueScheduler` for a queue-based scheduler 21 | /// which will enforce the serialization guarantee. 22 | @interface RACScheduler () 23 | 24 | /// Performs the given block with the receiver as the current scheduler for 25 | /// its thread. This should only be called by subclasses to perform their 26 | /// scheduled blocks. 27 | /// 28 | /// block - The block to execute. Cannot be NULL. 29 | - (void)performAsCurrentScheduler:(void (^)(void))block; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Hai Feng Kao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/LICENSE.md: -------------------------------------------------------------------------------- 1 | **Copyright (c) 2012 - 2016, GitHub, Inc.** 2 | **All rights reserved.** 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 8 | the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSString+RACKeyPathUtilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACKeyPathUtilities.h 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 05/05/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // A private category of methods to extract parts of a key path. 12 | @interface NSString (RACKeyPathUtilities) 13 | 14 | // Returns an array of the components of the receiver. 15 | // 16 | // Calling this method on a string that isn't a key path is considered undefined 17 | // behavior. 18 | - (NSArray *)rac_keyPathComponents; 19 | 20 | // Returns a key path with all the components of the receiver except for the 21 | // last one. 22 | // 23 | // Calling this method on a string that isn't a key path is considered undefined 24 | // behavior. 25 | - (NSString *)rac_keyPathByDeletingLastKeyPathComponent; 26 | 27 | // Returns a key path with all the components of the receiver expect for the 28 | // first one. 29 | // 30 | // Calling this method on a string that isn't a key path is considered undefined 31 | // behavior. 32 | - (NSString *)rac_keyPathByDeletingFirstKeyPathComponent; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSString+RACSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 5/11/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "NSString+RACSupport.h" 10 | #import "RACReplaySubject.h" 11 | #import "RACScheduler.h" 12 | 13 | @implementation NSString (RACSupport) 14 | 15 | + (RACSignal *)rac_readContentsOfURL:(NSURL *)URL usedEncoding:(NSStringEncoding *)encoding scheduler:(RACScheduler *)scheduler { 16 | NSCParameterAssert(URL != nil); 17 | NSCParameterAssert(encoding != nil); 18 | NSCParameterAssert(scheduler != nil); 19 | 20 | RACReplaySubject *subject = [RACReplaySubject subject]; 21 | [subject setNameWithFormat:@"+rac_readContentsOfURL: %@ usedEncoding:scheduler: %@", URL, scheduler]; 22 | 23 | [scheduler schedule:^{ 24 | NSError *error = nil; 25 | NSString *string = [NSString stringWithContentsOfURL:URL usedEncoding:encoding error:&error]; 26 | if (string == nil) { 27 | [subject sendError:error]; 28 | } else { 29 | [subject sendNext:string]; 30 | [subject sendCompleted]; 31 | } 32 | }]; 33 | 34 | return subject; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACDisposable.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACDisposable.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/16/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACScopedDisposable; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /// A disposable encapsulates the work necessary to tear down and cleanup a 16 | /// subscription. 17 | @interface RACDisposable : NSObject 18 | 19 | /// Whether the receiver has been disposed. 20 | /// 21 | /// Use of this property is discouraged, since it may be set to `YES` 22 | /// concurrently at any time. 23 | /// 24 | /// This property is not KVO-compliant. 25 | @property (atomic, assign, getter = isDisposed, readonly) BOOL disposed; 26 | 27 | + (instancetype)disposableWithBlock:(void (^)(void))block; 28 | 29 | /// Performs the disposal work. Can be called multiple times, though subsequent 30 | /// calls won't do anything. 31 | - (void)dispose; 32 | 33 | /// Returns a new disposable which will dispose of this disposable when it gets 34 | /// dealloc'd. 35 | - (RACScopedDisposable *)asScopedDisposable; 36 | 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /KVOMutableArray/Classes/KVOMutableArrayObserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // KVOMutableArrayObserver.h 3 | // Pods 4 | // 5 | // Created by Hai Feng Kao on 2015/7/20. 6 | // 7 | // 8 | 9 | #import 10 | #import "NSObject+BlockObservation.h" 11 | 12 | @interface KVOMutableArrayObserver : NSObject 13 | @property (nonatomic, strong) NSMutableArray* arr; 14 | 15 | - (instancetype)init; 16 | - (instancetype)initWithMutableArray:(NSMutableArray*)array NS_DESIGNATED_INITIALIZER; 17 | - (AMBlockToken*)addObserverWithTask:(AMBlockTask)task; 18 | 19 | 20 | #pragma mark - Getter Indexed Accessors 21 | - (NSUInteger)countOfArr; 22 | - (id)objectInArrAtIndex:(NSUInteger)index; 23 | - (void)getArr:(id __unsafe_unretained*)buffer range:(NSRange)inRange; 24 | 25 | #pragma mark - Mutable Indexed Accessors 26 | - (void)replaceObjectInArrAtIndex:(NSUInteger)index withObject:(id)obj; 27 | - (void)replaceArrAtIndexes:(NSIndexSet*)indexes withArr:(NSArray*)array; 28 | - (void)removeObjectFromArrAtIndex:(NSUInteger)index; 29 | - (void)removeArrAtIndexes:(NSIndexSet *)indexes; 30 | - (void)insertObject:(id)obj inArrAtIndex:(NSUInteger)index; 31 | - (void)insertArr:(NSArray *)array atIndexes:(NSIndexSet *)indexes; 32 | @end 33 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupportPrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+RACSignalSupportPrivate.h 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 06/08/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACChannelTerminal; 12 | 13 | @interface UIControl (RACSignalSupportPrivate) 14 | 15 | // Adds a RACChannel-based interface to the receiver for the given 16 | // UIControlEvents and exposes it. 17 | // 18 | // controlEvents - A mask of UIControlEvents on which to send new values. 19 | // key - The key whose value should be read and set when a control 20 | // event fires and when a value is sent to the 21 | // RACChannelTerminal respectively. 22 | // nilValue - The value to be assigned to the key when `nil` is sent to the 23 | // RACChannelTerminal. 24 | // 25 | // Returns a RACChannelTerminal which will send future values from the receiver, 26 | // and update the receiver when values are sent to the terminal. 27 | - (RACChannelTerminal *)rac_channelForControlEvents:(UIControlEvents)controlEvents key:(NSString *)key nilValue:(id)nilValue; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSObject+RACDescription.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+RACDescription.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-05-13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "NSObject+RACDescription.h" 10 | #import "RACTuple.h" 11 | 12 | @implementation NSValue (RACDescription) 13 | 14 | - (NSString *)rac_description { 15 | return self.description; 16 | } 17 | 18 | @end 19 | 20 | @implementation NSString (RACDescription) 21 | 22 | - (NSString *)rac_description { 23 | return self.description; 24 | } 25 | 26 | @end 27 | 28 | @implementation RACTuple (RACDescription) 29 | 30 | - (NSString *)rac_description { 31 | if (getenv("RAC_DEBUG_SIGNAL_NAMES") != NULL) { 32 | return self.allObjects.description; 33 | } else { 34 | return @"(description skipped)"; 35 | } 36 | } 37 | 38 | @end 39 | 40 | NSString *RACDescription(id object) { 41 | if (getenv("RAC_DEBUG_SIGNAL_NAMES") != NULL) { 42 | if ([object respondsToSelector:@selector(rac_description)]) { 43 | return [object rac_description]; 44 | } else { 45 | return [[NSString alloc] initWithFormat:@"<%@: %p>", [object class], object]; 46 | } 47 | } else { 48 | return @"(description skipped)"; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIGestureRecognizer+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIGestureRecognizer+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Vera on 5/5/13. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import "UIGestureRecognizer+RACSignalSupport.h" 10 | #import 11 | #import "NSObject+RACDeallocating.h" 12 | #import "NSObject+RACDescription.h" 13 | #import "RACCompoundDisposable.h" 14 | #import "RACDisposable.h" 15 | #import "RACSignal.h" 16 | #import "RACSubscriber.h" 17 | 18 | @implementation UIGestureRecognizer (RACSignalSupport) 19 | 20 | - (RACSignal *)rac_gestureSignal { 21 | @weakify(self); 22 | 23 | return [[RACSignal 24 | createSignal:^(id subscriber) { 25 | @strongify(self); 26 | 27 | [self addTarget:subscriber action:@selector(sendNext:)]; 28 | [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{ 29 | [subscriber sendCompleted]; 30 | }]]; 31 | 32 | return [RACDisposable disposableWithBlock:^{ 33 | @strongify(self); 34 | [self removeTarget:subscriber action:@selector(sendNext:)]; 35 | }]; 36 | }] 37 | setNameWithFormat:@"%@ -rac_gestureSignal", RACDescription(self)]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACScheduler+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACScheduler+Private.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 11/29/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACScheduler.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | // The thread-specific current scheduler key. 14 | extern NSString * const RACSchedulerCurrentSchedulerKey; 15 | 16 | // A private interface for internal RAC use only. 17 | @interface RACScheduler () 18 | 19 | // A dedicated scheduler that fills two requirements: 20 | // 21 | // 1. By the time subscription happens, we need a valid +currentScheduler. 22 | // 2. Subscription should happen as soon as possible. 23 | // 24 | // To fulfill those two, if we already have a valid +currentScheduler, it 25 | // immediately executes scheduled blocks. If we don't, it will execute scheduled 26 | // blocks with a private background scheduler. 27 | + (instancetype)subscriptionScheduler; 28 | 29 | // Initializes the receiver with the given name. 30 | // 31 | // name - The name of the scheduler. If nil, a default name will be used. 32 | // 33 | // Returns the initialized object. 34 | - (instancetype)initWithName:(nullable NSString *)name; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSubscriptingAssignmentTrampoline.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubscriptingAssignmentTrampoline.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 9/24/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSubscriptingAssignmentTrampoline.h" 10 | #import "RACSignal+Operations.h" 11 | 12 | @interface RACSubscriptingAssignmentTrampoline () 13 | 14 | // The object to bind to. 15 | @property (nonatomic, strong, readonly) id target; 16 | 17 | // A value to use when `nil` is sent on the bound signal. 18 | @property (nonatomic, strong, readonly) id nilValue; 19 | 20 | @end 21 | 22 | @implementation RACSubscriptingAssignmentTrampoline 23 | 24 | - (instancetype)initWithTarget:(id)target nilValue:(id)nilValue { 25 | // This is often a programmer error, but this prevents crashes if the target 26 | // object has unexpectedly deallocated. 27 | if (target == nil) return nil; 28 | 29 | self = [super init]; 30 | if (self == nil) return nil; 31 | 32 | _target = target; 33 | _nilValue = nilValue; 34 | 35 | return self; 36 | } 37 | 38 | - (void)setObject:(RACSignal *)signal forKeyedSubscript:(NSString *)keyPath { 39 | [signal setKeyPath:keyPath onObject:self.target nilValue:self.nilValue]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UITextField+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 4/17/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UITextField+RACSignalSupport.h" 10 | #import 11 | #import 12 | #import "NSObject+RACDeallocating.h" 13 | #import "NSObject+RACDescription.h" 14 | #import "RACSignal+Operations.h" 15 | #import "UIControl+RACSignalSupport.h" 16 | #import "UIControl+RACSignalSupportPrivate.h" 17 | 18 | @implementation UITextField (RACSignalSupport) 19 | 20 | - (RACSignal *)rac_textSignal { 21 | @weakify(self); 22 | return [[[[[RACSignal 23 | defer:^{ 24 | @strongify(self); 25 | return [RACSignal return:self]; 26 | }] 27 | concat:[self rac_signalForControlEvents:UIControlEventAllEditingEvents]] 28 | map:^(UITextField *x) { 29 | return x.text; 30 | }] 31 | takeUntil:self.rac_willDeallocSignal] 32 | setNameWithFormat:@"%@ -rac_textSignal", RACDescription(self)]; 33 | } 34 | 35 | - (RACChannelTerminal *)rac_newTextChannel { 36 | return [self rac_channelForControlEvents:UIControlEventAllEditingEvents key:@keypath(self.text) nilValue:@""]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACKVOTrampoline.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACKVOTrampoline.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 1/15/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NSObject+RACKVOWrapper.h" 11 | #import "RACDisposable.h" 12 | 13 | // A private trampoline object that represents a KVO observation. 14 | // 15 | // Disposing of the trampoline will stop observation. 16 | @interface RACKVOTrampoline : RACDisposable 17 | 18 | // Initializes the receiver with the given parameters. 19 | // 20 | // target - The object whose key path should be observed. Cannot be nil. 21 | // observer - The object that gets notified when the value at the key path 22 | // changes. Can be nil. 23 | // keyPath - The key path on `target` to observe. Cannot be nil. 24 | // options - Any key value observing options to use in the observation. 25 | // block - The block to call when the value at the observed key path changes. 26 | // Cannot be nil. 27 | // 28 | // Returns the initialized object. 29 | - (instancetype)initWithTarget:(__weak NSObject *)target observer:(__weak NSObject *)observer keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options block:(RACKVOBlock)block; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSFileHandle+RACSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileHandle+RACSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 5/10/12. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSFileHandle+RACSupport.h" 10 | #import "NSNotificationCenter+RACSupport.h" 11 | #import "NSObject+RACDescription.h" 12 | #import "RACReplaySubject.h" 13 | #import "RACDisposable.h" 14 | 15 | @implementation NSFileHandle (RACSupport) 16 | 17 | - (RACSignal *)rac_readInBackground { 18 | RACReplaySubject *subject = [RACReplaySubject subject]; 19 | [subject setNameWithFormat:@"%@ -rac_readInBackground", RACDescription(self)]; 20 | 21 | RACSignal *dataNotification = [[[NSNotificationCenter defaultCenter] rac_addObserverForName:NSFileHandleReadCompletionNotification object:self] map:^(NSNotification *note) { 22 | return note.userInfo[NSFileHandleNotificationDataItem]; 23 | }]; 24 | 25 | __block RACDisposable *subscription = [dataNotification subscribeNext:^(NSData *data) { 26 | if (data.length > 0) { 27 | [subject sendNext:data]; 28 | [self readInBackgroundAndNotify]; 29 | } else { 30 | [subject sendCompleted]; 31 | [subscription dispose]; 32 | } 33 | }]; 34 | 35 | [self readInBackgroundAndNotify]; 36 | 37 | return subject; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIActionSheet+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIActionSheet+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Dave Lee on 2013-06-22. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACDelegateProxy; 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface UIActionSheet (RACSignalSupport) 17 | 18 | /// A delegate proxy which will be set as the receiver's delegate when any of the 19 | /// methods in this category are used. 20 | @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; 21 | 22 | /// Creates a signal for button clicks on the receiver. 23 | /// 24 | /// When this method is invoked, the `rac_delegateProxy` will become the 25 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy 26 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't 27 | /// know how to handle. Setting the receiver's `delegate` afterward is 28 | /// considered undefined behavior. 29 | /// 30 | /// Returns a signal which will send the index of the specific button clicked. 31 | /// The signal will complete when the receiver is deallocated. 32 | - (RACSignal *)rac_buttonClickedSignal; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UITextView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextView+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Cody Krieger on 5/18/12. 6 | // Copyright (c) 2012 Cody Krieger. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACDelegateProxy; 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface UITextView (RACSignalSupport) 17 | 18 | /// A delegate proxy which will be set as the receiver's delegate when any of the 19 | /// methods in this category are used. 20 | @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; 21 | 22 | /// Creates a signal for the text of the receiver. 23 | /// 24 | /// When this method is invoked, the `rac_delegateProxy` will become the 25 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy 26 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't 27 | /// know how to handle. Setting the receiver's `delegate` afterward is 28 | /// considered undefined behavior. 29 | /// 30 | /// Returns a signal which will send the current text upon subscription, then 31 | /// again whenever the receiver's text is changed. The signal will complete when 32 | /// the receiver is deallocated. 33 | - (RACSignal *)rac_textSignal; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSDictionary+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+RACSequenceAdditions.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSequence<__covariant ValueType>; 12 | @class RACTuple; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface NSDictionary<__covariant KeyType, __covariant ObjectType> (RACSequenceAdditions) 17 | 18 | /// Creates and returns a sequence of RACTuple key/value pairs. The key will be 19 | /// the first element in the tuple, and the value will be the second. 20 | /// 21 | /// Mutating the receiver will not affect the sequence after it's been created. 22 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 23 | 24 | /// Creates and returns a sequence corresponding to the keys in the receiver. 25 | /// 26 | /// Mutating the receiver will not affect the sequence after it's been created. 27 | @property (nonatomic, copy, readonly) RACSequence *rac_keySequence; 28 | 29 | /// Creates and returns a sequence corresponding to the values in the receiver. 30 | /// 31 | /// Mutating the receiver will not affect the sequence after it's been created. 32 | @property (nonatomic, copy, readonly) RACSequence *rac_valueSequence; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACKVOProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACKVOProxy.h 3 | // ReactiveObjC 4 | // 5 | // Created by Richard Speyer on 4/10/14. 6 | // Copyright (c) 2014 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /// A singleton that can act as a proxy between a KVO observation and a RAC 12 | /// subscriber, in order to protect against KVO lifetime issues. 13 | @interface RACKVOProxy : NSObject 14 | 15 | /// Returns the singleton KVO proxy object. 16 | + (instancetype)sharedProxy; 17 | 18 | /// Registers an observer with the proxy, such that when the proxy receives a 19 | /// KVO change with the given context, it forwards it to the observer. 20 | /// 21 | /// observer - True observer of the KVO change. Must not be nil. 22 | /// context - Arbitrary context object used to differentiate multiple 23 | /// observations of the same keypath. Must be unique, cannot be nil. 24 | - (void)addObserver:(__weak NSObject *)observer forContext:(void *)context; 25 | 26 | /// Removes an observer from the proxy. Parameters must match those passed to 27 | /// addObserver:forContext:. 28 | /// 29 | /// observer - True observer of the KVO change. Must not be nil. 30 | /// context - Arbitrary context object used to differentiate multiple 31 | /// observations of the same keypath. Must be unique, cannot be nil. 32 | - (void)removeObserver:(NSObject *)observer forContext:(void *)context; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/KVOMutableArray.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KVOMutableArray", 3 | "version": "2.2.0", 4 | "summary": "A mutable array which can be key value observed (KVO).", 5 | "description": "KVOMutableArray provides the functionality to observe a NSMutableArray.\n\n* Markdown format.\n* Don't worry about the indent, we strip it!", 6 | "homepage": "https://github.com/haifengkao/KVOMutableArray", 7 | "license": "MIT", 8 | "authors": { 9 | "Hai Feng Kao": "haifeng@cocoaspice.in" 10 | }, 11 | "source": { 12 | "git": "https://github.com/haifengkao/KVOMutableArray.git", 13 | "tag": "2.2.0" 14 | }, 15 | "platforms": { 16 | "ios": "8.0" 17 | }, 18 | "requires_arc": true, 19 | "default_subspecs": "Core", 20 | "subspecs": [ 21 | { 22 | "name": "Core", 23 | "source_files": [ 24 | "KVOMutableArray/Classes/KVOMutableArray.{h,m}", 25 | "KVOMutableArray/Classes/NSObject+BlockObservation.{h,m}", 26 | "KVOMutableArray/Classes/KVOMutableArrayObserver.{h,m}" 27 | ], 28 | "public_header_files": "KVOMutableArray/Classes/**/{KVOMutableArray,NSObject+BlockObservation}.h" 29 | }, 30 | { 31 | "name": "ReactiveCocoaSupport", 32 | "dependencies": { 33 | "ReactiveObjC": [ 34 | 35 | ], 36 | "KVOMutableArray/Core": [ 37 | 38 | ] 39 | }, 40 | "source_files": "KVOMutableArray/Classes/KVOMutableArray+ReactiveCocoaSupport.{h,m}" 41 | } 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIImagePickerController+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImagePickerController+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Timur Kuchkarov on 28.03.14. 6 | // Copyright (c) 2014 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACDelegateProxy; 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface UIImagePickerController (RACSignalSupport) 17 | 18 | /// A delegate proxy which will be set as the receiver's delegate when any of the 19 | /// methods in this category are used. 20 | @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; 21 | 22 | /// Creates a signal for every new selected image. 23 | /// 24 | /// When this method is invoked, the `rac_delegateProxy` will become the 25 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy 26 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't 27 | /// know how to handle. Setting the receiver's `delegate` afterward is considered 28 | /// undefined behavior. 29 | /// 30 | /// Returns a signal which will send the dictionary with info for the selected image. 31 | /// Caller is responsible for picker controller dismissal. The signal will complete 32 | /// itself when the receiver is deallocated or when user cancels selection. 33 | - (RACSignal *)rac_imageSelectedSignal; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACBehaviorSubject.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACBehaviorSubject.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/16/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACBehaviorSubject.h" 10 | #import "RACDisposable.h" 11 | #import "RACScheduler+Private.h" 12 | 13 | @interface RACBehaviorSubject () 14 | 15 | // This property should only be used while synchronized on self. 16 | @property (nonatomic, strong) id currentValue; 17 | 18 | @end 19 | 20 | @implementation RACBehaviorSubject 21 | 22 | #pragma mark Lifecycle 23 | 24 | + (instancetype)behaviorSubjectWithDefaultValue:(id)value { 25 | RACBehaviorSubject *subject = [self subject]; 26 | subject.currentValue = value; 27 | return subject; 28 | } 29 | 30 | #pragma mark RACSignal 31 | 32 | - (RACDisposable *)subscribe:(id)subscriber { 33 | RACDisposable *subscriptionDisposable = [super subscribe:subscriber]; 34 | 35 | RACDisposable *schedulingDisposable = [RACScheduler.subscriptionScheduler schedule:^{ 36 | @synchronized (self) { 37 | [subscriber sendNext:self.currentValue]; 38 | } 39 | }]; 40 | 41 | return [RACDisposable disposableWithBlock:^{ 42 | [subscriptionDisposable dispose]; 43 | [schedulingDisposable dispose]; 44 | }]; 45 | } 46 | 47 | #pragma mark RACSubscriber 48 | 49 | - (void)sendNext:(id)value { 50 | @synchronized (self) { 51 | self.currentValue = value; 52 | [super sendNext:value]; 53 | } 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACEmptySignal.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACEmptySignal.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-10-10. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACEmptySignal.h" 10 | #import "RACScheduler+Private.h" 11 | #import "RACSubscriber.h" 12 | 13 | @implementation RACEmptySignal 14 | 15 | #pragma mark Properties 16 | 17 | // Only allow this signal's name to be customized in DEBUG, since it's 18 | // a singleton in release builds (see +empty). 19 | - (void)setName:(NSString *)name { 20 | #ifdef DEBUG 21 | [super setName:name]; 22 | #endif 23 | } 24 | 25 | - (NSString *)name { 26 | #ifdef DEBUG 27 | return super.name; 28 | #else 29 | return @"+empty"; 30 | #endif 31 | } 32 | 33 | #pragma mark Lifecycle 34 | 35 | + (RACSignal *)empty { 36 | #ifdef DEBUG 37 | // Create multiple instances of this class in DEBUG so users can set custom 38 | // names on each. 39 | return [[[self alloc] init] setNameWithFormat:@"+empty"]; 40 | #else 41 | static id singleton; 42 | static dispatch_once_t pred; 43 | 44 | dispatch_once(&pred, ^{ 45 | singleton = [[self alloc] init]; 46 | }); 47 | 48 | return singleton; 49 | #endif 50 | } 51 | 52 | #pragma mark Subscription 53 | 54 | - (RACDisposable *)subscribe:(id)subscriber { 55 | NSCParameterAssert(subscriber != nil); 56 | 57 | return [RACScheduler.subscriptionScheduler schedule:^{ 58 | [subscriber sendCompleted]; 59 | }]; 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 4/17/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UIControl+RACSignalSupport.h" 10 | #import 11 | #import "RACCompoundDisposable.h" 12 | #import "RACDisposable.h" 13 | #import "RACSignal.h" 14 | #import "RACSubscriber.h" 15 | #import "NSObject+RACDeallocating.h" 16 | #import "NSObject+RACDescription.h" 17 | 18 | @implementation UIControl (RACSignalSupport) 19 | 20 | - (RACSignal *)rac_signalForControlEvents:(UIControlEvents)controlEvents { 21 | @weakify(self); 22 | 23 | return [[RACSignal 24 | createSignal:^(id subscriber) { 25 | @strongify(self); 26 | 27 | [self addTarget:subscriber action:@selector(sendNext:) forControlEvents:controlEvents]; 28 | 29 | RACDisposable *disposable = [RACDisposable disposableWithBlock:^{ 30 | [subscriber sendCompleted]; 31 | }]; 32 | [self.rac_deallocDisposable addDisposable:disposable]; 33 | 34 | return [RACDisposable disposableWithBlock:^{ 35 | @strongify(self); 36 | [self.rac_deallocDisposable removeDisposable:disposable]; 37 | [self removeTarget:subscriber action:@selector(sendNext:) forControlEvents:controlEvents]; 38 | }]; 39 | }] 40 | setNameWithFormat:@"%@ -rac_signalForControlEvents: %lx", RACDescription(self), (unsigned long)controlEvents]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACImmediateScheduler.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACImmediateScheduler.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 11/30/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACImmediateScheduler.h" 10 | #import "RACScheduler+Private.h" 11 | 12 | @implementation RACImmediateScheduler 13 | 14 | #pragma mark Lifecycle 15 | 16 | - (instancetype)init { 17 | return [super initWithName:@"org.reactivecocoa.ReactiveObjC.RACScheduler.immediateScheduler"]; 18 | } 19 | 20 | #pragma mark RACScheduler 21 | 22 | - (RACDisposable *)schedule:(void (^)(void))block { 23 | NSCParameterAssert(block != NULL); 24 | 25 | block(); 26 | return nil; 27 | } 28 | 29 | - (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block { 30 | NSCParameterAssert(date != nil); 31 | NSCParameterAssert(block != NULL); 32 | 33 | [NSThread sleepUntilDate:date]; 34 | block(); 35 | 36 | return nil; 37 | } 38 | 39 | - (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block { 40 | NSCAssert(NO, @"+[RACScheduler immediateScheduler] does not support %@.", NSStringFromSelector(_cmd)); 41 | return nil; 42 | } 43 | 44 | - (RACDisposable *)scheduleRecursiveBlock:(RACSchedulerRecursiveBlock)recursiveBlock { 45 | for (__block NSUInteger remaining = 1; remaining > 0; remaining--) { 46 | recursiveBlock(^{ 47 | remaining++; 48 | }); 49 | } 50 | 51 | return nil; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACQueueScheduler+Subclass.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACQueueScheduler+Subclass.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 6/6/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACQueueScheduler.h" 10 | #import "RACScheduler+Subclass.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /// An interface for use by GCD queue-based subclasses. 15 | /// 16 | /// See RACScheduler+Subclass.h for subclassing notes. 17 | @interface RACQueueScheduler () 18 | 19 | /// The queue on which blocks are enqueued. 20 | #if OS_OBJECT_USE_OBJC 21 | @property (nonatomic, strong, readonly) dispatch_queue_t queue; 22 | #else 23 | // Swift builds with OS_OBJECT_HAVE_OBJC_SUPPORT=0 for Playgrounds and LLDB :( 24 | @property (nonatomic, assign, readonly) dispatch_queue_t queue; 25 | #endif 26 | 27 | /// Initializes the receiver with the name of the scheduler and the queue which 28 | /// the scheduler should use. 29 | /// 30 | /// name - The name of the scheduler. If nil, a default name will be used. 31 | /// queue - The queue upon which the receiver should enqueue scheduled blocks. 32 | /// This argument must not be NULL. 33 | /// 34 | /// Returns the initialized object. 35 | - (instancetype)initWithName:(nullable NSString *)name queue:(dispatch_queue_t)queue; 36 | 37 | /// Converts a date into a GCD time using dispatch_walltime(). 38 | /// 39 | /// date - The date to convert. This must not be nil. 40 | + (dispatch_time_t)wallTimeWithDate:(NSDate *)date; 41 | 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACTestScheduler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACTestScheduler.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-07-06. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACScheduler.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A special kind of scheduler that steps through virtualized time. 14 | /// 15 | /// This scheduler class can be used in unit tests to verify asynchronous 16 | /// behaviors without spending significant time waiting. 17 | /// 18 | /// This class can be used from multiple threads, but only one thread can `step` 19 | /// through the enqueued actions at a time. Other threads will wait while the 20 | /// scheduled blocks are being executed. 21 | @interface RACTestScheduler : RACScheduler 22 | 23 | /// Initializes a new test scheduler. 24 | - (instancetype)init; 25 | 26 | /// Executes the next scheduled block, if any. 27 | /// 28 | /// This method will block until the scheduled action has completed. 29 | - (void)step; 30 | 31 | /// Executes up to the next `ticks` scheduled blocks. 32 | /// 33 | /// This method will block until the scheduled actions have completed. 34 | /// 35 | /// ticks - The number of scheduled blocks to execute. If there aren't this many 36 | /// blocks enqueued, all scheduled blocks are executed. 37 | - (void)step:(NSUInteger)ticks; 38 | 39 | /// Executes all of the scheduled blocks on the receiver. 40 | /// 41 | /// This method will block until the scheduled actions have completed. 42 | - (void)stepAll; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIActionSheet+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIActionSheet+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Dave Lee on 2013-06-22. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UIActionSheet+RACSignalSupport.h" 10 | #import "RACDelegateProxy.h" 11 | #import "RACSignal+Operations.h" 12 | #import "NSObject+RACDeallocating.h" 13 | #import "NSObject+RACDescription.h" 14 | #import 15 | 16 | @implementation UIActionSheet (RACSignalSupport) 17 | 18 | static void RACUseDelegateProxy(UIActionSheet *self) { 19 | if (self.delegate == self.rac_delegateProxy) return; 20 | 21 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate; 22 | self.delegate = (id)self.rac_delegateProxy; 23 | } 24 | 25 | - (RACDelegateProxy *)rac_delegateProxy { 26 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd); 27 | if (proxy == nil) { 28 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIActionSheetDelegate)]; 29 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 30 | } 31 | 32 | return proxy; 33 | } 34 | 35 | - (RACSignal *)rac_buttonClickedSignal { 36 | RACSignal *signal = [[[[self.rac_delegateProxy 37 | signalForSelector:@selector(actionSheet:clickedButtonAtIndex:)] 38 | reduceEach:^(UIActionSheet *actionSheet, NSNumber *buttonIndex) { 39 | return buttonIndex; 40 | }] 41 | takeUntil:self.rac_willDeallocSignal] 42 | setNameWithFormat:@"%@ -rac_buttonClickedSignal", RACDescription(self)]; 43 | 44 | RACUseDelegateProxy(self); 45 | 46 | return signal; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupportPrivate.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+RACSignalSupportPrivate.m 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 06/08/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UIControl+RACSignalSupportPrivate.h" 10 | #import "NSObject+RACDeallocating.h" 11 | #import "NSObject+RACLifting.h" 12 | #import "RACChannel.h" 13 | #import "RACCompoundDisposable.h" 14 | #import "RACDisposable.h" 15 | #import "RACSignal+Operations.h" 16 | #import "UIControl+RACSignalSupport.h" 17 | 18 | @implementation UIControl (RACSignalSupportPrivate) 19 | 20 | - (RACChannelTerminal *)rac_channelForControlEvents:(UIControlEvents)controlEvents key:(NSString *)key nilValue:(id)nilValue { 21 | NSCParameterAssert(key.length > 0); 22 | key = [key copy]; 23 | RACChannel *channel = [[RACChannel alloc] init]; 24 | 25 | [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{ 26 | [channel.followingTerminal sendCompleted]; 27 | }]]; 28 | 29 | RACSignal *eventSignal = [[[self 30 | rac_signalForControlEvents:controlEvents] 31 | mapReplace:key] 32 | takeUntil:[[channel.followingTerminal 33 | ignoreValues] 34 | catchTo:RACSignal.empty]]; 35 | [[self 36 | rac_liftSelector:@selector(valueForKey:) withSignals:eventSignal, nil] 37 | subscribe:channel.followingTerminal]; 38 | 39 | RACSignal *valuesSignal = [channel.followingTerminal 40 | map:^(id value) { 41 | return value ?: nilValue; 42 | }]; 43 | [self rac_liftSelector:@selector(setValue:forKey:) withSignals:valuesSignal, [RACSignal return:key], nil]; 44 | 45 | return channel.leadingTerminal; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACEmptySequence.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACEmptySequence.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "RACEmptySequence.h" 10 | 11 | @implementation RACEmptySequence 12 | 13 | #pragma mark Lifecycle 14 | 15 | + (instancetype)empty { 16 | static id singleton; 17 | static dispatch_once_t pred; 18 | 19 | dispatch_once(&pred, ^{ 20 | singleton = [[self alloc] init]; 21 | }); 22 | 23 | return singleton; 24 | } 25 | 26 | #pragma mark RACSequence 27 | 28 | - (id)head { 29 | return nil; 30 | } 31 | 32 | - (RACSequence *)tail { 33 | return nil; 34 | } 35 | 36 | - (RACSequence *)bind:(RACStreamBindBlock)bindBlock passingThroughValuesFromSequence:(RACSequence *)passthroughSequence { 37 | return passthroughSequence ?: self; 38 | } 39 | 40 | #pragma mark NSCoding 41 | 42 | - (Class)classForCoder { 43 | // Empty sequences should be encoded as themselves, not array sequences. 44 | return self.class; 45 | } 46 | 47 | - (instancetype)initWithCoder:(NSCoder *)coder { 48 | // Return the singleton. 49 | return self.class.empty; 50 | } 51 | 52 | - (void)encodeWithCoder:(NSCoder *)coder { 53 | } 54 | 55 | #pragma mark NSObject 56 | 57 | - (NSString *)description { 58 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@ }", self.class, self, self.name]; 59 | } 60 | 61 | - (NSUInteger)hash { 62 | // This hash isn't ideal, but it's better than -[RACSequence hash], which 63 | // would just be zero because we have no head. 64 | return (NSUInteger)(__bridge void *)self; 65 | } 66 | 67 | - (BOOL)isEqual:(RACSequence *)seq { 68 | return (self == seq); 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/KVOMutableArray-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSubscriptionScheduler.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubscriptionScheduler.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 11/30/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSubscriptionScheduler.h" 10 | #import "RACScheduler+Private.h" 11 | 12 | @interface RACSubscriptionScheduler () 13 | 14 | // A private background scheduler on which to subscribe if the +currentScheduler 15 | // is unknown. 16 | @property (nonatomic, strong, readonly) RACScheduler *backgroundScheduler; 17 | 18 | @end 19 | 20 | @implementation RACSubscriptionScheduler 21 | 22 | #pragma mark Lifecycle 23 | 24 | - (instancetype)init { 25 | self = [super initWithName:@"org.reactivecocoa.ReactiveObjC.RACScheduler.subscriptionScheduler"]; 26 | 27 | _backgroundScheduler = [RACScheduler scheduler]; 28 | 29 | return self; 30 | } 31 | 32 | #pragma mark RACScheduler 33 | 34 | - (RACDisposable *)schedule:(void (^)(void))block { 35 | NSCParameterAssert(block != NULL); 36 | 37 | if (RACScheduler.currentScheduler == nil) return [self.backgroundScheduler schedule:block]; 38 | 39 | block(); 40 | return nil; 41 | } 42 | 43 | - (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block { 44 | RACScheduler *scheduler = RACScheduler.currentScheduler ?: self.backgroundScheduler; 45 | return [scheduler after:date schedule:block]; 46 | } 47 | 48 | - (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block { 49 | RACScheduler *scheduler = RACScheduler.currentScheduler ?: self.backgroundScheduler; 50 | return [scheduler after:date repeatingEvery:interval withLeeway:leeway schedule:block]; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UITextView+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITextView+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Cody Krieger on 5/18/12. 6 | // Copyright (c) 2012 Cody Krieger. All rights reserved. 7 | // 8 | 9 | #import "UITextView+RACSignalSupport.h" 10 | #import 11 | #import "NSObject+RACDeallocating.h" 12 | #import "NSObject+RACDescription.h" 13 | #import "RACDelegateProxy.h" 14 | #import "RACSignal+Operations.h" 15 | #import "RACTuple.h" 16 | #import 17 | 18 | @implementation UITextView (RACSignalSupport) 19 | 20 | static void RACUseDelegateProxy(UITextView *self) { 21 | if (self.delegate == self.rac_delegateProxy) return; 22 | 23 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate; 24 | self.delegate = (id)self.rac_delegateProxy; 25 | } 26 | 27 | - (RACDelegateProxy *)rac_delegateProxy { 28 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd); 29 | if (proxy == nil) { 30 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UITextViewDelegate)]; 31 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 32 | } 33 | 34 | return proxy; 35 | } 36 | 37 | - (RACSignal *)rac_textSignal { 38 | @weakify(self); 39 | RACSignal *signal = [[[[[RACSignal 40 | defer:^{ 41 | @strongify(self); 42 | return [RACSignal return:RACTuplePack(self)]; 43 | }] 44 | concat:[self.rac_delegateProxy signalForSelector:@selector(textViewDidChange:)]] 45 | reduceEach:^(UITextView *x) { 46 | return x.text; 47 | }] 48 | takeUntil:self.rac_willDeallocSignal] 49 | setNameWithFormat:@"%@ -rac_textSignal", RACDescription(self)]; 50 | 51 | RACUseDelegateProxy(self); 52 | 53 | return signal; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSUserDefaults+RACSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSUserDefaults+RACSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Matt Diephouse on 12/19/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "NSUserDefaults+RACSupport.h" 10 | #import 11 | #import "NSNotificationCenter+RACSupport.h" 12 | #import "NSObject+RACDeallocating.h" 13 | #import "RACChannel.h" 14 | #import "RACScheduler.h" 15 | #import "RACSignal+Operations.h" 16 | 17 | @implementation NSUserDefaults (RACSupport) 18 | 19 | - (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key { 20 | NSParameterAssert(key != nil); 21 | 22 | RACChannel *channel = [RACChannel new]; 23 | 24 | RACScheduler *scheduler = [RACScheduler scheduler]; 25 | __block BOOL ignoreNextValue = NO; 26 | 27 | @weakify(self); 28 | [[[[[[[NSNotificationCenter.defaultCenter 29 | rac_addObserverForName:NSUserDefaultsDidChangeNotification object:self] 30 | map:^(id _) { 31 | @strongify(self); 32 | return [self objectForKey:key]; 33 | }] 34 | startWith:[self objectForKey:key]] 35 | // Don't send values that were set on the other side of the terminal. 36 | filter:^ BOOL (id _) { 37 | if (RACScheduler.currentScheduler == scheduler && ignoreNextValue) { 38 | ignoreNextValue = NO; 39 | return NO; 40 | } 41 | return YES; 42 | }] 43 | distinctUntilChanged] 44 | takeUntil:self.rac_willDeallocSignal] 45 | subscribe:channel.leadingTerminal]; 46 | 47 | [[channel.leadingTerminal 48 | deliverOn:scheduler] 49 | subscribeNext:^(id value) { 50 | @strongify(self); 51 | ignoreNextValue = YES; 52 | [self setObject:value forKey:key]; 53 | }]; 54 | 55 | return channel.followingTerminal; 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACDynamicSignal.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACDynamicSignal.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-10-10. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACDynamicSignal.h" 10 | #import 11 | #import "RACCompoundDisposable.h" 12 | #import "RACPassthroughSubscriber.h" 13 | #import "RACScheduler+Private.h" 14 | #import "RACSubscriber.h" 15 | #import 16 | 17 | @interface RACDynamicSignal () 18 | 19 | // The block to invoke for each subscriber. 20 | @property (nonatomic, copy, readonly) RACDisposable * (^didSubscribe)(id subscriber); 21 | 22 | @end 23 | 24 | @implementation RACDynamicSignal 25 | 26 | #pragma mark Lifecycle 27 | 28 | + (RACSignal *)createSignal:(RACDisposable * (^)(id subscriber))didSubscribe { 29 | RACDynamicSignal *signal = [[self alloc] init]; 30 | signal->_didSubscribe = [didSubscribe copy]; 31 | return [signal setNameWithFormat:@"+createSignal:"]; 32 | } 33 | 34 | #pragma mark Managing Subscribers 35 | 36 | - (RACDisposable *)subscribe:(id)subscriber { 37 | NSCParameterAssert(subscriber != nil); 38 | 39 | RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable]; 40 | subscriber = [[RACPassthroughSubscriber alloc] initWithSubscriber:subscriber signal:self disposable:disposable]; 41 | 42 | if (self.didSubscribe != NULL) { 43 | RACDisposable *schedulingDisposable = [RACScheduler.subscriptionScheduler schedule:^{ 44 | RACDisposable *innerDisposable = self.didSubscribe(subscriber); 45 | [disposable addDisposable:innerDisposable]; 46 | }]; 47 | 48 | [disposable addDisposable:schedulingDisposable]; 49 | } 50 | 51 | return disposable; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIImagePickerController+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImagePickerController+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Timur Kuchkarov on 28.03.14. 6 | // Copyright (c) 2014 GitHub. All rights reserved. 7 | // 8 | 9 | #import "UIImagePickerController+RACSignalSupport.h" 10 | #import "RACDelegateProxy.h" 11 | #import "RACSignal+Operations.h" 12 | #import "NSObject+RACDeallocating.h" 13 | #import "NSObject+RACDescription.h" 14 | #import 15 | 16 | @implementation UIImagePickerController (RACSignalSupport) 17 | 18 | static void RACUseDelegateProxy(UIImagePickerController *self) { 19 | if (self.delegate == self.rac_delegateProxy) return; 20 | 21 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate; 22 | self.delegate = (id)self.rac_delegateProxy; 23 | } 24 | 25 | - (RACDelegateProxy *)rac_delegateProxy { 26 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd); 27 | if (proxy == nil) { 28 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIImagePickerControllerDelegate)]; 29 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 30 | } 31 | 32 | return proxy; 33 | } 34 | 35 | - (RACSignal *)rac_imageSelectedSignal { 36 | RACSignal *pickerCancelledSignal = [[self.rac_delegateProxy 37 | signalForSelector:@selector(imagePickerControllerDidCancel:)] 38 | merge:self.rac_willDeallocSignal]; 39 | 40 | RACSignal *imagePickerSignal = [[[[self.rac_delegateProxy 41 | signalForSelector:@selector(imagePickerController:didFinishPickingMediaWithInfo:)] 42 | reduceEach:^(UIImagePickerController *pickerController, NSDictionary *userInfo) { 43 | return userInfo; 44 | }] 45 | takeUntil:pickerCancelledSignal] 46 | setNameWithFormat:@"%@ -rac_imageSelectedSignal", RACDescription(self)]; 47 | 48 | RACUseDelegateProxy(self); 49 | 50 | return imagePickerSignal; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSerialDisposable.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSerialDisposable.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-07-22. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACDisposable.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A disposable that contains exactly one other disposable and allows it to be 14 | /// swapped out atomically. 15 | @interface RACSerialDisposable : RACDisposable 16 | 17 | /// The inner disposable managed by the serial disposable. 18 | /// 19 | /// This property is thread-safe for reading and writing. However, if you want to 20 | /// read the current value _and_ write a new one atomically, use 21 | /// -swapInDisposable: instead. 22 | /// 23 | /// Disposing of the receiver will also dispose of the current disposable set for 24 | /// this property, then set the property to nil. If any new disposable is set 25 | /// after the receiver is disposed, it will be disposed immediately and this 26 | /// property will remain set to nil. 27 | @property (atomic, strong, nullable) RACDisposable *disposable; 28 | 29 | /// Creates a serial disposable which will wrap the given disposable. 30 | /// 31 | /// disposable - The value to set for `disposable`. This may be nil. 32 | /// 33 | /// Returns a RACSerialDisposable. 34 | + (instancetype)serialDisposableWithDisposable:(nullable RACDisposable *)disposable; 35 | 36 | /// Atomically swaps the receiver's `disposable` for `newDisposable`. 37 | /// 38 | /// newDisposable - The new value for `disposable`. If the receiver has already 39 | /// been disposed, this disposable will be too, and `disposable` 40 | /// will remain set to nil. This argument may be nil. 41 | /// 42 | /// Returns the previous value for the `disposable` property. 43 | - (nullable RACDisposable *)swapInDisposable:(nullable RACDisposable *)newDisposable; 44 | 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIBarButtonItem+RACCommandSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItem+RACCommandSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Kyle LeNeau on 3/27/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UIBarButtonItem+RACCommandSupport.h" 10 | #import 11 | #import "RACCommand.h" 12 | #import "RACDisposable.h" 13 | #import "RACSignal+Operations.h" 14 | #import 15 | 16 | static void *UIControlRACCommandKey = &UIControlRACCommandKey; 17 | static void *UIControlEnabledDisposableKey = &UIControlEnabledDisposableKey; 18 | 19 | @implementation UIBarButtonItem (RACCommandSupport) 20 | 21 | - (RACCommand *)rac_command { 22 | return objc_getAssociatedObject(self, UIControlRACCommandKey); 23 | } 24 | 25 | - (void)setRac_command:(RACCommand *)command { 26 | objc_setAssociatedObject(self, UIControlRACCommandKey, command, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 27 | 28 | // Check for stored signal in order to remove it and add a new one 29 | RACDisposable *disposable = objc_getAssociatedObject(self, UIControlEnabledDisposableKey); 30 | [disposable dispose]; 31 | 32 | if (command == nil) return; 33 | 34 | disposable = [command.enabled setKeyPath:@keypath(self.enabled) onObject:self]; 35 | objc_setAssociatedObject(self, UIControlEnabledDisposableKey, disposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 36 | 37 | [self rac_hijackActionAndTargetIfNeeded]; 38 | } 39 | 40 | - (void)rac_hijackActionAndTargetIfNeeded { 41 | SEL hijackSelector = @selector(rac_commandPerformAction:); 42 | if (self.target == self && self.action == hijackSelector) return; 43 | 44 | if (self.target != nil) NSLog(@"WARNING: UIBarButtonItem.rac_command hijacks the control's existing target and action."); 45 | 46 | self.target = self; 47 | self.action = hijackSelector; 48 | } 49 | 50 | - (void)rac_commandPerformAction:(id)sender { 51 | [self.rac_command execute:sender]; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIButton+RACCommandSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+RACCommandSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Ash Furrow on 2013-06-06. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UIButton+RACCommandSupport.h" 10 | #import 11 | #import "RACCommand.h" 12 | #import "RACDisposable.h" 13 | #import "RACSignal+Operations.h" 14 | #import 15 | 16 | static void *UIButtonRACCommandKey = &UIButtonRACCommandKey; 17 | static void *UIButtonEnabledDisposableKey = &UIButtonEnabledDisposableKey; 18 | 19 | @implementation UIButton (RACCommandSupport) 20 | 21 | - (RACCommand *)rac_command { 22 | return objc_getAssociatedObject(self, UIButtonRACCommandKey); 23 | } 24 | 25 | - (void)setRac_command:(RACCommand *)command { 26 | objc_setAssociatedObject(self, UIButtonRACCommandKey, command, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 27 | 28 | // Check for stored signal in order to remove it and add a new one 29 | RACDisposable *disposable = objc_getAssociatedObject(self, UIButtonEnabledDisposableKey); 30 | [disposable dispose]; 31 | 32 | if (command == nil) return; 33 | 34 | disposable = [command.enabled setKeyPath:@keypath(self.enabled) onObject:self]; 35 | objc_setAssociatedObject(self, UIButtonEnabledDisposableKey, disposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 36 | 37 | [self rac_hijackActionAndTargetIfNeeded]; 38 | } 39 | 40 | - (void)rac_hijackActionAndTargetIfNeeded { 41 | SEL hijackSelector = @selector(rac_commandPerformAction:); 42 | 43 | for (NSString *selector in [self actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) { 44 | if (hijackSelector == NSSelectorFromString(selector)) { 45 | return; 46 | } 47 | } 48 | 49 | [self addTarget:self action:hijackSelector forControlEvents:UIControlEventTouchUpInside]; 50 | } 51 | 52 | - (void)rac_commandPerformAction:(id)sender { 53 | [self.rac_command execute:sender]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSubscriber.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubscriber.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/1/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACCompoundDisposable; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /// Represents any object which can directly receive values from a RACSignal. 16 | /// 17 | /// You generally shouldn't need to implement this protocol. +[RACSignal 18 | /// createSignal:], RACSignal's subscription methods, or RACSubject should work 19 | /// for most uses. 20 | /// 21 | /// Implementors of this protocol may receive messages and values from multiple 22 | /// threads simultaneously, and so should be thread-safe. Subscribers will also 23 | /// be weakly referenced so implementations must allow that. 24 | @protocol RACSubscriber 25 | @required 26 | 27 | /// Sends the next value to subscribers. 28 | /// 29 | /// value - The value to send. This can be `nil`. 30 | - (void)sendNext:(nullable id)value; 31 | 32 | /// Sends the error to subscribers. 33 | /// 34 | /// error - The error to send. This can be `nil`. 35 | /// 36 | /// This terminates the subscription, and invalidates the subscriber (such that 37 | /// it cannot subscribe to anything else in the future). 38 | - (void)sendError:(nullable NSError *)error; 39 | 40 | /// Sends completed to subscribers. 41 | /// 42 | /// This terminates the subscription, and invalidates the subscriber (such that 43 | /// it cannot subscribe to anything else in the future). 44 | - (void)sendCompleted; 45 | 46 | /// Sends the subscriber a disposable that represents one of its subscriptions. 47 | /// 48 | /// A subscriber may receive multiple disposables if it gets subscribed to 49 | /// multiple signals; however, any error or completed events must terminate _all_ 50 | /// subscriptions. 51 | - (void)didSubscribeWithDisposable:(RACCompoundDisposable *)disposable; 52 | 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACKVOProxy.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACKVOProxy.m 3 | // ReactiveObjC 4 | // 5 | // Created by Richard Speyer on 4/10/14. 6 | // Copyright (c) 2014 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACKVOProxy.h" 10 | 11 | @interface RACKVOProxy() 12 | 13 | @property (strong, nonatomic, readonly) NSMapTable *trampolines; 14 | @property (strong, nonatomic, readonly) dispatch_queue_t queue; 15 | 16 | @end 17 | 18 | @implementation RACKVOProxy 19 | 20 | + (instancetype)sharedProxy { 21 | static RACKVOProxy *proxy; 22 | static dispatch_once_t onceToken; 23 | 24 | dispatch_once(&onceToken, ^{ 25 | proxy = [[self alloc] init]; 26 | }); 27 | 28 | return proxy; 29 | } 30 | 31 | - (instancetype)init { 32 | self = [super init]; 33 | 34 | _queue = dispatch_queue_create("org.reactivecocoa.ReactiveObjC.RACKVOProxy", DISPATCH_QUEUE_SERIAL); 35 | _trampolines = [NSMapTable strongToWeakObjectsMapTable]; 36 | 37 | return self; 38 | } 39 | 40 | - (void)addObserver:(__weak NSObject *)observer forContext:(void *)context { 41 | NSValue *valueContext = [NSValue valueWithPointer:context]; 42 | 43 | dispatch_sync(self.queue, ^{ 44 | [self.trampolines setObject:observer forKey:valueContext]; 45 | }); 46 | } 47 | 48 | - (void)removeObserver:(NSObject *)observer forContext:(void *)context { 49 | NSValue *valueContext = [NSValue valueWithPointer:context]; 50 | 51 | dispatch_sync(self.queue, ^{ 52 | [self.trampolines removeObjectForKey:valueContext]; 53 | }); 54 | } 55 | 56 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { 57 | NSValue *valueContext = [NSValue valueWithPointer:context]; 58 | __block NSObject *trueObserver; 59 | 60 | dispatch_sync(self.queue, ^{ 61 | trueObserver = [self.trampolines objectForKey:valueContext]; 62 | }); 63 | 64 | if (trueObserver != nil) { 65 | [trueObserver observeValueForKeyPath:keyPath ofObject:object change:change context:context]; 66 | } 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACEvent.h 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-01-07. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// Describes the type of a RACEvent. 14 | /// 15 | /// RACEventTypeCompleted - A `completed` event. 16 | /// RACEventTypeError - An `error` event. 17 | /// RACEventTypeNext - A `next` event. 18 | typedef NS_ENUM(NSUInteger, RACEventType) { 19 | RACEventTypeCompleted, 20 | RACEventTypeError, 21 | RACEventTypeNext 22 | }; 23 | 24 | /// Represents an event sent by a RACSignal. 25 | /// 26 | /// This corresponds to the `Notification` class in Rx. 27 | @interface RACEvent<__covariant ValueType> : NSObject 28 | 29 | /// Returns a singleton RACEvent representing the `completed` event. 30 | + (RACEvent *)completedEvent; 31 | 32 | /// Returns a new event of type RACEventTypeError, containing the given error. 33 | + (RACEvent *)eventWithError:(nullable NSError *)error; 34 | 35 | /// Returns a new event of type RACEventTypeNext, containing the given value. 36 | + (RACEvent *)eventWithValue:(nullable ValueType)value; 37 | 38 | /// The type of event represented by the receiver. 39 | @property (nonatomic, assign, readonly) RACEventType eventType; 40 | 41 | /// Returns whether the receiver is of type RACEventTypeCompleted or 42 | /// RACEventTypeError. 43 | @property (nonatomic, getter = isFinished, assign, readonly) BOOL finished; 44 | 45 | /// The error associated with an event of type RACEventTypeError. This will be 46 | /// nil for all other event types. 47 | @property (nonatomic, strong, readonly, nullable) NSError *error; 48 | 49 | /// The value associated with an event of type RACEventTypeNext. This will be 50 | /// nil for all other event types. 51 | @property (nonatomic, strong, readonly, nullable) ValueType value; 52 | 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACCompoundDisposable.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACCompoundDisposable.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 11/30/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACDisposable.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A disposable of disposables. When it is disposed, it disposes of all its 14 | /// contained disposables. 15 | /// 16 | /// If -addDisposable: is called after the compound disposable has been disposed 17 | /// of, the given disposable is immediately disposed. This allows a compound 18 | /// disposable to act as a stand-in for a disposable that will be delivered 19 | /// asynchronously. 20 | @interface RACCompoundDisposable : RACDisposable 21 | 22 | /// Creates and returns a new compound disposable. 23 | + (instancetype)compoundDisposable; 24 | 25 | /// Creates and returns a new compound disposable containing the given 26 | /// disposables. 27 | + (instancetype)compoundDisposableWithDisposables:(nullable NSArray *)disposables; 28 | 29 | /// Adds the given disposable. If the receiving disposable has already been 30 | /// disposed of, the given disposable is disposed immediately. 31 | /// 32 | /// This method is thread-safe. 33 | /// 34 | /// disposable - The disposable to add. This may be nil, in which case nothing 35 | /// happens. 36 | - (void)addDisposable:(nullable RACDisposable *)disposable; 37 | 38 | /// Removes the specified disposable from the compound disposable (regardless of 39 | /// its disposed status), or does nothing if it's not in the compound disposable. 40 | /// 41 | /// This is mainly useful for limiting the memory usage of the compound 42 | /// disposable for long-running operations. 43 | /// 44 | /// This method is thread-safe. 45 | /// 46 | /// disposable - The disposable to remove. This argument may be nil (to make the 47 | /// use of weak references easier). 48 | - (void)removeDisposable:(nullable RACDisposable *)disposable; 49 | 50 | @end 51 | 52 | NS_ASSUME_NONNULL_END 53 | -------------------------------------------------------------------------------- /KVOMutableArray.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint KVOMutableArray.podspec' to ensure this is a 3 | # valid spec and remove all comments before submitting the spec. 4 | # 5 | # Any lines starting with a # are optional, but encouraged 6 | # 7 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 8 | # 9 | 10 | Pod::Spec.new do |s| 11 | s.name = "KVOMutableArray" 12 | s.version = "2.2.0" 13 | s.summary = "A mutable array which can be key value observed (KVO)." 14 | s.description = <<-DESC 15 | KVOMutableArray provides the functionality to observe a NSMutableArray. 16 | 17 | * Markdown format. 18 | * Don't worry about the indent, we strip it! 19 | DESC 20 | s.homepage = "https://github.com/haifengkao/KVOMutableArray" 21 | # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2" 22 | s.license = 'MIT' 23 | s.author = { "Hai Feng Kao" => "haifeng@cocoaspice.in" } 24 | s.source = { :git => "https://github.com/haifengkao/KVOMutableArray.git", :tag => s.version.to_s } 25 | # s.social_media_url = 'https://twitter.com/' 26 | 27 | s.platform = :ios, '8.0' 28 | s.requires_arc = true 29 | 30 | s.subspec 'Core' do |sp| 31 | sp.source_files = 'KVOMutableArray/Classes/KVOMutableArray.{h,m}', 'KVOMutableArray/Classes/NSObject+BlockObservation.{h,m}', 'KVOMutableArray/Classes/KVOMutableArrayObserver.{h,m}' 32 | sp.public_header_files = 'KVOMutableArray/Classes/**/{KVOMutableArray,NSObject+BlockObservation}.h' 33 | end 34 | 35 | s.subspec 'ReactiveCocoaSupport' do |sp| 36 | sp.dependency 'ReactiveObjC' 37 | sp.dependency 'KVOMutableArray/Core' 38 | sp.source_files = 'KVOMutableArray/Classes/KVOMutableArray+ReactiveCocoaSupport.{h,m}' 39 | end 40 | 41 | s.default_subspec = 'Core' 42 | # s.frameworks = 'UIKit', 'MapKit' 43 | # s.dependency 'AFNetworking', '~> 2.3' 44 | end 45 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACStringSequence.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACStringSequence.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-10-29. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "RACStringSequence.h" 10 | 11 | @interface RACStringSequence () 12 | 13 | // The string being sequenced. 14 | @property (nonatomic, copy, readonly) NSString *string; 15 | 16 | // The index in the string from which the sequence starts. 17 | @property (nonatomic, assign, readonly) NSUInteger offset; 18 | 19 | @end 20 | 21 | @implementation RACStringSequence 22 | 23 | #pragma mark Lifecycle 24 | 25 | + (RACSequence *)sequenceWithString:(NSString *)string offset:(NSUInteger)offset { 26 | NSCParameterAssert(offset <= string.length); 27 | 28 | if (offset == string.length) return self.empty; 29 | 30 | RACStringSequence *seq = [[self alloc] init]; 31 | seq->_string = [string copy]; 32 | seq->_offset = offset; 33 | return seq; 34 | } 35 | 36 | #pragma mark RACSequence 37 | 38 | - (id)head { 39 | return [self.string substringWithRange:NSMakeRange(self.offset, 1)]; 40 | } 41 | 42 | - (RACSequence *)tail { 43 | RACSequence *sequence = [self.class sequenceWithString:self.string offset:self.offset + 1]; 44 | sequence.name = self.name; 45 | return sequence; 46 | } 47 | 48 | - (NSArray *)array { 49 | NSUInteger substringLength = self.string.length - self.offset; 50 | NSMutableArray *array = [NSMutableArray arrayWithCapacity:substringLength]; 51 | 52 | [self.string enumerateSubstringsInRange:NSMakeRange(self.offset, substringLength) options:NSStringEnumerationByComposedCharacterSequences usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { 53 | [array addObject:substring]; 54 | }]; 55 | 56 | return [array copy]; 57 | } 58 | 59 | #pragma mark NSObject 60 | 61 | - (NSString *)description { 62 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@, string = %@ }", self.class, self, self.name, [self.string substringFromIndex:self.offset]]; 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSInvocation+RACTypeParsing.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSInvocation+RACTypeParsing.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 11/17/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACTuple; 12 | 13 | // A private category of methods to handle wrapping and unwrapping of values. 14 | @interface NSInvocation (RACTypeParsing) 15 | 16 | // Sets the argument for the invocation at the given index by unboxing the given 17 | // object based on the type signature of the argument. 18 | // 19 | // This does not support C arrays or unions. 20 | // 21 | // Note that calling this on a char * or const char * argument can cause all 22 | // arguments to be retained. 23 | // 24 | // object - The object to unbox and set as the argument. 25 | // index - The index of the argument to set. 26 | - (void)rac_setArgument:(id)object atIndex:(NSUInteger)index; 27 | 28 | // Gets the argument for the invocation at the given index based on the 29 | // invocation's method signature. The value is then wrapped in the appropriate 30 | // object type. 31 | // 32 | // This does not support C arrays or unions. 33 | // 34 | // index - The index of the argument to get. 35 | // 36 | // Returns the argument of the invocation, wrapped in an object. 37 | - (id)rac_argumentAtIndex:(NSUInteger)index; 38 | 39 | // Arguments tuple for the invocation. 40 | // 41 | // The arguments tuple excludes implicit variables `self` and `_cmd`. 42 | // 43 | // See -rac_argumentAtIndex: and -rac_setArgumentAtIndex: for further 44 | // description of the underlying behavior. 45 | @property (nonatomic, copy) RACTuple *rac_argumentsTuple; 46 | 47 | // Gets the return value from the invocation based on the invocation's method 48 | // signature. The value is then wrapped in the appropriate object type. 49 | // 50 | // This does not support C arrays or unions. 51 | // 52 | // Returns the return value of the invocation, wrapped in an object. Voids are 53 | // returned as `RACUnit.defaultUnit`. 54 | - (id)rac_returnValue; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIAlertView+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIAlertView+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Henrik Hodne on 6/16/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UIAlertView+RACSignalSupport.h" 10 | #import "RACDelegateProxy.h" 11 | #import "RACSignal+Operations.h" 12 | #import "NSObject+RACDeallocating.h" 13 | #import "NSObject+RACDescription.h" 14 | #import 15 | 16 | @implementation UIAlertView (RACSignalSupport) 17 | 18 | static void RACUseDelegateProxy(UIAlertView *self) { 19 | if (self.delegate == self.rac_delegateProxy) return; 20 | 21 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate; 22 | self.delegate = (id)self.rac_delegateProxy; 23 | } 24 | 25 | - (RACDelegateProxy *)rac_delegateProxy { 26 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd); 27 | if (proxy == nil) { 28 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIAlertViewDelegate)]; 29 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 30 | } 31 | 32 | return proxy; 33 | } 34 | 35 | - (RACSignal *)rac_buttonClickedSignal { 36 | RACSignal *signal = [[[[self.rac_delegateProxy 37 | signalForSelector:@selector(alertView:clickedButtonAtIndex:)] 38 | reduceEach:^(UIAlertView *alertView, NSNumber *buttonIndex) { 39 | return buttonIndex; 40 | }] 41 | takeUntil:self.rac_willDeallocSignal] 42 | setNameWithFormat:@"%@ -rac_buttonClickedSignal", RACDescription(self)]; 43 | 44 | RACUseDelegateProxy(self); 45 | 46 | return signal; 47 | } 48 | 49 | - (RACSignal *)rac_willDismissSignal { 50 | RACSignal *signal = [[[[self.rac_delegateProxy 51 | signalForSelector:@selector(alertView:willDismissWithButtonIndex:)] 52 | reduceEach:^(UIAlertView *alertView, NSNumber *buttonIndex) { 53 | return buttonIndex; 54 | }] 55 | takeUntil:self.rac_willDeallocSignal] 56 | setNameWithFormat:@"%@ -rac_willDismissSignal", RACDescription(self)]; 57 | 58 | RACUseDelegateProxy(self); 59 | 60 | return signal; 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACMulticastConnection.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACMulticastConnection.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 4/11/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACDisposable; 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /// A multicast connection encapsulates the idea of sharing one subscription to a 17 | /// signal to many subscribers. This is most often needed if the subscription to 18 | /// the underlying signal involves side-effects or shouldn't be called more than 19 | /// once. 20 | /// 21 | /// The multicasted signal is only subscribed to when 22 | /// -[RACMulticastConnection connect] is called. Until that happens, no values 23 | /// will be sent on `signal`. See -[RACMulticastConnection autoconnect] for how 24 | /// -[RACMulticastConnection connect] can be called automatically. 25 | /// 26 | /// Note that you shouldn't create RACMulticastConnection manually. Instead use 27 | /// -[RACSignal publish] or -[RACSignal multicast:]. 28 | @interface RACMulticastConnection : NSObject 29 | 30 | /// The multicasted signal. 31 | @property (nonatomic, strong, readonly) RACSignal *signal; 32 | 33 | /// Connect to the underlying signal by subscribing to it. Calling this multiple 34 | /// times does nothing but return the existing connection's disposable. 35 | /// 36 | /// Returns the disposable for the subscription to the multicasted signal. 37 | - (RACDisposable *)connect; 38 | 39 | /// Connects to the underlying signal when the returned signal is first 40 | /// subscribed to, and disposes of the subscription to the multicasted signal 41 | /// when the returned signal has no subscribers. 42 | /// 43 | /// If new subscribers show up after being disposed, they'll subscribe and then 44 | /// be immediately disposed of. The returned signal will never re-connect to the 45 | /// multicasted signal. 46 | /// 47 | /// Returns the autoconnecting signal. 48 | - (RACSignal *)autoconnect; 49 | 50 | @end 51 | 52 | NS_ASSUME_NONNULL_END 53 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSignalSequence.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACSignalSequence.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2012-11-09. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACSignalSequence.h" 10 | #import "RACDisposable.h" 11 | #import "RACReplaySubject.h" 12 | #import "RACSignal+Operations.h" 13 | 14 | @interface RACSignalSequence () 15 | 16 | // Replays the signal given on initialization. 17 | @property (nonatomic, strong, readonly) RACReplaySubject *subject; 18 | 19 | @end 20 | 21 | @implementation RACSignalSequence 22 | 23 | #pragma mark Lifecycle 24 | 25 | + (RACSequence *)sequenceWithSignal:(RACSignal *)signal { 26 | RACSignalSequence *seq = [[self alloc] init]; 27 | 28 | RACReplaySubject *subject = [RACReplaySubject subject]; 29 | [signal subscribeNext:^(id value) { 30 | [subject sendNext:value]; 31 | } error:^(NSError *error) { 32 | [subject sendError:error]; 33 | } completed:^{ 34 | [subject sendCompleted]; 35 | }]; 36 | 37 | seq->_subject = subject; 38 | return seq; 39 | } 40 | 41 | #pragma mark RACSequence 42 | 43 | - (id)head { 44 | id value = [self.subject firstOrDefault:self]; 45 | 46 | if (value == self) { 47 | return nil; 48 | } else { 49 | return value ?: NSNull.null; 50 | } 51 | } 52 | 53 | - (RACSequence *)tail { 54 | RACSequence *sequence = [self.class sequenceWithSignal:[self.subject skip:1]]; 55 | sequence.name = self.name; 56 | return sequence; 57 | } 58 | 59 | - (NSArray *)array { 60 | return self.subject.toArray; 61 | } 62 | 63 | #pragma mark NSObject 64 | 65 | - (NSString *)description { 66 | // Synchronously accumulate the values that have been sent so far. 67 | NSMutableArray *values = [NSMutableArray array]; 68 | RACDisposable *disposable = [self.subject subscribeNext:^(id value) { 69 | @synchronized (values) { 70 | [values addObject:value ?: NSNull.null]; 71 | } 72 | }]; 73 | 74 | [disposable dispose]; 75 | 76 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@, values = %@ … }", self.class, self, self.name, values]; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSURLConnection+RACSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLConnection+RACSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-10-01. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "NSURLConnection+RACSupport.h" 10 | #import "RACDisposable.h" 11 | #import "RACSignal.h" 12 | #import "RACSubscriber.h" 13 | #import "RACTuple.h" 14 | 15 | @implementation NSURLConnection (RACSupport) 16 | 17 | + (RACSignal *)rac_sendAsynchronousRequest:(NSURLRequest *)request { 18 | NSCParameterAssert(request != nil); 19 | 20 | return [[RACSignal 21 | createSignal:^(id subscriber) { 22 | NSOperationQueue *queue = [[NSOperationQueue alloc] init]; 23 | queue.name = @"org.reactivecocoa.ReactiveObjC.NSURLConnectionRACSupport"; 24 | #pragma clang diagnostic push 25 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" 26 | [NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { 27 | // The docs say that `nil` data means an error occurred, but 28 | // `nil` responses can also occur in practice (circumstances 29 | // unknown). Consider either to be an error. 30 | // 31 | // Note that _empty_ data is not necessarily erroneous, as there 32 | // may be headers but no HTTP body. 33 | if (response == nil || data == nil) { 34 | [subscriber sendError:error]; 35 | } else { 36 | [subscriber sendNext:RACTuplePack(response, data)]; 37 | [subscriber sendCompleted]; 38 | } 39 | }]; 40 | #pragma clang diagnostic pop 41 | 42 | return [RACDisposable disposableWithBlock:^{ 43 | // It's not clear if this will actually cancel the connection, 44 | // but we can at least prevent _some_ unnecessary work -- 45 | // without writing all the code for a proper delegate, which 46 | // doesn't really belong in RAC. 47 | queue.suspended = YES; 48 | [queue cancelAllOperations]; 49 | }]; 50 | }] 51 | setNameWithFormat:@"+rac_sendAsynchronousRequest: %@", request]; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACEagerSequence.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACEagerSequence.m 3 | // ReactiveObjC 4 | // 5 | // Created by Uri Baghin on 02/01/2013. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACEagerSequence.h" 10 | #import "NSObject+RACDescription.h" 11 | #import "RACArraySequence.h" 12 | 13 | @implementation RACEagerSequence 14 | 15 | #pragma mark RACStream 16 | 17 | + (RACSequence *)return:(id)value { 18 | return [[self sequenceWithArray:@[ value ] offset:0] setNameWithFormat:@"+return: %@", RACDescription(value)]; 19 | } 20 | 21 | - (RACSequence *)bind:(RACSequenceBindBlock (^)(void))block { 22 | NSCParameterAssert(block != nil); 23 | RACStreamBindBlock bindBlock = block(); 24 | NSArray *currentArray = self.array; 25 | NSMutableArray *resultArray = [NSMutableArray arrayWithCapacity:currentArray.count]; 26 | 27 | for (id value in currentArray) { 28 | BOOL stop = NO; 29 | RACSequence *boundValue = (id)bindBlock(value, &stop); 30 | if (boundValue == nil) break; 31 | 32 | for (id x in boundValue) { 33 | [resultArray addObject:x]; 34 | } 35 | 36 | if (stop) break; 37 | } 38 | 39 | return [[self.class sequenceWithArray:resultArray offset:0] setNameWithFormat:@"[%@] -bind:", self.name]; 40 | } 41 | 42 | - (RACSequence *)concat:(RACSequence *)sequence { 43 | NSCParameterAssert(sequence != nil); 44 | NSCParameterAssert([sequence isKindOfClass:RACSequence.class]); 45 | 46 | NSArray *array = [self.array arrayByAddingObjectsFromArray:sequence.array]; 47 | return [[self.class sequenceWithArray:array offset:0] setNameWithFormat:@"[%@] -concat: %@", self.name, sequence]; 48 | } 49 | 50 | #pragma mark Extended methods 51 | 52 | - (RACSequence *)eagerSequence { 53 | return self; 54 | } 55 | 56 | - (RACSequence *)lazySequence { 57 | return [RACArraySequence sequenceWithArray:self.array offset:0]; 58 | } 59 | 60 | - (id)foldRightWithStart:(id)start reduce:(id (^)(id, RACSequence *rest))reduce { 61 | return [super foldRightWithStart:start reduce:^(id first, RACSequence *rest) { 62 | return reduce(first, rest.eagerSequence); 63 | }]; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIAlertView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIAlertView+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Henrik Hodne on 6/16/13. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACDelegateProxy; 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface UIAlertView (RACSignalSupport) 17 | 18 | /// A delegate proxy which will be set as the receiver's delegate when any of the 19 | /// methods in this category are used. 20 | @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; 21 | 22 | /// Creates a signal for button clicks on the receiver. 23 | /// 24 | /// When this method is invoked, the `rac_delegateProxy` will become the 25 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy 26 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't 27 | /// know how to handle. Setting the receiver's `delegate` afterward is considered 28 | /// undefined behavior. 29 | /// 30 | /// Note that this signal will not send a value when the alert is dismissed 31 | /// programatically. 32 | /// 33 | /// Returns a signal which will send the index of the specific button clicked. 34 | /// The signal will complete itself when the receiver is deallocated. 35 | - (RACSignal *)rac_buttonClickedSignal; 36 | 37 | /// Creates a signal for dismissal of the receiver. 38 | /// 39 | /// When this method is invoked, the `rac_delegateProxy` will become the 40 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy 41 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't 42 | /// know how to handle. Setting the receiver's `delegate` afterward is considered 43 | /// undefined behavior. 44 | /// 45 | /// Returns a signal which will send the index of the button associated with the 46 | /// dismissal. The signal will complete itself when the receiver is deallocated. 47 | - (RACSignal *)rac_willDismissSignal; 48 | 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSObject+RACLifting.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+RACLifting.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 10/13/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACSignal<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSObject (RACLifting) 16 | 17 | /// Lifts the selector on the receiver into the reactive world. The selector will 18 | /// be invoked whenever any signal argument sends a value, but only after each 19 | /// signal has sent an initial value. 20 | /// 21 | /// It will replay the most recently sent value to new subscribers. 22 | /// 23 | /// This does not support C arrays or unions. 24 | /// 25 | /// selector - The selector on self to invoke. 26 | /// firstSignal - The signal corresponding to the first method argument. This 27 | /// must not be nil. 28 | /// ... - A list of RACSignals corresponding to the remaining arguments. 29 | /// There must be a non-nil signal for each method argument. 30 | /// 31 | /// Examples 32 | /// 33 | /// [button rac_liftSelector:@selector(setTitleColor:forState:) withSignals:textColorSignal, [RACSignal return:@(UIControlStateNormal)], nil]; 34 | /// 35 | /// Returns a signal which sends the return value from each invocation of the 36 | /// selector. If the selector returns void, it instead sends RACUnit.defaultUnit. 37 | /// It completes only after all the signal arguments complete. 38 | - (RACSignal *)rac_liftSelector:(SEL)selector withSignals:(RACSignal *)firstSignal, ... NS_REQUIRES_NIL_TERMINATION; 39 | 40 | /// Like -rac_liftSelector:withSignals:, but accepts an array instead of 41 | /// a variadic list of arguments. 42 | - (RACSignal *)rac_liftSelector:(SEL)selector withSignalsFromArray:(NSArray *)signals; 43 | 44 | /// Like -rac_liftSelector:withSignals:, but accepts a signal sending tuples of 45 | /// arguments instead of a variadic list of arguments. 46 | - (RACSignal *)rac_liftSelector:(SEL)selector withSignalOfArguments:(RACSignal *)arguments; 47 | 48 | @end 49 | 50 | NS_ASSUME_NONNULL_END 51 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/NSObject+RACKVOWrapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+RACKVOWrapper.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 10/11/11. 6 | // Copyright (c) 2011 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RACDisposable; 12 | @class RACKVOTrampoline; 13 | 14 | // A private category providing a block based interface to KVO. 15 | @interface NSObject (RACKVOWrapper) 16 | 17 | // Adds the given block as the callbacks for when the key path changes. 18 | // 19 | // Unlike direct KVO observation, this handles deallocation of `weak` properties 20 | // by generating an appropriate notification. This will only occur if there is 21 | // an `@property` declaration visible in the observed class, with the `weak` 22 | // memory management attribute. 23 | // 24 | // The observation does not need to be explicitly removed. It will be removed 25 | // when the observer or the receiver deallocate. 26 | // 27 | // keyPath - The key path to observe. Must not be nil. 28 | // options - The KVO observation options. 29 | // observer - The object that requested the observation. May be nil. 30 | // block - The block called when the value at the key path changes. It is 31 | // passed the current value of the key path and the extended KVO 32 | // change dictionary including RAC-specific keys and values. Must not 33 | // be nil. 34 | // 35 | // Returns a disposable that can be used to stop the observation. 36 | - (RACDisposable *)rac_observeKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(__weak NSObject *)observer block:(void (^)(id value, NSDictionary *change, BOOL causedByDealloc, BOOL affectedOnlyLastComponent))block; 37 | 38 | @end 39 | 40 | typedef void (^RACKVOBlock)(id target, id observer, NSDictionary *change); 41 | 42 | @interface NSObject (RACUnavailableKVOWrapper) 43 | 44 | - (RACKVOTrampoline *)rac_addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options block:(RACKVOBlock)block __attribute((unavailable("Use rac_observeKeyPath:options:observer:block: instead."))); 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/UIRefreshControl+RACCommandSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIRefreshControl+RACCommandSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Dave Lee on 2013-10-17. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "UIRefreshControl+RACCommandSupport.h" 10 | #import 11 | #import "RACCommand.h" 12 | #import "RACCompoundDisposable.h" 13 | #import "RACDisposable.h" 14 | #import "RACSignal.h" 15 | #import "RACSignal+Operations.h" 16 | #import "UIControl+RACSignalSupport.h" 17 | #import 18 | 19 | static void *UIRefreshControlRACCommandKey = &UIRefreshControlRACCommandKey; 20 | static void *UIRefreshControlDisposableKey = &UIRefreshControlDisposableKey; 21 | 22 | @implementation UIRefreshControl (RACCommandSupport) 23 | 24 | - (RACCommand *)rac_command { 25 | return objc_getAssociatedObject(self, UIRefreshControlRACCommandKey); 26 | } 27 | 28 | - (void)setRac_command:(RACCommand *)command { 29 | objc_setAssociatedObject(self, UIRefreshControlRACCommandKey, command, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 30 | 31 | // Dispose of any active command associations. 32 | [objc_getAssociatedObject(self, UIRefreshControlDisposableKey) dispose]; 33 | 34 | if (command == nil) return; 35 | 36 | // Like RAC(self, enabled) = command.enabled; but with access to disposable. 37 | RACDisposable *enabledDisposable = [command.enabled setKeyPath:@keypath(self.enabled) onObject:self]; 38 | 39 | RACDisposable *executionDisposable = [[[[[self 40 | rac_signalForControlEvents:UIControlEventValueChanged] 41 | map:^(UIRefreshControl *x) { 42 | return [[[command 43 | execute:x] 44 | catchTo:[RACSignal empty]] 45 | then:^{ 46 | return [RACSignal return:x]; 47 | }]; 48 | }] 49 | concat] 50 | deliverOnMainThread] 51 | subscribeNext:^(UIRefreshControl *x) { 52 | [x endRefreshing]; 53 | }]; 54 | 55 | RACDisposable *commandDisposable = [RACCompoundDisposable compoundDisposableWithDisposables:@[ enabledDisposable, executionDisposable ]]; 56 | objc_setAssociatedObject(self, UIRefreshControlDisposableKey, commandDisposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Example/KVOMutableArray/KVOAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // KVOAppDelegate.m 3 | // KVOMutableArray 4 | // 5 | // Created by Hai Feng Kao on 12/08/2016. 6 | // Copyright (c) 2016 Hai Feng Kao. All rights reserved. 7 | // 8 | 9 | #import "KVOAppDelegate.h" 10 | 11 | @implementation KVOAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACDisposable.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACDisposable.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 3/16/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACDisposable.h" 10 | #import "RACScopedDisposable.h" 11 | #import 12 | 13 | @interface RACDisposable () { 14 | // A copied block of type void (^)(void) containing the logic for disposal, 15 | // a pointer to `self` if no logic should be performed upon disposal, or 16 | // NULL if the receiver is already disposed. 17 | // 18 | // This should only be used atomically. 19 | void * volatile _disposeBlock; 20 | } 21 | 22 | @end 23 | 24 | @implementation RACDisposable 25 | 26 | #pragma mark Properties 27 | 28 | - (BOOL)isDisposed { 29 | return _disposeBlock == NULL; 30 | } 31 | 32 | #pragma mark Lifecycle 33 | 34 | - (instancetype)init { 35 | self = [super init]; 36 | 37 | _disposeBlock = (__bridge void *)self; 38 | OSMemoryBarrier(); 39 | 40 | return self; 41 | } 42 | 43 | - (instancetype)initWithBlock:(void (^)(void))block { 44 | NSCParameterAssert(block != nil); 45 | 46 | self = [super init]; 47 | 48 | _disposeBlock = (void *)CFBridgingRetain([block copy]); 49 | OSMemoryBarrier(); 50 | 51 | return self; 52 | } 53 | 54 | + (instancetype)disposableWithBlock:(void (^)(void))block { 55 | return [[self alloc] initWithBlock:block]; 56 | } 57 | 58 | - (void)dealloc { 59 | if (_disposeBlock == NULL || _disposeBlock == (__bridge void *)self) return; 60 | 61 | CFRelease(_disposeBlock); 62 | _disposeBlock = NULL; 63 | } 64 | 65 | #pragma mark Disposal 66 | 67 | - (void)dispose { 68 | void (^disposeBlock)(void) = NULL; 69 | 70 | while (YES) { 71 | void *blockPtr = _disposeBlock; 72 | if (OSAtomicCompareAndSwapPtrBarrier(blockPtr, NULL, &_disposeBlock)) { 73 | if (blockPtr != (__bridge void *)self) { 74 | disposeBlock = CFBridgingRelease(blockPtr); 75 | } 76 | 77 | break; 78 | } 79 | } 80 | 81 | if (disposeBlock != nil) disposeBlock(); 82 | } 83 | 84 | #pragma mark Scoped Disposables 85 | 86 | - (RACScopedDisposable *)asScopedDisposable { 87 | return [RACScopedDisposable scopedDisposableWithDisposable:self]; 88 | } 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /KVOMutableArray/Classes/KVOMutableArrayObserver.m: -------------------------------------------------------------------------------- 1 | // 2 | // KVOMutableArrayObserver.m 3 | // Pods 4 | // 5 | // Created by Hai Feng Kao on 2015/7/20. 6 | // 7 | // 8 | 9 | #import "KVOMutableArrayObserver.h" 10 | 11 | @implementation KVOMutableArrayObserver 12 | 13 | - (instancetype)init 14 | { 15 | return [self initWithMutableArray:[NSMutableArray new]]; 16 | } 17 | 18 | - (instancetype)initWithMutableArray:(NSMutableArray*)array 19 | { 20 | if((self = [super init])) 21 | { 22 | _arr = array; 23 | } 24 | return self; 25 | } 26 | 27 | 28 | - (AMBlockToken*)addObserverWithTask:(AMBlockTask)task 29 | { 30 | return [self addObserverForKeyPath:@"arr" task:task]; 31 | } 32 | 33 | #pragma mark - Getter Indexed Accessors 34 | - (NSUInteger)countOfArr { 35 | return [self.arr count]; 36 | } 37 | 38 | - (id)objectInArrAtIndex:(NSUInteger)index { 39 | if (index >= self.arr.count) { 40 | return nil; 41 | } 42 | return (self.arr)[index]; 43 | } 44 | 45 | // Implementing this method is optional, but offers additional performance gains. This method corresponds to the NSArray method getObjects:range:. 46 | - (void)getArr:(id __unsafe_unretained*)buffer range:(NSRange)inRange 47 | { 48 | // Return the objects in the specified range in the provided buffer. 49 | [self.arr getObjects:buffer range:inRange]; 50 | } 51 | 52 | #pragma mark - Mutable Indexed Accessors 53 | - (void)replaceObjectInArrAtIndex:(NSUInteger)index withObject:(id)obj 54 | { 55 | (self.arr)[index] = obj; 56 | } 57 | 58 | - (void)replaceArrAtIndexes:(NSIndexSet*)indexes withArr:(NSArray*)array 59 | { 60 | [self.arr replaceObjectsAtIndexes:indexes withObjects:array]; 61 | } 62 | 63 | - (void)removeObjectFromArrAtIndex:(NSUInteger)index 64 | { 65 | [self.arr removeObjectAtIndex:index]; 66 | } 67 | 68 | - (void)removeArrAtIndexes:(NSIndexSet *)indexes 69 | { 70 | [self.arr removeObjectsAtIndexes:indexes]; 71 | } 72 | 73 | - (void)insertObject:(id)obj inArrAtIndex:(NSUInteger)index 74 | { 75 | [self.arr insertObject:obj atIndex:index]; 76 | } 77 | 78 | - (void)insertArr:(NSArray *)array atIndexes:(NSIndexSet *)indexes 79 | { 80 | [self.arr insertObjects:array atIndexes:indexes]; 81 | } 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACTupleSequence.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACTupleSequence.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-05-01. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACTupleSequence.h" 10 | #import "RACTuple.h" 11 | 12 | @interface RACTupleSequence () 13 | 14 | // The array being sequenced, as taken from RACTuple.backingArray. 15 | @property (nonatomic, strong, readonly) NSArray *tupleBackingArray; 16 | 17 | // The index in the array from which the sequence starts. 18 | @property (nonatomic, assign, readonly) NSUInteger offset; 19 | 20 | @end 21 | 22 | @implementation RACTupleSequence 23 | 24 | #pragma mark Lifecycle 25 | 26 | + (RACSequence *)sequenceWithTupleBackingArray:(NSArray *)backingArray offset:(NSUInteger)offset { 27 | NSCParameterAssert(offset <= backingArray.count); 28 | 29 | if (offset == backingArray.count) return self.empty; 30 | 31 | RACTupleSequence *seq = [[self alloc] init]; 32 | seq->_tupleBackingArray = backingArray; 33 | seq->_offset = offset; 34 | return seq; 35 | } 36 | 37 | #pragma mark RACSequence 38 | 39 | - (id)head { 40 | id object = self.tupleBackingArray[self.offset]; 41 | return (object == RACTupleNil.tupleNil ? NSNull.null : object); 42 | } 43 | 44 | - (RACSequence *)tail { 45 | RACSequence *sequence = [self.class sequenceWithTupleBackingArray:self.tupleBackingArray offset:self.offset + 1]; 46 | sequence.name = self.name; 47 | return sequence; 48 | } 49 | 50 | - (NSArray *)array { 51 | NSRange range = NSMakeRange(self.offset, self.tupleBackingArray.count - self.offset); 52 | NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:range.length]; 53 | 54 | [self.tupleBackingArray enumerateObjectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:range] options:0 usingBlock:^(id object, NSUInteger index, BOOL *stop) { 55 | id mappedObject = (object == RACTupleNil.tupleNil ? NSNull.null : object); 56 | [array addObject:mappedObject]; 57 | }]; 58 | 59 | return array; 60 | } 61 | 62 | #pragma mark NSObject 63 | 64 | - (NSString *)description { 65 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@, tuple = %@ }", self.class, self, self.name, self.tupleBackingArray]; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACDelegateProxy.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACDelegateProxy.m 3 | // ReactiveObjC 4 | // 5 | // Created by Cody Krieger on 5/19/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACDelegateProxy.h" 10 | #import "NSObject+RACSelectorSignal.h" 11 | #import 12 | 13 | @interface RACDelegateProxy () { 14 | // Declared as an ivar to avoid method naming conflicts. 15 | Protocol *_protocol; 16 | } 17 | 18 | @end 19 | 20 | @implementation RACDelegateProxy 21 | 22 | #pragma mark Lifecycle 23 | 24 | - (instancetype)initWithProtocol:(Protocol *)protocol { 25 | NSCParameterAssert(protocol != NULL); 26 | 27 | self = [super init]; 28 | 29 | class_addProtocol(self.class, protocol); 30 | 31 | _protocol = protocol; 32 | 33 | return self; 34 | } 35 | 36 | #pragma mark API 37 | 38 | - (RACSignal *)signalForSelector:(SEL)selector { 39 | return [self rac_signalForSelector:selector fromProtocol:_protocol]; 40 | } 41 | 42 | #pragma mark NSObject 43 | 44 | - (BOOL)isProxy { 45 | return YES; 46 | } 47 | 48 | - (void)forwardInvocation:(NSInvocation *)invocation { 49 | [invocation invokeWithTarget:self.rac_proxiedDelegate]; 50 | } 51 | 52 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { 53 | // Look for the selector as an optional instance method. 54 | struct objc_method_description methodDescription = protocol_getMethodDescription(_protocol, selector, NO, YES); 55 | 56 | if (methodDescription.name == NULL) { 57 | // Then fall back to looking for a required instance 58 | // method. 59 | methodDescription = protocol_getMethodDescription(_protocol, selector, YES, YES); 60 | if (methodDescription.name == NULL) return [super methodSignatureForSelector:selector]; 61 | } 62 | 63 | return [NSMethodSignature signatureWithObjCTypes:methodDescription.types]; 64 | } 65 | 66 | - (BOOL)respondsToSelector:(SEL)selector { 67 | // Add the delegate to the autorelease pool, so it doesn't get deallocated 68 | // between this method call and -forwardInvocation:. 69 | __autoreleasing id delegate = self.rac_proxiedDelegate; 70 | if ([delegate respondsToSelector:selector]) return YES; 71 | 72 | return [super respondsToSelector:selector]; 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACReturnSignal.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACReturnSignal.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-10-10. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACReturnSignal.h" 10 | #import "RACScheduler+Private.h" 11 | #import "RACSubscriber.h" 12 | #import "RACUnit.h" 13 | 14 | @interface RACReturnSignal () 15 | 16 | // The value to send upon subscription. 17 | @property (nonatomic, strong, readonly) id value; 18 | 19 | @end 20 | 21 | @implementation RACReturnSignal 22 | 23 | #pragma mark Properties 24 | 25 | // Only allow this signal's name to be customized in DEBUG, since it's 26 | // potentially a singleton in release builds (see +return:). 27 | - (void)setName:(NSString *)name { 28 | #ifdef DEBUG 29 | [super setName:name]; 30 | #endif 31 | } 32 | 33 | - (NSString *)name { 34 | #ifdef DEBUG 35 | return super.name; 36 | #else 37 | return @"+return:"; 38 | #endif 39 | } 40 | 41 | #pragma mark Lifecycle 42 | 43 | + (RACSignal *)return:(id)value { 44 | #ifndef DEBUG 45 | // In release builds, use singletons for two very common cases. 46 | if (value == RACUnit.defaultUnit) { 47 | static RACReturnSignal *unitSingleton; 48 | static dispatch_once_t unitPred; 49 | 50 | dispatch_once(&unitPred, ^{ 51 | unitSingleton = [[self alloc] init]; 52 | unitSingleton->_value = RACUnit.defaultUnit; 53 | }); 54 | 55 | return unitSingleton; 56 | } else if (value == nil) { 57 | static RACReturnSignal *nilSingleton; 58 | static dispatch_once_t nilPred; 59 | 60 | dispatch_once(&nilPred, ^{ 61 | nilSingleton = [[self alloc] init]; 62 | nilSingleton->_value = nil; 63 | }); 64 | 65 | return nilSingleton; 66 | } 67 | #endif 68 | 69 | RACReturnSignal *signal = [[self alloc] init]; 70 | signal->_value = value; 71 | 72 | #ifdef DEBUG 73 | [signal setNameWithFormat:@"+return: %@", value]; 74 | #endif 75 | 76 | return signal; 77 | } 78 | 79 | #pragma mark Subscription 80 | 81 | - (RACDisposable *)subscribe:(id)subscriber { 82 | NSCParameterAssert(subscriber != nil); 83 | 84 | return [RACScheduler.subscriptionScheduler schedule:^{ 85 | [subscriber sendNext:self.value]; 86 | [subscriber sendCompleted]; 87 | }]; 88 | } 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACUnarySequence.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACUnarySequence.m 3 | // ReactiveObjC 4 | // 5 | // Created by Justin Spahr-Summers on 2013-05-01. 6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACUnarySequence.h" 10 | #import 11 | #import "NSObject+RACDescription.h" 12 | 13 | @interface RACUnarySequence () 14 | 15 | // The single value stored in this sequence. 16 | @property (nonatomic, strong, readwrite) id head; 17 | 18 | @end 19 | 20 | @implementation RACUnarySequence 21 | 22 | #pragma mark Properties 23 | 24 | @synthesize head = _head; 25 | 26 | #pragma mark Lifecycle 27 | 28 | + (RACUnarySequence *)return:(id)value { 29 | RACUnarySequence *sequence = [[self alloc] init]; 30 | sequence.head = value; 31 | return [sequence setNameWithFormat:@"+return: %@", RACDescription(value)]; 32 | } 33 | 34 | #pragma mark RACSequence 35 | 36 | - (RACSequence *)tail { 37 | return nil; 38 | } 39 | 40 | - (RACSequence *)bind:(RACSequenceBindBlock (^)(void))block { 41 | RACStreamBindBlock bindBlock = block(); 42 | BOOL stop = NO; 43 | 44 | RACSequence *result = (id)[bindBlock(self.head, &stop) setNameWithFormat:@"[%@] -bind:", self.name]; 45 | return result ?: self.class.empty; 46 | } 47 | 48 | #pragma mark NSCoding 49 | 50 | - (Class)classForCoder { 51 | // Unary sequences should be encoded as themselves, not array sequences. 52 | return self.class; 53 | } 54 | 55 | - (instancetype)initWithCoder:(NSCoder *)coder { 56 | id value = [coder decodeObjectForKey:@keypath(self.head)]; 57 | return [self.class return:value]; 58 | } 59 | 60 | - (void)encodeWithCoder:(NSCoder *)coder { 61 | if (self.head != nil) [coder encodeObject:self.head forKey:@keypath(self.head)]; 62 | } 63 | 64 | #pragma mark NSObject 65 | 66 | - (NSString *)description { 67 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@, head = %@ }", self.class, self, self.name, self.head]; 68 | } 69 | 70 | - (NSUInteger)hash { 71 | return [self.head hash]; 72 | } 73 | 74 | - (BOOL)isEqual:(RACUnarySequence *)seq { 75 | if (self == seq) return YES; 76 | if (![seq isKindOfClass:RACUnarySequence.class]) return NO; 77 | 78 | return self.head == seq.head || [(NSObject *)self.head isEqual:seq.head]; 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACSubscriptingAssignmentTrampoline.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubscriptingAssignmentTrampoline.h 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 9/24/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /// Assigns a signal to an object property, automatically setting the given key 17 | /// path on every `next`. When the signal completes, the binding is automatically 18 | /// disposed of. 19 | /// 20 | /// There are two different versions of this macro: 21 | /// 22 | /// - RAC(TARGET, KEYPATH, NILVALUE) will bind the `KEYPATH` of `TARGET` to the 23 | /// given signal. If the signal ever sends a `nil` value, the property will be 24 | /// set to `NILVALUE` instead. `NILVALUE` may itself be `nil` for object 25 | /// properties, but an NSValue should be used for primitive properties, to 26 | /// avoid an exception if `nil` is sent (which might occur if an intermediate 27 | /// object is set to `nil`). 28 | /// - RAC(TARGET, KEYPATH) is the same as the above, but `NILVALUE` defaults to 29 | /// `nil`. 30 | /// 31 | /// See -[RACSignal setKeyPath:onObject:nilValue:] for more information about the 32 | /// binding's semantics. 33 | /// 34 | /// Examples 35 | /// 36 | /// RAC(self, objectProperty) = objectSignal; 37 | /// RAC(self, stringProperty, @"foobar") = stringSignal; 38 | /// RAC(self, integerProperty, @42) = integerSignal; 39 | /// 40 | /// WARNING: Under certain conditions, use of this macro can be thread-unsafe. 41 | /// See the documentation of -setKeyPath:onObject:nilValue:. 42 | #define RAC(TARGET, ...) \ 43 | metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__)) \ 44 | (RAC_(TARGET, __VA_ARGS__, nil)) \ 45 | (RAC_(TARGET, __VA_ARGS__)) 46 | 47 | /// Do not use this directly. Use the RAC macro above. 48 | #define RAC_(TARGET, KEYPATH, NILVALUE) \ 49 | [[RACSubscriptingAssignmentTrampoline alloc] initWithTarget:(TARGET) nilValue:(NILVALUE)][@keypath(TARGET, KEYPATH)] 50 | 51 | @interface RACSubscriptingAssignmentTrampoline : NSObject 52 | 53 | - (nullable instancetype)initWithTarget:(nullable id)target nilValue:(nullable id)nilValue; 54 | - (void)setObject:(RACSignal *)signal forKeyedSubscript:(NSString *)keyPath; 55 | 56 | @end 57 | 58 | NS_ASSUME_NONNULL_END 59 | -------------------------------------------------------------------------------- /Example/Pods/ReactiveObjC/ReactiveObjC/RACMulticastConnection.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACMulticastConnection.m 3 | // ReactiveObjC 4 | // 5 | // Created by Josh Abernathy on 4/11/12. 6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved. 7 | // 8 | 9 | #import "RACMulticastConnection.h" 10 | #import "RACMulticastConnection+Private.h" 11 | #import "RACDisposable.h" 12 | #import "RACSerialDisposable.h" 13 | #import "RACSubject.h" 14 | #import 15 | 16 | @interface RACMulticastConnection () { 17 | RACSubject *_signal; 18 | 19 | // When connecting, a caller should attempt to atomically swap the value of this 20 | // from `0` to `1`. 21 | // 22 | // If the swap is successful the caller is resposible for subscribing `_signal` 23 | // to `sourceSignal` and storing the returned disposable in `serialDisposable`. 24 | // 25 | // If the swap is unsuccessful it means that `_sourceSignal` has already been 26 | // connected and the caller has no action to take. 27 | int32_t volatile _hasConnected; 28 | } 29 | 30 | @property (nonatomic, readonly, strong) RACSignal *sourceSignal; 31 | @property (strong) RACSerialDisposable *serialDisposable; 32 | @end 33 | 34 | @implementation RACMulticastConnection 35 | 36 | #pragma mark Lifecycle 37 | 38 | - (instancetype)initWithSourceSignal:(RACSignal *)source subject:(RACSubject *)subject { 39 | NSCParameterAssert(source != nil); 40 | NSCParameterAssert(subject != nil); 41 | 42 | self = [super init]; 43 | 44 | _sourceSignal = source; 45 | _serialDisposable = [[RACSerialDisposable alloc] init]; 46 | _signal = subject; 47 | 48 | return self; 49 | } 50 | 51 | #pragma mark Connecting 52 | 53 | - (RACDisposable *)connect { 54 | BOOL shouldConnect = OSAtomicCompareAndSwap32Barrier(0, 1, &_hasConnected); 55 | 56 | if (shouldConnect) { 57 | self.serialDisposable.disposable = [self.sourceSignal subscribe:_signal]; 58 | } 59 | 60 | return self.serialDisposable; 61 | } 62 | 63 | - (RACSignal *)autoconnect { 64 | __block volatile int32_t subscriberCount = 0; 65 | 66 | return [[RACSignal 67 | createSignal:^(id subscriber) { 68 | OSAtomicIncrement32Barrier(&subscriberCount); 69 | 70 | RACDisposable *subscriptionDisposable = [self.signal subscribe:subscriber]; 71 | RACDisposable *connectionDisposable = [self connect]; 72 | 73 | return [RACDisposable disposableWithBlock:^{ 74 | [subscriptionDisposable dispose]; 75 | 76 | if (OSAtomicDecrement32Barrier(&subscriberCount) == 0) { 77 | [connectionDisposable dispose]; 78 | } 79 | }]; 80 | }] 81 | setNameWithFormat:@"[%@] -autoconnect", self.signal.name]; 82 | } 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-KVOMutableArray_Tests/Pods-KVOMutableArray_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## KVOMutableArray 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2015 Hai Feng Kao 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | 29 | 30 | ## ReactiveObjC 31 | 32 | **Copyright (c) 2012 - 2016, GitHub, Inc.** 33 | **All rights reserved.** 34 | 35 | Permission is hereby granted, free of charge, to any person obtaining a copy of 36 | this software and associated documentation files (the "Software"), to deal in 37 | the Software without restriction, including without limitation the rights to 38 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 39 | the Software, and to permit persons to whom the Software is furnished to do so, 40 | subject to the following conditions: 41 | 42 | The above copyright notice and this permission notice shall be included in all 43 | copies or substantial portions of the Software. 44 | 45 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 46 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 47 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 48 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 49 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 50 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 51 | 52 | Generated by CocoaPods - https://cocoapods.org 53 | --------------------------------------------------------------------------------