Load binary file on iPhone
-
- Gnoblar
- Posts: 15
- Joined: Wed Oct 29, 2008 2:42 pm
Load binary file on iPhone
Hi, I try to load binary file from the resources directory ,use this path Ogre::macBundlePath() + "/filename" but it's not work?
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: Load binary file on iPhone
We need more information. Is the path correct? Does the file exist? What problem are you seeing?
-
- Gnoblar
- Posts: 15
- Joined: Wed Oct 29, 2008 2:42 pm
Re: Load binary file on iPhone
I put my binary file in resources folder( where is ogre.cfg and resources.cfg ) and try to load it, in debug mode macBundlePath() return "/var/mobile/Applications/device ID/Demo4.app", so I use this path macBundlePath() + "/"+filename ,in initOgre function use macBundlePath() + "/ogre.cfg" to load cfg file from same directory and its work.
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: Load binary file on iPhone
Are you copying it into the app bundle during a Copy Files build phase?
-
- Gnoblar
- Posts: 15
- Joined: Wed Oct 29, 2008 2:42 pm
Re: Load binary file on iPhone
thanks , stupid mistake , i forgot to add it to project in XCode.
-
- Gnoblar
- Posts: 15
- Joined: Wed Oct 29, 2008 2:42 pm
Re: Load binary file on iPhone
when I add some files in resource folder? how can i update it in XCode project? add a new copy files build phase ?
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: Load binary file on iPhone
Yup, that would do the trick and make sure that those files are included in the build phase.
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: Load binary file on iPhone
You've given us nothing to go on. Please supply more information, for example:
What is the error?
How are you trying to load the files? And how are you generating the path?
Is your project set up to copy the files into the app bundle?
If you're using the ResourceManager, are the resource locations being set up properly?
What is the error?
How are you trying to load the files? And how are you generating the path?
Is your project set up to copy the files into the app bundle?
If you're using the ResourceManager, are the resource locations being set up properly?