I'm creating a private pod and would like it to be used as a module. According to Using Pod Lib Create, in CocoaPods.org:
The first question you're asked is what language you want to build a pod in. For both choices CocoaPods will set up your library as a framework.
In fact, when I run pod lib create MyLibrary
, the initial project template they generate does have everything configured to be a framework, so that I can add a class to Development Pods/MyLibrary
, and access methods of that class from the sample project simply by importing the module using @import MyLibrary;
(or import MyLibrary
, in Swift).
The problem lies on the fact that the same page tells us
With the questions over, we run
pod install
on the newly created Project.
And as soon as I do that, the module-related files are gone, and all the files that I had added to my Development Pods
folders are gone. Not only that, the framework Target itself is gone, so it's not even a matter of simply adding the files back again.
What's the correct approach here? I don't seem to find anyone with the same problem.
I'm running Cocoapod v1.5.3
Any help is highly appreciated!
tl;dr:
pod lib create MyLibrary
cd MyLibrary/Example
pod install
- Now notice that the project has no module configuration anymore. How can I avoid this?