parent
17c94f8598
commit
1ed3c66f5d
@ -0,0 +1,26 @@ |
||||
// |
||||
// Config.swift |
||||
// PadelClubData |
||||
// |
||||
// Created by Laurent Morvillier on 21/05/2025. |
||||
// |
||||
|
||||
@testable import PadelClubData |
||||
|
||||
class Config { |
||||
|
||||
static var server: (secure: Bool, domain: String) { |
||||
|
||||
let bundle = Bundle(for: self) |
||||
|
||||
let secure = PListReader.readBool(plist: "config", key: "secure_server", bundle: bundle) |
||||
let domain = PListReader.readString(plist: "config", key: "server_domain", bundle: bundle) |
||||
|
||||
if let secure, let domain { |
||||
return (secure, domain) |
||||
} |
||||
|
||||
fatalError("no server configuration") |
||||
} |
||||
|
||||
} |
||||
@ -1,12 +1,21 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||
<!-- |
||||
config.plist |
||||
PadelClubData |
||||
|
||||
Created by Laurent Morvillier on 21/05/2025. |
||||
Copyright (c) 2025 ___ORGANIZATIONNAME___. All rights reserved. |
||||
--> |
||||
<plist version="1.0"> |
||||
<dict/> |
||||
<dict> |
||||
<key>secure_server</key> |
||||
<true/> |
||||
<key>server_domain</key> |
||||
<string>test1.padelclub.app</string> |
||||
<key>references</key> |
||||
<dict> |
||||
<key>local_server_domain</key> |
||||
<string>127.0.0.1:8000</string> |
||||
<key>prod_server_domain</key> |
||||
<string>padelclub.app</string> |
||||
<key>test1_server_domain</key> |
||||
<string>test1.padelclub.app</string> |
||||
<key>xlr_server_domain</key> |
||||
<string>xlr.alwaysdata.net</string> |
||||
</dict> |
||||
</dict> |
||||
</plist> |
||||
|
||||
Loading…
Reference in new issue