Nav Link On

iPhone Dev Forums > General Development > Beginners Section > CFBundleCopyResourceURL returning "NULL"

Reply
 
LinkBack Thread Tools Display Modes
Old 11-20-2008, 03:21 PM   #1 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 1
Unhappy CFBundleCopyResourceURL returning "NULL"

Hi,

I'm trying to make a simple sound player for my application and am having trouble getting the URL of files using CFBundleCopyResourceURL.

My app (so far) consists of a delegate and a view controller plus my own custom class for a sound object (just a NSObject that will play sounds). My view controller instantiates the sound object.

If try to load sounds in the sound object with CFBundleCopyResourceURL (to get the sound file URL) it returns NULL. If I move the code (to get the sound file URLs) to my view controller, it works.

The only way I can get the sound object to load the sounds is to have the view controller get the URL with CFBundleCopyResourceURL and then pass the resource URL to the sound object, which is messy as I'd rather have the sound object take care of all of it's loading needs.

Is there a scope/access issue with CFBundleCopyResourceURL? It's driving me mental!

Thanks,

Neil
neil.baldwin@me.com is offline   Reply With Quote
Reply

iPhone Dev Forums > General Development > Beginners Section


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump



All times are GMT. The time now is 10:50 AM.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15