gpt4 book ai didi

ios - Xcode 11 Swift 5 - 无法安装应用程序(无法加载 info.plist 文件)

转载 作者:行者123 更新时间:2023-12-03 02:52:09 27 4
gpt4 key购买 nike

正如标题所示,我无法在设备或模拟器上安装我的应用程序(但是构建成功)。仅当我使用 Cocoapods 时安装才会失败。

原因似乎是找不到已安装的各个 Pod 的 Info.plist 文件。

当我安装到模拟器时,我收到错误消息:

“此时无法安装此应用程序:无法从路径中的 bundle 加载 Info.plist ...有关 plist 的额外信息:ACL="

当我安装到我的设备时,收到错误消息:

“无法安装。”详细信息中的失败原因是“无法检查应用程序包。”

失败的 Pod(作为示例)是 ZIPFoundation 和 ReachabilitySwift。

在 Pods 项目下,如果我在 Targets 下选择框架,则没有可用的 Info.plist 文件,因此我不确定 plist 文件在 pods 安装过程中是否未被复制。

# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'

target 'app' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for app
pod 'ReachabilitySwift'
pod 'ZIPFoundation'

target 'appTests' do
inherit! :search_paths
# Pods for testing
end

target 'appUITests' do
# Pods for testing
end

end

我在 Xcode 11.2.1 中使用 Swift 5。

我已经尝试了很多解决方法但没有解决方案,因此我们将不胜感激有关该问题的任何提示和信息,因为我目前无法在我的项目中使用任何 Pod。

编辑:

我用一个新项目重现了这个问题。

在项目文件夹中,运行 pod init。添加 pod 'ReachabilitySwift' pods 安装开放工作区在模拟器上构建并运行 ->“此时无法安装此应用程序”

同样,这是使用 Xcode 11.2.1。

最佳答案

我今天也遇到了同样的问题。运行“pod install”后,我的 cocoapods 对于任何项目都卡住了。它突然发生,就在安装后:https://github.com/yiplee/YPNavigationBarTransition

然后我立即卸载了该插件并完全清除了缓存。还重新安装了cocoapods。没有运气。我现在正在尝试将 Xcode 升级到 12,希望能发生一些奇迹。

编辑:解决方法是为所有 pod 添加一个假 plist

general_pod_info.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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

enter image description here

关于ios - Xcode 11 Swift 5 - 无法安装应用程序(无法加载 info.plist 文件),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59688834/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com