开发者

How to add file with custom extension to bundle/resource folder in XCode?

开发者 https://www.devze.com 2023-03-21 13:43 出处:网络
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

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];
0

精彩评论

暂无评论...
验证码 换一张
取 消