fix signalEvent on iOS

This commit is contained in:
Roman Volosovskyi 2016-12-14 13:58:17 +02:00
parent 61100a1bc7
commit 6ab45b692f
3 changed files with 9 additions and 2 deletions

View File

@ -3,4 +3,5 @@
#import "RCTLog.h" #import "RCTLog.h"
@interface Status : NSObject <RCTBridgeModule> @interface Status : NSObject <RCTBridgeModule>
+ (void)signalEvent:(const char *) signal;
@end @end

View File

@ -283,11 +283,15 @@ RCT_EXPORT_METHOD(setSoftInputMode: (NSInteger) i) {
#endif #endif
} }
+ (void)signalEvent:(char *) signal + (void)signalEvent:(const char *) signal
{ {
if(!signal){ if(!signal){
#if DEBUG
NSLog(@"SignalEvent nil");
#endif
return; return;
} }
NSString *sig = [NSString stringWithUTF8String:signal]; NSString *sig = [NSString stringWithUTF8String:signal];
#if DEBUG #if DEBUG
NSLog(@"SignalEvent"); NSLog(@"SignalEvent");
@ -295,6 +299,8 @@ RCT_EXPORT_METHOD(setSoftInputMode: (NSInteger) i) {
#endif #endif
[bridge.eventDispatcher sendAppEventWithName:@"gethEvent" [bridge.eventDispatcher sendAppEventWithName:@"gethEvent"
body:@{@"jsonEvent": sig}]; body:@{@"jsonEvent": sig}];
return;
} }
@end @end

View File

@ -25,7 +25,7 @@
<artifactItem> <artifactItem>
<groupId>status-im</groupId> <groupId>status-im</groupId>
<artifactId>status-go-ios-simulator</artifactId> <artifactId>status-go-ios-simulator</artifactId>
<version>restart-rpc2</version> <version>restart-rpc3</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite> <overWrite>true</overWrite>
<outputDirectory>./</outputDirectory> <outputDirectory>./</outputDirectory>