Posts

Post not yet marked as solved
0 Replies
968 Views
I've found a few posts mentioning similar issues, but nothing so far that fixes my case. Hopefully if I write it up all pretty we can figure out a clear answer on best practices when dealing with framework dependency conflicts. Oh and everything here is in Objective C.I make a point of sale. It accepts credit cards. There are lots of complex rules about credit card hardware, and you don't always really get to pick what you have to use. My company is not the credit card processor. Those companies are our friends. We have more than one friend. For the first time, two different friends want to use the same piece of hardware. The dependencies go like this...CoolPointOfSale.app depends on CreditCardProcessorFriendA.frameworkCoolPointOfSale.app depends on CreditCardProcessorFriendB.frameworkBoth friend frameworks (friendworks?) depend on CreditCardReader.frameworkAs an aside, I don't use cocoa pods or any dependency management thinggie like that. We are just talking about good ole' XCode here.So the CoolPointOfSale project has both friend frameworks listed in the "Link binary with libraries" step and in the "Embedded Binaries" area under the General project settings.And we get a whole bunch of this at launch time.Class CoolHardwareFunTime is implemented in both /private/var/.../CoolPointOfSale.app/Frameworks/CreditCardProcessorFriendB.framework/CreditCardProcessorFriendB (0x104cc22c8) and /private/var/.../CoolPointOfSale.app/Frameworks/CreditCardProcessorFriendA.framework/CreditCardProcessorFriendA (0x104b84940). One of the two will be used. Which one is undefinedThere is a little bit of silver lining in that FriendA has been kind enough to give me access to their entire Xcode project and source code so that I can try to solve this. I can ask friendB nicely to make changes for me if that will help.So I figured "piece of cake! I'll remove the hardware framework from friendA's framework and then we can all just link against the copy in friendB's SDK and we'll be great (let's just assume they use the same version in this scenario).4 hours later I can't figure out how to leave the hardware framework out of friendA's framework. I've tried weak linking, fiddling with clang module settings, and all manner of other cargo cult fun stuff that stack overflow said worked for one guy one time.Would anyone be so kind as to tell me whether this is even possible? In what direction should I twiddle the linker settings? My "give up and take my ball home" is to just copy all the source from friendA and compile it directly as part of my app, but I'm hoping there's a better way.Thanks very much for reading.
Posted Last updated
.