Skip to content

Commit

Permalink
iOS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobar79 committed Dec 16, 2018
1 parent aafa762 commit 1ec7a87
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Web3Webview.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,11 +444,11 @@ class Web3Webview extends React.Component {
injectedJavaScriptForMainFrameOnly={
this.props.injectedJavaScriptForMainFrameOnly
}
injectJavaScript={this.props.injectJavaScript}
injectedJavaScript={
this.props.injectedJavaScript ||
injectJavaScript={
this.props.injectJavaScript ||
this.props.injectedOnStartLoadingJavaScript
}
injectedJavaScript={ this.props.injectedJavaScript }
bounces={this.props.bounces}
scrollEnabled={this.props.scrollEnabled}
contentInset={this.props.contentInset}
Expand Down
8 changes: 7 additions & 1 deletion ios/RNWeb3Webview.m
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,13 @@ - (BOOL)canGoForward

- (void)reload
{
[_webView reload];
NSURLRequest *request = [RCTConvert NSURLRequest:self.source];
if (request.URL && !_webView.URL.absoluteString.length) {
[self loadRequest:request];
}
else {
[_webView reload];
}
}

- (void)stopLoading
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-web3-webview",
"version": "1.2.1",
"version": "1.2.2",
"description": "A react native webview optimized for a web3 dApp browser application",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 1ec7a87

Please sign in to comment.