• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using Resource Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Resource Files


  • Subject: Re: Using Resource Files
  • From: Tim Rupe <email@hidden>
  • Date: Mon, 8 Dec 2003 01:24:57 -0600

Thanks for the help, however I'm trying to make my program as cross-platform compatible as possible, so Mac specific APIs won't work for me. Right now, I'm using the Qt Library, and I discovered that this topic has come up before, involving the method Macs use (Application Bundling), and the way *nix do it (separate executables from data locations). I did find a utility in the Qt library that allows you to embed the images into the application, and for now, that's how I'm going to do it. Later, if the file sizes get large, I'll have to find an alternative method.

Thanks,
- Tim


On Dec 7, 2003, at 12:04 AM, Kevin Grant wrote:

I'm new to Macs, and especially XCode, so this may seem like a stupid question. Anyway, I'm trying to use a few images in my program, but when I build the application, it can't access the files. I've tried putting them in a "Resources" group, and the files automatically get copied into a Resources folder in my build, but my application can't see them. Is there a special path I should use in my program that will access the Resources folder of my application package, or some settings I can change within XCode?

Also, is there any real documentation for XCode? I've seen some tutorials on Apple's Developer site, but nothing that goes into very much detail (compiler settings, detailed project settings, etc..)


Access to things inside your application package is possible using the CFBundle APIs.
See (for example):
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBundle.h


In Xcode, you can open this file using "Open Quickly" and typing "CFBundle.h".

In this case, you would want an API like CFBundleCopyResourceURL().

Kevin G.
http://homepage.mac.com/kmg/
mail to kevin at ieee dot org
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Using Resource Files (From: Tim Rupe <email@hidden>)
 >Re: Using Resource Files (From: Kevin Grant <email@hidden>)

  • Prev by Date: Re: Strange Xcode messages in console
  • Next by Date: Problem with nibtool v349 (Panther)
  • Previous by thread: Re: Using Resource Files
  • Next by thread: Re: Using Resource Files
  • Index(es):
    • Date
    • Thread