CFBundleIdentifier",不存在

时间:2016-09-06 00:58:13

标签: ios iphone react-native

我在iOS的本机应用程序中遇到以下错误。

Installing build/Build/Products/Debug-iphonesimulator/Este.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/Este.app/Info.plist
    Print: Entry, ":CFBundleIdentifier", Does Not Exist

但是我看到Info.plist的CFBundleIdentifier如下所示。

<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>

我也尝试将上面改为

<key>CFBundleIdentifier</key>
 <string>com.myApp</string>

但同样的错误。请帮忙。

我还看到在上述错误

之前显示以下错误
node_modules/react-native-fbsdk/ios/RCTFBSDK/share/RCTFBSDKShareDialog.h:21:9: fatal error: 
      'FBSDKShareKit/FBSDKShareKit.h' file not found
#import <FBSDKShareKit/FBSDKShareKit.h>

3 个答案:

答案 0 :(得分:4)

在我错过了这个错误的时间之后,我找到了解决方案,问题出在pods中,可能是在更新某些库时,pods不同步。

我的解决方案: 转到/ ios文件夹----&gt;并运行命令: ·

  

pod install&amp;&amp; pod更新

  • 回到项目文件夹后----&gt;并运行命令: ·
  

rm -rf node_modules&amp;&amp; npm install

清理ios构建文件夹: ·

  

rm -rf ios / build

之后,像往常一样运行: ·

  

react-native run-ios

答案 1 :(得分:1)

您可以尝试将其更改为$(PRODUCT_BUNDLE_IDENTIFIER)

答案 2 :(得分:-4)

将facebook rnfbsdk框架放在〜/ documents /文件夹中后问题得以解决。