hey guys. I have two Targets(Test and Dev) in my project. They have different base url and endpoint names that are hold in info-Test.plist and info-Dev.plist. What I want to do is I want to read that base url and enpoints in a class and use them as global variables. I have a Configuration.swift file and when I try to read the plist items like that
then i get that error
Where it would be better option to read that values and hold them as globals?
Code:
if let baseURL = Bundle.main.path(forResource: "info", ofType: "plist") {
}
Statements are not allowed at the top level
Where it would be better option to read that values and hold them as globals?