gpt4 book ai didi

iOS 使用 PlistBuddy 更改包标识符不起作用

转载 作者:可可西里 更新时间:2023-11-01 03:31:12 27 4
gpt4 key购买 nike

我正在尝试以编程方式更改我的 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com