How to add and use GData.framework to an iPhone custom application

91 views
Skip to first unread message

Hassan Ali

unread,
Sep 14, 2009, 8:04:59 AM9/14/09
to Google Data APIs Objective-C Client Library Discussion
Hi,
I have started working in Obj-c/iPhone app. development recently and i
want to create an application which uses GData Api for Youtube video
search and display. I have explored a lot of links related to this and
they helped me a lot. Now i m getting the error

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

I don't know why this error is occuring. If anyone can help me out by
telling me the list of steps how to reference and use this framework
from start or just tell me what i have to edit?

Till now, I have downloaded the GData APIs for Objective-C, referenced
the GData.xcodeproj into my application and added Direct Dependency on
GData.frameworkand it is showing build error which i have posted
above.

Thanks,

Hassan

Hassan Ali

unread,
Sep 14, 2009, 8:09:16 AM9/14/09
to Google Data APIs Objective-C Client Library Discussion

Matt

unread,
Sep 14, 2009, 5:16:28 PM9/14/09
to Google Data APIs Objective-C Client Library Discussion
Hi Hassan,

iPhone OS does not support dynamic frameworks in applications. You
can only use the iPhone's built in frameworks in your applications.

Instead you need to use the static library which is built as part of
the GDataTouchStaticLib target in the GData project.

The iPhone dev portal should have some information on how to do this.

Top Google search for 'using static libraries in iphone' is
http://blog.stormyprods.com/2008/11/using-static-libraries-with-iphone-sdk.html.

Cheers,

Matt

Hassan Ali

unread,
Sep 15, 2009, 2:24:52 AM9/15/09
to gdata-objec...@googlegroups.com
Thank you very much for ur help and guidance Matt.
--
Best Regards,

Hassan Ali
BIT
+923214201389

Peter J. MASON

unread,
Sep 15, 2009, 3:09:57 AM9/15/09
to gdata-objec...@googlegroups.com

What are dynamic frameworks?

Matt

unread,
Sep 15, 2009, 2:19:13 PM9/15/09
to Google Data APIs Objective-C Client Library Discussion
This is probably a more appropriate discussion for the Apple
discussion groups, but....

Frameworks are a bundle that include an additional binary and on Mac
OS X you can load Frameworks dynamically when you need them. These
frameworks are 'dynamically linked' to your application. Your
application and it's dependent frameworks are completely separate
build products (separate binaries) that are dynamically linked at
runtime. You can change the behavior of the application by swapping
out the frameworks with newer versions later, without rebuilding your
application. The Cocoa frameworks are dynamically loaded, which is
why your application behavior changes between versions of Mac OS X.

On iPhone you can't do this. You must create a static library and
have it linked during the build process which embeds the library into
your application binary. Because it combines the library into your
application binary the library is not dynamically loaded at run time.
Your application can therefore not be modified after it has been built
(except by the frameworks that come with iPhone OS - which are still
dynamically loaded). Therefore the only way that your application
behavior can change is if Apple makes a change to iPhone OS. I'm not
100% sure, but the restriction for iPhone apps to only use static
libraries is probably due to the security and stability issues that
come with them.

Matt

unread,
Sep 15, 2009, 6:15:34 PM9/15/09
to Google Data APIs Objective-C Client Library Discussion
Also, Greg added a page on this recently:
http://code.google.com/p/gdata-objectivec-client/wiki/BuildingTheLibrary
This discusses the static library for iPhone.

This is directly related to the original question - but I forgot all
about it.

rivertiger

unread,
Sep 15, 2009, 9:11:35 PM9/15/09
to Google Data APIs Objective-C Client Library Discussion
Matt--tangential to this question is...lets suppose that you use a
dynamic linked framework in a custom project. When you are using that
in conjunction with a distributed source control, such as github/
mercurial....you would need to include the dynamic linked framework in
the project's filesystem folder to properly upload/sync,
etc....correct?

~ James

Matt

unread,
Sep 16, 2009, 7:53:43 PM9/16/09
to Google Data APIs Objective-C Client Library Discussion
Hi James,

Sorry, I'm not sure what you mean. Can you explain this part of the
question a bit further?
"you would need to include the dynamic linked framework in the
project's filesystem folder to properly upload/sync"

Matt
Reply all
Reply to author
Forward
0 new messages