Re: Xcode warning from linking to a third-party framework in both app and in framework included in app?
Re: Xcode warning from linking to a third-party framework in both app and in framework included in app?
- Subject: Re: Xcode warning from linking to a third-party framework in both app and in framework included in app?
- From: Uli Kusterer <email@hidden>
- Date: Tue, 25 Aug 2015 11:13:19 +0200
On 18 Aug 2015, at 17:48, Steve Mykytyn <email@hidden> wrote:
> Both the app and the included framework use
>
> objc[1735]: Class PFObject is implemented in both <included framework> and
> <app>. One of the two will be used. Which one is undefined.
>
> I guess I could simply make sure to only use Parse my private framework,
> but it seems like this should be fixable somehow...
Yeah, sharing the same framework among both is really the only safe solution. Otherwise if one of those ends up being a different version, one of the clients will get the wrong version of *that one class* while other classes might be newer/older. You'll get fun random crashes.
Also, if you have internal, non-exported globals that contain unique values (like KVO keys that are used with pointer equality), you might suddenly have two copies of them, one for each framework, which would also cause issues because they won't be seen as identical when they should.
You definitely don't want to have two copies of the same framework linked in. Too much opportunity for things to go wrong, run twice etc.
If you must, use #defines and edit the XIBs so the class names are different (e.g. by prefixing all classes etc.), but that's hairy to do consistently without missing one, especially if it's not your code.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://stacksmith.org
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden