xcode - How to embed a file in an objective-c project and extract it in running time? -
i have code written in objective-c os x. want create text file right after user runs program , save under documents folder.
right stored text in string variable , on run time write in file. problem don't want have hardcode content of text file in code.
is there way embed text file in project , when user runs application extract , store under path?
p.s. using xcode.
thanks.
just add file project. in build phases add new copy files build phase , choose resources folder.
in code use nsbundle
Comments
Post a Comment