├── .gitignore ├── .travis.yml ├── ActionStage.jpg ├── ActionStage.podspec ├── ActionStage ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── ASActor.h │ ├── ASActor.m │ ├── ASHandle.h │ ├── ASHandle.m │ ├── ASTimer.h │ ├── ASTimer.m │ ├── ASWatcher.h │ ├── ActionStage.h │ └── ActionStage.m ├── Example ├── ActionStage.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── ActionStage-Example.xcscheme ├── ActionStage.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── ActionStage │ ├── ASAppDelegate.h │ ├── ASAppDelegate.m │ ├── ASFileDownloadActor.h │ ├── ASFileDownloadActor.m │ ├── ASTestActor.h │ ├── ASTestActor.m │ ├── ASTestSendCodeRequestActor.h │ ├── ASTestSendCodeRequestActor.m │ ├── ASTestView.h │ ├── ASTestView.m │ ├── ASViewController.h │ ├── ASViewController.m │ ├── ActionStage-Info.plist │ ├── ActionStage-Prefix.pch │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── ActionStage.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── ActionStage │ │ ├── ActionStage-Info.plist │ │ ├── ActionStage-dummy.m │ │ ├── ActionStage-prefix.pch │ │ ├── ActionStage-umbrella.h │ │ ├── ActionStage.modulemap │ │ └── ActionStage.xcconfig │ │ ├── Pods-ActionStage_Example │ │ ├── Pods-ActionStage_Example-Info.plist │ │ ├── Pods-ActionStage_Example-acknowledgements.markdown │ │ ├── Pods-ActionStage_Example-acknowledgements.plist │ │ ├── Pods-ActionStage_Example-dummy.m │ │ ├── Pods-ActionStage_Example-frameworks.sh │ │ ├── Pods-ActionStage_Example-umbrella.h │ │ ├── Pods-ActionStage_Example.debug.xcconfig │ │ ├── Pods-ActionStage_Example.modulemap │ │ └── Pods-ActionStage_Example.release.xcconfig │ │ └── Pods-ActionStage_Tests │ │ ├── Pods-ActionStage_Tests-Info.plist │ │ ├── Pods-ActionStage_Tests-acknowledgements.markdown │ │ ├── Pods-ActionStage_Tests-acknowledgements.plist │ │ ├── Pods-ActionStage_Tests-dummy.m │ │ ├── Pods-ActionStage_Tests-umbrella.h │ │ ├── Pods-ActionStage_Tests.debug.xcconfig │ │ ├── Pods-ActionStage_Tests.modulemap │ │ └── Pods-ActionStage_Tests.release.xcconfig └── Tests │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/ActionStage.xcworkspace -scheme ActionStage-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /ActionStage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/ActionStage/30a7fa351491e1faf3d9da22b04d028cb25e1ce7/ActionStage.jpg -------------------------------------------------------------------------------- /ActionStage.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint ActionStage.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'ActionStage' 11 | s.version = '0.2.0' 12 | s.summary = 'A short description of ActionStage.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | TODO: Add long description of the pod here. 22 | DESC 23 | 24 | s.homepage = 'https://github.com/coderyi/ActionStage' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'coderyi' => 'coderyi@foxmail.com' } 28 | s.source = { :git => 'https://github.com/coderyi/ActionStage.git', :tag => s.version.to_s } 29 | # s.social_media_url = 'https://twitter.com/' 30 | 31 | s.ios.deployment_target = '8.0' 32 | 33 | s.source_files = 'ActionStage/Classes/**/*' 34 | 35 | # s.resource_bundles = { 36 | # 'ActionStage' => ['ActionStage/Assets/*.png'] 37 | # } 38 | 39 | # s.public_header_files = 'Pod/Classes/**/*.h' 40 | # s.frameworks = 'UIKit', 'MapKit' 41 | # s.dependency 'AFNetworking', '~> 2.3' 42 | end 43 | -------------------------------------------------------------------------------- /ActionStage/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/ActionStage/30a7fa351491e1faf3d9da22b04d028cb25e1ce7/ActionStage/Assets/.gitkeep -------------------------------------------------------------------------------- /ActionStage/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/ActionStage/30a7fa351491e1faf3d9da22b04d028cb25e1ce7/ActionStage/Classes/.gitkeep -------------------------------------------------------------------------------- /ActionStage/Classes/ASActor.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASActor.h 3 | // ActionStage 4 | // 5 | // Created by coderyi on 2019/9/16. 6 | // 7 | 8 | #import 9 | #import "ASHandle.h" 10 | 11 | @interface ASActor : NSObject 12 | 13 | + (void)registerActorClass:(Class)requestBuilderClass; 14 | 15 | // 根据genericPath获取Actor 16 | + (ASActor *)requestBuilderForGenericPath:(NSString *)genericPath path:(NSString *)path; 17 | 18 | + (NSString *)genericPath; 19 | 20 | @property (nonatomic, strong) NSString *path; 21 | 22 | @property (nonatomic, strong) NSString *requestQueueName; 23 | @property (nonatomic, strong) NSDictionary *storedOptions; 24 | 25 | @property (nonatomic) NSTimeInterval cancelTimeout; 26 | @property (nonatomic) bool cancelled; 27 | 28 | - (id)initWithPath:(NSString *)path; 29 | - (void)prepare:(NSDictionary *)options; // actor准备执行 30 | - (void)execute:(NSDictionary *)options; // actor执行方法 31 | - (void)cancel; 32 | 33 | - (void)watcherJoined:(ASHandle *)watcherHandle options:(NSDictionary *)options waitingInActorQueue:(bool)waitingInActorQueue; // actor正在执行时,再次加入调用的方法 34 | 35 | @end 36 | 37 | -------------------------------------------------------------------------------- /ActionStage/Classes/ASActor.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASActor.m 3 | // ActionStage 4 | // 5 | // Created by coderyi on 2019/9/16. 6 | // 7 | 8 | #import "ASActor.h" 9 | 10 | static NSMutableDictionary *registeredRequestBuilders() 11 | { 12 | static NSMutableDictionary *dict = nil; 13 | static dispatch_once_t onceToken; 14 | dispatch_once(&onceToken, ^ 15 | { 16 | dict = [[NSMutableDictionary alloc] init]; 17 | }); 18 | return dict; 19 | } 20 | 21 | 22 | @implementation ASActor 23 | 24 | + (void)registerActorClass:(Class)requestBuilderClass 25 | { 26 | NSString *genericPath = [requestBuilderClass genericPath]; 27 | if (genericPath == nil || genericPath.length == 0) 28 | { 29 | #ifdef DEBUG 30 | NSLog(@"Error: ASActor::registerActorClass: genericPath is nil"); 31 | #endif 32 | return; 33 | } 34 | 35 | [registeredRequestBuilders() setObject:requestBuilderClass forKey:genericPath]; 36 | } 37 | 38 | + (ASActor *)requestBuilderForGenericPath:(NSString *)genericPath path:(NSString *)path 39 | { 40 | Class builderClass = [registeredRequestBuilders() objectForKey:genericPath]; 41 | if (builderClass != nil) 42 | { 43 | ASActor *builderInstance = [[builderClass alloc] initWithPath:path]; 44 | return builderInstance; 45 | } 46 | return nil; 47 | } 48 | 49 | + (NSString *)genericPath 50 | { 51 | #ifdef DEBUG 52 | NSLog(@"Error: ASActor::genericPath: no default implementation provided"); 53 | #endif 54 | return nil; 55 | } 56 | 57 | @synthesize path = _path; 58 | 59 | @synthesize requestQueueName = _requestQueueName; 60 | @synthesize storedOptions = _storedOptions; 61 | 62 | @synthesize cancelTimeout = _cancelTimeout; 63 | @synthesize cancelled = _cancelled; 64 | 65 | - (id)initWithPath:(NSString *)path 66 | { 67 | self = [super init]; 68 | if (self != nil) 69 | { 70 | _cancelTimeout = 0; 71 | _path = path; 72 | 73 | } 74 | return self; 75 | } 76 | 77 | - (void)dealloc 78 | { 79 | } 80 | 81 | - (void)prepare:(NSDictionary *)__unused options 82 | { 83 | } 84 | 85 | - (void)execute:(NSDictionary *)__unused options 86 | { 87 | #ifdef DEBUG 88 | NSLog(@"Error: ASActor::execute: no default implementation provided"); 89 | #endif 90 | } 91 | 92 | - (void)cancel 93 | { 94 | self.cancelled = true; 95 | } 96 | 97 | - (void)watcherJoined:(ASHandle *)__unused watcherHandle options:(NSDictionary *)__unused options waitingInActorQueue:(bool)__unused waitingInActorQueue 98 | { 99 | } 100 | @end 101 | -------------------------------------------------------------------------------- /ActionStage/Classes/ASHandle.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASHandle.h 3 | // ActionStage 4 | // 5 | // Created by coderyi on 2019/9/16. 6 | // 7 | 8 | #import 9 | 10 | @protocol ASWatcher; 11 | 12 | @interface ASHandle : NSObject 13 | 14 | @property (nonatomic, weak) id delegate; 15 | @property (nonatomic) bool releaseOnMainThread; 16 | 17 | - (id)initWithDelegate:(id)delegate; 18 | - (id)initWithDelegate:(id)delegate releaseOnMainThread:(bool)releaseOnMainThread; 19 | - (void)reset; 20 | 21 | - (bool)hasDelegate; 22 | 23 | - (void)requestAction:(NSString *)action options:(id)options; // 出发Watcher的actionStageActionRequested 24 | - (void)receiveActorMessage:(NSString *)path messageType:(NSString *)messageType message:(id)message; // 用于发送消息给Watcher,ASWatcher会收到actorMessageReceived的回调 25 | - (void)notifyResourceDispatched:(NSString *)path resource:(id)resource; // Watcher的actionStageResourceDispatched会被调用 26 | - (void)notifyResourceDispatched:(NSString *)path resource:(id)resource arguments:(id)arguments; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /ActionStage/Classes/ASHandle.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASHandle.m 3 | // ActionStage 4 | // 5 | // Created by coderyi on 2019/9/16. 6 | // 7 | 8 | #import "ASHandle.h" 9 | #import "ASWatcher.h" 10 | #import 11 | 12 | #define AS_SYNCHRONIZED_DEFINE(lock) pthread_mutex_t _AS_SYNCHRONIZED_##lock 13 | #define AS_SYNCHRONIZED_INIT(lock) pthread_mutex_init(&_AS_SYNCHRONIZED_##lock, NULL) 14 | #define AS_SYNCHRONIZED_BEGIN(lock) pthread_mutex_lock(&_AS_SYNCHRONIZED_##lock); 15 | #define AS_SYNCHRONIZED_END(lock) pthread_mutex_unlock(&_AS_SYNCHRONIZED_##lock); 16 | 17 | @interface ASHandle () 18 | { 19 | AS_SYNCHRONIZED_DEFINE(_delegate); 20 | } 21 | 22 | @end 23 | 24 | @implementation ASHandle 25 | 26 | @synthesize delegate = _delegate; 27 | @synthesize releaseOnMainThread = _releaseOnMainThread; 28 | 29 | - (id)initWithDelegate:(id)delegate 30 | { 31 | self = [super init]; 32 | if (self != nil) 33 | { 34 | AS_SYNCHRONIZED_INIT(_delegate); 35 | 36 | _delegate = delegate; 37 | } 38 | return self; 39 | } 40 | 41 | - (id)initWithDelegate:(id)delegate releaseOnMainThread:(bool)releaseOnMainThread 42 | { 43 | self = [super init]; 44 | if (self != nil) 45 | { 46 | AS_SYNCHRONIZED_INIT(_delegate); 47 | 48 | _delegate = delegate; 49 | _releaseOnMainThread = releaseOnMainThread; 50 | } 51 | return self; 52 | } 53 | 54 | - (void)reset 55 | { 56 | AS_SYNCHRONIZED_BEGIN(_delegate); 57 | _delegate = nil; 58 | AS_SYNCHRONIZED_END(_delegate); 59 | } 60 | 61 | - (bool)hasDelegate 62 | { 63 | bool result = false; 64 | 65 | AS_SYNCHRONIZED_BEGIN(_delegate); 66 | result = _delegate != nil; 67 | AS_SYNCHRONIZED_END(_delegate); 68 | 69 | return result; 70 | } 71 | 72 | - (id)delegate 73 | { 74 | id result = nil; 75 | 76 | AS_SYNCHRONIZED_BEGIN(_delegate); 77 | result = _delegate; 78 | AS_SYNCHRONIZED_END(_delegate); 79 | 80 | return result; 81 | } 82 | 83 | - (void)setDelegate:(id)delegate 84 | { 85 | AS_SYNCHRONIZED_BEGIN(_delegate); 86 | _delegate = delegate; 87 | AS_SYNCHRONIZED_END(_delegate); 88 | } 89 | 90 | - (void)requestAction:(NSString *)action options:(id)options 91 | { 92 | __strong id delegate = self.delegate; 93 | if (delegate != nil && [delegate respondsToSelector:@selector(actionStageActionRequested:options:)]) 94 | [delegate actionStageActionRequested:action options:options]; 95 | 96 | if (_releaseOnMainThread && ![NSThread isMainThread]) 97 | { 98 | dispatch_async(dispatch_get_main_queue(), ^ 99 | { 100 | [delegate class]; 101 | }); 102 | } 103 | } 104 | 105 | - (void)receiveActorMessage:(NSString *)path messageType:(NSString *)messageType message:(id)message 106 | { 107 | __strong id delegate = self.delegate; 108 | if (delegate != nil && [delegate respondsToSelector:@selector(actorMessageReceived:messageType:message:)]) 109 | [delegate actorMessageReceived:path messageType:messageType message:message]; 110 | 111 | if (_releaseOnMainThread && ![NSThread isMainThread]) 112 | { 113 | dispatch_async(dispatch_get_main_queue(), ^ 114 | { 115 | [delegate class]; 116 | }); 117 | } 118 | } 119 | 120 | - (void)notifyResourceDispatched:(NSString *)path resource:(id)resource 121 | { 122 | [self notifyResourceDispatched:path resource:resource arguments:nil]; 123 | } 124 | 125 | - (void)notifyResourceDispatched:(NSString *)path resource:(id)resource arguments:(id)arguments 126 | { 127 | __strong id delegate = self.delegate; 128 | if (delegate != nil && [delegate respondsToSelector:@selector(actionStageResourceDispatched:resource:arguments:)]) 129 | [delegate actionStageResourceDispatched:path resource:resource arguments:arguments]; 130 | 131 | if (_releaseOnMainThread && ![NSThread isMainThread]) 132 | { 133 | dispatch_async(dispatch_get_main_queue(), ^ 134 | { 135 | [delegate class]; 136 | }); 137 | } 138 | } 139 | 140 | 141 | @end 142 | -------------------------------------------------------------------------------- /ActionStage/Classes/ASTimer.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTimer.h 3 | // ActionStage 4 | // 5 | // Created by coderyi on 2019/9/18. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface ASTimer : NSObject 13 | - (id)initWithTimeout:(NSTimeInterval)timeout repeat:(bool)repeat completion:(dispatch_block_t)completion nativeQueue:(dispatch_queue_t)nativeQueue; 14 | 15 | - (void)start; 16 | - (void)invalidate; 17 | - (void)fireAndInvalidate; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /ActionStage/Classes/ASTimer.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASTimer.m 3 | // ActionStage 4 | // 5 | // Created by coderyi on 2019/9/18. 6 | // 7 | 8 | #import "ASTimer.h" 9 | @interface ASTimer () 10 | { 11 | dispatch_source_t _timer; 12 | NSTimeInterval _timeout; 13 | NSTimeInterval _timeoutDate; 14 | bool _repeat; 15 | dispatch_block_t _completion; 16 | dispatch_queue_t _nativeQueue; 17 | } 18 | @end 19 | 20 | @implementation ASTimer 21 | 22 | 23 | - (id)initWithTimeout:(NSTimeInterval)timeout repeat:(bool)repeat completion:(dispatch_block_t)completion nativeQueue:(dispatch_queue_t)nativeQueue 24 | { 25 | self = [super init]; 26 | if (self != nil) 27 | { 28 | _timeoutDate = INT_MAX; 29 | 30 | _timeout = timeout; 31 | _repeat = repeat; 32 | _completion = [completion copy]; 33 | _nativeQueue = nativeQueue; 34 | } 35 | return self; 36 | } 37 | 38 | - (void)dealloc 39 | { 40 | if (_timer != nil) 41 | { 42 | dispatch_source_cancel(_timer); 43 | _timer = nil; 44 | } 45 | } 46 | 47 | - (void)start 48 | { 49 | _timeoutDate = CFAbsoluteTimeGetCurrent() + kCFAbsoluteTimeIntervalSince1970 + _timeout; 50 | 51 | _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, _nativeQueue); 52 | dispatch_source_set_timer(_timer, dispatch_time(DISPATCH_TIME_NOW, (int64_t)(_timeout * NSEC_PER_SEC)), _repeat ? (int64_t)(_timeout * NSEC_PER_SEC) : DISPATCH_TIME_FOREVER, 0); 53 | 54 | dispatch_source_set_event_handler(_timer, ^ 55 | { 56 | if (_completion) 57 | _completion(); 58 | if (!_repeat) 59 | [self invalidate]; 60 | }); 61 | dispatch_resume(_timer); 62 | } 63 | 64 | - (void)fireAndInvalidate 65 | { 66 | if (_completion) 67 | _completion(); 68 | 69 | [self invalidate]; 70 | } 71 | 72 | - (void)invalidate 73 | { 74 | _timeoutDate = 0; 75 | 76 | if (_timer != nil) 77 | { 78 | dispatch_source_cancel(_timer); 79 | _timer = nil; 80 | } 81 | } 82 | 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /ActionStage/Classes/ASWatcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASWatcher.h 3 | // ActionStage 4 | // 5 | // Created by coderyi on 2019/9/16. 6 | // 7 | 8 | #import 9 | #import "ASHandle.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | 14 | @protocol ASWatcher 15 | 16 | @required 17 | 18 | @property (nonatomic, strong, readonly) ASHandle *actionHandle; 19 | 20 | @optional 21 | 22 | // actor执行完成 23 | - (void)actorCompleted:(int)status path:(NSString *)path result:(id)result; 24 | // 用于通知进度,来自ActionStage的nodeRetrieveProgress的回调 25 | - (void)actorReportedProgress:(NSString *)path progress:(float)progress; 26 | // 接收dispatchResource消息 27 | - (void)actionStageResourceDispatched:(NSString *)path resource:(id)resource arguments:(id)arguments; 28 | // 接收ASHandle调用requestAction的回调 29 | - (void)actionStageActionRequested:(NSString *)action options:(id)options; 30 | // 接收ActionStage的dispatchMessageToWatchers的消息 31 | - (void)actorMessageReceived:(NSString *)path messageType:(NSString *)messageType message:(id)message; 32 | 33 | @end 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /ActionStage/Classes/ActionStage.h: -------------------------------------------------------------------------------- 1 | // 2 | // ActionStage.h 3 | // ActionStage 4 | // 5 | // Created by coderyi on 2019/9/16. 6 | // 7 | 8 | #import 9 | #import "ASWatcher.h" 10 | #import "ASActor.h" 11 | 12 | typedef enum { 13 | ASStatusSuccess = 0, 14 | ASStatusFailed = -1 15 | } ASStatus; 16 | 17 | #ifdef DEBUG 18 | #define dispatchOnStageQueue dispatchOnStageQueueDebug:__FILE__ line:__LINE__ block 19 | #endif 20 | 21 | @class ActionStage; 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | ActionStage *ActionStageInstance(); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | typedef enum { 34 | ASActorRequestChangePriority = 1 35 | } ASActorRequestFlags; 36 | 37 | 38 | 39 | @interface ActionStage : NSObject 40 | 41 | - (dispatch_queue_t)globalStageDispatchQueue; 42 | #ifdef DEBUG 43 | - (void)dispatchOnStageQueueDebug:(const char *)function line:(int)line block:(dispatch_block_t)block; 44 | #else 45 | - (void)dispatchOnStageQueue:(dispatch_block_t)block; 46 | #endif 47 | 48 | - (bool)isCurrentQueueStageQueue; 49 | 50 | - (void)cancelActorTimeout:(NSString *)path; 51 | 52 | // 根据path获取genericPath 53 | - (NSString *)genericStringForParametrizedPath:(NSString *)path; 54 | 55 | // 执行Actor,触发Actor的execute方法 56 | - (void)requestActor:(NSString *)path options:(NSDictionary *)options flags:(int)flags watcher:(id)watcher; 57 | - (void)requestActor:(NSString *)path options:(NSDictionary *)options watcher:(id)watcher; 58 | - (void)changeActorPriority:(NSString *)path; // 改变Actor执行优先级 59 | 60 | - (NSArray *)rejoinActionsWithGenericPathNow:(NSString *)genericPath prefix:(NSString *)prefix watcher:(id)watcher; // 再次加入actor,如果actor正在执行则会出发Actor相应方法,如果actor没在执行,则不做响应 61 | // Actor是否正在执行 62 | - (bool)isExecutingActorsWithGenericPath:(NSString *)genericPath; 63 | - (bool)isExecutingActorsWithPathPrefix:(NSString *)pathPrefix; 64 | - (NSArray *)executingActorsWithPathPrefix:(NSString *)pathPrefix; 65 | // 获取执行中的Actor 66 | - (ASActor *)executingActorWithPath:(NSString *)path; 67 | 68 | // 增加Watcher 69 | - (void)watchForPath:(NSString *)path watcher:(id)watcher; 70 | - (void)watchForPaths:(NSArray *)paths watcher:(id)watcher; 71 | - (void)watchForGenericPath:(NSString *)path watcher:(id)watcher; 72 | - (void)watchForMessagesToWatchersAtGenericPath:(NSString *)genericPath watcher:(id)watcher; 73 | - (void)removeWatcherByHandle:(ASHandle *)actionHandle; 74 | - (void)removeWatcher:(id)watcher; 75 | - (void)removeWatcherByHandle:(ASHandle *)actionHandle fromPath:(NSString *)path; 76 | - (void)removeWatcher:(id)watcher fromPath:(NSString *)path; 77 | - (void)removeAllWatchersFromPath:(NSString *)path; 78 | 79 | // 获取Actor是否正在执行 80 | - (bool)requestActorStateNow:(NSString *)path; 81 | // 触发Watcher的actionStageResourceDispatched 82 | - (void)dispatchResource:(NSString *)path resource:(id)resource arguments:(id)arguments; 83 | - (void)dispatchResource:(NSString *)path resource:(id)resource; 84 | // 触发Watcher的actorCompleted:path:result: 85 | - (void)actionCompleted:(NSString *)action result:(id)result; 86 | // 用于发送消息给Watcher,ASWatcher会收到actorMessageReceived的回调 87 | - (void)dispatchMessageToWatchers:(NSString *)path messageType:(NSString *)messageType message:(id)message; 88 | // action失败方法,触发Watcher的actorCompleted:path:result: 89 | - (void)actionFailed:(NSString *)action reason:(int)reason; 90 | - (void)nodeRetrieveProgress:(NSString *)path progress:(float)progress; // 通知进度的消息 91 | - (void)nodeRetrieveFailed:(NSString *)path; // 调用actionFailed 92 | 93 | 94 | @end 95 | 96 | 97 | -------------------------------------------------------------------------------- /ActionStage/Classes/ActionStage.m: -------------------------------------------------------------------------------- 1 | // 2 | // ActionStage.m 3 | // ActionStage 4 | // 5 | // Created by coderyi on 2019/9/16. 6 | // 7 | 8 | #import "ActionStage.h" 9 | #import "ASActor.h" 10 | 11 | #import 12 | 13 | #import "ASTimer.h" 14 | 15 | static const char *graphQueueSpecific = "com.actionstage.graphdispatchqueue"; 16 | 17 | static dispatch_queue_t mainGraphQueue = nil; 18 | static dispatch_queue_t globalGraphQueue = nil; 19 | static dispatch_queue_t highPriorityGraphQueue = nil; 20 | 21 | static volatile OSSpinLock removeWatcherRequestsLock = OS_SPINLOCK_INIT; 22 | static volatile OSSpinLock removeWatcherFromPathRequestsLock = OS_SPINLOCK_INIT; 23 | 24 | @interface ASWatcherPathPair : NSObject 25 | @property (nonatomic, strong) ASHandle *watcher; 26 | @property (nonatomic, copy) NSString *path; 27 | @end 28 | 29 | @implementation ASWatcherPathPair 30 | @end 31 | 32 | @interface ActionStage () 33 | { 34 | NSMutableArray *_removeWatcherFromPathRequests; 35 | NSMutableArray *_removeWatcherRequests; 36 | } 37 | 38 | @property (nonatomic, strong) NSMutableDictionary *requestQueues; 39 | 40 | @property (nonatomic, strong) NSMutableDictionary *activeRequests; 41 | @property (nonatomic, strong) NSMutableDictionary *cancelRequestTimers; 42 | 43 | @property (nonatomic, strong) NSMutableDictionary *liveNodeWatchers; 44 | @property (nonatomic, strong) NSMutableDictionary *actorMessagesWatchers; 45 | 46 | @end 47 | 48 | ActionStage *ActionStageInstance() 49 | { 50 | static ActionStage *singleton = nil; 51 | static dispatch_once_t onceToken; 52 | dispatch_once(&onceToken, ^ 53 | { 54 | singleton = [[ActionStage alloc] init]; 55 | }); 56 | 57 | return singleton; 58 | } 59 | 60 | @implementation ActionStage 61 | 62 | #pragma mark - Singleton 63 | 64 | #pragma mark - Implemetation 65 | 66 | @synthesize requestQueues = _requestQueues; 67 | 68 | @synthesize activeRequests = _activeRequests; 69 | @synthesize cancelRequestTimers = _cancelRequestTimers; 70 | 71 | @synthesize liveNodeWatchers = _liveNodeWatchers; 72 | @synthesize actorMessagesWatchers = _actorMessagesWatchers; 73 | 74 | - (id)init 75 | { 76 | self = [super init]; 77 | if (self != nil) 78 | { 79 | _requestQueues = [[NSMutableDictionary alloc] init]; 80 | 81 | _activeRequests = [[NSMutableDictionary alloc] init]; 82 | _cancelRequestTimers = [[NSMutableDictionary alloc] init]; 83 | 84 | _liveNodeWatchers = [[NSMutableDictionary alloc] init]; 85 | _actorMessagesWatchers = [[NSMutableDictionary alloc] init]; 86 | _removeWatcherRequests = [NSMutableArray array]; 87 | _removeWatcherFromPathRequests = [NSMutableArray array]; 88 | } 89 | return self; 90 | } 91 | 92 | - (dispatch_queue_t)globalStageDispatchQueue 93 | { 94 | if (mainGraphQueue == NULL) 95 | { 96 | mainGraphQueue = dispatch_queue_create("com.actionstage.graphdispatchqueue", 0); 97 | 98 | globalGraphQueue = dispatch_queue_create("com.actionstage.graphdispatchqueue-global", 0); 99 | dispatch_set_target_queue(globalGraphQueue, mainGraphQueue); 100 | 101 | highPriorityGraphQueue = dispatch_queue_create("com.actionstage.graphdispatchqueue-high", 0); 102 | dispatch_set_target_queue(highPriorityGraphQueue, mainGraphQueue); 103 | 104 | dispatch_queue_set_specific(mainGraphQueue, graphQueueSpecific, (void *)graphQueueSpecific, NULL); 105 | dispatch_queue_set_specific(globalGraphQueue, graphQueueSpecific, (void *)graphQueueSpecific, NULL); 106 | dispatch_queue_set_specific(highPriorityGraphQueue, graphQueueSpecific, (void *)graphQueueSpecific, NULL); 107 | } 108 | return globalGraphQueue; 109 | } 110 | 111 | - (bool)isCurrentQueueStageQueue 112 | { 113 | return dispatch_get_specific(graphQueueSpecific) != NULL; 114 | } 115 | 116 | #ifdef DEBUG 117 | - (void)dispatchOnStageQueueDebug:(const char *)function line:(int)line block:(dispatch_block_t)block 118 | #else 119 | - (void)dispatchOnStageQueue:(dispatch_block_t)block 120 | #endif 121 | { 122 | bool isGraphQueue = false; 123 | 124 | isGraphQueue = dispatch_get_specific(graphQueueSpecific) != NULL; 125 | 126 | if (isGraphQueue) 127 | { 128 | #ifdef DEBUG 129 | CFAbsoluteTime startTime = CFAbsoluteTimeGetCurrent(); 130 | #endif 131 | 132 | block(); 133 | 134 | #ifdef DEBUG 135 | CFAbsoluteTime executionTime = (CFAbsoluteTimeGetCurrent() - startTime); 136 | if (executionTime > 0.1) 137 | ASLog(@"***** Dispatch from %s:%d took %f s", function, line, executionTime); 138 | #endif 139 | } 140 | else 141 | { 142 | #ifdef DEBUG 143 | dispatch_async([self globalStageDispatchQueue], ^ 144 | { 145 | CFAbsoluteTime startTime = CFAbsoluteTimeGetCurrent(); 146 | 147 | block(); 148 | 149 | CFAbsoluteTime executionTime = (CFAbsoluteTimeGetCurrent() - startTime); 150 | if (executionTime > 0.1) 151 | ASLog(@"***** Dispatch from %s:%d took %f s", function, line, executionTime); 152 | }); 153 | #else 154 | dispatch_async([self globalStageDispatchQueue], block); 155 | #endif 156 | } 157 | } 158 | 159 | - (void)dispatchOnHighPriorityQueue:(dispatch_block_t)block 160 | { 161 | if ([self isCurrentQueueStageQueue]) 162 | block(); 163 | else 164 | { 165 | if (highPriorityGraphQueue == NULL) 166 | [self globalStageDispatchQueue]; 167 | 168 | dispatch_async(highPriorityGraphQueue, block); 169 | } 170 | } 171 | 172 | - (void)dumpGraphState 173 | { 174 | [self dispatchOnStageQueue:^ 175 | { 176 | ASLog(@"===== SGraph State ====="); 177 | ASLog(@"%d live node watchers", _liveNodeWatchers.count); 178 | [_liveNodeWatchers enumerateKeysAndObjectsUsingBlock:^(NSString *path, NSArray *watchers, __unused BOOL *stop) 179 | { 180 | ASLog(@" %@", path); 181 | for (ASHandle *handle in watchers) 182 | { 183 | id watcher = handle.delegate; 184 | if (watcher != nil) 185 | { 186 | ASLog(@" %@", [watcher description]); 187 | } 188 | } 189 | }]; 190 | ASLog(@"%d requests", _activeRequests.count); 191 | [_activeRequests enumerateKeysAndObjectsUsingBlock:^(NSString *path, __unused id obj, __unused BOOL *stop) { 192 | ASLog(@" %@", path); 193 | }]; 194 | ASLog(@"========================"); 195 | }]; 196 | } 197 | 198 | - (NSString *)optionsHash:(NSDictionary *)options 199 | { 200 | if (options.count == 0) 201 | return @""; 202 | 203 | NSMutableString *string = [[NSMutableString alloc] initWithString:@"#"]; 204 | 205 | Class StringClass = [NSString class]; 206 | NSArray *keys = [[options allKeys] sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) 207 | { 208 | if ([obj1 isKindOfClass:StringClass] && [obj2 isKindOfClass:StringClass]) 209 | { 210 | return [(NSString *)obj1 compare:(NSString *)obj2]; 211 | } 212 | else 213 | return NSOrderedSame; 214 | }]; 215 | 216 | bool first = true; 217 | for (NSString *key in keys) 218 | { 219 | if (![key isKindOfClass:StringClass]) 220 | { 221 | ASLog(@"Warning: optionsHash: key is not a string"); 222 | continue; 223 | } 224 | 225 | if (first) 226 | { 227 | [string appendString:@","]; 228 | first = false; 229 | } 230 | 231 | NSObject *value = [options objectForKey:key]; 232 | if ([value respondsToSelector:@selector(stringValue)]) 233 | [string appendFormat:@"%@=%@", key, value]; 234 | } 235 | 236 | return string; 237 | } 238 | 239 | - (NSString *)genericStringForParametrizedPath:(NSString *)path 240 | { 241 | if (path == nil) 242 | return @""; 243 | 244 | int length = (int)path.length; 245 | unichar newPath[path.length]; 246 | int newLength = 0; 247 | 248 | SEL sel = @selector(characterAtIndex:); 249 | unichar (*characterAtIndexImp)(id, SEL, NSUInteger) = (unichar (*)(id, SEL, NSUInteger))[path methodForSelector:sel]; 250 | 251 | bool skipCharacters = false; 252 | bool skippedCharacters = false; 253 | 254 | for (int i = 0; i < length; i++) 255 | { 256 | unichar c = characterAtIndexImp(path, sel, i); 257 | if (c == '(') 258 | { 259 | skipCharacters = true; 260 | skippedCharacters = true; 261 | newPath[newLength++] = '@'; 262 | } 263 | else if (c == ')') 264 | { 265 | skipCharacters = false; 266 | } 267 | else if (!skipCharacters) 268 | { 269 | newPath[newLength++] = c; 270 | } 271 | } 272 | 273 | if (!skippedCharacters) 274 | return path; 275 | 276 | NSString *genericPath = [[NSString alloc] initWithCharacters:newPath length:newLength]; 277 | return genericPath; 278 | } 279 | 280 | - (void)_requestGeneric:(bool)joinOnly inCurrentQueue:(bool)inCurrentQueue path:(NSString *)path options:(NSDictionary *)options flags:(int)flags watcher:(id)watcher 281 | { 282 | ASHandle *actionHandle = watcher.actionHandle; 283 | dispatch_block_t requestBlock = ^ 284 | { 285 | if (![actionHandle hasDelegate]) 286 | { 287 | ASLog(@"Error: %s:%d: actionHandle.delegate is nil", __PRETTY_FUNCTION__, __LINE__); 288 | return; 289 | } 290 | 291 | NSMutableDictionary *activeRequests = _activeRequests; 292 | NSMutableDictionary *cancelTimers = _cancelRequestTimers; 293 | 294 | NSString *genericPath = [self genericStringForParametrizedPath:path]; 295 | 296 | NSMutableDictionary *requestInfo = nil; 297 | 298 | NSMutableDictionary *cancelRequestInfo = [cancelTimers objectForKey:path]; 299 | if (cancelRequestInfo != nil) // 启动该path前把取消信息删除 300 | { 301 | ASTimer *timer = [cancelRequestInfo objectForKey:@"timer"]; 302 | [timer invalidate]; 303 | timer = nil; 304 | requestInfo = [cancelRequestInfo objectForKey:@"requestInfo"]; 305 | [activeRequests setObject:requestInfo forKey:path]; 306 | [cancelTimers removeObjectForKey:path]; 307 | ASLog(@"Resuming request to \"%@\"", path); 308 | } 309 | 310 | if (requestInfo == nil) 311 | requestInfo = [activeRequests objectForKey:path]; 312 | 313 | if (joinOnly && requestInfo == nil) 314 | return; 315 | 316 | if (requestInfo == nil) 317 | { 318 | ASActor *requestBuilder = [ASActor requestBuilderForGenericPath:genericPath path:path]; 319 | if (requestBuilder != nil) 320 | { 321 | NSMutableArray *watchers = [[NSMutableArray alloc] initWithObjects:actionHandle, nil]; 322 | 323 | requestInfo = [[NSMutableDictionary alloc] initWithObjectsAndKeys: 324 | requestBuilder, @"requestBuilder", 325 | watchers, @"watchers", 326 | nil]; 327 | 328 | [activeRequests setObject:requestInfo forKey:path]; 329 | 330 | [requestBuilder prepare:options]; 331 | 332 | bool executeNow = true; 333 | if (requestBuilder.requestQueueName != nil) 334 | { 335 | NSMutableArray *requestQueue = [_requestQueues objectForKey:requestBuilder.requestQueueName]; 336 | if (requestQueue == nil) 337 | { 338 | requestQueue = [[NSMutableArray alloc] initWithObjects:requestBuilder, nil]; 339 | [_requestQueues setObject:requestQueue forKey:requestBuilder.requestQueueName]; 340 | } 341 | else 342 | { 343 | [requestQueue addObject:requestBuilder]; 344 | if ([requestQueue count] > 1) 345 | { 346 | executeNow = false; 347 | ASLog(@"Adding request %@ to request queue \"%@\"", requestBuilder, requestBuilder.requestQueueName); 348 | 349 | if (flags & ASActorRequestChangePriority) 350 | { 351 | if (requestQueue.count > 2) 352 | { 353 | [requestQueue removeLastObject]; 354 | [requestQueue insertObject:requestBuilder atIndex:1]; 355 | 356 | ASLog(@"(Inserted actor with high priority (next in queue)"); 357 | } 358 | } 359 | } 360 | } 361 | } 362 | 363 | if (executeNow) 364 | [requestBuilder execute:options]; 365 | else 366 | requestBuilder.storedOptions = options; 367 | } 368 | else 369 | { 370 | ASLog(@"Error: request builder not found for \"%@\"", path); 371 | } 372 | } 373 | else 374 | { 375 | NSMutableArray *watchers = [requestInfo objectForKey:@"watchers"]; 376 | if (![watchers containsObject:actionHandle]) 377 | { 378 | ASLog(@"Joining watcher to the watchers of \"%@\"", path); 379 | [watchers addObject:actionHandle]; 380 | } 381 | else 382 | { 383 | ASLog(@"Continue to watch for actor \"%@\"", path); 384 | } 385 | 386 | ASActor *actor = [requestInfo objectForKey:@"requestBuilder"]; 387 | if (actor.requestQueueName == nil) 388 | [actor watcherJoined:actionHandle options:options waitingInActorQueue:false]; 389 | else 390 | { 391 | NSMutableArray *requestQueue = [_requestQueues objectForKey:actor.requestQueueName]; 392 | if (requestQueue == nil || requestQueue.count == 0) 393 | { 394 | [actor watcherJoined:actionHandle options:options waitingInActorQueue:false]; 395 | } 396 | else 397 | { 398 | [actor watcherJoined:actionHandle options:options waitingInActorQueue:[requestQueue objectAtIndex:0] != actor]; 399 | 400 | if (flags & ASActorRequestChangePriority) 401 | [self changeActorPriority:path]; 402 | } 403 | } 404 | } 405 | }; 406 | 407 | if (inCurrentQueue) 408 | requestBlock(); 409 | else 410 | [self dispatchOnStageQueue:requestBlock]; 411 | } 412 | 413 | - (void)changeActorPriority:(NSString *)path 414 | { 415 | [ActionStageInstance() dispatchOnStageQueue:^ 416 | { 417 | NSDictionary *requestInfo = [_activeRequests objectForKey:path]; 418 | if (requestInfo != nil) 419 | { 420 | ASActor *actor = [requestInfo objectForKey:@"requestBuilder"]; 421 | if (actor.requestQueueName != nil) 422 | { 423 | NSMutableArray *requestQueue = [_requestQueues objectForKey:actor.requestQueueName]; 424 | if (requestQueue != nil && requestQueue.count != 0) 425 | { 426 | NSUInteger index = [requestQueue indexOfObject:actor]; 427 | if (index != NSNotFound && index != 0 && index != 1) 428 | { 429 | [requestQueue removeObjectAtIndex:index]; 430 | [requestQueue insertObject:actor atIndex:1]; 431 | 432 | ASLog(@"Changed actor %@ priority (next in %@)", path, actor.requestQueueName); 433 | } 434 | } 435 | } 436 | } 437 | }]; 438 | } 439 | 440 | - (NSArray *)rejoinActionsWithGenericPathNow:(NSString *)genericPath prefix:(NSString *)prefix watcher:(id)watcher 441 | { 442 | NSMutableDictionary *activeRequests = _activeRequests; 443 | NSMutableDictionary *cancelTimers = _cancelRequestTimers; 444 | 445 | NSMutableArray *rejoinPaths = [[NSMutableArray alloc] init]; 446 | 447 | for (NSString *path in activeRequests.allKeys) 448 | { 449 | if ([path isEqualToString:genericPath] || ([[self genericStringForParametrizedPath:path] isEqualToString:genericPath] && (prefix.length == 0 || [path hasPrefix:prefix]))) 450 | { 451 | [rejoinPaths addObject:path]; 452 | } 453 | } 454 | 455 | for (NSString *path in cancelTimers.allKeys) 456 | { 457 | if ([[self genericStringForParametrizedPath:path] isEqualToString:genericPath] && [path hasPrefix:prefix]) 458 | { 459 | [rejoinPaths addObject:path]; 460 | } 461 | } 462 | 463 | for (NSString *path in rejoinPaths) 464 | { 465 | [self _requestGeneric:true inCurrentQueue:true path:path options:nil flags:0 watcher:watcher]; 466 | } 467 | 468 | return rejoinPaths; 469 | } 470 | 471 | - (bool)isExecutingActorsWithGenericPath:(NSString *)genericPath 472 | { 473 | if (![self isCurrentQueueStageQueue]) 474 | { 475 | ASLog(@"%s should be called from graph queue", __PRETTY_FUNCTION__); 476 | 477 | return nil; 478 | } 479 | 480 | __block bool result = false; 481 | 482 | [_activeRequests enumerateKeysAndObjectsUsingBlock:^(__unused NSString *path, NSDictionary *actionInfo, BOOL *stop) 483 | { 484 | ASActor *actor = [actionInfo objectForKey:@"requestBuilder"]; 485 | 486 | if ([genericPath isEqualToString:[actor.class genericPath]]) 487 | { 488 | result = true; 489 | if (stop != NULL) 490 | *stop = true; 491 | } 492 | }]; 493 | 494 | if (!result) 495 | { 496 | [_cancelRequestTimers enumerateKeysAndObjectsUsingBlock:^(__unused NSString *path, NSDictionary *actionInfo, BOOL *stop) 497 | { 498 | ASActor *actor = [actionInfo objectForKey:@"requestBuilder"]; 499 | 500 | if ([genericPath isEqualToString:[actor.class genericPath]]) 501 | { 502 | result = true; 503 | if (stop != NULL) 504 | *stop = true; 505 | } 506 | }]; 507 | } 508 | 509 | return result; 510 | } 511 | 512 | - (bool)isExecutingActorsWithPathPrefix:(NSString *)pathPrefix 513 | { 514 | if (![self isCurrentQueueStageQueue]) 515 | { 516 | ASLog(@"%s should be called from graph queue", __PRETTY_FUNCTION__); 517 | 518 | return nil; 519 | } 520 | 521 | __block bool result = false; 522 | 523 | [_activeRequests enumerateKeysAndObjectsUsingBlock:^(NSString *path, __unused id obj, BOOL *stop) 524 | { 525 | if ([path hasPrefix:pathPrefix]) 526 | { 527 | result = true; 528 | if (stop != NULL) 529 | *stop = true; 530 | } 531 | }]; 532 | 533 | if (!result) 534 | { 535 | [_cancelRequestTimers enumerateKeysAndObjectsUsingBlock:^(NSString *path, __unused id obj, BOOL *stop) 536 | { 537 | if ([path hasPrefix:pathPrefix]) 538 | { 539 | result = true; 540 | if (stop != NULL) 541 | *stop = true; 542 | } 543 | }]; 544 | } 545 | 546 | return result; 547 | } 548 | 549 | - (NSArray *)executingActorsWithPathPrefix:(NSString *)pathPrefix 550 | { 551 | if (![self isCurrentQueueStageQueue]) 552 | { 553 | ASLog(@"%s should be called from graph queue", __PRETTY_FUNCTION__); 554 | 555 | return nil; 556 | } 557 | 558 | NSMutableArray *array = [[NSMutableArray alloc] init]; 559 | 560 | [_activeRequests enumerateKeysAndObjectsUsingBlock:^(NSString *path, NSDictionary *actionInfo, __unused BOOL *stop) 561 | { 562 | if ([path hasPrefix:pathPrefix]) 563 | { 564 | ASActor *actor = [actionInfo objectForKey:@"requestBuilder"]; 565 | if (actor != nil) 566 | [array addObject:actor]; 567 | } 568 | }]; 569 | 570 | [_cancelRequestTimers enumerateKeysAndObjectsUsingBlock:^(NSString *path, NSDictionary *actionInfo, __unused BOOL *stop) 571 | { 572 | if ([path hasPrefix:pathPrefix]) 573 | { 574 | ASActor *actor = [actionInfo objectForKey:@"requestBuilder"]; 575 | if (actor != nil) 576 | [array addObject:actor]; 577 | } 578 | }]; 579 | 580 | return array; 581 | } 582 | 583 | - (ASActor *)executingActorWithPath:(NSString *)path 584 | { 585 | if (![self isCurrentQueueStageQueue]) 586 | { 587 | ASLog(@"%s should be called from graph queue", __PRETTY_FUNCTION__); 588 | 589 | return nil; 590 | } 591 | 592 | NSMutableDictionary *requestInfo = [_activeRequests objectForKey:path]; 593 | if (requestInfo != nil) 594 | { 595 | ASActor *requestBuilder = [requestInfo objectForKey:@"requestBuilder"]; 596 | return requestBuilder; 597 | } 598 | 599 | NSMutableDictionary *cancelRequestInfo = [_cancelRequestTimers objectForKey:path]; 600 | if (cancelRequestInfo != nil) 601 | { 602 | ASActor *requestBuilder = [[cancelRequestInfo objectForKey:@"requestInfo"] objectForKey:@"requestBuilder"]; 603 | return requestBuilder; 604 | } 605 | 606 | return nil; 607 | } 608 | 609 | - (void)cancelActorTimeout:(NSString *)path 610 | { 611 | NSMutableDictionary *cancelRequestInfo = [_cancelRequestTimers objectForKey:path]; 612 | if (cancelRequestInfo != nil) 613 | { 614 | ASTimer *timer = [cancelRequestInfo objectForKey:@"timer"]; 615 | [timer fireAndInvalidate]; 616 | timer = nil; 617 | return; 618 | } 619 | } 620 | 621 | - (void)requestActor:(NSString *)action options:(NSDictionary *)options watcher:(id)watcher 622 | { 623 | [self _requestGeneric:false inCurrentQueue:false path:action options:options flags:0 watcher:watcher]; 624 | } 625 | 626 | - (void)requestActor:(NSString *)path options:(NSDictionary *)options flags:(int)flags watcher:(id)watcher 627 | { 628 | [self _requestGeneric:false inCurrentQueue:false path:path options:options flags:flags watcher:watcher]; 629 | } 630 | 631 | - (void)watchForPath:(NSString *)path watcher:(id)watcher 632 | { 633 | ASHandle *actionHandle = watcher.actionHandle; 634 | if (actionHandle == nil) 635 | { 636 | ASLog(@"***** Warning: actionHandle is nil in %s:%d", __PRETTY_FUNCTION__, __LINE__); 637 | return; 638 | } 639 | 640 | [self dispatchOnStageQueue:^ 641 | { 642 | NSMutableArray *pathWatchers = [_liveNodeWatchers objectForKey:path]; 643 | if (pathWatchers == nil) 644 | { 645 | pathWatchers = [[NSMutableArray alloc] init]; 646 | [_liveNodeWatchers setObject:pathWatchers forKey:path]; 647 | } 648 | 649 | if (![pathWatchers containsObject:actionHandle]) 650 | [pathWatchers addObject:actionHandle]; 651 | }]; 652 | } 653 | 654 | - (void)watchForPaths:(NSArray *)paths watcher:(id)watcher 655 | { 656 | ASHandle *actionHandle = watcher.actionHandle; 657 | if (actionHandle == nil) 658 | { 659 | ASLog(@"***** Warning: actionHandle is nil in %s:%d", __PRETTY_FUNCTION__, __LINE__); 660 | return; 661 | } 662 | 663 | [self dispatchOnStageQueue:^ 664 | { 665 | for (NSString *path in paths) 666 | { 667 | NSMutableArray *pathWatchers = [_liveNodeWatchers objectForKey:path]; 668 | if (pathWatchers == nil) 669 | { 670 | pathWatchers = [[NSMutableArray alloc] init]; 671 | [_liveNodeWatchers setObject:pathWatchers forKey:path]; 672 | } 673 | 674 | if (![pathWatchers containsObject:actionHandle]) 675 | [pathWatchers addObject:actionHandle]; 676 | } 677 | }]; 678 | } 679 | 680 | - (void)watchForGenericPath:(NSString *)path watcher:(id)watcher 681 | { 682 | ASHandle *actionHandle = watcher.actionHandle; 683 | if (actionHandle == nil) 684 | { 685 | ASLog(@"***** Warning: actionHandle is nil in %s:%d", __PRETTY_FUNCTION__, __LINE__); 686 | return; 687 | } 688 | 689 | [self dispatchOnStageQueue:^ 690 | { 691 | NSString *genericPath = [self genericStringForParametrizedPath:path]; 692 | NSMutableArray *pathWatchers = [_liveNodeWatchers objectForKey:genericPath]; 693 | if (pathWatchers == nil) 694 | { 695 | pathWatchers = [[NSMutableArray alloc] init]; 696 | [_liveNodeWatchers setObject:pathWatchers forKey:genericPath]; 697 | } 698 | 699 | [pathWatchers addObject:actionHandle]; 700 | }]; 701 | } 702 | 703 | - (void)watchForMessagesToWatchersAtGenericPath:(NSString *)genericPath watcher:(id)watcher 704 | { 705 | ASHandle *actionHandle = watcher.actionHandle; 706 | if (actionHandle == nil) 707 | { 708 | ASLog(@"***** Warning: actionHandle is nil in %s:%d", __PRETTY_FUNCTION__, __LINE__); 709 | return; 710 | } 711 | 712 | [self dispatchOnStageQueue:^ 713 | { 714 | NSMutableArray *pathWatchers = [_actorMessagesWatchers objectForKey:genericPath]; 715 | if (pathWatchers == nil) 716 | { 717 | pathWatchers = [[NSMutableArray alloc] init]; 718 | [_actorMessagesWatchers setObject:pathWatchers forKey:genericPath]; 719 | } 720 | 721 | [pathWatchers addObject:actionHandle]; 722 | }]; 723 | } 724 | 725 | - (void)removeRequestFromQueueAndProceedIfFirst:(NSString *)name fromRequestBuilder:(ASActor *)requestBuilder 726 | { 727 | NSMutableArray *requestQueue = [_requestQueues objectForKey:requestBuilder.requestQueueName == nil ? name : requestBuilder.requestQueueName]; 728 | if (requestQueue == nil) 729 | ASLog(@"Warning: requestQueue is nil"); 730 | else 731 | { 732 | if (requestQueue.count == 0) 733 | { 734 | ASLog(@"***** Warning ***** request queue \"%@\" is empty.", requestBuilder.requestQueueName); 735 | } 736 | else 737 | { 738 | if ([requestQueue objectAtIndex:0] == requestBuilder) 739 | { 740 | [requestQueue removeObjectAtIndex:0]; 741 | 742 | if (requestQueue.count != 0) 743 | { 744 | ASActor *nextRequest = nil; 745 | id nextRequestOptions = nil; 746 | 747 | nextRequest = [requestQueue objectAtIndex:0]; 748 | nextRequestOptions = nextRequest.storedOptions; 749 | nextRequest.storedOptions = nil; 750 | 751 | if (nextRequest != nil && !nextRequest.cancelled) 752 | [nextRequest execute:nextRequestOptions]; 753 | } 754 | else 755 | { 756 | [_requestQueues removeObjectForKey:requestBuilder.requestQueueName]; 757 | } 758 | } 759 | else 760 | { 761 | if ([requestQueue containsObject:requestBuilder]) 762 | { 763 | [requestQueue removeObject:requestBuilder]; 764 | } 765 | else 766 | { 767 | ASLog(@"***** Warning ***** request queue \"%@\" doesn't contain request to %@", requestBuilder.requestQueueName, requestBuilder.path); 768 | } 769 | } 770 | } 771 | } 772 | } 773 | 774 | - (void)removeWatcher:(id)watcher 775 | { 776 | [self removeWatcherByHandle:watcher.actionHandle]; 777 | } 778 | 779 | - (void)removeWatcherByHandle:(ASHandle *)actionHandle 780 | { 781 | ASHandle *watcherGraphHandle = actionHandle; 782 | if (watcherGraphHandle == nil) 783 | { 784 | ASLog(@"***** Warning: graph handle is nil in removeWatcher"); 785 | return; 786 | } 787 | 788 | bool alreadyExecuting = false; 789 | OSSpinLockLock(&removeWatcherRequestsLock); 790 | if (_removeWatcherRequests.count > 0) 791 | alreadyExecuting = true; 792 | [_removeWatcherRequests addObject:watcherGraphHandle]; 793 | OSSpinLockUnlock(&removeWatcherRequestsLock); 794 | 795 | if (alreadyExecuting && ![self isCurrentQueueStageQueue]) 796 | return; 797 | 798 | [self dispatchOnHighPriorityQueue:^ 799 | { 800 | NSMutableArray *removeWatchers = [NSMutableArray array]; 801 | 802 | OSSpinLockLock(&removeWatcherRequestsLock); 803 | [removeWatchers addObjectsFromArray:_removeWatcherRequests]; 804 | [_removeWatcherRequests removeAllObjects]; 805 | OSSpinLockUnlock(&removeWatcherRequestsLock); 806 | for (NSInteger i = 0; i < removeWatchers.count; i++) 807 | { 808 | ASHandle *actionHandle = [removeWatchers objectAtIndex:i]; 809 | 810 | for (id key in [_activeRequests allKeys]) 811 | { 812 | NSMutableDictionary *requestInfo = [_activeRequests objectForKey:key]; 813 | NSMutableArray *watchers = [requestInfo objectForKey:@"watchers"]; 814 | [watchers removeObject:actionHandle]; 815 | 816 | if (watchers.count == 0) 817 | { 818 | [self scheduleCancelRequest:(NSString *)key]; 819 | } 820 | } 821 | 822 | { 823 | NSMutableArray *keysToRemove = nil; 824 | for (NSString *key in [_liveNodeWatchers allKeys]) 825 | { 826 | NSMutableArray *watchers = [_liveNodeWatchers objectForKey:key]; 827 | [watchers removeObject:actionHandle]; 828 | 829 | if (watchers.count == 0) 830 | { 831 | if (keysToRemove == nil) 832 | keysToRemove = [[NSMutableArray alloc] init]; 833 | [keysToRemove addObject:key]; 834 | } 835 | } 836 | if (keysToRemove != nil) 837 | [_liveNodeWatchers removeObjectsForKeys:keysToRemove]; 838 | } 839 | 840 | { 841 | NSMutableArray *keysToRemove = nil; 842 | for (NSString *key in [_actorMessagesWatchers allKeys]) 843 | { 844 | NSMutableArray *watchers = [_actorMessagesWatchers objectForKey:key]; 845 | [watchers removeObject:actionHandle]; 846 | 847 | if (watchers.count == 0) 848 | { 849 | if (keysToRemove == nil) 850 | keysToRemove = [[NSMutableArray alloc] init]; 851 | [keysToRemove addObject:key]; 852 | } 853 | } 854 | if (keysToRemove != nil) 855 | [_actorMessagesWatchers removeObjectsForKeys:keysToRemove]; 856 | } 857 | } 858 | }]; 859 | } 860 | 861 | - (void)removeAllWatchersFromPath:(NSString *)path 862 | { 863 | [self dispatchOnHighPriorityQueue:^ 864 | { 865 | { 866 | NSMutableDictionary *requestInfo = [_activeRequests objectForKey:path]; 867 | if (requestInfo != nil) 868 | { 869 | NSMutableArray *watchers = [requestInfo objectForKey:@"watchers"]; 870 | [watchers removeAllObjects]; 871 | [self scheduleCancelRequest:(NSString *)path]; 872 | } 873 | } 874 | }]; 875 | } 876 | 877 | - (void)removeWatcher:(id)watcher fromPath:(NSString *)path 878 | { 879 | ASHandle *actionHandle = watcher.actionHandle; 880 | [self removeWatcherByHandle:actionHandle fromPath:path]; 881 | } 882 | 883 | - (void)removeWatcherByHandle:(ASHandle *)watcherGraphHandle fromPath:(NSString *)watcherPath 884 | { 885 | if (watcherGraphHandle == nil) 886 | { 887 | ASLog(@"***** Warning: graph handle is nil in removeWatcher:fromPath"); 888 | return; 889 | } 890 | 891 | bool alreadyExecuting = false; 892 | OSSpinLockLock(&removeWatcherFromPathRequestsLock); 893 | if (_removeWatcherFromPathRequests.count > 0) 894 | alreadyExecuting = true; 895 | ASWatcherPathPair *pair = [[ASWatcherPathPair alloc] init]; 896 | pair.watcher = watcherGraphHandle; 897 | pair.path = watcherPath; 898 | [_removeWatcherFromPathRequests addObject:pair]; 899 | OSSpinLockUnlock(&removeWatcherFromPathRequestsLock); 900 | 901 | if (alreadyExecuting && ![self isCurrentQueueStageQueue]) 902 | return; 903 | 904 | [self dispatchOnHighPriorityQueue:^ 905 | { 906 | NSMutableArray *removeWatchersFromPath = [NSMutableArray array]; 907 | 908 | OSSpinLockLock(&removeWatcherFromPathRequestsLock); 909 | [removeWatchersFromPath addObjectsFromArray:_removeWatcherFromPathRequests]; 910 | [_removeWatcherFromPathRequests removeAllObjects]; 911 | OSSpinLockUnlock(&removeWatcherFromPathRequestsLock); 912 | 913 | if (removeWatchersFromPath.count > 1) 914 | { 915 | ASLog(@"Cancelled %ld requests at once", removeWatchersFromPath.count); 916 | } 917 | for (NSInteger i = 0; i < removeWatchersFromPath.count; i++) 918 | { 919 | ASWatcherPathPair *watcherPathPair = [removeWatchersFromPath objectAtIndex:i]; 920 | ASHandle *actionHandle = watcherPathPair.watcher; 921 | NSString *path = watcherPathPair.path; 922 | if (path == nil) 923 | continue; 924 | 925 | { 926 | NSMutableDictionary *requestInfo = [_activeRequests objectForKey:path]; 927 | if (requestInfo != nil) 928 | { 929 | NSMutableArray *watchers = [requestInfo objectForKey:@"watchers"]; 930 | if ([watchers containsObject:actionHandle]) 931 | { 932 | [watchers removeObject:actionHandle]; 933 | } 934 | if (watchers.count == 0) 935 | { 936 | [self scheduleCancelRequest:(NSString *)path]; 937 | } 938 | } 939 | } 940 | { 941 | NSMutableArray *watchers = [_liveNodeWatchers objectForKey:path]; 942 | if ([watchers containsObject:actionHandle]) 943 | { 944 | [watchers removeObject:actionHandle]; 945 | } 946 | if (watchers.count == 0) 947 | { 948 | [_liveNodeWatchers removeObjectForKey:path]; 949 | } 950 | } 951 | { 952 | NSMutableArray *watchers = [_actorMessagesWatchers objectForKey:path]; 953 | if ([watchers containsObject:actionHandle]) 954 | { 955 | [watchers removeObject:actionHandle]; 956 | } 957 | if (watchers.count == 0) 958 | { 959 | [_actorMessagesWatchers removeObjectForKey:path]; 960 | } 961 | } 962 | } 963 | }]; 964 | } 965 | 966 | - (bool)requestActorStateNow:(NSString *)path 967 | { 968 | if ([_activeRequests objectForKey:path] != nil) 969 | return true; 970 | return false; 971 | } 972 | 973 | - (void)dispatchResource:(NSString *)path resource:(id)resource 974 | { 975 | [self dispatchResource:path resource:resource arguments:nil]; 976 | } 977 | 978 | - (void)dispatchResource:(NSString *)path resource:(id)resource arguments:(id)arguments 979 | { 980 | [self dispatchOnStageQueue:^ 981 | { 982 | NSString *genericPath = [self genericStringForParametrizedPath:path]; 983 | { 984 | NSArray *watchers = [[_liveNodeWatchers objectForKey:path] copy]; 985 | if (watchers != nil) 986 | { 987 | for (ASHandle *handle in watchers) 988 | { 989 | id watcher = handle.delegate; 990 | if (watcher != nil) 991 | { 992 | if ([watcher respondsToSelector:@selector(actionStageResourceDispatched:resource:arguments:)]) 993 | [watcher actionStageResourceDispatched:path resource:resource arguments:arguments]; 994 | 995 | if (handle.releaseOnMainThread) 996 | dispatch_async(dispatch_get_main_queue(), ^ { [watcher class]; }); 997 | watcher = nil; 998 | } 999 | } 1000 | } 1001 | } 1002 | if (![genericPath isEqualToString:path]) 1003 | { 1004 | NSArray *watchers = [_liveNodeWatchers objectForKey:genericPath]; 1005 | if (watchers != nil) 1006 | { 1007 | for (ASHandle *handle in watchers) 1008 | { 1009 | id watcher = handle.delegate; 1010 | if (watcher != nil) 1011 | { 1012 | if ([watcher respondsToSelector:@selector(actionStageResourceDispatched:resource:arguments:)]) 1013 | [watcher actionStageResourceDispatched:path resource:resource arguments:arguments]; 1014 | 1015 | if (handle.releaseOnMainThread) 1016 | dispatch_async(dispatch_get_main_queue(), ^ { [watcher class]; }); 1017 | watcher = nil; 1018 | } 1019 | } 1020 | } 1021 | } 1022 | }]; 1023 | } 1024 | 1025 | - (void)actionCompleted:(NSString *)action result:(id)result 1026 | { 1027 | [self dispatchOnStageQueue:^ 1028 | { 1029 | NSMutableDictionary *requestInfo = [_activeRequests objectForKey:action]; 1030 | if (requestInfo != nil) 1031 | { 1032 | ASActor *requestBuilder = [requestInfo objectForKey:@"requestBuilder"]; 1033 | 1034 | NSMutableArray *actionWatchers = [requestInfo objectForKey:@"watchers"]; 1035 | [_activeRequests removeObjectForKey:action]; 1036 | for (ASHandle *handle in actionWatchers) 1037 | { 1038 | id watcher = handle.delegate; 1039 | if (watcher != nil) 1040 | { 1041 | if ([watcher respondsToSelector:@selector(actorCompleted:path:result:)]) 1042 | [watcher actorCompleted:ASStatusSuccess path:action result:result]; 1043 | 1044 | if (handle.releaseOnMainThread) 1045 | dispatch_async(dispatch_get_main_queue(), ^ { [watcher class]; }); 1046 | watcher = nil; 1047 | } 1048 | } 1049 | [actionWatchers removeAllObjects]; 1050 | 1051 | if (requestBuilder == nil) 1052 | ASLog(@"***** Warning ***** requestBuilder is nil"); 1053 | else if (requestBuilder.requestQueueName != nil) 1054 | { 1055 | [self removeRequestFromQueueAndProceedIfFirst:requestBuilder.requestQueueName fromRequestBuilder:requestBuilder]; 1056 | } 1057 | } 1058 | }]; 1059 | } 1060 | 1061 | - (void)dispatchMessageToWatchers:(NSString *)path messageType:(NSString *)messageType message:(id)message 1062 | { 1063 | [self dispatchOnStageQueue:^ 1064 | { 1065 | NSMutableDictionary *requestInfo = [_activeRequests objectForKey:path]; 1066 | if (requestInfo != nil) 1067 | { 1068 | NSArray *actionWatchersCopy = [[requestInfo objectForKey:@"watchers"] copy]; 1069 | for (ASHandle *handle in actionWatchersCopy) 1070 | { 1071 | [handle receiveActorMessage:path messageType:messageType message:message]; 1072 | } 1073 | } 1074 | 1075 | if (_actorMessagesWatchers.count != 0) 1076 | { 1077 | NSString *genericPath = [self genericStringForParametrizedPath:path]; 1078 | NSArray *messagesWatchersCopy = [[_actorMessagesWatchers objectForKey:genericPath] copy]; 1079 | 1080 | if (messagesWatchersCopy != nil) 1081 | { 1082 | for (ASHandle *handle in messagesWatchersCopy) 1083 | { 1084 | [handle receiveActorMessage:path messageType:messageType message:message]; 1085 | } 1086 | } 1087 | } 1088 | }]; 1089 | } 1090 | 1091 | - (void)actionFailed:(NSString *)action reason:(int)reason 1092 | { 1093 | [self dispatchOnStageQueue:^ 1094 | { 1095 | NSMutableDictionary *requestInfo = [_activeRequests objectForKey:action]; 1096 | if (requestInfo != nil) 1097 | { 1098 | ASActor *requestBuilder = [requestInfo objectForKey:@"requestBuilder"]; 1099 | 1100 | NSMutableArray *actionWatchers = [requestInfo objectForKey:@"watchers"]; 1101 | [_activeRequests removeObjectForKey:action]; 1102 | for (ASHandle *handle in actionWatchers) 1103 | { 1104 | id watcher = handle.delegate; 1105 | if (watcher != nil) 1106 | { 1107 | if ([watcher respondsToSelector:@selector(actorCompleted:path:result:)]) 1108 | [watcher actorCompleted:reason path:action result:nil]; 1109 | 1110 | if (handle.releaseOnMainThread) 1111 | dispatch_async(dispatch_get_main_queue(), ^ { [watcher class]; }); 1112 | watcher = nil; 1113 | } 1114 | } 1115 | [actionWatchers removeAllObjects]; 1116 | 1117 | if (requestBuilder == nil) 1118 | ASLog(@"***** Warning ***** requestBuilder is nil"); 1119 | else if (requestBuilder.requestQueueName != nil) 1120 | { 1121 | [self removeRequestFromQueueAndProceedIfFirst:requestBuilder.requestQueueName fromRequestBuilder:requestBuilder]; 1122 | } 1123 | } 1124 | }]; 1125 | } 1126 | 1127 | - (void)nodeRetrieveProgress:(NSString *)path progress:(float)progress 1128 | { 1129 | [self dispatchOnStageQueue:^ 1130 | { 1131 | NSMutableDictionary *requestInfo = [_activeRequests objectForKey:path]; 1132 | if (requestInfo == nil) 1133 | requestInfo = [_activeRequests objectForKey:path]; 1134 | 1135 | if (requestInfo != nil) 1136 | { 1137 | NSMutableArray *watchers = [requestInfo objectForKey:@"watchers"]; 1138 | for (ASHandle *handle in watchers) 1139 | { 1140 | id watcher = handle.delegate; 1141 | if (watcher != nil) 1142 | { 1143 | if ([watcher respondsToSelector:@selector(actorReportedProgress:progress:)]) 1144 | [watcher actorReportedProgress:path progress:progress]; 1145 | 1146 | if (handle.releaseOnMainThread) 1147 | dispatch_async(dispatch_get_main_queue(), ^ { [watcher class]; }); 1148 | watcher = nil; 1149 | } 1150 | } 1151 | } 1152 | }]; 1153 | } 1154 | 1155 | - (void)nodeRetrieveFailed:(NSString *)path 1156 | { 1157 | [self actionFailed:path reason:-1]; 1158 | } 1159 | 1160 | - (void)scheduleCancelRequest:(NSString *)path 1161 | { 1162 | NSMutableDictionary *activeRequests = _activeRequests; 1163 | NSMutableDictionary *cancelTimers = _cancelRequestTimers; 1164 | 1165 | NSMutableDictionary *requestInfo = [activeRequests objectForKey:path]; 1166 | NSMutableDictionary *cancelRequestInfo = [cancelTimers objectForKey:path]; 1167 | if (requestInfo != nil && cancelRequestInfo == nil) 1168 | { 1169 | ASActor *requestBuilder = [requestInfo objectForKey:@"requestBuilder"]; 1170 | NSTimeInterval cancelTimeout = requestBuilder.cancelTimeout; 1171 | 1172 | if (cancelTimeout <= DBL_EPSILON) 1173 | { 1174 | [activeRequests removeObjectForKey:path]; 1175 | 1176 | [requestBuilder cancel]; 1177 | ASLog(@"Cancelled request to \"%@\"", path); 1178 | if (requestBuilder.requestQueueName != nil) 1179 | [self removeRequestFromQueueAndProceedIfFirst:requestBuilder.requestQueueName fromRequestBuilder:requestBuilder]; 1180 | } 1181 | else 1182 | { 1183 | ASLog(@"Will cancel request to \"%@\" in %f s", path, cancelTimeout); 1184 | NSDictionary *cancelDict = [NSDictionary dictionaryWithObjectsAndKeys:path, @"path", [NSNumber numberWithInt:0], @"type", nil]; 1185 | ASTimer *timer = [[ASTimer alloc] initWithTimeout:cancelTimeout repeat:false completion:^ 1186 | { 1187 | [self performCancelRequest:cancelDict]; 1188 | } nativeQueue:[ActionStageInstance() globalStageDispatchQueue]]; 1189 | 1190 | cancelRequestInfo = [[NSMutableDictionary alloc] initWithObjectsAndKeys:requestInfo, @"requestInfo", nil]; 1191 | [cancelRequestInfo setObject:timer forKey:@"timer"]; 1192 | [cancelTimers setObject:cancelRequestInfo forKey:path]; 1193 | [activeRequests removeObjectForKey:path]; 1194 | 1195 | [timer start]; 1196 | } 1197 | } 1198 | else if (cancelRequestInfo == nil) 1199 | { 1200 | ASLog(@"Warning: cannot cancel request to \"%@\": no active request found", path); 1201 | } 1202 | } 1203 | 1204 | - (void)performCancelRequest:(NSDictionary *)cancelDict 1205 | { 1206 | NSString *path = [cancelDict objectForKey:@"path"]; 1207 | 1208 | [self dispatchOnStageQueue:^ 1209 | { 1210 | NSMutableDictionary *cancelTimers = _cancelRequestTimers; 1211 | 1212 | NSMutableDictionary *cancelRequestInfo = [cancelTimers objectForKey:path]; 1213 | if (cancelRequestInfo == nil) 1214 | { 1215 | ASLog(@"Warning: cancelNodeRequestTimerEvent: \"%@\": no cancel info found", path); 1216 | return; 1217 | } 1218 | NSDictionary *requestInfo = [cancelRequestInfo objectForKey:@"requestInfo"]; 1219 | ASActor *requestBuilder = [requestInfo objectForKey:@"requestBuilder"]; 1220 | if (requestBuilder == nil) 1221 | { 1222 | ASLog(@"Warning: active request builder for \"%@\" not fond, cannot cancel request", path); 1223 | } 1224 | else 1225 | { 1226 | [requestBuilder cancel]; 1227 | ASLog(@"Cancelled request to \"%@\"", path); 1228 | if (requestBuilder.requestQueueName != nil) 1229 | [self removeRequestFromQueueAndProceedIfFirst:requestBuilder.requestQueueName fromRequestBuilder:requestBuilder]; 1230 | } 1231 | [cancelTimers removeObjectForKey:path]; 1232 | }]; 1233 | } 1234 | 1235 | void ASLog(NSString *format, ...) 1236 | { 1237 | va_list L; 1238 | va_start(L, format); 1239 | NSString *string = [[NSString alloc] initWithFormat:format arguments:L]; 1240 | va_end(L); 1241 | #ifdef DEBUG 1242 | NSLog(string); 1243 | #endif 1244 | } 1245 | 1246 | @end 1247 | -------------------------------------------------------------------------------- /Example/ActionStage.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1806920C2333B64700BB9C33 /* ASTestSendCodeRequestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1806920B2333B64700BB9C33 /* ASTestSendCodeRequestActor.m */; }; 11 | 185BCA4F2331182F0094B559 /* ASTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = 185BCA4E2331182F0094B559 /* ASTestActor.m */; }; 12 | 18EC8FD523325B1400AD6878 /* ASFileDownloadActor.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EC8FD423325B1400AD6878 /* ASFileDownloadActor.m */; }; 13 | 18EC8FD8233264B200AD6878 /* ASTestView.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EC8FD7233264B200AD6878 /* ASTestView.m */; }; 14 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 15 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 16 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 17 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; 18 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; 19 | 6003F59E195388D20070C39A /* ASAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* ASAppDelegate.m */; }; 20 | 6003F5A7195388D20070C39A /* ASViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* ASViewController.m */; }; 21 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; 22 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; 23 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 24 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 25 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 26 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 27 | 6BF71D7AC026323E23502739 /* Pods_ActionStage_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 10922E292642F330C5DE4184 /* Pods_ActionStage_Example.framework */; }; 28 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; 29 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 30 | C65CDDFC97692EC0661470DF /* Pods_ActionStage_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A88E9BA05B71C82A0F1B13D5 /* Pods_ActionStage_Tests.framework */; }; 31 | /* End PBXBuildFile section */ 32 | 33 | /* Begin PBXContainerItemProxy section */ 34 | 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 6003F582195388D10070C39A /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 6003F589195388D20070C39A; 39 | remoteInfo = ActionStage; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | 10922E292642F330C5DE4184 /* Pods_ActionStage_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ActionStage_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 1806920A2333B64700BB9C33 /* ASTestSendCodeRequestActor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASTestSendCodeRequestActor.h; sourceTree = ""; }; 46 | 1806920B2333B64700BB9C33 /* ASTestSendCodeRequestActor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASTestSendCodeRequestActor.m; sourceTree = ""; }; 47 | 185BCA4D2331182F0094B559 /* ASTestActor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASTestActor.h; sourceTree = ""; }; 48 | 185BCA4E2331182F0094B559 /* ASTestActor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASTestActor.m; sourceTree = ""; }; 49 | 18EC8FD323325B1400AD6878 /* ASFileDownloadActor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASFileDownloadActor.h; sourceTree = ""; }; 50 | 18EC8FD423325B1400AD6878 /* ASFileDownloadActor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASFileDownloadActor.m; sourceTree = ""; }; 51 | 18EC8FD6233264B200AD6878 /* ASTestView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASTestView.h; sourceTree = ""; }; 52 | 18EC8FD7233264B200AD6878 /* ASTestView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASTestView.m; sourceTree = ""; }; 53 | 1E17951A9D18672ECA9A3A56 /* Pods-ActionStage_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ActionStage_Tests.release.xcconfig"; path = "Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests.release.xcconfig"; sourceTree = ""; }; 54 | 3DFAFF5153E940394BAFD2EB /* Pods-ActionStage_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ActionStage_Example.release.xcconfig"; path = "Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example.release.xcconfig"; sourceTree = ""; }; 55 | 4C7BC689757F1EB9E982AF66 /* ActionStage.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ActionStage.podspec; path = ../ActionStage.podspec; sourceTree = ""; }; 56 | 5167ACD819F8C9707C0B6049 /* Pods-ActionStage_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ActionStage_Example.debug.xcconfig"; path = "Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example.debug.xcconfig"; sourceTree = ""; }; 57 | 6003F58A195388D20070C39A /* ActionStage_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ActionStage_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 59 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 60 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 61 | 6003F595195388D20070C39A /* ActionStage-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ActionStage-Info.plist"; sourceTree = ""; }; 62 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 63 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 64 | 6003F59B195388D20070C39A /* ActionStage-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ActionStage-Prefix.pch"; sourceTree = ""; }; 65 | 6003F59C195388D20070C39A /* ASAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASAppDelegate.h; sourceTree = ""; }; 66 | 6003F59D195388D20070C39A /* ASAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASAppDelegate.m; sourceTree = ""; }; 67 | 6003F5A5195388D20070C39A /* ASViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASViewController.h; sourceTree = ""; }; 68 | 6003F5A6195388D20070C39A /* ASViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASViewController.m; sourceTree = ""; }; 69 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 70 | 6003F5AE195388D20070C39A /* ActionStage_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ActionStage_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 71 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 72 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 73 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 74 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 75 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 76 | 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 77 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 78 | 88CA1708F3CD8C379F776A04 /* Pods-ActionStage_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ActionStage_Tests.debug.xcconfig"; path = "Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests.debug.xcconfig"; sourceTree = ""; }; 79 | A88E9BA05B71C82A0F1B13D5 /* Pods_ActionStage_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ActionStage_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 80 | AA47DF0F66CCCC66B44BB47F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 81 | F62C019F7FAB617A92BD1FCD /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 82 | /* End PBXFileReference section */ 83 | 84 | /* Begin PBXFrameworksBuildPhase section */ 85 | 6003F587195388D20070C39A /* Frameworks */ = { 86 | isa = PBXFrameworksBuildPhase; 87 | buildActionMask = 2147483647; 88 | files = ( 89 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 90 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 91 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 92 | 6BF71D7AC026323E23502739 /* Pods_ActionStage_Example.framework in Frameworks */, 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | 6003F5AB195388D20070C39A /* Frameworks */ = { 97 | isa = PBXFrameworksBuildPhase; 98 | buildActionMask = 2147483647; 99 | files = ( 100 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 101 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 102 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 103 | C65CDDFC97692EC0661470DF /* Pods_ActionStage_Tests.framework in Frameworks */, 104 | ); 105 | runOnlyForDeploymentPostprocessing = 0; 106 | }; 107 | /* End PBXFrameworksBuildPhase section */ 108 | 109 | /* Begin PBXGroup section */ 110 | 6003F581195388D10070C39A = { 111 | isa = PBXGroup; 112 | children = ( 113 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 114 | 6003F593195388D20070C39A /* Example for ActionStage */, 115 | 6003F5B5195388D20070C39A /* Tests */, 116 | 6003F58C195388D20070C39A /* Frameworks */, 117 | 6003F58B195388D20070C39A /* Products */, 118 | F62160A47E4CC6F9187B508A /* Pods */, 119 | ); 120 | sourceTree = ""; 121 | }; 122 | 6003F58B195388D20070C39A /* Products */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 6003F58A195388D20070C39A /* ActionStage_Example.app */, 126 | 6003F5AE195388D20070C39A /* ActionStage_Tests.xctest */, 127 | ); 128 | name = Products; 129 | sourceTree = ""; 130 | }; 131 | 6003F58C195388D20070C39A /* Frameworks */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 6003F58D195388D20070C39A /* Foundation.framework */, 135 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, 136 | 6003F591195388D20070C39A /* UIKit.framework */, 137 | 6003F5AF195388D20070C39A /* XCTest.framework */, 138 | 10922E292642F330C5DE4184 /* Pods_ActionStage_Example.framework */, 139 | A88E9BA05B71C82A0F1B13D5 /* Pods_ActionStage_Tests.framework */, 140 | ); 141 | name = Frameworks; 142 | sourceTree = ""; 143 | }; 144 | 6003F593195388D20070C39A /* Example for ActionStage */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 6003F59C195388D20070C39A /* ASAppDelegate.h */, 148 | 6003F59D195388D20070C39A /* ASAppDelegate.m */, 149 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, 150 | 6003F5A5195388D20070C39A /* ASViewController.h */, 151 | 6003F5A6195388D20070C39A /* ASViewController.m */, 152 | 18EC8FD6233264B200AD6878 /* ASTestView.h */, 153 | 18EC8FD7233264B200AD6878 /* ASTestView.m */, 154 | 185BCA4D2331182F0094B559 /* ASTestActor.h */, 155 | 185BCA4E2331182F0094B559 /* ASTestActor.m */, 156 | 1806920A2333B64700BB9C33 /* ASTestSendCodeRequestActor.h */, 157 | 1806920B2333B64700BB9C33 /* ASTestSendCodeRequestActor.m */, 158 | 18EC8FD323325B1400AD6878 /* ASFileDownloadActor.h */, 159 | 18EC8FD423325B1400AD6878 /* ASFileDownloadActor.m */, 160 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, 161 | 6003F5A8195388D20070C39A /* Images.xcassets */, 162 | 6003F594195388D20070C39A /* Supporting Files */, 163 | ); 164 | name = "Example for ActionStage"; 165 | path = ActionStage; 166 | sourceTree = ""; 167 | }; 168 | 6003F594195388D20070C39A /* Supporting Files */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 6003F595195388D20070C39A /* ActionStage-Info.plist */, 172 | 6003F596195388D20070C39A /* InfoPlist.strings */, 173 | 6003F599195388D20070C39A /* main.m */, 174 | 6003F59B195388D20070C39A /* ActionStage-Prefix.pch */, 175 | ); 176 | name = "Supporting Files"; 177 | sourceTree = ""; 178 | }; 179 | 6003F5B5195388D20070C39A /* Tests */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 6003F5BB195388D20070C39A /* Tests.m */, 183 | 6003F5B6195388D20070C39A /* Supporting Files */, 184 | ); 185 | path = Tests; 186 | sourceTree = ""; 187 | }; 188 | 6003F5B6195388D20070C39A /* Supporting Files */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | 6003F5B7195388D20070C39A /* Tests-Info.plist */, 192 | 6003F5B8195388D20070C39A /* InfoPlist.strings */, 193 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, 194 | ); 195 | name = "Supporting Files"; 196 | sourceTree = ""; 197 | }; 198 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { 199 | isa = PBXGroup; 200 | children = ( 201 | 4C7BC689757F1EB9E982AF66 /* ActionStage.podspec */, 202 | AA47DF0F66CCCC66B44BB47F /* README.md */, 203 | F62C019F7FAB617A92BD1FCD /* LICENSE */, 204 | ); 205 | name = "Podspec Metadata"; 206 | sourceTree = ""; 207 | }; 208 | F62160A47E4CC6F9187B508A /* Pods */ = { 209 | isa = PBXGroup; 210 | children = ( 211 | 5167ACD819F8C9707C0B6049 /* Pods-ActionStage_Example.debug.xcconfig */, 212 | 3DFAFF5153E940394BAFD2EB /* Pods-ActionStage_Example.release.xcconfig */, 213 | 88CA1708F3CD8C379F776A04 /* Pods-ActionStage_Tests.debug.xcconfig */, 214 | 1E17951A9D18672ECA9A3A56 /* Pods-ActionStage_Tests.release.xcconfig */, 215 | ); 216 | path = Pods; 217 | sourceTree = ""; 218 | }; 219 | /* End PBXGroup section */ 220 | 221 | /* Begin PBXNativeTarget section */ 222 | 6003F589195388D20070C39A /* ActionStage_Example */ = { 223 | isa = PBXNativeTarget; 224 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "ActionStage_Example" */; 225 | buildPhases = ( 226 | E2D54C7BCEEE75AE1850C49E /* [CP] Check Pods Manifest.lock */, 227 | 6003F586195388D20070C39A /* Sources */, 228 | 6003F587195388D20070C39A /* Frameworks */, 229 | 6003F588195388D20070C39A /* Resources */, 230 | 3A0FE5F62D1815490C7D745E /* [CP] Embed Pods Frameworks */, 231 | ); 232 | buildRules = ( 233 | ); 234 | dependencies = ( 235 | ); 236 | name = ActionStage_Example; 237 | productName = ActionStage; 238 | productReference = 6003F58A195388D20070C39A /* ActionStage_Example.app */; 239 | productType = "com.apple.product-type.application"; 240 | }; 241 | 6003F5AD195388D20070C39A /* ActionStage_Tests */ = { 242 | isa = PBXNativeTarget; 243 | buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "ActionStage_Tests" */; 244 | buildPhases = ( 245 | 36CCC8937A228E0AA6305608 /* [CP] Check Pods Manifest.lock */, 246 | 6003F5AA195388D20070C39A /* Sources */, 247 | 6003F5AB195388D20070C39A /* Frameworks */, 248 | 6003F5AC195388D20070C39A /* Resources */, 249 | ); 250 | buildRules = ( 251 | ); 252 | dependencies = ( 253 | 6003F5B4195388D20070C39A /* PBXTargetDependency */, 254 | ); 255 | name = ActionStage_Tests; 256 | productName = ActionStageTests; 257 | productReference = 6003F5AE195388D20070C39A /* ActionStage_Tests.xctest */; 258 | productType = "com.apple.product-type.bundle.unit-test"; 259 | }; 260 | /* End PBXNativeTarget section */ 261 | 262 | /* Begin PBXProject section */ 263 | 6003F582195388D10070C39A /* Project object */ = { 264 | isa = PBXProject; 265 | attributes = { 266 | CLASSPREFIX = AS; 267 | LastUpgradeCheck = 0720; 268 | ORGANIZATIONNAME = coderyi; 269 | TargetAttributes = { 270 | 6003F5AD195388D20070C39A = { 271 | TestTargetID = 6003F589195388D20070C39A; 272 | }; 273 | }; 274 | }; 275 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "ActionStage" */; 276 | compatibilityVersion = "Xcode 3.2"; 277 | developmentRegion = English; 278 | hasScannedForEncodings = 0; 279 | knownRegions = ( 280 | English, 281 | en, 282 | Base, 283 | ); 284 | mainGroup = 6003F581195388D10070C39A; 285 | productRefGroup = 6003F58B195388D20070C39A /* Products */; 286 | projectDirPath = ""; 287 | projectRoot = ""; 288 | targets = ( 289 | 6003F589195388D20070C39A /* ActionStage_Example */, 290 | 6003F5AD195388D20070C39A /* ActionStage_Tests */, 291 | ); 292 | }; 293 | /* End PBXProject section */ 294 | 295 | /* Begin PBXResourcesBuildPhase section */ 296 | 6003F588195388D20070C39A /* Resources */ = { 297 | isa = PBXResourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, 301 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */, 302 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 303 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | 6003F5AC195388D20070C39A /* Resources */ = { 308 | isa = PBXResourcesBuildPhase; 309 | buildActionMask = 2147483647; 310 | files = ( 311 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, 312 | ); 313 | runOnlyForDeploymentPostprocessing = 0; 314 | }; 315 | /* End PBXResourcesBuildPhase section */ 316 | 317 | /* Begin PBXShellScriptBuildPhase section */ 318 | 36CCC8937A228E0AA6305608 /* [CP] Check Pods Manifest.lock */ = { 319 | isa = PBXShellScriptBuildPhase; 320 | buildActionMask = 2147483647; 321 | files = ( 322 | ); 323 | inputFileListPaths = ( 324 | ); 325 | inputPaths = ( 326 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 327 | "${PODS_ROOT}/Manifest.lock", 328 | ); 329 | name = "[CP] Check Pods Manifest.lock"; 330 | outputFileListPaths = ( 331 | ); 332 | outputPaths = ( 333 | "$(DERIVED_FILE_DIR)/Pods-ActionStage_Tests-checkManifestLockResult.txt", 334 | ); 335 | runOnlyForDeploymentPostprocessing = 0; 336 | shellPath = /bin/sh; 337 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 338 | showEnvVarsInLog = 0; 339 | }; 340 | 3A0FE5F62D1815490C7D745E /* [CP] Embed Pods Frameworks */ = { 341 | isa = PBXShellScriptBuildPhase; 342 | buildActionMask = 2147483647; 343 | files = ( 344 | ); 345 | inputPaths = ( 346 | "${PODS_ROOT}/Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example-frameworks.sh", 347 | "${BUILT_PRODUCTS_DIR}/ActionStage/ActionStage.framework", 348 | ); 349 | name = "[CP] Embed Pods Frameworks"; 350 | outputPaths = ( 351 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ActionStage.framework", 352 | ); 353 | runOnlyForDeploymentPostprocessing = 0; 354 | shellPath = /bin/sh; 355 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example-frameworks.sh\"\n"; 356 | showEnvVarsInLog = 0; 357 | }; 358 | E2D54C7BCEEE75AE1850C49E /* [CP] Check Pods Manifest.lock */ = { 359 | isa = PBXShellScriptBuildPhase; 360 | buildActionMask = 2147483647; 361 | files = ( 362 | ); 363 | inputFileListPaths = ( 364 | ); 365 | inputPaths = ( 366 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 367 | "${PODS_ROOT}/Manifest.lock", 368 | ); 369 | name = "[CP] Check Pods Manifest.lock"; 370 | outputFileListPaths = ( 371 | ); 372 | outputPaths = ( 373 | "$(DERIVED_FILE_DIR)/Pods-ActionStage_Example-checkManifestLockResult.txt", 374 | ); 375 | runOnlyForDeploymentPostprocessing = 0; 376 | shellPath = /bin/sh; 377 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 378 | showEnvVarsInLog = 0; 379 | }; 380 | /* End PBXShellScriptBuildPhase section */ 381 | 382 | /* Begin PBXSourcesBuildPhase section */ 383 | 6003F586195388D20070C39A /* Sources */ = { 384 | isa = PBXSourcesBuildPhase; 385 | buildActionMask = 2147483647; 386 | files = ( 387 | 18EC8FD8233264B200AD6878 /* ASTestView.m in Sources */, 388 | 6003F59E195388D20070C39A /* ASAppDelegate.m in Sources */, 389 | 185BCA4F2331182F0094B559 /* ASTestActor.m in Sources */, 390 | 18EC8FD523325B1400AD6878 /* ASFileDownloadActor.m in Sources */, 391 | 1806920C2333B64700BB9C33 /* ASTestSendCodeRequestActor.m in Sources */, 392 | 6003F5A7195388D20070C39A /* ASViewController.m in Sources */, 393 | 6003F59A195388D20070C39A /* main.m in Sources */, 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | }; 397 | 6003F5AA195388D20070C39A /* Sources */ = { 398 | isa = PBXSourcesBuildPhase; 399 | buildActionMask = 2147483647; 400 | files = ( 401 | 6003F5BC195388D20070C39A /* Tests.m in Sources */, 402 | ); 403 | runOnlyForDeploymentPostprocessing = 0; 404 | }; 405 | /* End PBXSourcesBuildPhase section */ 406 | 407 | /* Begin PBXTargetDependency section */ 408 | 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { 409 | isa = PBXTargetDependency; 410 | target = 6003F589195388D20070C39A /* ActionStage_Example */; 411 | targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; 412 | }; 413 | /* End PBXTargetDependency section */ 414 | 415 | /* Begin PBXVariantGroup section */ 416 | 6003F596195388D20070C39A /* InfoPlist.strings */ = { 417 | isa = PBXVariantGroup; 418 | children = ( 419 | 6003F597195388D20070C39A /* en */, 420 | ); 421 | name = InfoPlist.strings; 422 | sourceTree = ""; 423 | }; 424 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { 425 | isa = PBXVariantGroup; 426 | children = ( 427 | 6003F5B9195388D20070C39A /* en */, 428 | ); 429 | name = InfoPlist.strings; 430 | sourceTree = ""; 431 | }; 432 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = { 433 | isa = PBXVariantGroup; 434 | children = ( 435 | 71719F9E1E33DC2100824A3D /* Base */, 436 | ); 437 | name = LaunchScreen.storyboard; 438 | sourceTree = ""; 439 | }; 440 | /* End PBXVariantGroup section */ 441 | 442 | /* Begin XCBuildConfiguration section */ 443 | 6003F5BD195388D20070C39A /* Debug */ = { 444 | isa = XCBuildConfiguration; 445 | buildSettings = { 446 | ALWAYS_SEARCH_USER_PATHS = NO; 447 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 448 | CLANG_CXX_LIBRARY = "libc++"; 449 | CLANG_ENABLE_MODULES = YES; 450 | CLANG_ENABLE_OBJC_ARC = YES; 451 | CLANG_WARN_BOOL_CONVERSION = YES; 452 | CLANG_WARN_CONSTANT_CONVERSION = YES; 453 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 454 | CLANG_WARN_EMPTY_BODY = YES; 455 | CLANG_WARN_ENUM_CONVERSION = YES; 456 | CLANG_WARN_INT_CONVERSION = YES; 457 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 458 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 459 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 460 | COPY_PHASE_STRIP = NO; 461 | ENABLE_TESTABILITY = YES; 462 | GCC_C_LANGUAGE_STANDARD = gnu99; 463 | GCC_DYNAMIC_NO_PIC = NO; 464 | GCC_OPTIMIZATION_LEVEL = 0; 465 | GCC_PREPROCESSOR_DEFINITIONS = ( 466 | "DEBUG=1", 467 | "$(inherited)", 468 | ); 469 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 470 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 471 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 472 | GCC_WARN_UNDECLARED_SELECTOR = YES; 473 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 474 | GCC_WARN_UNUSED_FUNCTION = YES; 475 | GCC_WARN_UNUSED_VARIABLE = YES; 476 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 477 | ONLY_ACTIVE_ARCH = YES; 478 | SDKROOT = iphoneos; 479 | TARGETED_DEVICE_FAMILY = "1,2"; 480 | }; 481 | name = Debug; 482 | }; 483 | 6003F5BE195388D20070C39A /* Release */ = { 484 | isa = XCBuildConfiguration; 485 | buildSettings = { 486 | ALWAYS_SEARCH_USER_PATHS = NO; 487 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 488 | CLANG_CXX_LIBRARY = "libc++"; 489 | CLANG_ENABLE_MODULES = YES; 490 | CLANG_ENABLE_OBJC_ARC = YES; 491 | CLANG_WARN_BOOL_CONVERSION = YES; 492 | CLANG_WARN_CONSTANT_CONVERSION = YES; 493 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 494 | CLANG_WARN_EMPTY_BODY = YES; 495 | CLANG_WARN_ENUM_CONVERSION = YES; 496 | CLANG_WARN_INT_CONVERSION = YES; 497 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 498 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 499 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 500 | COPY_PHASE_STRIP = YES; 501 | ENABLE_NS_ASSERTIONS = NO; 502 | GCC_C_LANGUAGE_STANDARD = gnu99; 503 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 504 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 505 | GCC_WARN_UNDECLARED_SELECTOR = YES; 506 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 507 | GCC_WARN_UNUSED_FUNCTION = YES; 508 | GCC_WARN_UNUSED_VARIABLE = YES; 509 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 510 | SDKROOT = iphoneos; 511 | TARGETED_DEVICE_FAMILY = "1,2"; 512 | VALIDATE_PRODUCT = YES; 513 | }; 514 | name = Release; 515 | }; 516 | 6003F5C0195388D20070C39A /* Debug */ = { 517 | isa = XCBuildConfiguration; 518 | baseConfigurationReference = 5167ACD819F8C9707C0B6049 /* Pods-ActionStage_Example.debug.xcconfig */; 519 | buildSettings = { 520 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 521 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 522 | GCC_PREFIX_HEADER = "ActionStage/ActionStage-Prefix.pch"; 523 | INFOPLIST_FILE = "ActionStage/ActionStage-Info.plist"; 524 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 525 | MODULE_NAME = ExampleApp; 526 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 527 | PRODUCT_NAME = "$(TARGET_NAME)"; 528 | SWIFT_VERSION = 4.0; 529 | WRAPPER_EXTENSION = app; 530 | }; 531 | name = Debug; 532 | }; 533 | 6003F5C1195388D20070C39A /* Release */ = { 534 | isa = XCBuildConfiguration; 535 | baseConfigurationReference = 3DFAFF5153E940394BAFD2EB /* Pods-ActionStage_Example.release.xcconfig */; 536 | buildSettings = { 537 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 538 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 539 | GCC_PREFIX_HEADER = "ActionStage/ActionStage-Prefix.pch"; 540 | INFOPLIST_FILE = "ActionStage/ActionStage-Info.plist"; 541 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 542 | MODULE_NAME = ExampleApp; 543 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 544 | PRODUCT_NAME = "$(TARGET_NAME)"; 545 | SWIFT_VERSION = 4.0; 546 | WRAPPER_EXTENSION = app; 547 | }; 548 | name = Release; 549 | }; 550 | 6003F5C3195388D20070C39A /* Debug */ = { 551 | isa = XCBuildConfiguration; 552 | baseConfigurationReference = 88CA1708F3CD8C379F776A04 /* Pods-ActionStage_Tests.debug.xcconfig */; 553 | buildSettings = { 554 | BUNDLE_LOADER = "$(TEST_HOST)"; 555 | FRAMEWORK_SEARCH_PATHS = ( 556 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 557 | "$(inherited)", 558 | "$(DEVELOPER_FRAMEWORKS_DIR)", 559 | ); 560 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 561 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 562 | GCC_PREPROCESSOR_DEFINITIONS = ( 563 | "DEBUG=1", 564 | "$(inherited)", 565 | ); 566 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 567 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 568 | PRODUCT_NAME = "$(TARGET_NAME)"; 569 | SWIFT_VERSION = 4.0; 570 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ActionStage_Example.app/ActionStage_Example"; 571 | WRAPPER_EXTENSION = xctest; 572 | }; 573 | name = Debug; 574 | }; 575 | 6003F5C4195388D20070C39A /* Release */ = { 576 | isa = XCBuildConfiguration; 577 | baseConfigurationReference = 1E17951A9D18672ECA9A3A56 /* Pods-ActionStage_Tests.release.xcconfig */; 578 | buildSettings = { 579 | BUNDLE_LOADER = "$(TEST_HOST)"; 580 | FRAMEWORK_SEARCH_PATHS = ( 581 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 582 | "$(inherited)", 583 | "$(DEVELOPER_FRAMEWORKS_DIR)", 584 | ); 585 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 586 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 587 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 588 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 589 | PRODUCT_NAME = "$(TARGET_NAME)"; 590 | SWIFT_VERSION = 4.0; 591 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ActionStage_Example.app/ActionStage_Example"; 592 | WRAPPER_EXTENSION = xctest; 593 | }; 594 | name = Release; 595 | }; 596 | /* End XCBuildConfiguration section */ 597 | 598 | /* Begin XCConfigurationList section */ 599 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "ActionStage" */ = { 600 | isa = XCConfigurationList; 601 | buildConfigurations = ( 602 | 6003F5BD195388D20070C39A /* Debug */, 603 | 6003F5BE195388D20070C39A /* Release */, 604 | ); 605 | defaultConfigurationIsVisible = 0; 606 | defaultConfigurationName = Release; 607 | }; 608 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "ActionStage_Example" */ = { 609 | isa = XCConfigurationList; 610 | buildConfigurations = ( 611 | 6003F5C0195388D20070C39A /* Debug */, 612 | 6003F5C1195388D20070C39A /* Release */, 613 | ); 614 | defaultConfigurationIsVisible = 0; 615 | defaultConfigurationName = Release; 616 | }; 617 | 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "ActionStage_Tests" */ = { 618 | isa = XCConfigurationList; 619 | buildConfigurations = ( 620 | 6003F5C3195388D20070C39A /* Debug */, 621 | 6003F5C4195388D20070C39A /* Release */, 622 | ); 623 | defaultConfigurationIsVisible = 0; 624 | defaultConfigurationName = Release; 625 | }; 626 | /* End XCConfigurationList section */ 627 | }; 628 | rootObject = 6003F582195388D10070C39A /* Project object */; 629 | } 630 | -------------------------------------------------------------------------------- /Example/ActionStage.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/ActionStage.xcodeproj/xcshareddata/xcschemes/ActionStage-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Example/ActionStage.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/ActionStage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/ActionStage/ASAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASAppDelegate.h 3 | // ActionStage 4 | // 5 | // Created by coderyi on 09/16/2019. 6 | // Copyright (c) 2019 coderyi. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface ASAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/ActionStage/ASAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASAppDelegate.m 3 | // ActionStage 4 | // 5 | // Created by coderyi on 09/16/2019. 6 | // Copyright (c) 2019 coderyi. All rights reserved. 7 | // 8 | 9 | #import "ASAppDelegate.h" 10 | #import "ActionStage.h" 11 | #import "ASTestActor.h" 12 | #import "ASFileDownloadActor.h" 13 | #import "ASTestSendCodeRequestActor.h" 14 | 15 | @implementation ASAppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | // Override point for customization after application launch. 20 | [ASActor registerActorClass:[ASTestActor class]]; 21 | [ASActor registerActorClass:[ASFileDownloadActor class]]; 22 | [ASActor registerActorClass:[ASTestSendCodeRequestActor class]]; 23 | 24 | return YES; 25 | } 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application 28 | { 29 | // 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. 30 | // 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. 31 | } 32 | 33 | - (void)applicationDidEnterBackground:(UIApplication *)application 34 | { 35 | // 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. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | - (void)applicationWillEnterForeground:(UIApplication *)application 40 | { 41 | // 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. 42 | } 43 | 44 | - (void)applicationDidBecomeActive:(UIApplication *)application 45 | { 46 | // 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. 47 | } 48 | 49 | - (void)applicationWillTerminate:(UIApplication *)application 50 | { 51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Example/ActionStage/ASFileDownloadActor.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASFileDownloadActor.h 3 | // ActionStage_Example 4 | // 5 | // Created by coderyi on 2019/9/18. 6 | // Copyright © 2019 coderyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface ASFileDownloadActor : ASActor 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Example/ActionStage/ASFileDownloadActor.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASFileDownloadActor.m 3 | // ActionStage_Example 4 | // 5 | // Created by coderyi on 2019/9/18. 6 | // Copyright © 2019 coderyi. All rights reserved. 7 | // 8 | 9 | #import "ASFileDownloadActor.h" 10 | @interface ASFileDownloadActor() 11 | @property (nonatomic, strong) NSTimer *testTimer; 12 | @property (nonatomic, assign) NSInteger testCount; 13 | @end 14 | 15 | @implementation ASFileDownloadActor 16 | 17 | + (NSString *)genericPath 18 | { 19 | return @"/as/file/@"; 20 | } 21 | 22 | - (void)execute:(NSDictionary *)options 23 | { 24 | // NSString *url = [options objectForKey:@"url"]; 25 | [ActionStageInstance() nodeRetrieveProgress:self.path progress:0.001f]; 26 | if (!_testTimer) { 27 | _testTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(testFileDownloadProgress) userInfo:nil repeats:YES]; 28 | NSRunLoop *runloop = [NSRunLoop currentRunLoop]; 29 | [runloop addTimer:_testTimer forMode:NSDefaultRunLoopMode]; 30 | [runloop run]; 31 | 32 | } 33 | [_testTimer invalidate]; 34 | [_testTimer fire]; 35 | } 36 | 37 | - (void)testFileDownloadProgress 38 | { 39 | _testCount++; 40 | [ActionStageInstance() nodeRetrieveProgress:self.path progress:0.1 * _testCount]; 41 | if (_testCount >= 10) { 42 | [_testTimer invalidate]; 43 | _testTimer = nil; 44 | [ActionStageInstance() actionCompleted:self.path result:nil]; 45 | // [ActionStageInstance() actionFailed:self.path reason:-1]; 46 | } 47 | 48 | } 49 | 50 | - (void)dealloc 51 | { 52 | NSLog(@"dealloc"); 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Example/ActionStage/ASTestActor.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTestActor.h 3 | // ActionStage_Example 4 | // 5 | // Created by coderyi on 2019/9/17. 6 | // Copyright © 2019 coderyi. All rights reserved. 7 | // 8 | 9 | /** 10 | <# 此类是做什么的? #> 11 | */ 12 | #import 13 | #import "ASActor.h" 14 | 15 | @interface ASTestActor : ASActor 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /Example/ActionStage/ASTestActor.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASTestActor.m 3 | // ActionStage_Example 4 | // 5 | // Created by coderyi on 2019/9/17. 6 | // Copyright © 2019 coderyi. All rights reserved. 7 | // 8 | 9 | #import "ASTestActor.h" 10 | #import "ActionStage.h" 11 | 12 | @implementation ASTestActor 13 | 14 | + (NSString *)genericPath 15 | { 16 | return @"/as/test/@"; 17 | } 18 | 19 | - (void)execute:(NSDictionary *)options 20 | { 21 | NSString *testKey = [options objectForKey:@"testKey"]; 22 | NSLog(@"ASTestActor %@",testKey); 23 | [self testRequest]; 24 | } 25 | 26 | - (void)testRequest 27 | { 28 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 29 | [ActionStageInstance() dispatchMessageToWatchers:self.path messageType:@"requestResults" message:@[@"test1", @"test2"]]; 30 | [self testCompleted]; 31 | }); 32 | } 33 | 34 | - (void)testCompleted 35 | { 36 | [ActionStageInstance() actionCompleted:self.path result:nil]; 37 | } 38 | @en 39 | d 40 | -------------------------------------------------------------------------------- /Example/ActionStage/ASTestSendCodeRequestActor.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTestSendCodeRequestActor.h 3 | // ActionStage_Example 4 | // 5 | // Created by coderyi on 2019/9/19. 6 | // Copyright © 2019 coderyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface ASTestSendCodeRequestActor : ASActor 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Example/ActionStage/ASTestSendCodeRequestActor.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASTestSendCodeRequestActor.m 3 | // ActionStage_Example 4 | // 5 | // Created by coderyi on 2019/9/19. 6 | // Copyright © 2019 coderyi. All rights reserved. 7 | // 8 | 9 | #import "ASTestSendCodeRequestActor.h" 10 | 11 | @implementation ASTestSendCodeRequestActor 12 | 13 | + (NSString *)genericPath 14 | { 15 | return @"/as/service/auth/sendCode"; 16 | } 17 | 18 | - (void)execute:(NSDictionary *)options 19 | { 20 | NSString *phoneNumber = [options objectForKey:@"phoneNumber"]; 21 | [self sendNetwork:phoneNumber]; 22 | } 23 | 24 | - (void)sendNetwork:(NSString *)phoneNumber 25 | { 26 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 27 | [ActionStageInstance() actionCompleted:self.path result:nil]; 28 | }); 29 | } 30 | @end 31 | -------------------------------------------------------------------------------- /Example/ActionStage/ASTestView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTestView.h 3 | // ActionStage_Example 4 | // 5 | // Created by coderyi on 2019/9/18. 6 | // Copyright © 2019 coderyi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ASHandle.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface ASTestView : UIView 15 | @property (nonatomic, strong) ASHandle *actionHandle; 16 | - (void)testViewClick; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Example/ActionStage/ASTestView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASTestView.m 3 | // ActionStage_Example 4 | // 5 | // Created by coderyi on 2019/9/18. 6 | // Copyright © 2019 coderyi. All rights reserved. 7 | // 8 | 9 | #import "ASTestView.h" 10 | 11 | @interface ASTestView () 12 | 13 | @end 14 | 15 | @implementation ASTestView 16 | 17 | - (void)dealloc 18 | { 19 | 20 | } 21 | 22 | - (id)initWithFrame:(CGRect)frame 23 | { 24 | self = [super initWithFrame:frame]; 25 | 26 | if (self) 27 | { 28 | } 29 | 30 | return self; 31 | } 32 | 33 | - (void)testViewClick 34 | { 35 | [_actionHandle requestAction:@"/testViewClick" options:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:2], @"testCount", nil]]; 36 | 37 | } 38 | @end 39 | -------------------------------------------------------------------------------- /Example/ActionStage/ASViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASViewController.h 3 | // ActionStage 4 | // 5 | // Created by coderyi on 09/16/2019. 6 | // Copyright (c) 2019 coderyi. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface ASViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/ActionStage/ASViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASViewController.m 3 | // ActionStage 4 | // 5 | // Created by coderyi on 09/16/2019. 6 | // Copyright (c) 2019 coderyi. All rights reserved. 7 | // 8 | 9 | #import "ASViewController.h" 10 | #import "ActionStage.h" 11 | #import "ASTestView.h" 12 | 13 | @interface ASViewController () 14 | 15 | @property (nonatomic, strong) ASHandle *actionHandle; 16 | 17 | @end 18 | 19 | @implementation ASViewController 20 | 21 | - (void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | // Do any additional setup after loading the view, typically from a nib. 25 | 26 | _actionHandle = [[ASHandle alloc] initWithDelegate:self releaseOnMainThread:true]; 27 | 28 | [ActionStageInstance() requestActor:@"/as/test/(1)" options:[[NSDictionary alloc] initWithObjectsAndKeys:@"helloWorld", @"testKey", nil] watcher:self]; 29 | 30 | [ActionStageInstance() requestActor:@"/as/file/(1)" options:[[NSDictionary alloc] initWithObjectsAndKeys:@"http://www.helloWorld.com", @"url", nil] watcher:self]; 31 | 32 | [ActionStageInstance() requestActor:@"/as/service/auth/sendCode" options:[[NSDictionary alloc] initWithObjectsAndKeys:@"123", @"phoneNumber", nil] watcher:self]; 33 | 34 | 35 | [ActionStageInstance() watchForPaths:@[ 36 | @"/as/unreadMessageCount", 37 | ] watcher:self]; 38 | [ActionStageInstance() dispatchResource:@"/as/unreadMessageCount" resource:[[NSNumber alloc] initWithInt:2]]; 39 | 40 | ASTestView *testView = [[ASTestView alloc] init]; 41 | testView.actionHandle = _actionHandle; 42 | [self.view addSubview:testView]; 43 | [testView testViewClick]; 44 | 45 | } 46 | 47 | - (void)actorMessageReceived:(NSString *)path messageType:(NSString *)messageType message:(id)message 48 | { 49 | if ([messageType isEqualToString:@"requestResults"]) 50 | { 51 | NSLog(@"actorMessageReceived %@", message); 52 | } 53 | } 54 | 55 | - (void)actorReportedProgress:(NSString *)path progress:(float)progress 56 | { 57 | NSLog(@"actorReportedProgress %@ %@", path, @(progress)); 58 | } 59 | 60 | - (void)actorCompleted:(int)resultCode path:(NSString *)path result:(id)result 61 | { 62 | NSLog(@"requestActor completed %@",path); 63 | } 64 | 65 | - (void)actionStageResourceDispatched:(NSString *)path resource:(id)resource arguments:(id)arguments; 66 | { 67 | NSLog(@"ResourceDispatch %@ %@", path, resource); 68 | } 69 | 70 | - (void)actionStageActionRequested:(NSString *)action options:(NSDictionary *)options 71 | { 72 | NSLog(@"actionStageActionRequested %@ %@", action, options); 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Example/ActionStage/ActionStage-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 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Example/ActionStage/ActionStage-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/ActionStage/Base.lproj/LaunchScreen.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 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Example/ActionStage/Base.lproj/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 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Example/ActionStage/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Example/ActionStage/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/ActionStage/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ActionStage 4 | // 5 | // Created by coderyi on 09/16/2019. 6 | // Copyright (c) 2019 coderyi. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "ASAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([ASAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | platform :ios, '8.0' 4 | 5 | target 'ActionStage_Example' do 6 | pod 'ActionStage', :path => '../' 7 | 8 | target 'ActionStage_Tests' do 9 | inherit! :search_paths 10 | 11 | 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ActionStage (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - ActionStage (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | ActionStage: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | ActionStage: e6ed4592a39f841fa5fdbbcffbbbe8f1b1acaf44 13 | 14 | PODFILE CHECKSUM: 3380b1c3f9d1fbdcec0d8d07c9ee6742fe19199b 15 | 16 | COCOAPODS: 1.7.1 17 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/ActionStage.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ActionStage", 3 | "version": "0.1.0", 4 | "summary": "A short description of ActionStage.", 5 | "description": "TODO: Add long description of the pod here.", 6 | "homepage": "https://github.com/coderyi/ActionStage", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "coderyi": "coderyi@foxmail.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/coderyi/ActionStage.git", 16 | "tag": "0.1.0" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "source_files": "ActionStage/Classes/**/*" 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ActionStage (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - ActionStage (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | ActionStage: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | ActionStage: e6ed4592a39f841fa5fdbbcffbbbe8f1b1acaf44 13 | 14 | PODFILE CHECKSUM: 3380b1c3f9d1fbdcec0d8d07c9ee6742fe19199b 15 | 16 | COCOAPODS: 1.7.1 17 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 033E01D5AC35B641F569AE3D80A75823 /* ASHandle.m in Sources */ = {isa = PBXBuildFile; fileRef = F15DD81F5EEBC48A00C6B089CFFF6277 /* ASHandle.m */; }; 11 | 0CD97CDF473B96906E547AC08C524C5C /* ASTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C3436ACE3A7B8136601FCDCA11AAEA9 /* ASTimer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 0D2D3F857257EB2E4EA6528BD690AAD7 /* Pods-ActionStage_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E5B95D27C133ABD593EA38049F537C /* Pods-ActionStage_Tests-dummy.m */; }; 13 | 2D1469D4C111DBE40745F3B246CFC487 /* Pods-ActionStage_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F6B622D8C7D81686721933450EA79F2 /* Pods-ActionStage_Example-dummy.m */; }; 14 | 2F1594A1BB7F9E9695DD8E051C266F31 /* Pods-ActionStage_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B6B6FE66392BFC24D1FFE245AB86E31 /* Pods-ActionStage_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | 36652C8BB808206A052965C5D9D88FD9 /* ASTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 82779D370D0185A49306838B1DD05179 /* ASTimer.m */; }; 16 | 55A62BC2DFCE935293105F171A1EF381 /* ASWatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 071A1AFF8CE63C8B56C83326FC1A1B5E /* ASWatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | 875501F9DB945EE64B6FBD31A629851C /* ActionStage-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B2B1980DC40C2BB6B5FE20C33C6158F6 /* ActionStage-dummy.m */; }; 18 | 8D114F912C1C1217CCF251CEBEBF463C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 19 | 97417C0A9069CF1293A195044E5B799C /* ASHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = DDB22A943F8544D87EB66944BE2EB59F /* ASHandle.h */; settings = {ATTRIBUTES = (Public, ); }; }; 20 | A6E8743EB25B3A5222BAFC4C5B88105E /* ActionStage.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D9FBE50782227EE2D480A1F80C73D5 /* ActionStage.m */; }; 21 | AB4B8FDEE6F3FC87F2192497659CEADC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 22 | B23C21517B400670E5CD2E47BBA9908A /* ASActor.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B96EEB7B2CBC33552F337F0AD7C2576 /* ASActor.m */; }; 23 | CAF2E1741847B66DA7BAA595A5CA4ED6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 24 | CB324571F7CE0F59C36185DE58652ED4 /* ActionStage.h in Headers */ = {isa = PBXBuildFile; fileRef = 40F310A5101861CB2190666A9F6377BA /* ActionStage.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25 | DD4D819E00EF773DA50DCF78278DD895 /* ASActor.h in Headers */ = {isa = PBXBuildFile; fileRef = 07536C07FB8B2E470A6E1D720EA4E1CE /* ASActor.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26 | DDF00E599E2A085B0CA800B812EF73A5 /* ActionStage-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 74D308B354202E38A079240F55FC75FE /* ActionStage-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 27 | FEA4F913276669F231CA5845BD655288 /* Pods-ActionStage_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 199530B52BF6619549B7C68850062402 /* Pods-ActionStage_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | 6A8DBBB0414C4B94F1CEE25C437E858C /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 9C1CAF01DA0D66C5DB5E7BEED87305EA; 36 | remoteInfo = "Pods-ActionStage_Example"; 37 | }; 38 | F363B3E15C91E0B7E579C09FE42B763C /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 41 | proxyType = 1; 42 | remoteGlobalIDString = 1A360E364EB83E700F74D0738F19D1E9; 43 | remoteInfo = ActionStage; 44 | }; 45 | /* End PBXContainerItemProxy section */ 46 | 47 | /* Begin PBXFileReference section */ 48 | 06BA522FC0554CB40CBC1E65E34733B1 /* ActionStage-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ActionStage-Info.plist"; sourceTree = ""; }; 49 | 071A1AFF8CE63C8B56C83326FC1A1B5E /* ASWatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASWatcher.h; path = ActionStage/Classes/ASWatcher.h; sourceTree = ""; }; 50 | 07536C07FB8B2E470A6E1D720EA4E1CE /* ASActor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASActor.h; path = ActionStage/Classes/ASActor.h; sourceTree = ""; }; 51 | 199530B52BF6619549B7C68850062402 /* Pods-ActionStage_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ActionStage_Tests-umbrella.h"; sourceTree = ""; }; 52 | 1E66AEFD0EF5C5BB669A9BA2DD6559EB /* Pods-ActionStage_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ActionStage_Example.debug.xcconfig"; sourceTree = ""; }; 53 | 30571F6AD4E8EB1B85A52EEAC9D8020B /* Pods_ActionStage_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ActionStage_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 55 | 3945A70C10E6AF2D57F5AE5008FD4017 /* Pods-ActionStage_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-ActionStage_Example.modulemap"; sourceTree = ""; }; 56 | 3F8B3ACFD32815885109DC9254521BF4 /* Pods-ActionStage_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ActionStage_Tests-Info.plist"; sourceTree = ""; }; 57 | 40F310A5101861CB2190666A9F6377BA /* ActionStage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ActionStage.h; path = ActionStage/Classes/ActionStage.h; sourceTree = ""; }; 58 | 4F9EE504ED3BDAFCB563DAEF74457D69 /* Pods-ActionStage_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ActionStage_Example.release.xcconfig"; sourceTree = ""; }; 59 | 61E5B95D27C133ABD593EA38049F537C /* Pods-ActionStage_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ActionStage_Tests-dummy.m"; sourceTree = ""; }; 60 | 6C3436ACE3A7B8136601FCDCA11AAEA9 /* ASTimer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASTimer.h; path = ActionStage/Classes/ASTimer.h; sourceTree = ""; }; 61 | 6D081482AF66CFFA3C1EA053AE1D0C3B /* Pods-ActionStage_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ActionStage_Example-acknowledgements.markdown"; sourceTree = ""; }; 62 | 6D8661AEBE066A41210D1A859D288939 /* Pods-ActionStage_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-ActionStage_Tests.modulemap"; sourceTree = ""; }; 63 | 71184680CC914B9D0DAA6BE02582464C /* ActionStage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ActionStage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 64 | 74D308B354202E38A079240F55FC75FE /* ActionStage-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ActionStage-umbrella.h"; sourceTree = ""; }; 65 | 7B6B6FE66392BFC24D1FFE245AB86E31 /* Pods-ActionStage_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ActionStage_Example-umbrella.h"; sourceTree = ""; }; 66 | 82779D370D0185A49306838B1DD05179 /* ASTimer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASTimer.m; path = ActionStage/Classes/ASTimer.m; sourceTree = ""; }; 67 | 868039FF0BAEAF2500D5A1D779CEEFA8 /* Pods-ActionStage_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ActionStage_Tests.debug.xcconfig"; sourceTree = ""; }; 68 | 89D9FBE50782227EE2D480A1F80C73D5 /* ActionStage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ActionStage.m; path = ActionStage/Classes/ActionStage.m; sourceTree = ""; }; 69 | 8B96EEB7B2CBC33552F337F0AD7C2576 /* ASActor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASActor.m; path = ActionStage/Classes/ASActor.m; sourceTree = ""; }; 70 | 8E9AD0D1FDCFB904BF27258625A743B6 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 71 | 8F6B622D8C7D81686721933450EA79F2 /* Pods-ActionStage_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ActionStage_Example-dummy.m"; sourceTree = ""; }; 72 | 9010AFD2752E73CD3FF994FE21105906 /* Pods-ActionStage_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ActionStage_Tests.release.xcconfig"; sourceTree = ""; }; 73 | 94C742B0FF9691F8218F17EC6952BB81 /* Pods-ActionStage_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ActionStage_Example-Info.plist"; sourceTree = ""; }; 74 | 9C4A0E8225A3FD7E9CF1A2A40A177ACE /* Pods-ActionStage_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ActionStage_Tests-acknowledgements.plist"; sourceTree = ""; }; 75 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 76 | A550267C332D97F72906BE50A6AD4C41 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 77 | B2B1980DC40C2BB6B5FE20C33C6158F6 /* ActionStage-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ActionStage-dummy.m"; sourceTree = ""; }; 78 | B72853F1D5388B57ECAB2E9FE20CD0DE /* Pods-ActionStage_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ActionStage_Example-frameworks.sh"; sourceTree = ""; }; 79 | B9548D2F2A11F928E994E49A7D214562 /* Pods-ActionStage_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ActionStage_Tests-acknowledgements.markdown"; sourceTree = ""; }; 80 | C1CB0A023D1C8AA5C9769147BF936D44 /* ActionStage.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ActionStage.xcconfig; sourceTree = ""; }; 81 | D5E072CDB9710578C432D99E96C54CB9 /* ActionStage.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = ActionStage.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 82 | D7690283B137C7A61D13A95F6570E442 /* ActionStage-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ActionStage-prefix.pch"; sourceTree = ""; }; 83 | DAAEFFF44D22BE6651E3900B0AE8800B /* ActionStage.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = ActionStage.modulemap; sourceTree = ""; }; 84 | DDB22A943F8544D87EB66944BE2EB59F /* ASHandle.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASHandle.h; path = ActionStage/Classes/ASHandle.h; sourceTree = ""; }; 85 | F15DD81F5EEBC48A00C6B089CFFF6277 /* ASHandle.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASHandle.m; path = ActionStage/Classes/ASHandle.m; sourceTree = ""; }; 86 | F78B387AA6FD0A374CCFBA80EECDB817 /* Pods_ActionStage_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ActionStage_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 87 | FC83CEFE7563C9A61BF0959CDC9286EE /* Pods-ActionStage_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ActionStage_Example-acknowledgements.plist"; sourceTree = ""; }; 88 | /* End PBXFileReference section */ 89 | 90 | /* Begin PBXFrameworksBuildPhase section */ 91 | 2095182FF94677F825ACF832E75FF7B0 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | 8D114F912C1C1217CCF251CEBEBF463C /* Foundation.framework in Frameworks */, 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | BED75039499539749F2EB97B74BEF19C /* Frameworks */ = { 100 | isa = PBXFrameworksBuildPhase; 101 | buildActionMask = 2147483647; 102 | files = ( 103 | AB4B8FDEE6F3FC87F2192497659CEADC /* Foundation.framework in Frameworks */, 104 | ); 105 | runOnlyForDeploymentPostprocessing = 0; 106 | }; 107 | F535B496B92ED496E37659C8F4141076 /* Frameworks */ = { 108 | isa = PBXFrameworksBuildPhase; 109 | buildActionMask = 2147483647; 110 | files = ( 111 | CAF2E1741847B66DA7BAA595A5CA4ED6 /* Foundation.framework in Frameworks */, 112 | ); 113 | runOnlyForDeploymentPostprocessing = 0; 114 | }; 115 | /* End PBXFrameworksBuildPhase section */ 116 | 117 | /* Begin PBXGroup section */ 118 | 419CFA72C345A2110EC9C09510E8027C /* Pods-ActionStage_Tests */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 6D8661AEBE066A41210D1A859D288939 /* Pods-ActionStage_Tests.modulemap */, 122 | B9548D2F2A11F928E994E49A7D214562 /* Pods-ActionStage_Tests-acknowledgements.markdown */, 123 | 9C4A0E8225A3FD7E9CF1A2A40A177ACE /* Pods-ActionStage_Tests-acknowledgements.plist */, 124 | 61E5B95D27C133ABD593EA38049F537C /* Pods-ActionStage_Tests-dummy.m */, 125 | 3F8B3ACFD32815885109DC9254521BF4 /* Pods-ActionStage_Tests-Info.plist */, 126 | 199530B52BF6619549B7C68850062402 /* Pods-ActionStage_Tests-umbrella.h */, 127 | 868039FF0BAEAF2500D5A1D779CEEFA8 /* Pods-ActionStage_Tests.debug.xcconfig */, 128 | 9010AFD2752E73CD3FF994FE21105906 /* Pods-ActionStage_Tests.release.xcconfig */, 129 | ); 130 | name = "Pods-ActionStage_Tests"; 131 | path = "Target Support Files/Pods-ActionStage_Tests"; 132 | sourceTree = ""; 133 | }; 134 | 4449841326E015CC1E9A47F5A9555494 /* Pods-ActionStage_Example */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 3945A70C10E6AF2D57F5AE5008FD4017 /* Pods-ActionStage_Example.modulemap */, 138 | 6D081482AF66CFFA3C1EA053AE1D0C3B /* Pods-ActionStage_Example-acknowledgements.markdown */, 139 | FC83CEFE7563C9A61BF0959CDC9286EE /* Pods-ActionStage_Example-acknowledgements.plist */, 140 | 8F6B622D8C7D81686721933450EA79F2 /* Pods-ActionStage_Example-dummy.m */, 141 | B72853F1D5388B57ECAB2E9FE20CD0DE /* Pods-ActionStage_Example-frameworks.sh */, 142 | 94C742B0FF9691F8218F17EC6952BB81 /* Pods-ActionStage_Example-Info.plist */, 143 | 7B6B6FE66392BFC24D1FFE245AB86E31 /* Pods-ActionStage_Example-umbrella.h */, 144 | 1E66AEFD0EF5C5BB669A9BA2DD6559EB /* Pods-ActionStage_Example.debug.xcconfig */, 145 | 4F9EE504ED3BDAFCB563DAEF74457D69 /* Pods-ActionStage_Example.release.xcconfig */, 146 | ); 147 | name = "Pods-ActionStage_Example"; 148 | path = "Target Support Files/Pods-ActionStage_Example"; 149 | sourceTree = ""; 150 | }; 151 | 5AE9719F2B20E3767A761C1527149A69 /* ActionStage */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 40F310A5101861CB2190666A9F6377BA /* ActionStage.h */, 155 | 89D9FBE50782227EE2D480A1F80C73D5 /* ActionStage.m */, 156 | 07536C07FB8B2E470A6E1D720EA4E1CE /* ASActor.h */, 157 | 8B96EEB7B2CBC33552F337F0AD7C2576 /* ASActor.m */, 158 | DDB22A943F8544D87EB66944BE2EB59F /* ASHandle.h */, 159 | F15DD81F5EEBC48A00C6B089CFFF6277 /* ASHandle.m */, 160 | 6C3436ACE3A7B8136601FCDCA11AAEA9 /* ASTimer.h */, 161 | 82779D370D0185A49306838B1DD05179 /* ASTimer.m */, 162 | 071A1AFF8CE63C8B56C83326FC1A1B5E /* ASWatcher.h */, 163 | 90305C614AD1745054F58F90F0597059 /* Pod */, 164 | 7077A810C3BF2922DC8861E1AD68D612 /* Support Files */, 165 | ); 166 | name = ActionStage; 167 | path = ../..; 168 | sourceTree = ""; 169 | }; 170 | 7077A810C3BF2922DC8861E1AD68D612 /* Support Files */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | DAAEFFF44D22BE6651E3900B0AE8800B /* ActionStage.modulemap */, 174 | C1CB0A023D1C8AA5C9769147BF936D44 /* ActionStage.xcconfig */, 175 | B2B1980DC40C2BB6B5FE20C33C6158F6 /* ActionStage-dummy.m */, 176 | 06BA522FC0554CB40CBC1E65E34733B1 /* ActionStage-Info.plist */, 177 | D7690283B137C7A61D13A95F6570E442 /* ActionStage-prefix.pch */, 178 | 74D308B354202E38A079240F55FC75FE /* ActionStage-umbrella.h */, 179 | ); 180 | name = "Support Files"; 181 | path = "Example/Pods/Target Support Files/ActionStage"; 182 | sourceTree = ""; 183 | }; 184 | 90305C614AD1745054F58F90F0597059 /* Pod */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | D5E072CDB9710578C432D99E96C54CB9 /* ActionStage.podspec */, 188 | A550267C332D97F72906BE50A6AD4C41 /* LICENSE */, 189 | 8E9AD0D1FDCFB904BF27258625A743B6 /* README.md */, 190 | ); 191 | name = Pod; 192 | sourceTree = ""; 193 | }; 194 | B45BF6DD0F84C8D0437AD92761CB1198 /* Targets Support Files */ = { 195 | isa = PBXGroup; 196 | children = ( 197 | 4449841326E015CC1E9A47F5A9555494 /* Pods-ActionStage_Example */, 198 | 419CFA72C345A2110EC9C09510E8027C /* Pods-ActionStage_Tests */, 199 | ); 200 | name = "Targets Support Files"; 201 | sourceTree = ""; 202 | }; 203 | C0834CEBB1379A84116EF29F93051C60 /* iOS */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */, 207 | ); 208 | name = iOS; 209 | sourceTree = ""; 210 | }; 211 | CF1408CF629C7361332E53B88F7BD30C = { 212 | isa = PBXGroup; 213 | children = ( 214 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 215 | ECE6E913836EFE98D1A5D6A5A5F4CB89 /* Development Pods */, 216 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, 217 | E791842A641C5237497BCD896110F06E /* Products */, 218 | B45BF6DD0F84C8D0437AD92761CB1198 /* Targets Support Files */, 219 | ); 220 | sourceTree = ""; 221 | }; 222 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | C0834CEBB1379A84116EF29F93051C60 /* iOS */, 226 | ); 227 | name = Frameworks; 228 | sourceTree = ""; 229 | }; 230 | E791842A641C5237497BCD896110F06E /* Products */ = { 231 | isa = PBXGroup; 232 | children = ( 233 | 71184680CC914B9D0DAA6BE02582464C /* ActionStage.framework */, 234 | F78B387AA6FD0A374CCFBA80EECDB817 /* Pods_ActionStage_Example.framework */, 235 | 30571F6AD4E8EB1B85A52EEAC9D8020B /* Pods_ActionStage_Tests.framework */, 236 | ); 237 | name = Products; 238 | sourceTree = ""; 239 | }; 240 | ECE6E913836EFE98D1A5D6A5A5F4CB89 /* Development Pods */ = { 241 | isa = PBXGroup; 242 | children = ( 243 | 5AE9719F2B20E3767A761C1527149A69 /* ActionStage */, 244 | ); 245 | name = "Development Pods"; 246 | sourceTree = ""; 247 | }; 248 | /* End PBXGroup section */ 249 | 250 | /* Begin PBXHeadersBuildPhase section */ 251 | 5665C439DCD26195079DB2F85E55432B /* Headers */ = { 252 | isa = PBXHeadersBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | 2F1594A1BB7F9E9695DD8E051C266F31 /* Pods-ActionStage_Example-umbrella.h in Headers */, 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | B9D0EABCB57A353F0D533F34F6C8F69A /* Headers */ = { 260 | isa = PBXHeadersBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | DDF00E599E2A085B0CA800B812EF73A5 /* ActionStage-umbrella.h in Headers */, 264 | CB324571F7CE0F59C36185DE58652ED4 /* ActionStage.h in Headers */, 265 | DD4D819E00EF773DA50DCF78278DD895 /* ASActor.h in Headers */, 266 | 97417C0A9069CF1293A195044E5B799C /* ASHandle.h in Headers */, 267 | 0CD97CDF473B96906E547AC08C524C5C /* ASTimer.h in Headers */, 268 | 55A62BC2DFCE935293105F171A1EF381 /* ASWatcher.h in Headers */, 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | }; 272 | D4CF232EC5D896466C6FF34ABC76D0E4 /* Headers */ = { 273 | isa = PBXHeadersBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | FEA4F913276669F231CA5845BD655288 /* Pods-ActionStage_Tests-umbrella.h in Headers */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | /* End PBXHeadersBuildPhase section */ 281 | 282 | /* Begin PBXNativeTarget section */ 283 | 1A360E364EB83E700F74D0738F19D1E9 /* ActionStage */ = { 284 | isa = PBXNativeTarget; 285 | buildConfigurationList = 90E47A533B9B2AF0B2D8FEE24920745F /* Build configuration list for PBXNativeTarget "ActionStage" */; 286 | buildPhases = ( 287 | B9D0EABCB57A353F0D533F34F6C8F69A /* Headers */, 288 | 760A990D15FD926632BE9F5980B89F94 /* Sources */, 289 | 2095182FF94677F825ACF832E75FF7B0 /* Frameworks */, 290 | 9FD261293DBC724DF4F7D9F627B27659 /* Resources */, 291 | ); 292 | buildRules = ( 293 | ); 294 | dependencies = ( 295 | ); 296 | name = ActionStage; 297 | productName = ActionStage; 298 | productReference = 71184680CC914B9D0DAA6BE02582464C /* ActionStage.framework */; 299 | productType = "com.apple.product-type.framework"; 300 | }; 301 | 9285C45EF0C1CFC990F586CAA9336B12 /* Pods-ActionStage_Tests */ = { 302 | isa = PBXNativeTarget; 303 | buildConfigurationList = EEABF9B03A6987656A56C4FE3AD74933 /* Build configuration list for PBXNativeTarget "Pods-ActionStage_Tests" */; 304 | buildPhases = ( 305 | D4CF232EC5D896466C6FF34ABC76D0E4 /* Headers */, 306 | 652D8BE12D106A32A6F25055B0C9EADE /* Sources */, 307 | BED75039499539749F2EB97B74BEF19C /* Frameworks */, 308 | CC2F5947BA66DFAA76B361E18E55B441 /* Resources */, 309 | ); 310 | buildRules = ( 311 | ); 312 | dependencies = ( 313 | 65D39647545290F10103BD3B2A91CA0B /* PBXTargetDependency */, 314 | ); 315 | name = "Pods-ActionStage_Tests"; 316 | productName = "Pods-ActionStage_Tests"; 317 | productReference = 30571F6AD4E8EB1B85A52EEAC9D8020B /* Pods_ActionStage_Tests.framework */; 318 | productType = "com.apple.product-type.framework"; 319 | }; 320 | 9C1CAF01DA0D66C5DB5E7BEED87305EA /* Pods-ActionStage_Example */ = { 321 | isa = PBXNativeTarget; 322 | buildConfigurationList = 6903164E56BC69A82E8BBFBF82BCD84E /* Build configuration list for PBXNativeTarget "Pods-ActionStage_Example" */; 323 | buildPhases = ( 324 | 5665C439DCD26195079DB2F85E55432B /* Headers */, 325 | 86BDC4AC73C9C47DCD253EA5CF5A0AAF /* Sources */, 326 | F535B496B92ED496E37659C8F4141076 /* Frameworks */, 327 | 64BE9D7A0BF1712297941D65CA71195F /* Resources */, 328 | ); 329 | buildRules = ( 330 | ); 331 | dependencies = ( 332 | A01612E94D98F0B56C9C3785CACD9758 /* PBXTargetDependency */, 333 | ); 334 | name = "Pods-ActionStage_Example"; 335 | productName = "Pods-ActionStage_Example"; 336 | productReference = F78B387AA6FD0A374CCFBA80EECDB817 /* Pods_ActionStage_Example.framework */; 337 | productType = "com.apple.product-type.framework"; 338 | }; 339 | /* End PBXNativeTarget section */ 340 | 341 | /* Begin PBXProject section */ 342 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = { 343 | isa = PBXProject; 344 | attributes = { 345 | LastSwiftUpdateCheck = 1100; 346 | LastUpgradeCheck = 1100; 347 | }; 348 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; 349 | compatibilityVersion = "Xcode 3.2"; 350 | developmentRegion = en; 351 | hasScannedForEncodings = 0; 352 | knownRegions = ( 353 | en, 354 | ); 355 | mainGroup = CF1408CF629C7361332E53B88F7BD30C; 356 | productRefGroup = E791842A641C5237497BCD896110F06E /* Products */; 357 | projectDirPath = ""; 358 | projectRoot = ""; 359 | targets = ( 360 | 1A360E364EB83E700F74D0738F19D1E9 /* ActionStage */, 361 | 9C1CAF01DA0D66C5DB5E7BEED87305EA /* Pods-ActionStage_Example */, 362 | 9285C45EF0C1CFC990F586CAA9336B12 /* Pods-ActionStage_Tests */, 363 | ); 364 | }; 365 | /* End PBXProject section */ 366 | 367 | /* Begin PBXResourcesBuildPhase section */ 368 | 64BE9D7A0BF1712297941D65CA71195F /* Resources */ = { 369 | isa = PBXResourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | 9FD261293DBC724DF4F7D9F627B27659 /* Resources */ = { 376 | isa = PBXResourcesBuildPhase; 377 | buildActionMask = 2147483647; 378 | files = ( 379 | ); 380 | runOnlyForDeploymentPostprocessing = 0; 381 | }; 382 | CC2F5947BA66DFAA76B361E18E55B441 /* Resources */ = { 383 | isa = PBXResourcesBuildPhase; 384 | buildActionMask = 2147483647; 385 | files = ( 386 | ); 387 | runOnlyForDeploymentPostprocessing = 0; 388 | }; 389 | /* End PBXResourcesBuildPhase section */ 390 | 391 | /* Begin PBXSourcesBuildPhase section */ 392 | 652D8BE12D106A32A6F25055B0C9EADE /* Sources */ = { 393 | isa = PBXSourcesBuildPhase; 394 | buildActionMask = 2147483647; 395 | files = ( 396 | 0D2D3F857257EB2E4EA6528BD690AAD7 /* Pods-ActionStage_Tests-dummy.m in Sources */, 397 | ); 398 | runOnlyForDeploymentPostprocessing = 0; 399 | }; 400 | 760A990D15FD926632BE9F5980B89F94 /* Sources */ = { 401 | isa = PBXSourcesBuildPhase; 402 | buildActionMask = 2147483647; 403 | files = ( 404 | 875501F9DB945EE64B6FBD31A629851C /* ActionStage-dummy.m in Sources */, 405 | A6E8743EB25B3A5222BAFC4C5B88105E /* ActionStage.m in Sources */, 406 | B23C21517B400670E5CD2E47BBA9908A /* ASActor.m in Sources */, 407 | 033E01D5AC35B641F569AE3D80A75823 /* ASHandle.m in Sources */, 408 | 36652C8BB808206A052965C5D9D88FD9 /* ASTimer.m in Sources */, 409 | ); 410 | runOnlyForDeploymentPostprocessing = 0; 411 | }; 412 | 86BDC4AC73C9C47DCD253EA5CF5A0AAF /* Sources */ = { 413 | isa = PBXSourcesBuildPhase; 414 | buildActionMask = 2147483647; 415 | files = ( 416 | 2D1469D4C111DBE40745F3B246CFC487 /* Pods-ActionStage_Example-dummy.m in Sources */, 417 | ); 418 | runOnlyForDeploymentPostprocessing = 0; 419 | }; 420 | /* End PBXSourcesBuildPhase section */ 421 | 422 | /* Begin PBXTargetDependency section */ 423 | 65D39647545290F10103BD3B2A91CA0B /* PBXTargetDependency */ = { 424 | isa = PBXTargetDependency; 425 | name = "Pods-ActionStage_Example"; 426 | target = 9C1CAF01DA0D66C5DB5E7BEED87305EA /* Pods-ActionStage_Example */; 427 | targetProxy = 6A8DBBB0414C4B94F1CEE25C437E858C /* PBXContainerItemProxy */; 428 | }; 429 | A01612E94D98F0B56C9C3785CACD9758 /* PBXTargetDependency */ = { 430 | isa = PBXTargetDependency; 431 | name = ActionStage; 432 | target = 1A360E364EB83E700F74D0738F19D1E9 /* ActionStage */; 433 | targetProxy = F363B3E15C91E0B7E579C09FE42B763C /* PBXContainerItemProxy */; 434 | }; 435 | /* End PBXTargetDependency section */ 436 | 437 | /* Begin XCBuildConfiguration section */ 438 | 4BE66A09A74FD25164AAB3C2645B9B93 /* Release */ = { 439 | isa = XCBuildConfiguration; 440 | buildSettings = { 441 | ALWAYS_SEARCH_USER_PATHS = NO; 442 | CLANG_ANALYZER_NONNULL = YES; 443 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 444 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 445 | CLANG_CXX_LIBRARY = "libc++"; 446 | CLANG_ENABLE_MODULES = YES; 447 | CLANG_ENABLE_OBJC_ARC = YES; 448 | CLANG_ENABLE_OBJC_WEAK = YES; 449 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 450 | CLANG_WARN_BOOL_CONVERSION = YES; 451 | CLANG_WARN_COMMA = YES; 452 | CLANG_WARN_CONSTANT_CONVERSION = YES; 453 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 454 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 455 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 456 | CLANG_WARN_EMPTY_BODY = YES; 457 | CLANG_WARN_ENUM_CONVERSION = YES; 458 | CLANG_WARN_INFINITE_RECURSION = YES; 459 | CLANG_WARN_INT_CONVERSION = YES; 460 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 461 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 462 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 463 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 464 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 465 | CLANG_WARN_STRICT_PROTOTYPES = YES; 466 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 467 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 468 | CLANG_WARN_UNREACHABLE_CODE = YES; 469 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 470 | COPY_PHASE_STRIP = NO; 471 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 472 | ENABLE_NS_ASSERTIONS = NO; 473 | ENABLE_STRICT_OBJC_MSGSEND = YES; 474 | GCC_C_LANGUAGE_STANDARD = gnu11; 475 | GCC_NO_COMMON_BLOCKS = YES; 476 | GCC_PREPROCESSOR_DEFINITIONS = ( 477 | "POD_CONFIGURATION_RELEASE=1", 478 | "$(inherited)", 479 | ); 480 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 481 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 482 | GCC_WARN_UNDECLARED_SELECTOR = YES; 483 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 484 | GCC_WARN_UNUSED_FUNCTION = YES; 485 | GCC_WARN_UNUSED_VARIABLE = YES; 486 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 487 | MTL_ENABLE_DEBUG_INFO = NO; 488 | MTL_FAST_MATH = YES; 489 | PRODUCT_NAME = "$(TARGET_NAME)"; 490 | STRIP_INSTALLED_PRODUCT = NO; 491 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 492 | SWIFT_VERSION = 5.0; 493 | SYMROOT = "${SRCROOT}/../build"; 494 | }; 495 | name = Release; 496 | }; 497 | 56387C157ED745E74CFE7D78659AFC7E /* Release */ = { 498 | isa = XCBuildConfiguration; 499 | baseConfigurationReference = 9010AFD2752E73CD3FF994FE21105906 /* Pods-ActionStage_Tests.release.xcconfig */; 500 | buildSettings = { 501 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 502 | CODE_SIGN_IDENTITY = ""; 503 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 504 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 505 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 506 | CURRENT_PROJECT_VERSION = 1; 507 | DEFINES_MODULE = YES; 508 | DYLIB_COMPATIBILITY_VERSION = 1; 509 | DYLIB_CURRENT_VERSION = 1; 510 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 511 | INFOPLIST_FILE = "Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests-Info.plist"; 512 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 513 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 514 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 515 | MACH_O_TYPE = staticlib; 516 | MODULEMAP_FILE = "Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests.modulemap"; 517 | OTHER_LDFLAGS = ""; 518 | OTHER_LIBTOOLFLAGS = ""; 519 | PODS_ROOT = "$(SRCROOT)"; 520 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 521 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 522 | SDKROOT = iphoneos; 523 | SKIP_INSTALL = YES; 524 | TARGETED_DEVICE_FAMILY = "1,2"; 525 | VALIDATE_PRODUCT = YES; 526 | VERSIONING_SYSTEM = "apple-generic"; 527 | VERSION_INFO_PREFIX = ""; 528 | }; 529 | name = Release; 530 | }; 531 | 7EF7227D9B20A1D549000096ACCB23D7 /* Debug */ = { 532 | isa = XCBuildConfiguration; 533 | buildSettings = { 534 | ALWAYS_SEARCH_USER_PATHS = NO; 535 | CLANG_ANALYZER_NONNULL = YES; 536 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 537 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 538 | CLANG_CXX_LIBRARY = "libc++"; 539 | CLANG_ENABLE_MODULES = YES; 540 | CLANG_ENABLE_OBJC_ARC = YES; 541 | CLANG_ENABLE_OBJC_WEAK = YES; 542 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 543 | CLANG_WARN_BOOL_CONVERSION = YES; 544 | CLANG_WARN_COMMA = YES; 545 | CLANG_WARN_CONSTANT_CONVERSION = YES; 546 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 547 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 548 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 549 | CLANG_WARN_EMPTY_BODY = YES; 550 | CLANG_WARN_ENUM_CONVERSION = YES; 551 | CLANG_WARN_INFINITE_RECURSION = YES; 552 | CLANG_WARN_INT_CONVERSION = YES; 553 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 554 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 555 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 556 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 557 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 558 | CLANG_WARN_STRICT_PROTOTYPES = YES; 559 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 560 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 561 | CLANG_WARN_UNREACHABLE_CODE = YES; 562 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 563 | COPY_PHASE_STRIP = NO; 564 | DEBUG_INFORMATION_FORMAT = dwarf; 565 | ENABLE_STRICT_OBJC_MSGSEND = YES; 566 | ENABLE_TESTABILITY = YES; 567 | GCC_C_LANGUAGE_STANDARD = gnu11; 568 | GCC_DYNAMIC_NO_PIC = NO; 569 | GCC_NO_COMMON_BLOCKS = YES; 570 | GCC_OPTIMIZATION_LEVEL = 0; 571 | GCC_PREPROCESSOR_DEFINITIONS = ( 572 | "POD_CONFIGURATION_DEBUG=1", 573 | "DEBUG=1", 574 | "$(inherited)", 575 | ); 576 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 577 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 578 | GCC_WARN_UNDECLARED_SELECTOR = YES; 579 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 580 | GCC_WARN_UNUSED_FUNCTION = YES; 581 | GCC_WARN_UNUSED_VARIABLE = YES; 582 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 583 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 584 | MTL_FAST_MATH = YES; 585 | ONLY_ACTIVE_ARCH = YES; 586 | PRODUCT_NAME = "$(TARGET_NAME)"; 587 | STRIP_INSTALLED_PRODUCT = NO; 588 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 589 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 590 | SWIFT_VERSION = 5.0; 591 | SYMROOT = "${SRCROOT}/../build"; 592 | }; 593 | name = Debug; 594 | }; 595 | 88A30B6F20FD6A3E326683E008FEC86A /* Release */ = { 596 | isa = XCBuildConfiguration; 597 | baseConfigurationReference = C1CB0A023D1C8AA5C9769147BF936D44 /* ActionStage.xcconfig */; 598 | buildSettings = { 599 | CODE_SIGN_IDENTITY = ""; 600 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 601 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 602 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 603 | CURRENT_PROJECT_VERSION = 1; 604 | DEFINES_MODULE = YES; 605 | DYLIB_COMPATIBILITY_VERSION = 1; 606 | DYLIB_CURRENT_VERSION = 1; 607 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 608 | GCC_PREFIX_HEADER = "Target Support Files/ActionStage/ActionStage-prefix.pch"; 609 | INFOPLIST_FILE = "Target Support Files/ActionStage/ActionStage-Info.plist"; 610 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 611 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 612 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 613 | MODULEMAP_FILE = "Target Support Files/ActionStage/ActionStage.modulemap"; 614 | PRODUCT_MODULE_NAME = ActionStage; 615 | PRODUCT_NAME = ActionStage; 616 | SDKROOT = iphoneos; 617 | SKIP_INSTALL = YES; 618 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 619 | SWIFT_VERSION = 4.0; 620 | TARGETED_DEVICE_FAMILY = "1,2"; 621 | VALIDATE_PRODUCT = YES; 622 | VERSIONING_SYSTEM = "apple-generic"; 623 | VERSION_INFO_PREFIX = ""; 624 | }; 625 | name = Release; 626 | }; 627 | C85334084DBE8B2E0BDDD2A6EA91C949 /* Debug */ = { 628 | isa = XCBuildConfiguration; 629 | baseConfigurationReference = C1CB0A023D1C8AA5C9769147BF936D44 /* ActionStage.xcconfig */; 630 | buildSettings = { 631 | CODE_SIGN_IDENTITY = ""; 632 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 633 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 634 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 635 | CURRENT_PROJECT_VERSION = 1; 636 | DEFINES_MODULE = YES; 637 | DYLIB_COMPATIBILITY_VERSION = 1; 638 | DYLIB_CURRENT_VERSION = 1; 639 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 640 | GCC_PREFIX_HEADER = "Target Support Files/ActionStage/ActionStage-prefix.pch"; 641 | INFOPLIST_FILE = "Target Support Files/ActionStage/ActionStage-Info.plist"; 642 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 643 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 644 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 645 | MODULEMAP_FILE = "Target Support Files/ActionStage/ActionStage.modulemap"; 646 | PRODUCT_MODULE_NAME = ActionStage; 647 | PRODUCT_NAME = ActionStage; 648 | SDKROOT = iphoneos; 649 | SKIP_INSTALL = YES; 650 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 651 | SWIFT_VERSION = 4.0; 652 | TARGETED_DEVICE_FAMILY = "1,2"; 653 | VERSIONING_SYSTEM = "apple-generic"; 654 | VERSION_INFO_PREFIX = ""; 655 | }; 656 | name = Debug; 657 | }; 658 | CBCF13623F91654F026F3F5143763C95 /* Release */ = { 659 | isa = XCBuildConfiguration; 660 | baseConfigurationReference = 4F9EE504ED3BDAFCB563DAEF74457D69 /* Pods-ActionStage_Example.release.xcconfig */; 661 | buildSettings = { 662 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 663 | CODE_SIGN_IDENTITY = ""; 664 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 665 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 666 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 667 | CURRENT_PROJECT_VERSION = 1; 668 | DEFINES_MODULE = YES; 669 | DYLIB_COMPATIBILITY_VERSION = 1; 670 | DYLIB_CURRENT_VERSION = 1; 671 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 672 | INFOPLIST_FILE = "Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example-Info.plist"; 673 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 674 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 675 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 676 | MACH_O_TYPE = staticlib; 677 | MODULEMAP_FILE = "Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example.modulemap"; 678 | OTHER_LDFLAGS = ""; 679 | OTHER_LIBTOOLFLAGS = ""; 680 | PODS_ROOT = "$(SRCROOT)"; 681 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 682 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 683 | SDKROOT = iphoneos; 684 | SKIP_INSTALL = YES; 685 | TARGETED_DEVICE_FAMILY = "1,2"; 686 | VALIDATE_PRODUCT = YES; 687 | VERSIONING_SYSTEM = "apple-generic"; 688 | VERSION_INFO_PREFIX = ""; 689 | }; 690 | name = Release; 691 | }; 692 | E56B4DF7A9A04715544993D4678162E3 /* Debug */ = { 693 | isa = XCBuildConfiguration; 694 | baseConfigurationReference = 868039FF0BAEAF2500D5A1D779CEEFA8 /* Pods-ActionStage_Tests.debug.xcconfig */; 695 | buildSettings = { 696 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 697 | CODE_SIGN_IDENTITY = ""; 698 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 699 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 700 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 701 | CURRENT_PROJECT_VERSION = 1; 702 | DEFINES_MODULE = YES; 703 | DYLIB_COMPATIBILITY_VERSION = 1; 704 | DYLIB_CURRENT_VERSION = 1; 705 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 706 | INFOPLIST_FILE = "Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests-Info.plist"; 707 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 708 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 709 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 710 | MACH_O_TYPE = staticlib; 711 | MODULEMAP_FILE = "Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests.modulemap"; 712 | OTHER_LDFLAGS = ""; 713 | OTHER_LIBTOOLFLAGS = ""; 714 | PODS_ROOT = "$(SRCROOT)"; 715 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 716 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 717 | SDKROOT = iphoneos; 718 | SKIP_INSTALL = YES; 719 | TARGETED_DEVICE_FAMILY = "1,2"; 720 | VERSIONING_SYSTEM = "apple-generic"; 721 | VERSION_INFO_PREFIX = ""; 722 | }; 723 | name = Debug; 724 | }; 725 | EEE89CE3CA724F1B8A77A8A0FFC3B34C /* Debug */ = { 726 | isa = XCBuildConfiguration; 727 | baseConfigurationReference = 1E66AEFD0EF5C5BB669A9BA2DD6559EB /* Pods-ActionStage_Example.debug.xcconfig */; 728 | buildSettings = { 729 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 730 | CODE_SIGN_IDENTITY = ""; 731 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 732 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 733 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 734 | CURRENT_PROJECT_VERSION = 1; 735 | DEFINES_MODULE = YES; 736 | DYLIB_COMPATIBILITY_VERSION = 1; 737 | DYLIB_CURRENT_VERSION = 1; 738 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 739 | INFOPLIST_FILE = "Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example-Info.plist"; 740 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 741 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 742 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 743 | MACH_O_TYPE = staticlib; 744 | MODULEMAP_FILE = "Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example.modulemap"; 745 | OTHER_LDFLAGS = ""; 746 | OTHER_LIBTOOLFLAGS = ""; 747 | PODS_ROOT = "$(SRCROOT)"; 748 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 749 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 750 | SDKROOT = iphoneos; 751 | SKIP_INSTALL = YES; 752 | TARGETED_DEVICE_FAMILY = "1,2"; 753 | VERSIONING_SYSTEM = "apple-generic"; 754 | VERSION_INFO_PREFIX = ""; 755 | }; 756 | name = Debug; 757 | }; 758 | /* End XCBuildConfiguration section */ 759 | 760 | /* Begin XCConfigurationList section */ 761 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { 762 | isa = XCConfigurationList; 763 | buildConfigurations = ( 764 | 7EF7227D9B20A1D549000096ACCB23D7 /* Debug */, 765 | 4BE66A09A74FD25164AAB3C2645B9B93 /* Release */, 766 | ); 767 | defaultConfigurationIsVisible = 0; 768 | defaultConfigurationName = Release; 769 | }; 770 | 6903164E56BC69A82E8BBFBF82BCD84E /* Build configuration list for PBXNativeTarget "Pods-ActionStage_Example" */ = { 771 | isa = XCConfigurationList; 772 | buildConfigurations = ( 773 | EEE89CE3CA724F1B8A77A8A0FFC3B34C /* Debug */, 774 | CBCF13623F91654F026F3F5143763C95 /* Release */, 775 | ); 776 | defaultConfigurationIsVisible = 0; 777 | defaultConfigurationName = Release; 778 | }; 779 | 90E47A533B9B2AF0B2D8FEE24920745F /* Build configuration list for PBXNativeTarget "ActionStage" */ = { 780 | isa = XCConfigurationList; 781 | buildConfigurations = ( 782 | C85334084DBE8B2E0BDDD2A6EA91C949 /* Debug */, 783 | 88A30B6F20FD6A3E326683E008FEC86A /* Release */, 784 | ); 785 | defaultConfigurationIsVisible = 0; 786 | defaultConfigurationName = Release; 787 | }; 788 | EEABF9B03A6987656A56C4FE3AD74933 /* Build configuration list for PBXNativeTarget "Pods-ActionStage_Tests" */ = { 789 | isa = XCConfigurationList; 790 | buildConfigurations = ( 791 | E56B4DF7A9A04715544993D4678162E3 /* Debug */, 792 | 56387C157ED745E74CFE7D78659AFC7E /* Release */, 793 | ); 794 | defaultConfigurationIsVisible = 0; 795 | defaultConfigurationName = Release; 796 | }; 797 | /* End XCConfigurationList section */ 798 | }; 799 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; 800 | } 801 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ActionStage/ActionStage-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 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ActionStage/ActionStage-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ActionStage : NSObject 3 | @end 4 | @implementation PodsDummy_ActionStage 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ActionStage/ActionStage-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/ActionStage/ActionStage-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 "ActionStage.h" 14 | #import "ASActor.h" 15 | #import "ASHandle.h" 16 | #import "ASTimer.h" 17 | #import "ASWatcher.h" 18 | 19 | FOUNDATION_EXPORT double ActionStageVersionNumber; 20 | FOUNDATION_EXPORT const unsigned char ActionStageVersionString[]; 21 | 22 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ActionStage/ActionStage.modulemap: -------------------------------------------------------------------------------- 1 | framework module ActionStage { 2 | umbrella header "ActionStage-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ActionStage/ActionStage.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ActionStage 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT} 6 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_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-ActionStage_Example/Pods-ActionStage_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ActionStage 5 | 6 | Copyright (c) 2019 coderyi 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2019 coderyi <coderyi@foxmail.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | ActionStage 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ActionStage_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ActionStage_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # frameworks to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 19 | 20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 22 | 23 | # Used as a return value for each invocation of `strip_invalid_archs` function. 24 | STRIP_BINARY_RETVAL=0 25 | 26 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 27 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 28 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 29 | 30 | # Copies and strips a vendored framework 31 | install_framework() 32 | { 33 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 34 | local source="${BUILT_PRODUCTS_DIR}/$1" 35 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 36 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 37 | elif [ -r "$1" ]; then 38 | local source="$1" 39 | fi 40 | 41 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 42 | 43 | if [ -L "${source}" ]; then 44 | echo "Symlinked..." 45 | source="$(readlink "${source}")" 46 | fi 47 | 48 | # Use filter instead of exclude so missing patterns don't throw errors. 49 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 50 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 51 | 52 | local basename 53 | basename="$(basename -s .framework "$1")" 54 | binary="${destination}/${basename}.framework/${basename}" 55 | 56 | if ! [ -r "$binary" ]; then 57 | binary="${destination}/${basename}" 58 | elif [ -L "${binary}" ]; then 59 | echo "Destination binary is symlinked..." 60 | dirname="$(dirname "${binary}")" 61 | binary="${dirname}/$(readlink "${binary}")" 62 | fi 63 | 64 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 65 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 66 | strip_invalid_archs "$binary" 67 | fi 68 | 69 | # Resign the code if required by the build settings to avoid unstable apps 70 | code_sign_if_enabled "${destination}/$(basename "$1")" 71 | 72 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 73 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 74 | local swift_runtime_libs 75 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) 76 | for lib in $swift_runtime_libs; do 77 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 78 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 79 | code_sign_if_enabled "${destination}/${lib}" 80 | done 81 | fi 82 | } 83 | 84 | # Copies and strips a vendored dSYM 85 | install_dsym() { 86 | local source="$1" 87 | if [ -r "$source" ]; then 88 | # Copy the dSYM into a the targets temp dir. 89 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 90 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 91 | 92 | local basename 93 | basename="$(basename -s .framework.dSYM "$source")" 94 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 95 | 96 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 97 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then 98 | strip_invalid_archs "$binary" 99 | fi 100 | 101 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 102 | # Move the stripped file into its final destination. 103 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 104 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 105 | else 106 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 107 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 108 | fi 109 | fi 110 | } 111 | 112 | # Copies the bcsymbolmap files of a vendored framework 113 | install_bcsymbolmap() { 114 | local bcsymbolmap_path="$1" 115 | local destination="${BUILT_PRODUCTS_DIR}" 116 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" 117 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" 118 | } 119 | 120 | # Signs a framework with the provided identity 121 | code_sign_if_enabled() { 122 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 123 | # Use the current code_sign_identity 124 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 125 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 126 | 127 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 128 | code_sign_cmd="$code_sign_cmd &" 129 | fi 130 | echo "$code_sign_cmd" 131 | eval "$code_sign_cmd" 132 | fi 133 | } 134 | 135 | # Strip invalid architectures 136 | strip_invalid_archs() { 137 | binary="$1" 138 | # Get architectures for current target binary 139 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 140 | # Intersect them with the architectures we are building for 141 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 142 | # If there are no archs supported by this binary then warn the user 143 | if [[ -z "$intersected_archs" ]]; then 144 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 145 | STRIP_BINARY_RETVAL=0 146 | return 147 | fi 148 | stripped="" 149 | for arch in $binary_archs; do 150 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 151 | # Strip non-valid architectures in-place 152 | lipo -remove "$arch" -output "$binary" "$binary" 153 | stripped="$stripped $arch" 154 | fi 155 | done 156 | if [[ "$stripped" ]]; then 157 | echo "Stripped $binary of architectures:$stripped" 158 | fi 159 | STRIP_BINARY_RETVAL=1 160 | } 161 | 162 | 163 | if [[ "$CONFIGURATION" == "Debug" ]]; then 164 | install_framework "${BUILT_PRODUCTS_DIR}/ActionStage/ActionStage.framework" 165 | fi 166 | if [[ "$CONFIGURATION" == "Release" ]]; then 167 | install_framework "${BUILT_PRODUCTS_DIR}/ActionStage/ActionStage.framework" 168 | fi 169 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 170 | wait 171 | fi 172 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_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_ActionStage_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ActionStage_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ActionStage" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ActionStage/ActionStage.framework/Headers" 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_LDFLAGS = $(inherited) -framework "ActionStage" 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-ActionStage_Example/Pods-ActionStage_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ActionStage_Example { 2 | umbrella header "Pods-ActionStage_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Example/Pods-ActionStage_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ActionStage" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ActionStage/ActionStage.framework/Headers" 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_LDFLAGS = $(inherited) -framework "ActionStage" 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-ActionStage_Tests/Pods-ActionStage_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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ActionStage_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ActionStage_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_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_ActionStage_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ActionStage_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ActionStage" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ActionStage/ActionStage.framework/Headers" 4 | OTHER_LDFLAGS = $(inherited) -framework "ActionStage" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ActionStage_Tests { 2 | umbrella header "Pods-ActionStage_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ActionStage_Tests/Pods-ActionStage_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ActionStage" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ActionStage/ActionStage.framework/Headers" 4 | OTHER_LDFLAGS = $(inherited) -framework "ActionStage" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /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/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 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ActionStageTests.m 3 | // ActionStageTests 4 | // 5 | // Created by coderyi on 09/16/2019. 6 | // Copyright (c) 2019 coderyi. All rights reserved. 7 | // 8 | 9 | @import XCTest; 10 | 11 | @interface Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Tests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 coderyi 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ActionStage 2 | 3 | 4 | 5 | 6 | 7 | 8 | ActionStage 来自于 Telegram 官方开源的 iOS 客户端。 9 | 10 | ActionStage 是一个消息通信、模块解耦的框架。 11 | 12 | ActionStage,消息的中枢派发模块 13 | 14 | Actor,处理 requestActor 的模块 15 | 16 | Watcher,观察协议,定义为接收 ActionStage 的消息 17 | 18 | Handle,定义为管理 Watcher,给 Watcher 发消息的模块 19 | 20 | 设计图如下 21 | 22 | ![](https://github.com/coderyi/ActionStage/blob/master/ActionStage.jpg) 23 | 24 | ## Installation 25 | 26 | ```ruby 27 | pod 'ActionStage' 28 | ``` 29 | 30 | ## Example 31 | 32 | 在 Example 文件夹下运行`pod install` 33 | 34 | ## Usage 35 | 36 | 37 | ### dispatchResource 38 | 39 | dispatchResource 类似于通知, 40 | 41 | 发送消息 42 | 43 | ``` 44 | [ActionStageInstance() dispatchResource:@"/as/unreadMessageCount" resource:[[NSNumber alloc] initWithInt:2]]; 45 | ``` 46 | 47 | 监听对应 path,在回调可以接收消息 48 | 49 | ``` 50 | _actionHandle = [[ASHandle alloc] initWithDelegate:self releaseOnMainThread:true]; 51 | 52 | [ActionStageInstance() watchForPaths:@[ 53 | @"/as/unreadMessageCount", 54 | ] watcher:self]; 55 | 56 | - (void)actionStageResourceDispatched:(NSString *)path resource:(id)resource arguments:(id)arguments; 57 | { 58 | NSLog(@"ResourceDispatch %@ %@", path, resource); 59 | } 60 | ``` 61 | 62 | ### requestActor 63 | 64 | requestActor 65 | 66 | ``` 67 | [ActionStageInstance() requestActor:@"/as/service/auth/sendCode" options:[[NSDictionary alloc] initWithObjectsAndKeys:@"123", @"phoneNumber", nil] watcher:self]; 68 | ``` 69 | 70 | 这时可以定义一个 Actor 处理 sendCode 的网络任务,如 ASTestSendCodeRequestActor 71 | 72 | ``` 73 | + (NSString *)genericPath 74 | { 75 | return @"/as/service/auth/sendCode"; 76 | } 77 | 78 | - (void)execute:(NSDictionary *)options 79 | { 80 | NSString *phoneNumber = [options objectForKey:@"phoneNumber"]; 81 | [self sendNetwork:phoneNumber]; 82 | } 83 | 84 | - (void)sendNetwork:(NSString *)phoneNumber 85 | { 86 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 87 | [ActionStageInstance() actionCompleted:self.path result:nil]; 88 | }); 89 | } 90 | ``` 91 | 92 | 93 | ### actionCompleted 94 | 95 | 当 Actor 执行完成后,可以发起 actionCompleted 96 | 97 | ``` 98 | [ActionStageInstance() actionCompleted:self.path result:nil]; 99 | ``` 100 | 101 | 在 Watcher 可以接收到消息 102 | 103 | ``` 104 | - (void)actorCompleted:(int)resultCode path:(NSString *)path result:(id)result 105 | { 106 | NSLog(@"requestActor completed %@",path); 107 | } 108 | ``` 109 | 110 | 111 | ## Author 112 | 113 | coderyi, coderyi@foxmail.com 114 | 115 | ## License 116 | 117 | ActionStage is available under the MIT license. See the LICENSE file for more info. 118 | --------------------------------------------------------------------------------