As many have pointed out, the app's bundle is read-only. What you can do is copy the file if you really want to use it and put it in the documentDirectory where you can read and write to it.
let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] as String
let plistPath = paths.appending("/data.plist")
let fileManager = FileManager.default
if !fileManager.fileExists(atPath: plistPath)
{
// Default plist name is Info. Just using ClassA
let bundle = Bundle.main.path(forResource: "ClassA", ofType: "plist")
try! fileManager.copyItem(atPath: bundle!, toPath: plistPath)
}
let data = NSMutableDictionary(contentsOfFile: plistPath)
data?.setObject("Hello World", forKey: "name" as NSCopying)
data?.write(toFile: plistPath, atomically: true)
print(data)