Skip to content

Instantly share code, notes, and snippets.

@sghiassy
Created September 25, 2015 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sghiassy/efd0f724904e93179251 to your computer and use it in GitHub Desktop.
Save sghiassy/efd0f724904e93179251 to your computer and use it in GitHub Desktop.
- (void)executeApplicationScript:(NSString *)script sourceURL:(NSURL *)URL onComplete:(RCTJavaScriptCompleteBlock)onComplete {
NSDictionary *message = @{
@"method": @"executeApplicationScript",
@"url": RCTNullIfNil(URL.absoluteString),
@"inject": _injectedObjects,
};
[self sendMessage:message waitForReply:^(NSError *error, NSDictionary *reply) {
onComplete(error);
}];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment