0

After creating a library that contains AFNetworking and Reachability I had some issues importing this library to other projects with the -ObjC flag that have already AFNetworking and Reachability. I have a linker error:

duplicate symbols for architecture

Is there any solution to prevent AFNetworking from custom library to be loaded in the main project by -ObjC flag?

Here is this solution but this means that some changes need to be done in the main project, and I want to avoid that. The client should only import my library without making any additional changes.

Community
  • 1
  • 1
Constantin Saulenco
  • 2,353
  • 1
  • 22
  • 44

1 Answers1

0

Your link seems like has not any relicationship to your problem, and same as using -ObjC. -ObjC is just used if static lib codes has OC Category.

As you want to do nothing when using your static library, then you need modify your AFNetworking and Reachability's all Class names if you really want to do it.That is the only way to avoid conflict.

Eduoduo
  • 68
  • 4