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"
@interface Status : NSObject <RCTBridgeModule>
+ (void)signalEvent:(const char *) signal;
@end

View File

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

View File

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