iphone - Mac 中的 PLIST(属性列表)是否必须使用制表符/缩进?

标签 iphone macos plist

我已经创建了一个 PLIST。 PLIST的结构是这样的

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://10.87.145.105:8080/copy/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>title</key>
        <string>Sample</string>
        <key>title.short</key>
        <string>Sample1</string>
         </dict>
</plist>

这在 Mac/iPhone 中不被识别为 plist。 如果我删除那个额外的选项卡并进行相同的缩进,它可以在 mac 和 iPhone 中使用。 如下所示的缩进是 MAC 或 iPhone 识别该文件所必需的。

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://10.87.145.105:8080/copy/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>title</key>
    <string>Sample</string>
    <key>title.short</key>
    <string>Sample1</string>
</dict>
</plist>

最佳答案

刚刚尝试了一下,没有任何区别 - 我认为不应该,而且我是对的。

关于iphone - Mac 中的 PLIST(属性列表)是否必须使用制表符/缩进?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3405206/

相关文章:

iphone - 替换NSString中的字符列表

macos - 具有多个按钮的 NSStatusItem

python - 为什么在 Mac 上键入括号时 Python 的 IDLE 会崩溃?

iphone - 使用内存中持久存储作为临时区域是否可能/明智,如果可以,我该如何清除它?

iphone - MKMapView setRegion animated 不显示动画

macos - 在OS X中安装OpenCV 2.3(新版本)时出现问题

ios - iOS 中的身份验证和 session 管理

macos - 无法在 Mac Mojave 上使用 opencv 访问相机

objective-c - 在服务器上编辑 Plist

iphone - iOS 中无休止的重复滚动/动画背景?