This should be easy but its got me stuck.
In my app, I have a global constant defined as
public let apiKey = "hjbcsddsbsdjhksdbvbsdbvsdbvs"
I want to use that apiKey in a library that I have added to my project as a SwiftPackage. I need it in the library to initiate a service.
Library.configure(withAPIKey: apiKey)
but I get the error
Cannot find apiKey in scope
I have tried wrapping the apiKey into a struct like so:
public struct globalConstants {
static let apiKey = "hjbcsddsbsdjhksdbvbsdbvsdbvs"
}
and using it as such:
Library.configure(withAPIKey: globalConstants.apiKey)
and I get a similar error message.
What am I missing?