【问题标题】:How to regenerate an iPhone Xcode info.plist file如何重新生成 iPhone Xcode info.plist 文件
【发布时间】:2009-08-26 20:50:03
【问题描述】:

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

我该怎么做?

【问题讨论】:

标签: iphone xcode plist


【解决方案1】:

这是给你的一个干净的 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>

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      【解决方案3】:

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

      要找到它:

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

      在 Xcode 7.3 上测试。

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2022-01-12
        • 1970-01-01
        • 1970-01-01
        • 2015-04-09
        • 1970-01-01
        • 2014-07-30
        • 2017-06-03
        • 1970-01-01
        相关资源
        最近更新 更多