Monday 15 August 2011

ios - Cocoapods: Linking pod to multiple targets issue -


I am trying to create a stable library by a cocopod for many goals in my workspace when I do this I get an error of duplicate symbols in the stage of adding during the building. This is understandable because I am adding the library twice.

How do I get it? Should I just join the main goal and include the heading path of the pod in shared goals? How do I do this in Cocopod? I can manually set the header path to the fds but seems to defeat the point of using pod install .

Below is my workstation setup, it includes a main project and many static libraries as their own xcode project, which is a shared code. I link to the products of two static library projects for the main goal and they automatically become the dependency of the main goal.

  shared1.xcodeproj - & gt; Shared sharing 1 shared2.xcodeproj - & gt; Target share 2 main.xcodeproj - & gt; Target main   

This is my podfile:

  Workspace 'Main Xcworkspace 'xcodeproj' main.xcodeproj 'xcodeproj' shared1.xcodeproj 'Forums: iOS Goals: Third, Exclusive = & gt; Really link with ['main', 'shared 1'] 'mknetworkkit' pod 'sbjsan' ... and    

Have you tried to add it to the podfile: 'target1', 'target2'

There is a different goal in this way and it works well.

No comments:

Post a Comment