gpt4 book ai didi

iphone - 无法读取 Info.plist

转载 作者:行者123 更新时间:2023-12-03 18:25:28 25 4
gpt4 key购买 nike

我在 2 台 Mac 之间复制了一个项目。我收到有关 Xcode 4 ProcessInfoPlistFile 中未找到 Info.plist 的错误消息:

could not read data from '/Users/iamme/Documents/XCode/myapp/myapp/myapp-Info.plist': The file “myapp-Info.plist” couldn’t be opened because there is no such file.

按照 Xcode can't open Info.plist -- error says "there is no such file" 中的建议我去build设置并输入正确的路径 - 我从 Xcode 中显示的文件路径复制并粘贴了该路径。

不幸的是,在编译时我得到了完全相同的消息。那么 Info.plist 路径还存储在哪里?

更新:我已按照建议设置相对路径,但仍然收到错误(在事件日志中给出完整消息):

Process myapp/myapp-Info.plist
ProcessInfoPlistFile /Users/username/Library/Developer/Xcode/DerivedData/myapp-ancooijwpdbuzbbggnsalnhvckyr/Build/Products/Debug-iphonesimulator/myapp.app/Info.plist myapp/myapp-Info.plist
cd /Users/username/Documents/XCode/myapp
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-infoPlistUtility myapp/myapp-Info.plist -genpkginfo /Users/username/Library/Developer/Xcode/DerivedData/myapp-ancooijwpdbuzbbggnsalnhvckyr/Build/Products/Debug-iphonesimulator/myapp.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -o /Users/username/Library/Developer/Xcode/DerivedData/myapp-ancooijwpdbuzbbggnsalnhvckyr/Build/Products/Debug-iphonesimulator/myapp.app/Info.plist

最佳答案

此处不要使用绝对路径,请使用相对于项目文件的路径。

Xcode 项目的默认布局是这样的:

CodeName.xcodeproj
CodeName/
CodeName-Info.plist
CodeName-Prefix.pch

从图形上看,它在 Finder 中看起来像这样: Project Layout in Finder

在本例中,您希望 Info.plist 文件为 CodeName/CodeName-Info.plist

在这里,我选择了 Xcode 项目、目标,并使用搜索栏来限制显示的设置:

Info.plist setting

最后,检查您的项目是否包含来自正确位置的 info.plist 文件。

Info.plist location

关于iphone - 无法读取 Info.plist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9880184/

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