我已将我的 iPhone 应用程序从一台机器移动到另一台机器。在此过程中,我的 info.plist 文件似乎具有错误的包标识符并且无法正常工作。我想为我的项目创建一个全新的 info.plist 文件。
我怎样才能做到这一点?
这是一个干净的 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>
如果你只想要一个空的 info.plist 文件,那么只需在 XCode 的“文件”菜单上选择“新建文件...”。
在“新建文件”窗口中,您选择左侧的“其他”,然后选择右侧的“属性列表”。
我在查找“Info.plist”文件时也遇到了问题,尤其是某些 C++ 测试应用程序目标没有“Info”选项卡,因此必须手动修改此文件。
要找到它:
在 Xcode 7.3 上测试。
就我而言,我必须在“应用程序传输安全设置”中“允许任意加载”来恢复不安全的 HTTP 协议。