1

I'm trying to add GVRSDK to my iOS app but as soon as i add it, linking error appear with multiple duplicates between the GVRSDK and GTMSessionFetcher that is used in my application by another pod. I can't remove the GTMSessionFetcher as some other pods are using it and i'm not able to remove the referencing of it also from the libCardboardSDK.a.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Mohammad Allam
  • 258
  • 2
  • 14
  • Could you show your PodFile and the pointing out the two pods causing the issue? Don't they specify in their pod spec their dependency on that vendor library? – Larme Nov 17 '16 at 12:40
  • This is my PodFile pod 'AFNetworking', '~> 3.0' pod 'Mantle-HAL', '~> 1.1' pod 'Google/SignIn' pod 'ICViewPager' pod 'IDMPhotoBrowser' pod 'TwitterKit' pod 'TwitterCore' pod 'YSLTransitionAnimator' pod 'GVRSDK' Mainly "Google/SignIn" and "GVRSDK" are the conflicting ones. – Mohammad Allam Nov 20 '16 at 21:39

2 Answers2

0

Do you have the projects/sources for the .a? can you make sure they use the @rpath as their install name and set the @rpath correctly for all of them? Then you can make sure they all look for their .dylib/.framework dependencies in e.g. MyApp.app/Contents/Frameworks/ and then put only one copy of GTMSessionFetcher's framework in there and have all others link to that.

If the projects you're referencing have been set up correctly according to Apple's guidelines, that should just mean you set the @rpath in your main application and it should all resolve itself, IIRC (been a while since we did that and we weren't using CocoaPods, so not sure if that does something that would prevent that from working).

uliwitness
  • 8,532
  • 36
  • 58
0

It's a design issue in the googleVR SDK. I've reported the bug there and an issue has been created.Let's wait for them to fix it. https://github.com/googlevr/gvr-ios-sdk/issues/163

Mohammad Allam
  • 258
  • 2
  • 14