Importing a custom programmed swift package

I have made a custom swift package that contains the encoding and decoding functions for my app String Conversion Tool. It is uploaded to GitHub: (https://github.com/Casual3306/ConverterExtra). I do a request for the package (in my apps main project) and the package imports just fine, it is present in the Frameworks, Libraries, and Embedded Content and it is present in Package Dependencies, I have also run: "Reset Package Caches" and "Resolve Package Versions". The package also imports into the designated module as a "module" but when I try to access any of that "modules" files like > ConverterExtras > Encoders it is giving me an error saying that "This class may not be available in this context". All of the files are in the module package but Xcode isn't finding them for some reason:

Xcode version: 13 System: MacOS (Big Sur 11.6)

Answered by robnotyou in 691241022

Did you declare anything that needs to be accessed outside the package as "public"?

Accepted Answer

Did you declare anything that needs to be accessed outside the package as "public"?

I think I see what you mean...

import ExtraConverter

let encoder = Encoder.init(source: myString)

then in the package's contents make the class and constructors public is what solved the issue...

Importing a custom programmed swift package
 
 
Q