Support iOS FlipperConnection send with array parameters
Summary: Achieving API parity with C++ and Android. Reviewed By: lblasa Differential Revision: D31921830 fbshipit-source-id: 873901107fc3c53166fa7bbaaff65ebdb0e53c2a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4a4cc21d89
commit
64df212cd3
@@ -25,12 +25,20 @@
|
||||
|
||||
#pragma mark - SonarConnection
|
||||
|
||||
- (void)send:(NSString*)method withParams:(NSDictionary*)params {
|
||||
- (void)sendInternal:(NSString*)method withParams:(id)params {
|
||||
conn_->send(
|
||||
[method UTF8String],
|
||||
facebook::cxxutils::convertIdToFollyDynamic(params, true));
|
||||
}
|
||||
|
||||
- (void)send:(NSString*)method withParams:(NSDictionary*)params {
|
||||
[self sendInternal:method withParams:params];
|
||||
}
|
||||
|
||||
- (void)send:(NSString*)method withArrayParams:(NSArray*)params {
|
||||
[self sendInternal:method withParams:params];
|
||||
}
|
||||
|
||||
- (void)receive:(NSString*)method withBlock:(SonarReceiver)receiver {
|
||||
const auto lambda =
|
||||
[receiver](
|
||||
|
||||
@@ -23,6 +23,11 @@ Invoke a method on the Sonar desktop plugin with with a matching identifier.
|
||||
*/
|
||||
- (void)send:(NSString*)method withParams:(NSDictionary*)params;
|
||||
|
||||
/**
|
||||
Invoke a method on the Sonar desktop plugin with with a matching identifier.
|
||||
*/
|
||||
- (void)send:(NSString*)method withArrayParams:(NSArray*)params;
|
||||
|
||||
/**
|
||||
Register a receiver to be notified of incoming calls of the given method from
|
||||
the Sonar desktop plugin with a matching identifier.
|
||||
|
||||
Reference in New Issue
Block a user