I made a framework which is partially written in Swift and partially in Objective C (the models only are written in Objective C). The library is dependent on Alamofire and JSONModel.
I managed to make it available for cocoa pods users and everything runs fine. The problem is if you want to build the library as a standalone target. In this case it pretends to usually not find JSONModel. In order to solve it I had to deal with a lot of headache and in the end the steps are as follows:
1) make sure the pods project in the project with your standalone framework has the flag "build active architectures only" set to NO
2) make sure to include the dependencies of your framework in the Linked Frameworks
3) make sure to create a new build phase which will include copying the dependency frameworks in the "Frameworks" destination.
But actually this steps do not fully work.
The idea is that first time it will fail because for some reasons it searches for the embedded frameworks somewhere where they are not present. And then I have to delete them from the build phase and from linked frameworks and assign them again. And it seems like this time it points to the real path of the embedded frameworks. And it seems like the real embedded frameworks are available only after the first build as this is when they are actually created.
Is there a way I can avoid this manual "build first time/delete and re-add dependencies"? Or at least to include another build phase which would somehow manage it?