[英]How do I get Xcode to treat an Info.plist as an iPhone/iPad Info.plist?
[英]How to regenerate an iPhone Xcode info.plist file
我已将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的“File”菜单中选择“New File ...”。
在“新建文件”窗口中,选择左侧的“其他”,然后选择右侧的“属性列表”。
我也很难找到“Info.plist”文件,特别是某些C ++测试应用程序目标没有“Info”选项卡,因此必须手动完成此文件中的修改。
找到它:
在Xcode 7.3上测试过。
在我的情况下,我不得不在“App Transport Security Settings”中“允许任意加载”来恢复不安全的HTTP协议。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.