How to add file with custom extension to bundle/resource folder in XCode?
I have a problem. I have been made a file with custom extension like .xyz in resource folder. But when I running the application, the file wasn't开发者_JAVA百科 in resource folder. How can I add the file with custom extension? Anybody can help me?
Thanks before. Regards.
You need to make sure that this .xyz file is in the Copy Resources phase of your application's target.
simple drag n drop to your resources folder and check copy items to resources folder option. That's it.
what do you mean with "the file wasn't in resource folder" ?
do you want to move it into Documents
directory ?
if yes, you just can move your file from resource
into Documents
, i was do something like that with this code :
[[NSFileManager defaultManager] moveItemAtPath:resourcePath toPath:documentsPath error:NULL];
精彩评论