Skip to content
This repository was archived by the owner on Nov 11, 2019. It is now read-only.
This repository was archived by the owner on Nov 11, 2019. It is now read-only.

iOS: NSPOSIXErrorDomain Error Code 1 when using local source #39

Description

@jayporta

Hi. I started using this plugin just to hide the form bar above the keyboard in my app’s webview, but now I get an NSPOSIXErrorDomain error every time I install the app on a device, but the weird part is it only happens when the app is installed from Test Flight. The error does not appear when building it and running it on a device via Xcode.

This has never happened when using React Native’s built-in WebView.

I am using the allowFileAccessFromFileURLs prop.

      <WebView
            style={styles.webView}
            ref={(ref) => { this.webView = ref; }}
            scrollEnabled={false}
            javaScriptEnabled
            javaScriptEnabledAndroid
            hideAccessory
            allowFileAccessFromFileURLs
            source={require('./index.html')}
            onLoad={this.sendDataToWebview}
            onMessage={event => this.handleOnMessage(event.nativeEvent.data)}
            onNavigationStateChange={(event) => {
              // https://stackoverflow.com/a/40382325
              if (event.navigationType && event.navigationType === 'click') {
                this.webView.stopLoading();
                Linking.openURL(event.url);
              }
            }}
       />

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions