From e56f1d2a4e5d518855cfb4c67253dae9be90094f Mon Sep 17 00:00:00 2001 From: JanNiklas Grabowski Date: Mon, 26 Jun 2023 12:22:44 +0000 Subject: [PATCH] Feature/4753 bum test app --- .../BuM-Open/AppIdentifiers-bum-open.xcconfig | 39 +++++++ .../BuM-Open/BWIBuildSettings+BuM-Open.swift | 34 ++++++ Config/copyOpenConfig.sh | 20 ++++ Podfile | 20 ++++ Riot/target-bum-beta.yml | 1 + Riot/target-bum-open.yml | 107 ++++++++++++++++++ Riot/target-messenger.yml | 1 + Riot/target.yml | 1 + project.yml | 1 + 9 files changed, 224 insertions(+) create mode 100644 Config/BuM-Open/AppIdentifiers-bum-open.xcconfig create mode 100644 Config/BuM-Open/BWIBuildSettings+BuM-Open.swift create mode 100755 Config/copyOpenConfig.sh create mode 100644 Riot/target-bum-open.yml diff --git a/Config/BuM-Open/AppIdentifiers-bum-open.xcconfig b/Config/BuM-Open/AppIdentifiers-bum-open.xcconfig new file mode 100644 index 000000000..cecebe704 --- /dev/null +++ b/Config/BuM-Open/AppIdentifiers-bum-open.xcconfig @@ -0,0 +1,39 @@ +// +// Copyright 2021 Vector Creations 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. +// + + +// App identity +BUNDLE_DISPLAY_NAME = BuM-Open +BASE_BUNDLE_IDENTIFIER = de.bwi.messenger-open +APPLICATION_GROUP_IDENTIFIER = group.de.messenger-open +APPLICATION_SCHEME = element + +// Team +DEVELOPMENT_TEAM = Q111Q11QQ1 + + +// Provisioning profiles +RIOT_PROVISIONING_PROFILE_SPECIFIER = Vector App Store +RIOT_PROVISIONING_PROFILE = 7579fa6f-9887-415e-90fc-2c7acd8812e6 + +NSE_PROVISIONING_PROFILE_SPECIFIER = "Vector NSE: App Store" +NSE_PROVISIONING_PROFILE = e73107b2-1bfe-4615-be3e-39fd4dcb2af0 + +SHARE_EXTENSION_PROVISIONING_PROFILE_SPECIFIER = "Vector Share Extension: App Store" +SHARE_EXTENSION_PROVISIONING_PROFILE = 8c797ca0-0440-49bd-be8d-11d761152995 + +SIRI_INTENTS_PROVISIONING_PROFILE_SPECIFIER = "Vector Siri Intents: App Store" +SIRI_INTENTS_PROVISIONING_PROFILE = 1690e81a-5ad3-4d99-b578-02693579be71 diff --git a/Config/BuM-Open/BWIBuildSettings+BuM-Open.swift b/Config/BuM-Open/BWIBuildSettings+BuM-Open.swift new file mode 100644 index 000000000..823147272 --- /dev/null +++ b/Config/BuM-Open/BWIBuildSettings+BuM-Open.swift @@ -0,0 +1,34 @@ +// +/* + * Copyright (c) 2023 BWI GmbH + * + * 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. + */ + +import Foundation + +extension BWIBuildSettings { + + func overrideTargetSpecificSettings() { + secondaryAppName = "BundesMessenger" + locationSharingEnabled = false + bwiLocationShareButtonVisible = false + bwiLoginFlowLayout = false + authScreenShowTestServerOptions = false + + enableNewSessionManagerByDefault = true + + bwiEnableLoginProtection = false + } + +} diff --git a/Config/copyOpenConfig.sh b/Config/copyOpenConfig.sh new file mode 100755 index 000000000..392f83a60 --- /dev/null +++ b/Config/copyOpenConfig.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# setConfig.sh +# +# Copyright (c) 2023 BWI GmbH +# +# 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. +# + +cp -vf ../Config/BuM-Open/AppIdentifiers-bum-open.xcconfig ../Config/AppIdentifiers.xcconfig diff --git a/Podfile b/Podfile index f54632804..c2f8d59bc 100644 --- a/Podfile +++ b/Podfile @@ -155,6 +155,26 @@ abstract_target 'RiotPods' do pod 'FLEX', '~> 4.5.0', :configurations => ['Debug'] end + + target "BuM-Open" do + import_MatrixSDK + import_MatrixKit_pods + + import_SwiftUI_pods + + pod 'UICollectionViewLeftAlignedLayout', '~> 1.0.2' + pod 'UICollectionViewRightAlignedLayout', '~> 0.0.3' + pod 'KTCenterFlowLayout', '~> 1.3.1' + pod 'FlowCommoniOS', '~> 1.12.0' + pod 'DTTJailbreakDetection', '~> 0.4.0' + pod 'ReadMoreTextView', '~> 3.0.1' + pod 'SwiftBase32', '~> 0.9.0' + pod 'SwiftJWT', '~> 3.6.200' + pod 'SideMenu', '~> 6.5' + pod 'DSWaveformImage', '~> 6.1.1' + + pod 'FLEX', '~> 4.5.0', :configurations => ['Debug'] + end target "RiotSwiftUI" do import_SwiftUI_pods diff --git a/Riot/target-bum-beta.yml b/Riot/target-bum-beta.yml index 1351d3fa0..3a39d7c17 100644 --- a/Riot/target-bum-beta.yml +++ b/Riot/target-bum-beta.yml @@ -80,6 +80,7 @@ targets: excludes: - "AppIdentifiers.xcconfig" - "BuM" + - "BuM-Open" - "*.sh" - path: . excludes: diff --git a/Riot/target-bum-open.yml b/Riot/target-bum-open.yml new file mode 100644 index 000000000..60bbc951b --- /dev/null +++ b/Riot/target-bum-open.yml @@ -0,0 +1,107 @@ +name: BuM-Open + +schemes: + BuM-Open: + analyze: + config: Debug + archive: + config: Release + build: + targets: + BuM-Open: + - running + - testing + - profiling + - analyzing + - archiving + profile: + config: Release + run: + config: Debug + disableMainThreadChecker: true + test: + config: Debug + disableMainThreadChecker: true + gatherCoverageData: true + language: "de" + region: "DE" + environmentVariables: + username: + defaultpin: + defaultpassphrase: + defaultpassword: + targets: + - RiotTests + +targets: + BuM-Open: + type: application + platform: iOS + + dependencies: + - target: RiotNSE + - target: DesignKit + - target: CommonKit + - package: AnalyticsEvents + - package: Mapbox + - package: OrderedCollections + - package: SwiftOGG + - package: Lottie + - package: WysiwygComposer + - package: DeviceKit + + configFiles: + Debug: Debug.xcconfig + Release: Release.xcconfig + + preBuildScripts: + - name: ⚠️ SwiftLint + runOnlyWhenInstalling: false + shell: /bin/sh + script: "${PODS_ROOT}/SwiftLint/swiftlint\n" + - name: 🛠 SwiftGen + runOnlyWhenInstalling: false + shell: /bin/sh + script: "${PODS_ROOT}/SwiftGen/bin/swiftgen config run --config Tools/SwiftGen/swiftgen-config.yml\n" + + sources: + - path: ../RiotSwiftUI/Modules + # Riot will provide it's own LocaleProviderType so exclude. + # Riot will provide it's own LocaleProviderType so exclude. + excludes: + - "Common/Locale/LocaleProvider.swift" + - "**/Test/**" + - path: ../Tools + excludes: + - "Logs" + - "Release" + - "Templates/*.sh" + - path: ../Config + excludes: + - "BuM-Beta" + - "BuM" + - "AppIdentifiers.xcconfig" + - "*.sh" + - path: . + excludes: + - "Modules/Room/EmojiPicker/Data/EmojiMart/EmojiJSONStore.swift" + - "Modules/Analytics/Test/Unit/BWIAnalyticsTests.swift" + - "**/*.strings" # Exclude all strings files + - path: ../bwi + excludes: + - "Tests" + - "ServerURLs/serverurls.json" + - path: ../RiotShareExtension/Shared + - path: Modules/MatrixKit + excludes: + - "**/*.md" # excludes all files with the .md extension + # Add separately localizable files + # Once a language has enough translations (>80%), it must be declared here + - path: Assets/en.lproj/InfoPlist.strings + - path: Assets/en.lproj/Localizable.strings + - path: Assets/en.lproj/Vector.strings + - path: Assets/en.lproj/Bwi.strings + - path: Assets/de.lproj/InfoPlist.strings + - path: Assets/de.lproj/Localizable.strings + - path: Assets/de.lproj/Vector.strings + - path: Assets/de.lproj/Bwi.strings diff --git a/Riot/target-messenger.yml b/Riot/target-messenger.yml index 8b53a33c5..654c4a78c 100644 --- a/Riot/target-messenger.yml +++ b/Riot/target-messenger.yml @@ -79,6 +79,7 @@ targets: - path: ../Config excludes: - "BuM-Beta" + - "BuM-Open" - "*.sh" - path: . excludes: diff --git a/Riot/target.yml b/Riot/target.yml index 48f4a6ebf..cfbe335a3 100644 --- a/Riot/target.yml +++ b/Riot/target.yml @@ -85,6 +85,7 @@ targets: - "beta" - "bwi" - "BuM-Beta" + - "BuM-Open" - "*.sh" - path: . excludes: diff --git a/project.yml b/project.yml index 1067da832..76fbbb359 100644 --- a/project.yml +++ b/project.yml @@ -30,6 +30,7 @@ include: - path: Riot/target.yml - path: Riot/target-messenger.yml - path: Riot/target-bum-beta.yml + - path: Riot/target-bum-open.yml - path: RiotTests/target.yml - path: RiotShareExtension/target.yml - path: SiriIntents/target.yml