ios – Error Utilizing react-native-static-server for Loading Native HTML in WebView (Goal C BOOL Conversion Problem)

0
21
ios – Error Utilizing react-native-static-server for Loading Native HTML in WebView (Goal C BOOL Conversion Problem)


I’m growing a React Native app with a WebView to load an HTML bundle from the native file system. I’m specializing in iOS growth first and can work on Android later.

Under is the code I’m utilizing to load the HTML file:

App.js

import RNFS from 'react-native-fs';

const pathURI =
    Platform.OS === 'android'
      ? 'file:///android_asset/samples/index.html'
      : `${RNFS.MainBundlePath}/samples/index.html`;

 {
    const {nativeEvent} = syntheticEvent;
    console.log('WebView error:', nativeEvent);
  }}
  onHttpError={syntheticEvent => {
    const {nativeEvent} = syntheticEvent;
    console.log('HTTP error:', nativeEvent);
  }}
  onMessage={occasion => {
    console.log('WebView log:', occasion.nativeEvent.knowledge);
  }}
/>

index.html



  
    
    
    
  
  
    

LOADING...