user2157677
user2157677

Reputation: 33

Performing a RACSignal Synchronously

I'm currently working on a WatchKit app and I'm currently having an issue with this given method:

- (void)application:(UIApplication*)application handleWatchKitExtensionRequest:(NSDictionary*)userInfo reply:(void (^)(NSDictionary* replyInfo))reply

My networking client is built on top of Reactive Cocoa and everything is performed asynchronously. For this method in the AppDelegate I need to fire off the reply response before the method finishes so I'm wondering if theres anyway to block the method from finishing until the RACSignal has been completed (subscribeCompleted).

Any help is great!

Cheers

Upvotes: 2

Views: 489

Answers (1)

Ian Henry
Ian Henry

Reputation: 22403

Yep! You're looking for waitUntilCompleted:.

Upvotes: 1

Related Questions