I want to move swift extension files into a swift package. But, after move files to swift package, I have got this kind of error:
"Type 'NSAttributedString' has no member 'makeUnderlineString'"
Can't we add a swift extension into a swift package?
Updated:
Finally, I have solved the issue. I missed several things. These are you have to do for using extensions in Swift Package. Thanks all for your comments.
Add "public" in front of the "extension"
public extension String {
If you edit the Swift Package in local, create a scheme for the Swift Package.
Add the Swift Package into "TARGET -> General -> Frameworks, Libraries, and Embedded Content".
Import the target of the Swift Package. Here the MyLibrary is a target name in Swift Package.
import MyLibrary