- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试以编程方式更改我的 XCode 项目的包标识符。
$ /usr/libexec/PlistBuddy -c "Set :CFBundleIndentifier com.myIdentifier.appName" MyApp-Info.plist
但我一直收到错误 -
Set: Entry, ":CFBundleIndentifier", Does Not Exist
这就是我的 Info-Plist 的样子,它有 CFBundleIndentifier 的条目。
<?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>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon-120</string>
<string>Icon.png</string>
<string>Icon@2x.png</string>
<string>Icon-iPad.png</string>
<string>Icon-iPad@2x.png</string>
</array>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon-152</string>
<string>Icon-76</string>
<string>Icon-120</string>
<string>Icon.png</string>
<string>Icon@2x.png</string>
<string>Icon-iPad.png</string>
<string>Icon-iPad@2x.png</string>
</array>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.myOldIdentifier.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.12</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIAppFonts</key>
<array>
<string>Gotham-Bold.otf</string>
<string>Gotham-BoldItalic.otf</string>
<string>Gotham-Book.otf</string>
<string>Gotham-BookItalic.otf</string>
<string>Gotham-Light.otf</string>
<string>Gotham-LightItalic.otf</string>
<string>Gotham-Medium.otf</string>
<string>Gotham-MediumItalic.otf</string>
</array>
<key>UIApplicationExitsOnSuspend</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
</dict>
</plist>
也许我用错了 PlistBuddy。如何使用命令行更改 XCode 项目的 Bundle 标识符。我需要将它添加到脚本中。
最佳答案
您拼错了 key 的名称。它应该是 CFBundleIdentifier 而不是 CFBundleIdentifier
关于iOS 使用 PlistBuddy 更改包标识符不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26449019/
我正在尝试编写一个脚本,在构建期间将设置添加到“设置”应用程序,而不会覆盖现有设置(如果存在)。这是我的脚本片段: PLISTBUDDY="/usr/libexec/PlistBuddy" SETTI
我正在尝试修改用户 Java 设置。我正在尝试将安全设置为 MEDIUM 。这是我到目前为止所拥有的,但它将其添加为另一个 dict 。我想将其添加到 /com/oracle/javadeployme
var="keychain-access-groups" declare -a val=$( /usr/libexec/PlistBuddy -c "Print $var" "sample.plist
我在 settings.bundle 中添加“版本详细信息”。有什么更好的方法来设置该标识符,我看到很少有人通过其他人使用带有 Plistbuddy 的运行脚本的代码来做到这一点。 是不是这样,如果你
我正在尝试以编程方式更改我的 XCode 项目的包标识符。 $ /usr/libexec/PlistBuddy -c "Set :CFBundleIndentifier com.myIdentifie
我正在使用 plistbuddy 读取一个 plist 文件;我正在从不同的词典中收集数据。 问题是有时值不存在,出于某种原因,所以我得到输出 "Key does not exist"。 有没有办法拦
这个问题是一个子问题/替代方法来解决我想通过这个问题做的事情:How can I use PListBuddy to copy an entry from one file to another? 我
我在使用 PlistBuddy 跟踪 .plist 并在命令行中更改它时遇到问题,我知道格式类似于“/usr/libexec/PlistBuddy -c”Set :items:2:assets: ww
目前我正在使用此代码 /usr/libexec/PlistBuddy -c "Set PreferenceSpecifiers:1:DefaultValue $productVersion" "T
在我的 Info.plist 文件中,我想修改 shell 上的 Plist 文件,如下所示: CFBundleURLTypes CFB
我想使用脚本将 UIFileSharingEnabled 键设置为 true。脚本代码: echo "set file sharing to true" BASE_PLIST="${SRCROOT}/
我知道这是一个简单而愚蠢的问题,但我找不到为什么会出错。我想在获取 xcarchive 文件后打印项目的应用程序版本。为此,我正在使用 PlistBuddy。 /usr/libexec/PlistBu
我想使用 plistbuddy 从 plist 中的字典中读取所有键,并将值推送到数组中。我知道下面的实用程序有助于阅读 plist。/usr/libexec/PlistBuddy 到目前为止,我正在
我想创建一个 iOS list 文件,用于通过无线方式分发 Ad-Hoc 和企业构建的 iOS 应用程序。 理想情况下,我可以使用 plistbuddy 自动执行此操作,以便可以通过构建脚本创建它。
我是一名优秀的程序员,十分优秀!