diff --git a/.githooks/post-checkout b/.githooks/post-checkout index 5765f32c0c..a424f0b811 100755 --- a/.githooks/post-checkout +++ b/.githooks/post-checkout @@ -5,5 +5,5 @@ git lfs post-checkout "$@" #!/bin/bash export PATH="$PATH:/opt/homebrew/bin" -# ignores updates of 'secrets.xcconfig' to avoid pushing sensitive data by mistake -git update-index --assume-unchanged ElementX/SupportingFiles/secrets.xcconfig \ No newline at end of file +# ignores updates of 'Secrets.swift' to avoid pushing sensitive data by mistake +git update-index --assume-unchanged ElementX/SupportingFiles/Secrets.swift diff --git a/.github/workflows/unit_tests_enterprise.yml b/.github/workflows/unit_tests_enterprise.yml index 02545643dd..d2291e5ab1 100644 --- a/.github/workflows/unit_tests_enterprise.yml +++ b/.github/workflows/unit_tests_enterprise.yml @@ -41,6 +41,10 @@ jobs: run: bundle exec fastlane config_enterprise env: MAPLIBRE_API_KEY: WeDontNeedOneForUnitTests + SENTRY_DSN: https://sentry.localhost + POSTHOG_HOST: https://posthog.localhost + POSTHOG_API_KEY: WeDontNeedOneForUnitTests + RAGESHAKE_SERVER_URL: https://rageshake.localhost - name: SwiftFormat run: swiftformat --lint . diff --git a/.gitignore b/.gitignore index 79a67996e4..e0308969e2 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,7 @@ build ## macOS Files .DS_Store ._* + +# This is a temporary file that is used to generate Secrets.swift +# That file doesn't need to be ignored, as it we assumed-unchanged it post-checkout. +Secrets/secrets.yml diff --git a/.swiftformat b/.swiftformat index a54a94aa48..21bb29f1cc 100644 --- a/.swiftformat +++ b/.swiftformat @@ -1,6 +1,6 @@ --swiftversion 5.6 ---exclude ElementX/Sources/Generated,vendor,**/Package.swift,ElementX/Sources/Mocks/Generated +--exclude **/Sources/**/Generated,vendor,**/Package.swift,Secrets/** --disable wrapMultiLineStatementBraces --disable hoistPatternLet diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index b21c91acda..70b1c6ef7e 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -180,6 +180,7 @@ 21AFEFB8CEFE56A3811A1F5B /* VoiceMessageCacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 283974987DA7EC61D2AB57D9 /* VoiceMessageCacheTests.swift */; }; 21F29351EDD7B2A5534EE862 /* SecureBackupKeyBackupScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD558A898847C179E4B7A237 /* SecureBackupKeyBackupScreen.swift */; }; 22882C710BC99EC34A5024A0 /* UITestsScreenIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CEBE5EA91E8691EDF364EC2 /* UITestsScreenIdentifier.swift */; }; + 22B380C579C148BA0BFB5952 /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3557ACB95D0F666EF5AF0CE /* Secrets.swift */; }; 22C5483D01EEB290B8339817 /* HomeScreenInviteCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8FC33C3F6BF597E095CE9FA /* HomeScreenInviteCell.swift */; }; 230981086F0199F913434D6B /* EncryptionSettingsUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BF8E5D4C95974B96A18C80E /* EncryptionSettingsUITests.swift */; }; 2335D1AB954C151FD8779F45 /* RoomPermissionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0096BC5DA86AF6B6E5742AC /* RoomPermissionsTests.swift */; }; @@ -2353,6 +2354,7 @@ D28F7A6CEEA4A2815B0F0F55 /* SettingsFlowCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsFlowCoordinator.swift; sourceTree = ""; }; D316BB02636AF2174F2580E6 /* SoftLogoutScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoftLogoutScreenViewModelProtocol.swift; sourceTree = ""; }; D33116993D54FADC0C721C1F /* Application.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = ""; }; + D3557ACB95D0F666EF5AF0CE /* Secrets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Secrets.swift; sourceTree = ""; }; D38391154120264910D19528 /* PollMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollMock.swift; sourceTree = ""; }; D39D7F513A36C9C1951DB44C /* AnalyticsSettingsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsSettingsScreen.swift; sourceTree = ""; }; D3F219838588C62198E726E3 /* LABiometryType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LABiometryType.swift; sourceTree = ""; }; @@ -2439,7 +2441,6 @@ E5FDFAA04174CC99FB66391C /* EditRoomAddressScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditRoomAddressScreenViewModel.swift; sourceTree = ""; }; E60757AFE04391B43EA568B8 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = ""; }; E6372DD10DED30E7AD7BCE21 /* RoomListFiltersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomListFiltersView.swift; sourceTree = ""; }; - E65DA46BD5CA83747AE144F3 /* secrets.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = secrets.xcconfig; sourceTree = ""; }; E66763BD54A3A1D9C6E6F2F1 /* PinnedItemsIndicatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinnedItemsIndicatorView.swift; sourceTree = ""; }; E6935A55AB3B0C94BC566DD6 /* EncryptionResetPasswordScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptionResetPasswordScreenCoordinator.swift; sourceTree = ""; }; E6E6BDF9D26DB05C88901416 /* RedactedRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RedactedRoomTimelineItem.swift; sourceTree = ""; }; @@ -2500,6 +2501,7 @@ F17EFA1D3D09FC2F9C5E1CB2 /* MediaProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaProvider.swift; sourceTree = ""; }; F1B8500C152BC59445647DA8 /* UnsupportedRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnsupportedRoomTimelineItem.swift; sourceTree = ""; }; F276F31C1AEC19E52B951B62 /* SendInviteConfirmationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendInviteConfirmationView.swift; sourceTree = ""; }; + F2DC502B1A566E99969D34DD /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/InfoPlist.strings; sourceTree = ""; }; F2E4EF80DFB8FE7C4469B15D /* RoomDirectorySearchScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDirectorySearchScreen.swift; sourceTree = ""; }; F31F59030205A6F65B057E1A /* MatrixEntityRegexTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatrixEntityRegexTests.swift; sourceTree = ""; }; F348B5F2C12F9D4F4B4D3884 /* VideoRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineItem.swift; sourceTree = ""; }; @@ -2796,7 +2798,6 @@ 9C5E81214D27A6B898FC397D /* ElementX.entitlements */, 81B17DB1BC3B0C62AF84D230 /* Info.plist */, 048A21188AB19349D026BECD /* PrivacyInfo.xcprivacy */, - E65DA46BD5CA83747AE144F3 /* secrets.xcconfig */, B050A6B233D95807A09289E7 /* Settings.bundle */, F012CB5EE3F2B67359F6CC52 /* target.yml */, ); @@ -2952,6 +2953,14 @@ path = View; sourceTree = ""; }; + 2197234282B4BC0CE79AAC74 /* Secrets */ = { + isa = PBXGroup; + children = ( + D3557ACB95D0F666EF5AF0CE /* Secrets.swift */, + ); + path = Secrets; + sourceTree = ""; + }; 21E5BB69FC9058BED96B9EFD /* Sources */ = { isa = PBXGroup; children = ( @@ -3488,6 +3497,7 @@ A8002CB4F20B6282850A614C /* DevelopmentAssets */, B04B538A859CD012755DC19C /* NSE */, 1803CD2B96BF06009334BB61 /* PreviewTests */, + 2197234282B4BC0CE79AAC74 /* Secrets */, D0111119CDF3E28E6D7768E8 /* ShareExtension */, 681566846AF307E9BA4C72C6 /* Products */, ); @@ -7450,6 +7460,7 @@ 0437765FF480249486893CC7 /* ScreenTrackerViewModifier.swift in Sources */, 0BFA67AFD757EE2BA569836A /* ScrollViewAdapter.swift in Sources */, 67160204A8D362BB7D4AD259 /* Search.swift in Sources */, + 22B380C579C148BA0BFB5952 /* Secrets.swift in Sources */, 339BC18777912E1989F2F17D /* Section.swift in Sources */, F833D5B5BE6707F961FA88DB /* SecureBackupController.swift in Sources */, 2D0E3983288E2D35613AD681 /* SecureBackupControllerMock.swift in Sources */, @@ -7896,6 +7907,7 @@ 7199693797B66245EF97BCF5 /* id */, 44C314C00533E2C297796B60 /* it */, 0BA7D6C94A50428463D09AF0 /* ka */, + F2DC502B1A566E99969D34DD /* nb */, E60757AFE04391B43EA568B8 /* nl */, 997BF045585AF6DB2EBC5755 /* pl */, A8DF55467ED4CE76B7AE9A33 /* pt */, @@ -7982,7 +7994,6 @@ }; 62E1B7866DF0ED442C39A83B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E65DA46BD5CA83747AE144F3 /* secrets.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = ElementX/SupportingFiles/ElementX.entitlements; @@ -8011,7 +8022,6 @@ }; 6897D5BC19A2EA6ABD57DE7E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E65DA46BD5CA83747AE144F3 /* secrets.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = ElementX/SupportingFiles/ElementX.entitlements; @@ -8135,7 +8145,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 17.6; KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)"; MACOSX_DEPLOYMENT_TARGET = 14.6; - MARKETING_VERSION = 25.02.1; + MARKETING_VERSION = 25.03.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCTION_APP_NAME = Element; @@ -8212,7 +8222,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 17.6; KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)"; MACOSX_DEPLOYMENT_TARGET = 14.6; - MARKETING_VERSION = 25.02.1; + MARKETING_VERSION = 25.03.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; diff --git a/ElementX/Sources/Application/AppSettings.swift b/ElementX/Sources/Application/AppSettings.swift index 3422b6f8e4..40e51e0a57 100644 --- a/ElementX/Sources/Application/AppSettings.swift +++ b/ElementX/Sources/Application/AppSettings.swift @@ -200,8 +200,8 @@ final class AppSettings { // MARK: - Bug report - let bugReportServiceBaseURL: URL = "https://riot.im/bugreports" - let bugReportSentryURL: URL = "https://f39ac49e97714316965b777d9f3d6cd8@sentry.tools.element.io/44" + let bugReportServiceBaseURL: URL! = URL(string: Secrets.rageshakeServerURL) + let bugReportSentryURL: URL! = URL(string: Secrets.sentryDSN) // Use the name allocated by the bug report server let bugReportApplicationId = "element-x-ios" /// The maximum size of the upload request. Default value is just below CloudFlare's max request size. @@ -209,22 +209,15 @@ final class AppSettings { // MARK: - Analytics - #if DEBUG - /// The configuration to use for analytics during development. Set `isEnabled` to false to disable analytics in debug builds. - /// **Note:** Analytics are disabled by default for forks. If you are maintaining a fork, set custom configurations. - let analyticsConfiguration = AnalyticsConfiguration(isEnabled: InfoPlistReader.main.bundleIdentifier.starts(with: "io.element."), - host: "https://posthog.element.dev", - apiKey: "phc_VtA1L35nw3aeAtHIx1ayrGdzGkss7k1xINeXcoIQzXN", - termsURL: "https://element.io/cookie-policy") - #else /// The configuration to use for analytics. Set `isEnabled` to false to disable analytics. - /// **Note:** Analytics are disabled by default for forks. If you are maintaining a fork, set custom configurations. + /// + /// **Note:** Analytics are disabled by default for forks. If you are maintaining a fork you will + /// need to regenerate the Secrets file with your PostHog server and API key before enabling. let analyticsConfiguration = AnalyticsConfiguration(isEnabled: InfoPlistReader.main.bundleIdentifier.starts(with: "io.element."), - host: "https://posthog.element.io", - apiKey: "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO", - termsURL: URL("https://element.io/cookie-policy")) - #endif - + host: Secrets.postHogHost, + apiKey: Secrets.postHogAPIKey, + termsURL: "https://element.io/cookie-policy") + /// Whether the user has opted in to send analytics. @UserPreference(key: UserDefaultsKeys.analyticsConsentState, defaultValue: AnalyticsConsentState.unknown, storageType: .userDefaults(store)) var analyticsConsentState @@ -273,7 +266,7 @@ final class AppSettings { let mapTilerBaseURL: URL = "https://api.maptiler.com/maps" // maptiler api key - let mapTilerApiKey = InfoPlistReader.main.mapLibreAPIKey + let mapTilerApiKey = Secrets.mapLibreAPIKey // MARK: - Presence diff --git a/ElementX/Sources/Other/InfoPlistReader.swift b/ElementX/Sources/Other/InfoPlistReader.swift index f819040ece..df1686ab9a 100644 --- a/ElementX/Sources/Other/InfoPlistReader.swift +++ b/ElementX/Sources/Other/InfoPlistReader.swift @@ -15,7 +15,6 @@ struct InfoPlistReader { static let bundleShortVersion = "CFBundleShortVersionString" static let bundleDisplayName = "CFBundleDisplayName" static let productionAppName = "productionAppName" - static let mapLibreAPIKey = "mapLibreAPIKey" static let utExportedTypeDeclarationsKey = "UTExportedTypeDeclarations" static let utTypeIdentifierKey = "UTTypeIdentifier" static let utDescriptionKey = "UTTypeDescription" @@ -87,12 +86,6 @@ struct InfoPlistReader { var productionAppName: String { infoPlistValue(forKey: Keys.productionAppName) } - - // MARK: - MapLibre - - var mapLibreAPIKey: String { - infoPlistValue(forKey: Keys.mapLibreAPIKey) - } // MARK: - Custom App Scheme diff --git a/ElementX/SupportingFiles/Info.plist b/ElementX/SupportingFiles/Info.plist index 1008fa9c4e..9cb8f52b03 100644 --- a/ElementX/SupportingFiles/Info.plist +++ b/ElementX/SupportingFiles/Info.plist @@ -117,8 +117,6 @@ $(BASE_BUNDLE_IDENTIFIER) keychainAccessGroupIdentifier $(KEYCHAIN_ACCESS_GROUP_IDENTIFIER) - mapLibreAPIKey - $(MAPLIBRE_API_KEY) productionAppName $(PRODUCTION_APP_NAME) diff --git a/ElementX/SupportingFiles/secrets.xcconfig b/ElementX/SupportingFiles/secrets.xcconfig deleted file mode 100644 index ef84fb8992..0000000000 --- a/ElementX/SupportingFiles/secrets.xcconfig +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2023 New Vector Ltd -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Configuration settings file format documentation can be found at: -// https://help.apple.com/xcode/#/dev745c5c974 - -// MARK: - MapLibre -MAPLIBRE_API_KEY = your_key diff --git a/ElementX/SupportingFiles/target.yml b/ElementX/SupportingFiles/target.yml index 437f811128..550104cb20 100644 --- a/ElementX/SupportingFiles/target.yml +++ b/ElementX/SupportingFiles/target.yml @@ -42,10 +42,6 @@ targets: type: application platform: iOS - configFiles: - Debug: ../SupportingFiles/secrets.xcconfig - Release: ../SupportingFiles/secrets.xcconfig - info: path: ../SupportingFiles/Info.plist properties: @@ -109,8 +105,6 @@ targets: LSHandlerRank: Owner LSItemContentTypes: $(PILLS_UT_TYPE_IDENTIFIER) LSSupportsOpeningDocumentsInPlace: false - mapLibreAPIKey: $(MAPLIBRE_API_KEY) - settings: base: @@ -226,6 +220,7 @@ targets: excludes: - Other/Extensions/XCTestCase.swift - Other/Extensions/XCUIElement.swift + - path: ../../Secrets/Secrets.swift - path: ../Resources - path: ../SupportingFiles - path: ../../Tools/Scripts/Templates/SimpleScreenExample/ElementX diff --git a/Secrets/Secrets.pkl b/Secrets/Secrets.pkl new file mode 100644 index 0000000000..76ed68d74c --- /dev/null +++ b/Secrets/Secrets.pkl @@ -0,0 +1,17 @@ +// +// Copyright 2025 New Vector Ltd. +// +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. +// + +// Analytics and Diagnostics + +sentryDSN = read("env:SENTRY_DSN") +postHogHost = read("env:POSTHOG_HOST") +postHogAPIKey = read("env:POSTHOG_API_KEY") +rageshakeServerURL = read("env:RAGESHAKE_SERVER_URL") + +// Maps + +mapLibreAPIKey = read("env:MAPLIBRE_API_KEY") diff --git a/Secrets/Secrets.swift b/Secrets/Secrets.swift new file mode 100644 index 0000000000..c414670c09 --- /dev/null +++ b/Secrets/Secrets.swift @@ -0,0 +1,19 @@ +// swiftlint:disable all +// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen + +import Foundation + +// swiftlint:disable superfluous_disable_command +// swiftlint:disable file_length + +// MARK: - YAML Files + +// swiftlint:disable identifier_name line_length number_separator type_body_length +internal enum Secrets { + internal static let mapLibreAPIKey: String = "your_key" + internal static let postHogAPIKey: String = "your_key" + internal static let postHogHost: String = "https://posthog.localhost" + internal static let rageshakeServerURL: String = "https://rageshake.localhost" + internal static let sentryDSN: String = "https://sentry.localhost" +} +// swiftlint:enable identifier_name line_length number_separator type_body_length diff --git a/ci_scripts/ci_common.sh b/ci_scripts/ci_common.sh index 25a8d582ca..7bf07af311 100755 --- a/ci_scripts/ci_common.sh +++ b/ci_scripts/ci_common.sh @@ -30,14 +30,14 @@ setup_xcode_cloud_environment () { } install_xcode_cloud_brew_dependencies () { - brew update && brew install xcodegen pkl + brew update && brew install xcodegen swiftgen pkl } setup_github_actions_environment() { unset HOMEBREW_NO_INSTALL_FROM_API export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 - brew update && brew install xcodegen swiftlint swiftformat git-lfs pkl a7ex/homebrew-formulae/xcresultparser + brew update && brew install xcodegen swiftlint swiftformat swiftgen git-lfs pkl a7ex/homebrew-formulae/xcresultparser bundle config path vendor/bundle bundle install --jobs 4 --retry 3 diff --git a/docs/FORKING.md b/docs/FORKING.md index 82bbf659f3..b9d1735820 100644 --- a/docs/FORKING.md +++ b/docs/FORKING.md @@ -17,19 +17,20 @@ The location sharing feature on Element X is currently integrated with [MapLibre The MapLibre SDK requires an API key to work, so you need to get one for yourself. -After you get an API key, you need to configure the project by adding it inside the file `secrets.xconfig` in the project root folder. After you are done, the file should contain a setting like this: +After you get an API key, you need to configure the project by exporting it and regenerating the `Secrets.swift` file: ``` -MAPLIBRE_API_KEY = your_map_libre_key +export MAPLIBRE_API_KEY=your_map_libre_key +bundle exec fastlane config_secrets ``` It’s not recommended to push your API key in your repository since other people may get it. One way to avoid pushing the API key by mistake is running on your machine the command: ``` -git update-index assume-unchanged secrets.xcconfig +git update-index assume-unchanged Secrets/Secrets.swift ``` -this will prevent pushing any update of the file`secrets.xcconfig`. +this will prevent pushing any update of the file `Secrets.swift`. Finally you need to setup your map styles overriding the values you find in the code: diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0605ce7782..88ceab0faf 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -408,14 +408,9 @@ private_lane :create_simulator_if_necessary do |options| end end -private_lane :config_secrets do - maplibre_api_key = ENV["MAPLIBRE_API_KEY"] - UI.user_error!("Invalid Map Libre API key.") unless !maplibre_api_key.to_s.empty? - - set_xcconfig_value( - path: './ElementX/SupportingFiles/secrets.xcconfig', - name: 'MAPLIBRE_API_KEY', - value: maplibre_api_key, - mask_value: true - ) +lane :config_secrets do + Dir.chdir "../Secrets" do + sh("pkl eval -f yaml -o secrets.yml Secrets.pkl") + sh("swiftgen run yaml -n inline-swift5 --param enumName=Secrets -o Secrets.swift secrets.yml") + end end diff --git a/fastlane/README.md b/fastlane/README.md index ae2f9317d5..aebf3bc079 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -101,6 +101,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do +### config_secrets + +```sh +[bundle exec] fastlane config_secrets +``` + + + ---- This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. diff --git a/project.yml b/project.yml index 8655096d3d..b80e109547 100644 --- a/project.yml +++ b/project.yml @@ -41,7 +41,7 @@ settings: APP_GROUP_IDENTIFIER: group.$(BASE_APP_GROUP_IDENTIFIER) APP_NAME: ElementX KEYCHAIN_ACCESS_GROUP_IDENTIFIER: "$(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)" - MARKETING_VERSION: 25.02.1 + MARKETING_VERSION: 25.03.0 CURRENT_PROJECT_VERSION: 1 SUPPORTS_MACCATALYST: false diff --git a/secrets.xcconfig b/secrets.xcconfig deleted file mode 100644 index 5eb6c81379..0000000000 --- a/secrets.xcconfig +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright 2023 New Vector Ltd -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Configuration settings file format documentation can be found at: -// https://help.apple.com/xcode/#/dev745c5c974 - -MAPLIBRE_API_KEY = your_key