Framework conflicts on Snow Leopard

5 views
Skip to first unread message

Jeff Nichols

unread,
Sep 1, 2009, 4:06:06 PM9/1/09
to gdata-objec...@googlegroups.com
When running my application on a developer preview of Snow Leopard, I
see a bunch of console logs resembling the following:

[1204]: Class GDataAttribute is implemented in both
/Users/jeff/Workspace/MyApp/build/Debug/MyApp.app/Contents/MacOS/../Frameworks/GData.framework/Versions/A/GData
and /System/Library/PrivateFrameworks/GoogleContactSync.framework/Versions/A/GoogleContactSync.
One of the two will be used. Which one is undefined.

I can't get ahold of an official Snow Leopard install yet, so I can't
say if this is still a problem. Does anyone have any ideas about
what's going on here? I'm certainly not linking to that private
framework directly... just the public AddressBook.framework.

Thanks!
Jeff

Greg Robbins

unread,
Sep 1, 2009, 5:08:19 PM9/1/09
to Google Data APIs Objective-C Client Library Discussion
The Google Contact Sync in Mac OS X 10.5 and 10.6 does use the GData
framework, but I'm not sure why simply linking to Address Book would
cause its GData framework code to be loaded into your process space.

I tried adding the Address Book framework to the ContactsSample app
(and calling a few Address Book methods when the app launches) and
rebuilding on the release Snow Leopard (10A423) and could not
reproduce the problem.

If you continue to see an issue on the released version of Snow
Leopard, please let us know. If there is a conflict, it can be avoided
by defining GDATA_TARGET_NAMESPACE in your GData project, but for
regular Mac apps that should not be needed.

Jeff Nichols

unread,
Sep 1, 2009, 5:26:06 PM9/1/09
to gdata-objec...@googlegroups.com
Thanks Greg,

I'll try to get a release copy as soon as I can to test it out...
easier said than done in Berlin at the moment!

Jeff
--
Jeff Nichols
Wateree Software
http://wateree.net/

Jeff Nichols

unread,
Oct 28, 2009, 8:11:21 AM10/28/09
to gdata-objec...@googlegroups.com
I figured this out a few weeks ago, but forgot to 'publish' my
results. Since this basically required me to completely dismantle and
rebuild my app piece by piece, I'd be happy if I could save fellow
developers a few hours/days.

http://www.openradar.appspot.com/radar?id=104407

The issue was with ABPeoplePickerView. Simply including and
instantiating an ABPeoplePickerView on Snow Leopard will cause a
framework conflict.

Cheers,
Jeff

Greg Robbins

unread,
Oct 28, 2009, 9:03:19 PM10/28/09
to gdata-objec...@googlegroups.com
Thanks for bringing this up, Jeff. We'll probably work with Apple to resolve this.

Greg Robbins

unread,
Oct 29, 2009, 5:53:40 PM10/29/09
to gdata-objec...@googlegroups.com
I just confirmed that you can use the library's namespacing feature to avoid this error on Snow Leopard.

In the framework project and in your app (for debug and release builds) define the namespace for the library's classes. For example, in the Other C Flags sections of the GData framework target and the app target, add

  -DGDATA_TARGET_NAMESPACE=MyApp

Unfortunately, the library build being used in Snow Leopard's AddressBook.framework currently lacks a namespace, so apps pulling in AddressBook.framework will need to define a namespace for the GData library.

Jeff Nichols

unread,
Nov 4, 2009, 5:50:13 AM11/4/09
to gdata-objec...@googlegroups.com
Great, thanks Greg.

Jeff

portsix

unread,
Nov 17, 2009, 12:07:25 AM11/17/09
to Google Data APIs Objective-C Client Library Discussion
So I've got the same issue happening, and was hoping for a little bit
of guidance.

The GData framework is included in a plugin for the app, while another
plugin uses the AddressBook framework. So, I've rebuilt both the
GData framework and the plugin that uses it using the flag indicated
above, all to no aval. Does the whole application need to be built
with the flag?

Any help would be greatly appreciated.

Daniel

Greg Robbins

unread,
Nov 17, 2009, 1:16:25 AM11/17/09
to gdata-objec...@googlegroups.com
Only the code that refers to the GData classes needs GDATA_TARGET_NAMESPACE to be defined. If your main app does not refer to the GData classes, it shouldn't need the namespace definition.

The targets or projects containing the library sources and the plug-in sources that use the GData APIs clearly do need the namespace to be defined.

But since you're still seeing the problem, it doesn't hurt to define the namespace in your main app project as well to see if the conflict is resolved. There may be an unintended dependency on the GData library in the main application.

Reply all
Reply to author
Forward
0 new messages