When I run react-native run-ios
the build succeeds but I get the error below. I've checked all over the place but nothing seems to be working. Using sudo
in front of the command does not help either. I am using Xcode 7.3, react-native-cli: 0.2.0, react-native: 0.24.1, node v5.11.0.
当我运行反应堆本机运行时,构建成功了,但是我得到了下面的错误。我到处都找过了,但似乎什么也没有。在命令前面使用sudo也没有帮助。我使用的是Xcode 7.3,反应式本机-cli: 0.2.0,反应式本机:0.24.1,节点v5.11.0。
=== BUILD TARGET mobileTests OF PROJECT mobile WITH CONFIGURATION Release ===
Check dependencies
** BUILD SUCCEEDED **
Installing build/Build/Products/Debug-iphonesimulator/mobile.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
/Users/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/done.js:10
throw err;
^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/mobile.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:470:13)
at Object.execFileSync (child_process.js:490:13)
at _runIOS (runIOS.js:91:34)
at runIOS.js:24:5
at tryCallTwo (/Users/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/core.js:45:5)
at doResolve (/Users/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/core.js:200:13)
at new Promise (/Users/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (runIOS.js:23:10)
at Object.run (/Users/astiefel/workspace/bosspayments/mobile/node_modules/react-native/local-cli/cli.js:86:13)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)
23 个解决方案
#1
24
Open Project in XCode
在XCode中开放项目
If Xcode > 9 run command react-native upgrade
如果Xcode > 9运行命令反应,本地升级。
then
然后
1.Go to File -> Project settings
1。转到File ->项目设置
2.Click the Advanced button
2。单击高级按钮
3.Select "Custom" and select "Relative to Workspace" in the pull down
3所示。在下拉菜单中选择“自定义”并选择“相对于工作区”
4.Change "Build/Products" to "build/Build/Products"
4所示。“构建/产品”改为“构建/构建/产品”
5.click done, done
5。点击完成,完成
#2
17
Update React using react-native upgrade
did it for me.
更新的反应使用的是本地的升级。
Disclaimer: this overwrites all your iOS configurations, use with caution!
免责声明:这将覆盖所有iOS配置,小心使用!
#3
8
My problem was actually that my build was in Release mode instead of Debug mode. As a result, the identifier was pointing to something that was not in existence. I changed the build type and it ended up working.
我的问题实际上是我的构建处于发布模式而不是调试模式。结果,标识符指向不存在的东西。我更改了构建类型,并最终完成了工作。
#4
6
I also came across this issue as well and I found a way to fix it
我也遇到了这个问题,我找到了解决问题的方法。
Here is what i did:
我所做的是:
1) Make sure there is no white spaces in the file directory.
1)确保文件目录中没有空格。
2) cd project directory
2)cd项目目录
3) run command react-native upgrade
3)运行命令堆本地升级
4) Go to native ios folder and open xcode project.
4)进入本机ios文件夹,打开xcode项目。
5) Go to File > Project Settings > Advanced...
5)进入文件>项目设置>高级…
6) select custom > Relative to workspace
6)选择自定义>相对于工作区。
7) products path should be 'build/Build/Products'
7)产品路径应该是“构建/构建/产品”
8) intermediates path should be 'build/Build/Intermediates'
8)中介路径应该是“构建/构建/中介”
9) now try running command in your terminal react-native run-ios
9)现在尝试运行命令在您的终端反应堆本机运行
I hope that this solutions will help some of us facing this issue.
我希望这一解决办法将有助于我们中一些人面对这一问题。
#5
4
I had this happen to me when my node_modules folder got screwy after installing a new package. I killed the folder rm -rf node_modules
and then did an npm install
to re-install my packages and that fixed it.
当我的node_modules文件夹在安装了新包后出现问题时,我就遇到了这种情况。我删除了rm -rf node_modules文件夹,然后进行了npm安装以重新安装我的包,并修复了它。
#6
3
If you've received this error, then you probably do not have the correct path for your application.
如果您已经收到这个错误,那么您的应用程序可能没有正确的路径。
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2): Failed to install the requested application An application bundle was not found at the provided path. Provide a valid path to the desired application bundle. Print: Entry, ":CFBundleIdentifier", Does Not Exist
处理命令时遇到错误(domain=NSPOSIXErrorDomain, code=2):未能安装所请求的应用程序,在提供的路径中找不到应用程序包。为所需的应用程序包提供有效路径。打印:条目“:CFBundleIdentifier”不存在
React Native has hardcoded it as part of their run-ios command in runIOS.js
React Native已将其硬编码为runIOS.js中run-ios命令的一部分
build/Build/Products/${configuration}-${isDevice ? 'iphoneos' : 'iphonesimulator'}/${appName}.app
Unfortunately, Xcode has different build paths depending on your configuration and on whether you are using an Xcode Project or Workspace. I believe the default path for an Xcode Project is build/Products
.
I submitted this pull request 11899 to give programmers more flexibility from the CLI.
不幸的是,Xcode有不同的构建路径,这取决于您的配置,以及您是在使用Xcode项目还是工作区。我认为Xcode项目的默认路径是build/Products。我在11899年提交了这个拉请求,以便程序员从CLI中获得更大的灵活性。
#7
1
the 0.44 is ok to run,but 0.45 can not,maybe is the version problem i solved this by the following command: rninit init TaxiApp --source react-native@0.44.0;
0.44可以运行,但0.45不能,也许是版本的问题我解决了通过以下命令:rninit init TaxiApp——react-native@0.44.0来源;
#8
1
For react-native@0.46.4
the following did the trick for me:
对于反应炉-native@0.46.4,以下是我的诀窍:
1) Check your paths, open your .xcodeproj (not .xcworkspace) file and:
1)检查路径,打开.xcodeproj(不是.xcworkspace)文件,并:
-
go to File > Project Settings > Advanced
进入文件>项目设置>高级
-
custom > Relative to workspace
相对于工作区自定义>
- set the products path to
'build/Build/Products'
- 将产品路径设置为“构建/构建/产品”
- set the intermediates path to
'build/Build/Intermediates'
- 设置“构建/构建/中间体”的中间路径
- press done and save your changes
- 按完成并保存更改
2) Run rm -rf ios/build
in your project's root directory
2)在项目的根目录中运行rm -rf ios/build
3) Close your react packager
3)关闭你的反应包装机
4) Run react-native run-ios
again
4)再次运行堆本地运行
#9
1
Adding, it works for me, when nothing above fixes:
另外,它对我来说是适用的,当上面没有任何修正时:
- Install react-native-git-upgrade and update your project.
npm i -g react-native-git-upgrade && react-native-git-upgrade
- 安装反应器-本机-单元升级并更新项目。npm i -g反应堆本机-单元升级和反应堆本机-单元升级
- Open Xcode -> File -> Project settings -> Advanced.
- 打开Xcode ->文件->项目设置->高级。
- Select "Custom", then select "Relative to Workspace" and then click done, done.
- 选择“Custom”,然后选择“Relative to Workspace”,然后单击“done, done”。
- Update your CLI.
npm i -g react-native-cli
- 更新你的CLI。npm我- g react-native-cli
- Update your Nodejs 8 and NPM.
nvm install --lts
andnvm install-latest-npm
- 更新Nodejs 8和NPM。nvm安装—lts和nvm安装—最新的npm
- Remove ios/build and node_modules (in your project root path)
- 删除ios/build和node_modules(在项目根路径中)
- Proceed again with
npm install
andreact-native run-ios
, and give me a hug :-) - 继续进行npm安装和反应本机运行-ios,并给我一个拥抱:
It finally works here.
这里最后的作品。
- Mac OS High Sierra 10.13.4
- Mac OS High Sierra 10.13.4
- Xcode 9.3
- Xcode 9.3
- NPM 5.8.0
- NPM 5.8.0
- Node 8.11.1
- 节点8.11.1
- RN 0.55.2
- RN 0.55.2
#10
0
Have you checked that you declared a bundle identifier? You can do this by Clicking on your project file in xcode and then selecting the general tab and it is listed under the first text box under "Identity". Another way to check is to check in your info.plist file in the ios folder of your project. This is how it shows in my info.plist. My actual bundle identifier for my project is in xcode.
你检查过你声明的bundle标识符吗?您可以在xcode中单击项目文件,然后选择general选项卡,该选项卡在“Identity”的第一个文本框下列出。另一种检查方法是检查你的信息。项目ios文件夹中的plist文件。这就是它在我的info.plist中显示的方式。我项目的实际包标识符在xcode中。
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
#11
0
I updated Xcode to v8 and the error was resolved.
我将Xcode更新为v8,错误得到了解决。
#12
#13
0
I found how to solve the issue: do NOT use space in your project path! ???? ????
我发现如何解决这个问题:不要在你的项目路径中使用空间!????????
#14
0
My terminal pops out the same message due to deleting some simulators I don't use in Xcode.
我的终端弹出相同的消息,因为删除了一些我在Xcode中不使用的模拟器。
If you run react-native run-ios
with no specific parameters, react-native will run the default simulator which is iPhone 6 with iOS 10.3.1 in my case and I deleted this simulator by chance.
如果你在没有特定参数的情况下运行核反应堆原生运行,核反应堆原生会运行默认的模拟器,在我的例子中是iPhone 6和ios10.3.1,我偶然删除了这个模拟器。
Here comes my error messages:
下面是我的错误信息:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ id:F3A7BF54-B827-4517-A30D-8B3241C8EBF8 }
Available destinations for the "albums" scheme:
{ platform:iOS Simulator, id:CD64F26B-045A-4E27-B05A-5255924095FB, OS:10.3.1, name:iPad Pro (9.7 inch) }
{ platform:iOS Simulator, id:8FC41950-9E60-4264-B8B6-20E62FAB3BD0, OS:10.3.1, name:iPad Pro (10.5-inch) }
{ platform:iOS Simulator, id:991C8B5F-49E2-4BB7-BBB6-2F5D1776F8D2, OS:10.3.1, name:iPad Pro (12.9 inch) }
{ platform:iOS Simulator, id:B9A80D04-E43F-43E3-9CA5-21137F7C673D, OS:10.3.1, name:iPhone 7 }
{ platform:iOS Simulator, id:58F6514E-185B-4B12-9336-B8A1D4E901F8, OS:10.3.1, name:iPhone 7 Plus }
. . .
。
Installing build/Build/Products/Debug-iphonesimulator/myapp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/myapp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
In order to get rid of these, open up your Xcode and check for available simulators (as same as terminal listed) and run react-native run-ios --simulator="your device name"
为了摆脱这些,打开您的Xcode并检查可用的模拟器(与所列出的终端相同),并运行“您的设备名称”
For my case, I run react-native run-ios --simulator="iPhone 7"
, the problem solved.
在我的例子中,我运行的是反应堆本地运行的run-ios——模拟器=“iPhone 7”,这个问题就解决了。
#15
0
MAC Solution for people facing this issue with react-native version 0.45.1
MAC解决方案,供面临这个问题的人使用
After going through many solutions this is what I have compiled it to
在经历了许多解决方案之后,这就是我编译它的目的
-
First and foremost important step is to ensure you have latest Xcode version running on your Mac.
首先也是最重要的一步是确保在Mac上运行最新的Xcode版本。
-
Check if your project name contains spaces. If it so kindly remove the spaces.
检查项目名称是否包含空格。如果可以的话,请把空格去掉。
-
Many Users including me found this issue due to the latest released version of react-native 0.45.1 so if you are one using this version you can downgrade to more stable version (i.e 0.44.0) using the step below
包括我在内的许多用户都发现了这个问题,这是由于最新版本的反应式本机0.45.1导致的,所以如果您是使用这个版本的用户,您可以降级为更稳定的版本(i)。e 0.44.0)使用下面的步骤
To check your current react-native version type
检查当前的反应堆本机版本类型
react-native -v
react-native - v
3.1 If you have your project created.
3.1如果创建了项目。
Go to your current Project directory through terminal and type
npm install react-native-git-upgrade (If already installed, skip this step)
npm安装反应-本机-git升级(如果已经安装,跳过这一步)
react-native-git-upgrade 0.44.0
react-native-git-upgrade 0.44.0
Downgrading to this version solved my problem.
降级到这个版本解决了我的问题。
3.2 If you are about to create a new project try using the line below
3.2如果您要创建一个新项目,请使用下面的行
react-native init ProjectName -v 0.44.0
反应堆本机init项目名称-v 0.44.0
replace ProjectName with your project name.
将项目名替换为项目名。
After installation check your current version of react-native and version specified while installation if both match. If not then try step 3.1 after project creation.
安装后,请检查您当前版本的本地版本和安装时指定的版本。如果没有,请在项目创建后尝试步骤3.1。
If still the same problem exists please comment below so that I may try finding few more workarounds.
如果仍然存在同样的问题,请在下面评论,以便我可以尝试找到更多的解决方案。
#16
0
This worked for me. Follow steps https://facebook.github.io/react-native/docs/getting-started.html (Building Projects with Native Code).
这为我工作。遵循步骤https://facebook.github.io/react-native/docs/getting-started。html(使用本地代码构建项目)。
Before running react-native run-ios command, download boost node module from https://sourceforge.net/projects/boost/files/boost/1.63.0/ and replace node_modules/react-native/third-party/boost_1_63_0
运行machine -native - run-ios命令之前,从https://sourceforge.net/projects/boost/files/boost/boost/1.63.0/下载boost节点模块,替换node_modules/反应物-native/第三方/boost_1_63_0
Now run react-native run-ios command
现在运行反应堆本机run-ios命令
#17
0
When you run npm install
command some time internet issue problem, Files in node_modules\react-native\third-party
is not properly downloaded so please check this is properly downloaded or not if no please remove node_modules and install it again
当您运行npm安装命令时,出现了一些网络问题,node_modules\堆本地\第三方的文件没有被正确下载,所以请检查这个文件是否被正确下载,如果没有,请删除node_modules并重新安装它
then run react-native run-ios
command
然后运行反应堆本机run-ios命令
#18
0
After a couple of months trying all the answers, I finally update my OS to Sierra, Update XCode to the latest version and with that all the errors disappear. Hope this could help some folks out there!
在尝试了几个月的所有答案之后,我终于将我的操作系统更新到Sierra,将XCode更新到最新的版本,这样所有的错误都消失了。希望这能帮助一些人!
#19
0
For me it was a problem with accidently setting up modules using Cocoapods & react-native link
at the same time.
对我来说,这是一个意外地使用Cocoapods和反应堆原生链接建立模块的问题。
Don't mix those two for same modules!
不要把这两个模块混在一起!
#20
0
I have resolved this problem removing the build folder on my iOS project and building again.
我已经解决了这个问题,删除了iOS项目上的build文件夹并再次构建。
$ rm -rf ios/build/
$ react-native run-ios
#21
0
Unfortunately, none of the mentioned solutions worked for me.
不幸的是,上面提到的解决方案对我都不起作用。
After trying out some of the answers from this issue, the following finally did work:
在尝试了这个问题的一些答案之后,下面的方法终于奏效了:
As one or more of the required iOS third-party libraries were not properly downloaded to ~/.rncache
(meaning the files in there were corrupted and could not be unzipped), I removed the content of this folder, ran react-native run-ios
again, and this eventually did the trick.
由于一个或多个必需的iOS第三方库没有被正确地下载到~/。rncache(意味着里面的文件已经损坏,无法解压),我删除了这个文件夹的内容,再次运行了基于堆的run-ios,这最终成功了。
#22
0
FIX FOR OSX EL CAPITAN
修复OSX EL CAPITAN
I'm still on OSX 10.11.6 with XCode 8.2.1 ... will upgrade someday but not today. I was able to get past the :CFBundleIdentifier error by downgrading react native to 52.0
我还在使用OSX 10.11.6和XCode 8.2.1…总有一天会升级,但不是今天。通过降级response为52.0,我通过了:CFBundleIdentifier错误
yarn upgrade react-native@52.0
纱升级react-native@52.0
Got me a successful build on the simulator. Cheers!
让我在模拟器上成功构建。干杯!
#23
0
Closing as resolved. Please use Xcode 9.
关闭解决。请使用Xcode 9。
#1
24
Open Project in XCode
在XCode中开放项目
If Xcode > 9 run command react-native upgrade
如果Xcode > 9运行命令反应,本地升级。
then
然后
1.Go to File -> Project settings
1。转到File ->项目设置
2.Click the Advanced button
2。单击高级按钮
3.Select "Custom" and select "Relative to Workspace" in the pull down
3所示。在下拉菜单中选择“自定义”并选择“相对于工作区”
4.Change "Build/Products" to "build/Build/Products"
4所示。“构建/产品”改为“构建/构建/产品”
5.click done, done
5。点击完成,完成
#2
17
Update React using react-native upgrade
did it for me.
更新的反应使用的是本地的升级。
Disclaimer: this overwrites all your iOS configurations, use with caution!
免责声明:这将覆盖所有iOS配置,小心使用!
#3
8
My problem was actually that my build was in Release mode instead of Debug mode. As a result, the identifier was pointing to something that was not in existence. I changed the build type and it ended up working.
我的问题实际上是我的构建处于发布模式而不是调试模式。结果,标识符指向不存在的东西。我更改了构建类型,并最终完成了工作。
#4
6
I also came across this issue as well and I found a way to fix it
我也遇到了这个问题,我找到了解决问题的方法。
Here is what i did:
我所做的是:
1) Make sure there is no white spaces in the file directory.
1)确保文件目录中没有空格。
2) cd project directory
2)cd项目目录
3) run command react-native upgrade
3)运行命令堆本地升级
4) Go to native ios folder and open xcode project.
4)进入本机ios文件夹,打开xcode项目。
5) Go to File > Project Settings > Advanced...
5)进入文件>项目设置>高级…
6) select custom > Relative to workspace
6)选择自定义>相对于工作区。
7) products path should be 'build/Build/Products'
7)产品路径应该是“构建/构建/产品”
8) intermediates path should be 'build/Build/Intermediates'
8)中介路径应该是“构建/构建/中介”
9) now try running command in your terminal react-native run-ios
9)现在尝试运行命令在您的终端反应堆本机运行
I hope that this solutions will help some of us facing this issue.
我希望这一解决办法将有助于我们中一些人面对这一问题。
#5
4
I had this happen to me when my node_modules folder got screwy after installing a new package. I killed the folder rm -rf node_modules
and then did an npm install
to re-install my packages and that fixed it.
当我的node_modules文件夹在安装了新包后出现问题时,我就遇到了这种情况。我删除了rm -rf node_modules文件夹,然后进行了npm安装以重新安装我的包,并修复了它。
#6
3
If you've received this error, then you probably do not have the correct path for your application.
如果您已经收到这个错误,那么您的应用程序可能没有正确的路径。
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2): Failed to install the requested application An application bundle was not found at the provided path. Provide a valid path to the desired application bundle. Print: Entry, ":CFBundleIdentifier", Does Not Exist
处理命令时遇到错误(domain=NSPOSIXErrorDomain, code=2):未能安装所请求的应用程序,在提供的路径中找不到应用程序包。为所需的应用程序包提供有效路径。打印:条目“:CFBundleIdentifier”不存在
React Native has hardcoded it as part of their run-ios command in runIOS.js
React Native已将其硬编码为runIOS.js中run-ios命令的一部分
build/Build/Products/${configuration}-${isDevice ? 'iphoneos' : 'iphonesimulator'}/${appName}.app
Unfortunately, Xcode has different build paths depending on your configuration and on whether you are using an Xcode Project or Workspace. I believe the default path for an Xcode Project is build/Products
.
I submitted this pull request 11899 to give programmers more flexibility from the CLI.
不幸的是,Xcode有不同的构建路径,这取决于您的配置,以及您是在使用Xcode项目还是工作区。我认为Xcode项目的默认路径是build/Products。我在11899年提交了这个拉请求,以便程序员从CLI中获得更大的灵活性。
#7
1
the 0.44 is ok to run,but 0.45 can not,maybe is the version problem i solved this by the following command: rninit init TaxiApp --source react-native@0.44.0;
0.44可以运行,但0.45不能,也许是版本的问题我解决了通过以下命令:rninit init TaxiApp——react-native@0.44.0来源;
#8
1
For react-native@0.46.4
the following did the trick for me:
对于反应炉-native@0.46.4,以下是我的诀窍:
1) Check your paths, open your .xcodeproj (not .xcworkspace) file and:
1)检查路径,打开.xcodeproj(不是.xcworkspace)文件,并:
-
go to File > Project Settings > Advanced
进入文件>项目设置>高级
-
custom > Relative to workspace
相对于工作区自定义>
- set the products path to
'build/Build/Products'
- 将产品路径设置为“构建/构建/产品”
- set the intermediates path to
'build/Build/Intermediates'
- 设置“构建/构建/中间体”的中间路径
- press done and save your changes
- 按完成并保存更改
2) Run rm -rf ios/build
in your project's root directory
2)在项目的根目录中运行rm -rf ios/build
3) Close your react packager
3)关闭你的反应包装机
4) Run react-native run-ios
again
4)再次运行堆本地运行
#9
1
Adding, it works for me, when nothing above fixes:
另外,它对我来说是适用的,当上面没有任何修正时:
- Install react-native-git-upgrade and update your project.
npm i -g react-native-git-upgrade && react-native-git-upgrade
- 安装反应器-本机-单元升级并更新项目。npm i -g反应堆本机-单元升级和反应堆本机-单元升级
- Open Xcode -> File -> Project settings -> Advanced.
- 打开Xcode ->文件->项目设置->高级。
- Select "Custom", then select "Relative to Workspace" and then click done, done.
- 选择“Custom”,然后选择“Relative to Workspace”,然后单击“done, done”。
- Update your CLI.
npm i -g react-native-cli
- 更新你的CLI。npm我- g react-native-cli
- Update your Nodejs 8 and NPM.
nvm install --lts
andnvm install-latest-npm
- 更新Nodejs 8和NPM。nvm安装—lts和nvm安装—最新的npm
- Remove ios/build and node_modules (in your project root path)
- 删除ios/build和node_modules(在项目根路径中)
- Proceed again with
npm install
andreact-native run-ios
, and give me a hug :-) - 继续进行npm安装和反应本机运行-ios,并给我一个拥抱:
It finally works here.
这里最后的作品。
- Mac OS High Sierra 10.13.4
- Mac OS High Sierra 10.13.4
- Xcode 9.3
- Xcode 9.3
- NPM 5.8.0
- NPM 5.8.0
- Node 8.11.1
- 节点8.11.1
- RN 0.55.2
- RN 0.55.2
#10
0
Have you checked that you declared a bundle identifier? You can do this by Clicking on your project file in xcode and then selecting the general tab and it is listed under the first text box under "Identity". Another way to check is to check in your info.plist file in the ios folder of your project. This is how it shows in my info.plist. My actual bundle identifier for my project is in xcode.
你检查过你声明的bundle标识符吗?您可以在xcode中单击项目文件,然后选择general选项卡,该选项卡在“Identity”的第一个文本框下列出。另一种检查方法是检查你的信息。项目ios文件夹中的plist文件。这就是它在我的info.plist中显示的方式。我项目的实际包标识符在xcode中。
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
#11
0
I updated Xcode to v8 and the error was resolved.
我将Xcode更新为v8,错误得到了解决。
#12
0
This work for me Click on the RCTWebSocket project in your navigator and remove the flags under build settings > custom compiler flags
我可以在导航器中单击RCTWebSocket项目,并删除build settings >自定义编译器标志下的标志
#13
0
I found how to solve the issue: do NOT use space in your project path! ???? ????
我发现如何解决这个问题:不要在你的项目路径中使用空间!????????
#14
0
My terminal pops out the same message due to deleting some simulators I don't use in Xcode.
我的终端弹出相同的消息,因为删除了一些我在Xcode中不使用的模拟器。
If you run react-native run-ios
with no specific parameters, react-native will run the default simulator which is iPhone 6 with iOS 10.3.1 in my case and I deleted this simulator by chance.
如果你在没有特定参数的情况下运行核反应堆原生运行,核反应堆原生会运行默认的模拟器,在我的例子中是iPhone 6和ios10.3.1,我偶然删除了这个模拟器。
Here comes my error messages:
下面是我的错误信息:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ id:F3A7BF54-B827-4517-A30D-8B3241C8EBF8 }
Available destinations for the "albums" scheme:
{ platform:iOS Simulator, id:CD64F26B-045A-4E27-B05A-5255924095FB, OS:10.3.1, name:iPad Pro (9.7 inch) }
{ platform:iOS Simulator, id:8FC41950-9E60-4264-B8B6-20E62FAB3BD0, OS:10.3.1, name:iPad Pro (10.5-inch) }
{ platform:iOS Simulator, id:991C8B5F-49E2-4BB7-BBB6-2F5D1776F8D2, OS:10.3.1, name:iPad Pro (12.9 inch) }
{ platform:iOS Simulator, id:B9A80D04-E43F-43E3-9CA5-21137F7C673D, OS:10.3.1, name:iPhone 7 }
{ platform:iOS Simulator, id:58F6514E-185B-4B12-9336-B8A1D4E901F8, OS:10.3.1, name:iPhone 7 Plus }
. . .
。
Installing build/Build/Products/Debug-iphonesimulator/myapp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/myapp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
In order to get rid of these, open up your Xcode and check for available simulators (as same as terminal listed) and run react-native run-ios --simulator="your device name"
为了摆脱这些,打开您的Xcode并检查可用的模拟器(与所列出的终端相同),并运行“您的设备名称”
For my case, I run react-native run-ios --simulator="iPhone 7"
, the problem solved.
在我的例子中,我运行的是反应堆本地运行的run-ios——模拟器=“iPhone 7”,这个问题就解决了。
#15
0
MAC Solution for people facing this issue with react-native version 0.45.1
MAC解决方案,供面临这个问题的人使用
After going through many solutions this is what I have compiled it to
在经历了许多解决方案之后,这就是我编译它的目的
-
First and foremost important step is to ensure you have latest Xcode version running on your Mac.
首先也是最重要的一步是确保在Mac上运行最新的Xcode版本。
-
Check if your project name contains spaces. If it so kindly remove the spaces.
检查项目名称是否包含空格。如果可以的话,请把空格去掉。
-
Many Users including me found this issue due to the latest released version of react-native 0.45.1 so if you are one using this version you can downgrade to more stable version (i.e 0.44.0) using the step below
包括我在内的许多用户都发现了这个问题,这是由于最新版本的反应式本机0.45.1导致的,所以如果您是使用这个版本的用户,您可以降级为更稳定的版本(i)。e 0.44.0)使用下面的步骤
To check your current react-native version type
检查当前的反应堆本机版本类型
react-native -v
react-native - v
3.1 If you have your project created.
3.1如果创建了项目。
Go to your current Project directory through terminal and type
npm install react-native-git-upgrade (If already installed, skip this step)
npm安装反应-本机-git升级(如果已经安装,跳过这一步)
react-native-git-upgrade 0.44.0
react-native-git-upgrade 0.44.0
Downgrading to this version solved my problem.
降级到这个版本解决了我的问题。
3.2 If you are about to create a new project try using the line below
3.2如果您要创建一个新项目,请使用下面的行
react-native init ProjectName -v 0.44.0
反应堆本机init项目名称-v 0.44.0
replace ProjectName with your project name.
将项目名替换为项目名。
After installation check your current version of react-native and version specified while installation if both match. If not then try step 3.1 after project creation.
安装后,请检查您当前版本的本地版本和安装时指定的版本。如果没有,请在项目创建后尝试步骤3.1。
If still the same problem exists please comment below so that I may try finding few more workarounds.
如果仍然存在同样的问题,请在下面评论,以便我可以尝试找到更多的解决方案。
#16
0
This worked for me. Follow steps https://facebook.github.io/react-native/docs/getting-started.html (Building Projects with Native Code).
这为我工作。遵循步骤https://facebook.github.io/react-native/docs/getting-started。html(使用本地代码构建项目)。
Before running react-native run-ios command, download boost node module from https://sourceforge.net/projects/boost/files/boost/1.63.0/ and replace node_modules/react-native/third-party/boost_1_63_0
运行machine -native - run-ios命令之前,从https://sourceforge.net/projects/boost/files/boost/boost/1.63.0/下载boost节点模块,替换node_modules/反应物-native/第三方/boost_1_63_0
Now run react-native run-ios command
现在运行反应堆本机run-ios命令
#17
0
When you run npm install
command some time internet issue problem, Files in node_modules\react-native\third-party
is not properly downloaded so please check this is properly downloaded or not if no please remove node_modules and install it again
当您运行npm安装命令时,出现了一些网络问题,node_modules\堆本地\第三方的文件没有被正确下载,所以请检查这个文件是否被正确下载,如果没有,请删除node_modules并重新安装它
then run react-native run-ios
command
然后运行反应堆本机run-ios命令
#18
0
After a couple of months trying all the answers, I finally update my OS to Sierra, Update XCode to the latest version and with that all the errors disappear. Hope this could help some folks out there!
在尝试了几个月的所有答案之后,我终于将我的操作系统更新到Sierra,将XCode更新到最新的版本,这样所有的错误都消失了。希望这能帮助一些人!
#19
0
For me it was a problem with accidently setting up modules using Cocoapods & react-native link
at the same time.
对我来说,这是一个意外地使用Cocoapods和反应堆原生链接建立模块的问题。
Don't mix those two for same modules!
不要把这两个模块混在一起!
#20
0
I have resolved this problem removing the build folder on my iOS project and building again.
我已经解决了这个问题,删除了iOS项目上的build文件夹并再次构建。
$ rm -rf ios/build/
$ react-native run-ios
#21
0
Unfortunately, none of the mentioned solutions worked for me.
不幸的是,上面提到的解决方案对我都不起作用。
After trying out some of the answers from this issue, the following finally did work:
在尝试了这个问题的一些答案之后,下面的方法终于奏效了:
As one or more of the required iOS third-party libraries were not properly downloaded to ~/.rncache
(meaning the files in there were corrupted and could not be unzipped), I removed the content of this folder, ran react-native run-ios
again, and this eventually did the trick.
由于一个或多个必需的iOS第三方库没有被正确地下载到~/。rncache(意味着里面的文件已经损坏,无法解压),我删除了这个文件夹的内容,再次运行了基于堆的run-ios,这最终成功了。
#22
0
FIX FOR OSX EL CAPITAN
修复OSX EL CAPITAN
I'm still on OSX 10.11.6 with XCode 8.2.1 ... will upgrade someday but not today. I was able to get past the :CFBundleIdentifier error by downgrading react native to 52.0
我还在使用OSX 10.11.6和XCode 8.2.1…总有一天会升级,但不是今天。通过降级response为52.0,我通过了:CFBundleIdentifier错误
yarn upgrade react-native@52.0
纱升级react-native@52.0
Got me a successful build on the simulator. Cheers!
让我在模拟器上成功构建。干杯!
#23
0
Closing as resolved. Please use Xcode 9.
关闭解决。请使用Xcode 9。