Can I store a json file on an iPhone to be accessed by an app?

Is there a way to save a json file to an iPhone so that it may be accessed by an app. I have a data collection app and each user will be starting with different data. They could create the first table via Numbers or Excel and create a json file, which, if it could be stored on the phone, could then be accessed when the app is loaded and first run. Thereafter, data entry is made against the elements of the first table.

too easy. in your info.plist


add this key


Application supports iTunes file sharing ->Bool Yes


you can save the data locally and get to it from iTunes


or just dump into the net with icloud, aws, dropbox, etc

I had already activated File Sharing. My issue is where does iTunes File Sharing put the json files and how do I get them. If I include this code, I always get "The path cannot be created", even after moving the json files into the app.


func importJSONWellSeedData() {

guard Bundle.main.path(forResource: "wellData", ofType: "json") != nil else {

print("The path could not be created.")

return

}


etc, etc, etc.

I was looking for the file in the wrong place, when I went ot documents directory, etc, I found the files and imported them to the app without issue!

Can I store a json file on an iPhone to be accessed by an app?
 
 
Q