开发者

How to get NSBundle URLsForResourcesWithExtension to return actual URLs?

I'm trying to be a good doobee and use URLs everywhere. When I invoke

(gdb) po [[NSBundle mainBundle] URLsForResourcesWithExtension:@".aif" subdirectory:nil]

<__NSCFArray 0x6a02150>(
drip.aif -- /Users/hacksaw/Library/Application Support/iPhone Simulator/4.3.2/Applications/CF4B60C1-D8E1-4CEA-B7CF-DE57F开发者_运维百科88E1023/SuperTimer.app/

Which is the right path, but not at all a URL.

Is it somehow unreasonable to expect that the array returned from this method would contain actual URLs?

What's the proper way to find all my .aif's I included with my bundle?


This is an NSURL. When you print them out in the debugger with po, they just show their description, which is the name of the file, two hyphens and the name of the directory. But it's an NSURL.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜