iosshellinfo.plistcfbundledisplayname

Set: Cannot Perform Set On Containers


I am trying to update CFBundleName & CFBundleDisplayName in Info.plist using PlistBuddy

 /usr/libexec/PlistBuddy -c "Set : CFBundleName test" info.plist
 /usr/libexec/PlistBuddy -c "Set : CFBundleDisplayName test" info.plist

It works perfectly when the file is outside of the Xcode Project But when the file is inside the project It throws "Set: Cannot Perform Set On Containers"

Why it happens and how about solving this without moving the file outside of the project.


Solution

  • Space between colon(:) and key name is the reason why it was throwing the error and now it works as expected

    /usr/libexec/PlistBuddy -c "Set :CFBundleName test" info.plist

    /usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName test" info.plist