React Native iOS build не работает - PullRequest
0 голосов
/ 06 июня 2018

по какой-то причине, когда я пытаюсь собрать и запустить свое приложение, я получаю много ошибок

CompileC /Users/EcoSurvUser/Desktop/eco-surv/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/vlog_is_on.o /Users/EcoSurvUser/Desktop/eco-surv/node_modules/react-native/third-party/glog-0.3.4/src/vlog_is_on.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /Users/EcoSurvUser/Desktop/eco-surv/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/utilities.o /Users/EcoSurvUser/Desktop/eco-surv/node_modules/react-native/third-party/glog-0.3.4/src/utilities.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)

Installing build/Build/Products/Debug-iphonesimulator/ecosurv.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/ecosurv.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Самое интересное, что он работает на моем компьютере друзей

ОБНОВЛЕНИЕ:

Мой ios / build / dinfo.plist выглядит так:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>LastAccessedDate</key>
    <date>2018-06-06T10:17:34Z</date>
    <key>WorkspacePath</key>
    <string>/Users/EcoSurvUser/Desktop/eco- 
    surv/ios/ecosurv.xcodeproj</string>
</dict>
</plist>

Ответы [ 2 ]

0 голосов
/ 06 июня 2018

Не могли бы вы проверить, есть ли у вас Info.plist в ios / yourProjectName / info.plist, чтобы проверить, есть ли у вас CFBundlerIdentifier?

Если все в порядке с плитами, вы также можете запустить

sudo lsof -i :8081

Если найден результат, например:

node 7601 XXXX 23u IPv6 0xc6b249599e5f1169 0t0 TCP *:sunproxyadmin (LISTEN)

Завершить процесс

kill -9 7601

И повторить попытку:

react-native run-ios
0 голосов
/ 06 июня 2018

Вы можете попробовать, как показано ниже

Вам необходимо удалить как ios, android, так и папку модуля узла.Выполните следующие команды

> npm install //to get the node module folder

> react-native upgrade //to get android and ios folder

> react-native link // for linking the libraries

> react-native run ios/android
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...