Hello everyone, I have a problem. For using my app, many files must be reading ( 3 json files ) and at the end of the app theses files are updated. When I read my files, the directory changes any reboots. So, I decided use url from my Desktop, but when I simulate app on my phone, the app crashes because the Desktop isn't on my phone, and on the phone of the future user. So my question is is it posible to have the same directory any reboots ? And if is not, how I can manage my file for avoid this problem ? Thanks everyone
Choose the file directory of my files
I'm not sure if I understand your question correctly. However, you should add these json files to your main bundle, make sure you add them to your project in Xcode. Collecting them should then look like this:
let jsonUrl = Bundle.main.url(forResource: "yourJson", withExtension: "json")!
I hope this helps you.