Reputation: 988
I'm porting my android app to iOS. In android I have the asset folder I can manage through the studio and where all my config files reside.
Where should reside my txt config files in Xcode: Supporting files, Poducts, xcassets, ...?
What should I use to open/read the files? Should I use the following constants?
let fileManager = NSFileManager.defaultManager()
let currDir = fileManager.currentDirectoryPath
is there a good article/tuto you recommend to read?
many thanks!!!
Upvotes: 0
Views: 300
Reputation: 1384
This isn't a cross-platform way of doing things, and as such won't answer your question directly, but if you wanted to do things "the Apple way", see this: http://www.myswiftjourney.me/2014/10/01/simple-persistent-storage-using-nsuserdefaults/
You shouldn't need to worry about raw file access if you're only saving config values.
Upvotes: 1