• 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: Including binaries and other files in a application package
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Including binaries and other files in a application package


  • Subject: Re: Including binaries and other files in a application package
  • From: James Andrews <email@hidden>
  • Date: Thu, 27 Jan 2005 08:18:37 -0500

Hi,

It's really simple. NSBundle allows you to bundle the app in your program. NSTask allows you to use the app.

In XCode, you add the binary file to your project, like you would any Class file. You then use NSBundle to find the path to that resource. Then NSTask to execute the included binary.

Good Luck,
James



On Jan 27, 2005, at 7:15 AM, Sherm Pendley wrote:

On Jan 27, 2005, at 3:22 AM, Philipp Ringli wrote:

First of all: I am a bloody newb.

You might want to check with a doctor about that.

What I would like to do in my first Cocoa-Application is the following:

Include binaries and other files (a directory with more files and directories) in my final App-Package.

I've seen two good responses so far, suggesting docs regarding bundles, and docs regarding the many pathFor... methods in NSBundle. That covers where to put the files inside the .app, and how to find them when your app is running.


One part of your question that hasn't yet been answered is how to put the files where they need to go - for that, you need a "copy files" build phase in XCode. Have a look at:

<http://developer.apple.com/documentation/DeveloperTools/Conceptual/ Build_System/index.html>

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Including binaries and other files in a application package
      • From: Philipp Ringli <email@hidden>
References: 
 >Including binaries and other files in a application package (From: Philipp Ringli <email@hidden>)
 >Re: Including binaries and other files in a application package (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: mathematical area of closed vector path
  • Next by Date: Re: [newbie] Question about NSText
  • Previous by thread: Re: Including binaries and other files in a application package
  • Next by thread: Re: Including binaries and other files in a application package
  • Index(es):
    • Date
    • Thread