Last active
June 23, 2016 01:22
-
-
Save mactive/3cb2e2c53c3b9edf48a0793dae3c82cf to your computer and use it in GitHub Desktop.
iOS端的注入方法 __fbBatchedBridgeConfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file location | |
// node_module/react-native/Libraries/WebSocket | |
- (void)executeApplicationScript:(NSData *)script sourceURL:(NSURL *)URL onComplete:(RCTJavaScriptCompleteBlock)onComplete | |
{ | |
NSDictionary<NSString *, id> *message = @{ | |
@"method": @"executeApplicationScript", | |
@"url": RCTNullIfNil(URL.absoluteString), | |
@"inject": _injectedObjects, | |
}; | |
[self sendMessage:message waitForReply:^(NSError *error, NSDictionary<NSString *, id> *reply) { | |
onComplete(error); | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment