Swift 3: cannot write data to plist file
问题 I am trying to use a file called Data.plist to store some simple unstructured data, and I placed this file at the root folder of my app. To make it simple to read/write to this file, I created the following DataManager struct. It can read Data.plist file with no problem, but it cannot write data to the file. I am not sure where the problem is, could anyone spot where might be wrong? struct DataManager { static var shared = DataManager() var dataFilePath: String? { return Bundle.main.path