mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 03:48:27 +00:00
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:
@@ -205,7 +205,7 @@ final class AppSettings {
|
||||
let darkTileMapStyleURL: URL = "https://api.maptiler.com/maps/dea61faf-292b-4774-9660-58fcef89a7f3"
|
||||
|
||||
// maptiler api key
|
||||
let mapTilerApiKey = "fU3vlMsMn4Jb6dnEIFsx"
|
||||
let mapTilerApiKey = InfoPlistReader.main.mapLibreAPIKey
|
||||
|
||||
// maptiler geocoding url
|
||||
let geocodingURLFormatString = "https://api.maptiler.com/geocoding/%f,%f.json"
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -60,5 +60,7 @@
|
||||
<string>$(BASE_BUNDLE_IDENTIFIER)</string>
|
||||
<key>keychainAccessGroupIdentifier</key>
|
||||
<string>$(KEYCHAIN_ACCESS_GROUP_IDENTIFIER)</string>
|
||||
<key>mapLibreAPIKey</key>
|
||||
<string>$(MAPLIBRE_API_KEY)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -45,6 +45,10 @@ targets:
|
||||
type: application
|
||||
platform: iOS
|
||||
|
||||
configFiles:
|
||||
Debug: ../../secrets.xcconfig
|
||||
Release: ../../secrets.xcconfig
|
||||
|
||||
info:
|
||||
path: ../SupportingFiles/Info.plist
|
||||
properties:
|
||||
@@ -76,6 +80,7 @@ targets:
|
||||
BGTaskSchedulerPermittedIdentifiers: [
|
||||
io.element.elementx.background.refresh
|
||||
]
|
||||
mapLibreAPIKey: $(MAPLIBRE_API_KEY)
|
||||
|
||||
|
||||
settings:
|
||||
|
||||
Reference in New Issue
Block a user