8

我已将我的 iPhone 应用程序从一台机器移动到另一台机器。在此过程中,我的 info.plist 文件似乎具有错误的包标识符并且无法正常工作。我想为我的项目创建一个全新的 info.plist 文件。

我怎样才能做到这一点?

4

3 回答 3

11

这是一个干净的 info.plist 给你。不要忘记替换 xxx.yyy,并重命名 xib 文件(如果需要)

<?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>English</string>
    <key>CFBundleDisplayName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIconFile</key>
    <string>Icon.png</string>
    <key>CFBundleIdentifier</key>
    <string>xxx.yyy.${PRODUCT_NAME:rfc1034identifier}</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSMainNibFile</key>
    <string>MainWindow</string>
</dict>
</plist>
于 2009-08-26T21:38:31.450 回答
5

如果你只想要一个空的 info.plist 文件,那么只需在 XCode 的“文件”菜单上选择“新建文件...”。

在“新建文件”窗口中,您选择左侧的“其他”,然后选择右侧的“属性列表”。

于 2009-08-26T21:14:35.147 回答
3

我在查找“Info.plist”文件时也遇到了问题,尤其是某些 C++ 测试应用程序目标没有“Info”选项卡,因此必须手动修改此文件。

要找到它:

  1. 在项目导航器中选择项目
  2. 选择所需的目标(项目可以有多个目标)
  3. 选择选项卡“构建设置”
  4. 搜索条目“Info.plist 文件”。在那里你应该找到这个文件的路径

在 Xcode 7.3 上测试。

就我而言,我必须在“应用程序传输安全设置”中“允许任意加载”来恢复不安全的 HTTP 协议。

于 2016-04-26T13:03:34.187 回答