【问题标题】:CFBundleIdentifier", Does Not ExistCFBundleIdentifier”,不存在
【发布时间】:2016-09-06 00:58:13
【问题描述】:

我在 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>

【问题讨论】:

    标签: ios iphone react-native


    【解决方案1】:

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

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

    pod 安装 && pod 更新

    • 回到项目文件夹后---->运行命令: ·

    rm -rf node_modules && npm install

    清理 ios 构建文件夹: ·

    rm -rf ios/构建

    之后,照常运行: ·

    react-native run-ios

    【讨论】:

      【解决方案2】:

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

      【讨论】:

      • 我设置了这个值。 $(foo) 究竟是如何工作的?也许我需要在其他地方设置那个环境值?
      【解决方案3】:

      将 facebook rnfbsdk 框架放入 ~/documents/ 文件夹后问题解决。

      【讨论】:

      • 我认为这个答案不完整
      猜你喜欢
      • 2018-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-09
      • 2016-09-24
      • 2019-02-27
      • 1970-01-01
      • 2019-04-26
      相关资源
      最近更新 更多