Reputation: 1305
I just converted a git repository to Swift Package Manager (spm), all good, it compiles and I can import it in the project.
What is not good is that the project doesn't compile, is not seeing the protocol
. My lib is a single generic class and i'm supposed to create an enum that implements the protocol then use the enum as a generic of the class.
enum LocalPreferences: String, RCPreferencesProtocol {
I get: Use of undeclared type RCPreferencesProtocol
Then I get further errors when trying to use the enum but i think this are only because the enum had an error:
private let localPreferences = RCPreferences<LocalPreferences>()
I get: Cannot specialize a non-generic definition
Anybody had this problem and fixed it?
Here is reference to the library is the lib for reference.
Upvotes: 1
Views: 641
Reputation: 1305
I made a stupid mistake, didn't declared the protocol and class public in the package. Strange though that the unit tests of the package passed instead giving the same error.
Upvotes: 2