관리 메뉴

심재운 블로그

requireNativeComponent: "RNCWebView" was not found in the UIManager 본문

프로그래밍/ReactJS, React Native

requireNativeComponent: "RNCWebView" was not found in the UIManager

재우니 2019. 11. 5. 00:50

requireNativeComponent: "RNCWebView" was not found in the UIManager

/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React from 'react';
import WebView from 'react-native-webview';

const App: () => React$Node = () => {
  return (
    <>
      <WebView
        source={{uri: 'https://www.careertalk.kr'}}
        style={{marginTop: 20}}
      />
    </>
  );
};


export default App;

실행할 경우 webview 에 대해 제대로 설치가 안되어 실행이 되지 않은 에러 구문입니다.

오류가 발생할 경우, 아래와 같은 절차로 mac 의 터미널에서 실행하면 됩니다.

 

react-native link

cd ios

pod install

 

이제 잘 되는지 ios 을 가동시켜 봅시다.

npm run ios

 

 

참고사이트

https://github.com/react-native-community/react-native-webview/issues/851

0 Comments
댓글쓰기 폼