Move Map Libre API key to Xcode Cloud (#1313)

* Add config_production lane

* Add maplibre to .gitignore

* Add setupMapLibreKey

* Add documentation

* Fix failing UTs

* Fix more UTs

* Cleanup

* Add secrets.xcconfig

* Cleanup gitignore file

* Update post-checkout hook

* Cleanup SetupProject

* Update project

* Remove leftover in SetupProject

* Cleanup project.yml

* Add fastlane-plugin-xcconfig

* Improve test

* Update docs
This commit is contained in:
Alfonso Grillo
2023-07-14 10:19:38 +02:00
committed by GitHub
parent 027b6b21f7
commit a7256bb486
17 changed files with 160 additions and 13 deletions
@@ -23,6 +23,7 @@ struct InfoPlistReader {
static let keychainAccessGroupIdentifier = "keychainAccessGroupIdentifier"
static let bundleShortVersion = "CFBundleShortVersionString"
static let bundleDisplayName = "CFBundleDisplayName"
static let mapLibreAPIKey = "mapLibreAPIKey"
}
/// Info.plist reader on the bundle object that contains the current executable.
@@ -76,6 +77,11 @@ struct InfoPlistReader {
infoPlistStringValue(forKey: Keys.bundleDisplayName)
}
/// Map Libre API Key
var mapLibreAPIKey: String {
infoPlistStringValue(forKey: Keys.mapLibreAPIKey)
}
private func infoPlistStringValue(forKey key: String) -> String {
guard let result = bundle.object(forInfoDictionaryKey: key) as? String else {
fatalError("Add \(key) into your target's Info.plst")