【问题标题】:Xcode 11.3.1 Failed to load Info.plist from bundle at pathXcode 11.3.1 无法从路径中的包加载 Info.plist
【发布时间】:2020-05-13 09:21:32
【问题描述】:

我的 React Native 项目在 Xcode 升级到版本 11.3.1 后停止工作。错误如下

Could not install at this time.
Failed to load Info.plist from bundle at path /Users/dmytro/Library/Developer/CoreSimulator/Devices/F0BD5650-04A4-4534-B3F6-56B74ED1B0C2/data/Library/Caches/com.apple.mobile.installd.staging/temp.aRWRdh/extracted/Target.app/Frameworks/RCTVibration.framework; Extra info about plist: ACL=<not found

和细节

Details

This app could not be installed at this time.
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Could not install at this time.
Recovery Suggestion: Failed to load Info.plist from bundle at path /Users/dmytro/Library/Developer/CoreSimulator/Devices/F0BD5650-04A4-4534-B3F6-56B74ED1B0C2/data/Library/Caches/com.apple.mobile.installd.staging/temp.aRWRdh/extracted/Target.app/Frameworks/RCTVibration.framework; Extra info about plist: ACL=<not found> 
--
Failed to load Info.plist from bundle at path /Users/dmytro/Library/Developer/CoreSimulator/Devices/F0BD5650-04A4-4534-B3F6-56B74ED1B0C2/data/Library/Caches/com.apple.mobile.installd.staging/temp.aRWRdh/extracted/Target.app/Frameworks/RCTVibration.framework; Extra info about plist: ACL=<not found> 
Domain: MIInstallerErrorDomain
Code: 35
User Info: {
    FunctionName = "-[MIBundle _validateWithError:]";
    LegacyErrorString = PackageInspectionFailed;
    SourceFileLine = 128;
}
--

【问题讨论】:

    标签: ios xcode react-native cocoapods


    【解决方案1】:

    使用CocoaPods v1.9+,如果无法从Podfile中删除use_frameworks!,可以设置:

    use_frameworks! :linkage => :static
    

    现在 Swift 支持静态链接,CocoaPods 扩展了这个 DSL 以允许指定首选的链接类型。

    来源:https://blog.cocoapods.org/CocoaPods-1.9.0-beta/

    【讨论】:

    • 添加:linkage =&gt; :static有什么后果吗?
    • 谢谢伙计,花了很多时间。最后这行得通。但我的疑问也是一样的。这样做有什么后果吗?
    • @Ravi 不客气!我认为不会,因为 Cocoapods 使用它会生成带有静态链接库和模块映射文件的完整框架。
    【解决方案2】:

    我的解决方案是从Podfile 中删除use_frameworks!

    不要忘记pod install,清除模拟器上的派生数据和Erase All Content And Settings

    【讨论】:

    • 我遇到了同样的问题,但就我而言,我需要使用 use_frameworks!作为强制性的,寻找解决方案将近 1 天。但还是没有头绪
    • @JothiKannan 由于可可豆荚 1.5,不需要使用 use_frameworks!,请检查 blog.cocoapods.org/CocoaPods-1.5.0。为什么需要它?
    • 我正在使用这个pushy.me/docs/additional-platforms/react-native,需要use_frameworks!的推送通知SDK
    • 我没用过,建议尝试将cocoapods更新到最新版本,不用use_frameworks!也可以尝试使用
    • 我试过了,我有 cocopod 1.9.1 并没有use_frameworks! 尝试过,结果出现很多错误
    【解决方案3】:

    我在这里找到了带有屏幕截图的详细解决方案:

    https://handyopinion.com/solution-failed-to-load-info-plist-from-bundle-at-path-in-xcode/

    步骤:

    1. 移除 use_frameworks!来自 Podfile

    2.运行pod install命令

    3.删除派生数据文件夹的内容。为此导航到 xCode 中的File -&gt; Workspace Settings,然后导航到派生数据文件夹并删除其内容。

    【讨论】:

      【解决方案4】:

      转到YourTarget > Build Settings > Packaging > Info.plist File 并在此处检查您的.plist 文件的路径。

      此外,清除您的 derived data 文件夹并重新构建项目也会有所帮助。

      【讨论】:

      • 感谢您的回答,但 Info.plist 设置很好。错误指向 Pods 库,因此可能与 Pods 相关。
      • 那可能是因为有两个Plist文件。删除其中之一。另外,重启 Xcode 后,尝试在 xcodeproj 中为 plist 提供路径,您可以在某个地方最初提供路径。
      猜你喜欢
      • 2017-05-07
      • 2020-08-31
      • 2017-03-12
      • 1970-01-01
      • 2020-06-09
      • 1970-01-01
      • 2021-04-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多