iPhone target for Frameworks/Libraries

Hi all,

I am new to iPhone dev and Xcode. I am trying to build an app that will use a library (a dylib or a framework) which I am also in the process of developing.

I have noticed that when I choose a new Cocoa Framework (or Dynamic Library) project and build it, in the configurations "Overview" I see only OSX 10.5 targets. When I try to change the targets (using Project Settings->General->Base SDK for all Configurations) it can add, for example, the iPhone simulator. But! When I try to build the framework for the simulator it says:

"target specifies product type 'com.apple.product-type.framework', but there's no such product type for the 'iphonesimulator' platform"

Ok, I get it, no such type for the platform. But now some questions arise.

1. How do I know which product types ARE available for the iPhone simulator/device platform?
2. A static library (libMyCoreLib.a) builds fine (and has iPhone Simulator in the target types from the get go); so why not Frameworks and Dynamic libraries? I was under the impression that iPhone runs plain OSX, so what's the deal here? Can I build for OSX and deploy on iPhone?
3. Can I have a Cocoa Touch app which embeds/includes/depends on (I am not quite fluent with the terminology here) another project NOT targeted at the iPhone platform? Something like here:
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/Cr eatingFrameworks.html

Thanks!

MarK.

MacBook, Mac OS X (10.5.2)

Posted on Apr 10, 2008 2:15 AM

Reply
3 replies

Apr 13, 2008 7:16 AM in response to herrmess

Over 70 views and nobody knows if I can or cannot (and why can't I) code a Framework for the iPhone? Or mix platforms in a single Xcode project view?

My current take is: mixing project targets is probably impossible (mostly since the platform is simply not the same - as in i386 vs ARM - stupid me). Probably the FMWK tagret type won't sit with the ARM gcc compiler either (but that's just a guess).

As for why Frameworks don't have an iPhone target, I still have no idea.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iPhone target for Frameworks/Libraries

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.