I'm trying to create asimple framework for testing with swift.
I had post the question in objective-c with "create the framework" before. It was resolved.
But I'm trying to create framework with swift.
I encounter the problem. I can't import the MyUtility file in header file.
like below:
Have anyone know how to import the file in my custom framework?
thank you very much.
============== edit ===========
for @Jerome L
I ran into the same issue. I have an all swift project and am making a pure swift framework. In order to get the target in the same project file to see the classes in my framework, I needed to explicitly add the modifier
public
in front of my class declaration and in front of any method that I wanted to be accessible. Here is an example of one of the classes.The documentation states this in here https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html but is a bit buried. If you scroll down to the section called Importing Code from Within the Same Framework Target it says
In order to import Swift in objective C, you need to use the following syntax:
So I guess in your case ti would be something like:
You can find more details here