While working in Swift project, I have two modules, let's say
BaseFeature
Base has a SHService class from where I am calling a function of Feature module (of class SHCommon). Feature module is building without error but Base raises error in linking phase.
Snapshot of workspace:

Base.SHService
import Foundation
import Feature
class SHService {
public func printMe(printString: String){
SHCommon().printMe(printString: printString)
}
}
Feature.SHCommon
import Foundation
public class SHCommon {
public init(){}
public func printMe(printString: String) {
print(printString)
}
}
Link error:

Any idea why this is happening?
from Swift linking error: type metadata accessor for Module.Class
No comments:
Post a Comment