• 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: Custom Framework Basics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Framework Basics


  • Subject: Re: Custom Framework Basics
  • From: Jonathon Mah <email@hidden>
  • Date: Mon, 30 May 2005 21:11:01 +0930

Hi Francisco,

On 2005-05-30, at 07:15, Francisco Tolmasky wrote:

I'm attempting to create a custom framework, and I would like to know how to initially set up my project. Apple suggests having a Framework Target and a Testing Target within the same project since the dependancies are "easy to handle". But I'm having trouble doing this. I have been able to add a new target to my framework project, and have been testing with it, but Im not sure if Im doing some thing correctly. For example, I ended up adding Cocoa and FOundation frameworks twice, one for each target, this seems innifficient, but maybe its required.

Adding a framework to a target just tells the linker that you're using code from that framework. Both _your_ framework and test app use Foundation stuff, for example. It doesn't actually add those files (as then every app on your system would include a copy of Cocoa!). So that's how it's meant to work, and it's as efficient as you're going to get. :)


Also, to use my custom framework in my other target, Im having to do things like #import "customclass.h" #import "customclass.m", which seems very incorrect.

You should use statements like #import <MyFramework/customclass.h>. If you want, you can make a header file in your framework that is just a whole list of imports, and from your test app use #import <MyFramework/MyFramework.h>.


On a separate note, you probably shouldn't need to import .m files...

The whole point of having everything in one project is to make things easier, so how do I access my framework files easily from my testing target, i.e. treating as if it is a real framework?

Is the above import stuff what you meant by this?


Jonathon Mah email@hidden


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Custom Framework Basics
      • From: "Mark Munz (DevList)" <email@hidden>
References: 
 >Custom Framework Basics (From: Francisco Tolmasky <email@hidden>)

  • Prev by Date: Re: Tiger Decoding problem
  • Next by Date: Re: Urgent build problem
  • Previous by thread: Custom Framework Basics
  • Next by thread: Re: Custom Framework Basics
  • Index(es):
    • Date
    • Thread