07-20-2023, 05:47 AM
So I have a project in swift (xcode 7) that has a bunch of framework targets, I want to have one podspec that includes, as subspecs, all of these frameworks.
When I create a podspec and add a bunch of subspecs to a sample project the sample project doesn't compile because the module names have changed.
For example I have a podspec named "Frameworks" with subspecs "Datamodel" and "Common".
I create a sample project with a podfile that has references to both 'Frameworks/Datamodel' and 'Frameworks/Common'. The datamodel framework has dependencies on the common and inside the datamodel code the common framework is imported with
import common
but in the sample project all of the subspecs are getting inserted into a new framework that cocoapods generates called Frameworks so this import common throws an error saying it can't find the common module. I have to change it to
import Framework
To get it to work, but that is definitely not an acceptable solution.
How can I resolve this?? Or is this just something I can't do?
When I create a podspec and add a bunch of subspecs to a sample project the sample project doesn't compile because the module names have changed.
For example I have a podspec named "Frameworks" with subspecs "Datamodel" and "Common".
I create a sample project with a podfile that has references to both 'Frameworks/Datamodel' and 'Frameworks/Common'. The datamodel framework has dependencies on the common and inside the datamodel code the common framework is imported with
import common
but in the sample project all of the subspecs are getting inserted into a new framework that cocoapods generates called Frameworks so this import common throws an error saying it can't find the common module. I have to change it to
import Framework
To get it to work, but that is definitely not an acceptable solution.
How can I resolve this?? Or is this just something I can't do?