I've had no issues running the app on Simulator, but it fails to find
the file when being run on my physical iPhone.
That’s a common problem for folks starting out. Your app running in the simulator has access to the macOS file system. That’s not the case when your app is running on the phone.
How you fix this depends on what you’re using this text file for. Is it:
-
Something you only read?
-
Something that maintains state, so it starts out blank but then you read and write it?
-
Something that maintains state, but it needs to start out with some default value?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"