I have been having the following problem after updating cocoapods to 0.39 ( i do not remember the previous one's version) :
https://github.com/eduedix/react-native-networking/issues/6
I think the issue is related to cocoapods, but I have no idea how to solve it. I am waiting for your suggestions.
Could you please share a project that reproduces this issue? This isn't enough info to know what's going on
there you go: https://drive.google.com/file/d/0B86UITfgEN1XcXdIVzl4VzVSbTA/view?usp=sharing
RNNetworkingManager ( path: node_modules/react-native-networking) is the static lib which has AFNetworking installed via cocoapods.
hi @eduedix i'm looking at the sample project you uploaded and it seems that when building SomeTest.app from the SomeTest/ios/SomeTest.xcodeproj you setup implicit dependencies by linking the various React libraries. The one in question RNNetworkingManager does use AFNetworking installed from CocoaPods. I found that in the SomeTest/node_modules/react-native-networking/ directory there is Pods directory with respective Pods.xcodeproj. This Pods project file and the RNNetworkManager.xcodeproj are part of a workspace file, which allows them to be built and linked properly.
The issue you are running into is that the SomeTest.xcodeproj that contains your app, has a bunch of child xcodeproj files for all the respective React Native libraries, however it is missing a reference to the Pods.xcodeproj file. This means that when you try to build the libRNNetworkingManager library, it is asking to link libAFNetworkingand libPods but it doesn't know where to find them or that they are even things to be built.
I was able to get the SomeTest.app to build without errors (there are a bunch of other linker warnings, but that is a separate issue).
Step 1: Close Xcode and find the RNNetworkingManager.xcworkspace file. Open that in Xcode and find the RNNetworkingManager target and select Build Phases then expand the section titled Link Binary with Libraries. Here you will want to select where it says libPods-AFNetworking and remove it. Then click the plus sign and select the item named libAFNetworking.a that is at the top of the window that will appear. Close the workspace file.

Step 2: Open the SomeTests.xcodeproj file and expand the Libraries group to display the other project files that are added to this project. From there select the plus button in the lower left, and choose the option "Add files to 'SomeTest'...". When the file browser appears navigate to find the Pods.xcodeproj file located in SomeTest/node_modules/react-native-networking/Pods/ and select that and have it get added to the project (do not tell it to copy if necessary and deselect any targets it may try to be added to).

Once both of these steps are completed you should be able to build your app successfully. You should be aware that building in this configuration isn't supported by CocoaPods (or Xcode for that matter). Projects shouldn't be nested like this as it can create problems with dependency resolution. You should look at creating a workspace file to do this organization with instead if possible.
I hope this helps, cheers!
@samdmarshall Wow. this was a perfectly helpful answer. Thank you very much for your time.
I would like to find out though, what has changed in Cocoapods or Xcode, since I did not need to do these steps beforehand and now I have to do it? Is there anyway to automate these steps with Cocoapods while preparing the static lib, such as
1.add libAFNetworking.a instead of libPods-AFNetworking.a
2.somehow also add Pods as a library?
Most helpful comment
hi @eduedix i'm looking at the sample project you uploaded and it seems that when building
SomeTest.appfrom theSomeTest/ios/SomeTest.xcodeprojyou setup implicit dependencies by linking the various React libraries. The one in questionRNNetworkingManagerdoes use AFNetworking installed from CocoaPods. I found that in theSomeTest/node_modules/react-native-networking/directory there isPodsdirectory with respectivePods.xcodeproj. This Pods project file and theRNNetworkManager.xcodeprojare part of a workspace file, which allows them to be built and linked properly.The issue you are running into is that the
SomeTest.xcodeprojthat contains your app, has a bunch of child xcodeproj files for all the respective React Native libraries, however it is missing a reference to thePods.xcodeprojfile. This means that when you try to build thelibRNNetworkingManagerlibrary, it is asking to linklibAFNetworkingandlibPodsbut it doesn't know where to find them or that they are even things to be built.I was able to get the
SomeTest.appto build without errors (there are a bunch of other linker warnings, but that is a separate issue).Step 1: Close Xcode and find the

RNNetworkingManager.xcworkspacefile. Open that in Xcode and find theRNNetworkingManagertarget and selectBuild Phasesthen expand the section titledLink Binary with Libraries. Here you will want to select where it sayslibPods-AFNetworkingand remove it. Then click the plus sign and select the item namedlibAFNetworking.athat is at the top of the window that will appear. Close the workspace file.Step 2: Open the

SomeTests.xcodeprojfile and expand theLibrariesgroup to display the other project files that are added to this project. From there select the plus button in the lower left, and choose the option "Add files to 'SomeTest'...". When the file browser appears navigate to find thePods.xcodeprojfile located inSomeTest/node_modules/react-native-networking/Pods/and select that and have it get added to the project (do not tell it to copy if necessary and deselect any targets it may try to be added to).Once both of these steps are completed you should be able to build your app successfully. You should be aware that building in this configuration isn't supported by CocoaPods (or Xcode for that matter). Projects shouldn't be nested like this as it can create problems with dependency resolution. You should look at creating a workspace file to do this organization with instead if possible.
I hope this helps, cheers!