Subprocess subsspec where module name is not the same as podspec name?

So I have a project in swift (xcode 7) that has a bunch of infrastructure targets, I want to have one podspec that includes the subroutines of all these frameworks.

When I create podspec and add a bunch of routines to the sample project, the sample project won't compile because the module names have changed.

For example, I have a subroutine called "Frameworks" with routines "Datamodel" and "Common".

I am creating a sample project with a podfile that has links to "Frameworks / Datamodel" and "Frameworks / Common". The datamodel framework has dependencies on the common and inside the datamodel code which brings the common structure together with

import common

      

but in the sample project, all the subroutines are inserted into a new structure that generates cocoapods called Frameworks, so this generic import throws an error saying it cannot find the generic module. I have to change it to

import Framework

      

To make it work, but this is definitely not an acceptable solution.

How can I resolve this? Or is it just something I cannot do?

+3


source to share


1 answer


I think you are looking for an attribute module_name

. You can add this to your podspec to change how CocoaPods generates your infrastructure.



0


source







All Articles