我使用 pkgbuild 创建了一个默认的组件属性列表文件。该文件如下所示:
<?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">
<array>
<dict>
<key>BundleHasStrictIdentifier</key>
<true/>
<key>BundleIsRelocatable</key>
<true/>
<key>BundleIsVersionChecked</key>
<true/>
<key>BundleOverwriteAction</key>
<string>upgrade</string>
<key>RootRelativeBundlePath</key>
<string>MyApp.app</string>
</dict>
</array>
</plist>
我想通过使用 shell 脚本来修改这个文件。我尝试使用默认写入,但它没有做任何事情。
怎么做?(例如:我想设置BundleIsRelocatable为false)