6

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.

Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241

1 Answers1

8

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

Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241