Swift: Reading a plist from MainBundle and writing directly to Documents fails
问题 Take the following file, named Permissions.plist : <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>SomeKey</key> <false/> </dict> </plist> I'd like to read it in from my MainBundle , modify it, and write it out to my .Documents . However, even if I leave it unmodified , the write fails. The Swift syntax seems to have changed since this question, and the