2015-03-26 5 views
1

После установки реагировать родной и запустить вновь созданный проект Xcode я получаю следующий результат:Ошибка запуска инициализированную реагировать-нативный проект в Xcode

2015-03-26 15:35:05.865 React[1427:7950] CLTilesManagerClient: initialize, sSharedTilesManagerClient 
2015-03-26 15:35:05.865 React[1427:7950] CLTilesManagerClient: init 
2015-03-26 15:35:05.866 React[1427:7950] CLTilesManagerClient: reconnecting, 0x7fac1b289e40 
RCTJSLog> "Running application "React" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF" 
RCTJSLog> "Error: 
stack: 
    React_render          index.ios.bundle:955 
    _renderValidatedComponentWithoutOwnerOrContext  index.ios.bundle:16453 
    _renderValidatedComponent       index.ios.bundle:16479 
    ReactCompositeComponent__renderValidatedComponent index.ios.bundle:4860 
    mountComponent          index.ios.bundle:15913 
    ReactCompositeComponent_mountComponent    index.ios.bundle:4860 
    mountComponent          index.ios.bundle:4929 
    mountComponentIntoNode        index.ios.bundle:15386 
    perform           index.ios.bundle:5992 
    batchedMountComponentIntoNode      index.ios.bundle:15405 
    perform           index.ios.bundle:5992 
    batchedUpdates          index.ios.bundle:13507 
    batchedUpdates          index.ios.bundle:4524 
    renderComponent         index.ios.bundle:15457 
    ReactMount__renderNewRootComponent     index.ios.bundle:4860 
    render            index.ios.bundle:1155 
    renderApplication         index.ios.bundle:33797 
    run            index.ios.bundle:33743 
    runApplication          index.ios.bundle:33765 
    jsCall            index.ios.bundle:7149 
    _callFunction          index.ios.bundle:7396 
    applyWithGuard          index.ios.bundle:877 
    guardReturn          index.ios.bundle:7198 
    callFunctionReturnFlushedQueue      index.ios.bundle:7405 
URL: http://localhost:8081/index.ios.bundle 
line: 955 
message: undefined is not a function (evaluating 'React.createElement(Text, {style: styles.welcome}, 
      "Welcome to React Native!" 
     )')" 

Любая помощь выяснить, почему это происходит сбой будет оценен ,

Спасибо!

+1

Удалось устранить ошибку симулятора, запустив «npm start» в справочном каталоге. Теперь с тестированием проблем на USB-подключенном iPhone. Получение этой ошибки: Не удалось подключиться к серверу разработки. Убедитесь, что сервер узла запущен - запустите «npm start» из React root Операция не может быть выполнена. (Ошибка NSURLErrorDomain - 1004.) – TimDOES

ответ

3

Для запуска на устройстве (которое является вашей второй проблемой), посмотрите на эти комментарии от React Native примеров:

https://github.com/facebook/react-native/blob/master/Examples/Movies/Movies/AppDelegate.m

To run on device, change localhost to the IP address of your computer, and make sure your computer and iOS device are on the same Wi-Fi network.

Я думаю, что это происходит потому, что приложение должно подключитесь к упаковщику. Посмотрите, поможет ли это.

+0

Это сработало. Спасибо! – TimDOES

Смежные вопросы