mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-16 06:28:27 +02:00
Clean up and make an application target so that debug works in live preview.
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
|
||||
/// Colors at https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=1255%3A1104
|
||||
public protocol Colors {
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
|
||||
/// Describe fonts used in the application.
|
||||
/// Font names are based on Element typograhy https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=1362%3A0 which is based on Apple font text styles (UIFont.TextStyle): https://developer.apple.com/documentation/uikit/uifonttextstyle
|
||||
|
||||
@@ -24,7 +24,7 @@ class MockAvatarService: AvatarServiceType {
|
||||
static let example: AvatarServiceType = MockAvatarService()
|
||||
func avatarImage(mxContentUri: String, avatarSize: AvatarSize) -> Future<UIImage, Error> {
|
||||
Future { promise in
|
||||
promise(.success(Asset.Images.appSymbol.image))
|
||||
promise(.success(Asset.Images.appSymbol.image))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import Combine
|
||||
/**
|
||||
Provides the theme and theme updates to SwiftUI.
|
||||
Replaces the old ThemeObserver. Riot app can push updates to this class
|
||||
removing the dependency of this calss on the `ThemeService`.
|
||||
removing the dependency of this class on the `ThemeService`.
|
||||
*/
|
||||
@available(iOS 14.0, *)
|
||||
class ThemePublisher: ObservableObject {
|
||||
|
||||
30
RiotSwiftUI/RiotSwiftUIApp.swift
Normal file
30
RiotSwiftUI/RiotSwiftUIApp.swift
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// Copyright 2021 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.
|
||||
//
|
||||
import SwiftUI
|
||||
|
||||
/**
|
||||
Just needed so the application target has an entry point for the moment.
|
||||
Could use to render the different screens.
|
||||
*/
|
||||
@available(iOS 14.0, *)
|
||||
@main
|
||||
struct testApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
Text("app")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ schemes:
|
||||
|
||||
targets:
|
||||
RiotSwiftUI:
|
||||
type: framework
|
||||
type: application
|
||||
platform: iOS
|
||||
dependencies:
|
||||
- target: DesignKit
|
||||
@@ -35,6 +35,8 @@ targets:
|
||||
buildPhase: resources
|
||||
- path: ../Riot/Assets/Images.xcassets
|
||||
buildPhase: resources
|
||||
- path: ../Riot/Assets/SharedImages.xcassets
|
||||
buildPhase: resources
|
||||
configFiles:
|
||||
Debug: Debug.xcconfig
|
||||
Release: Release.xcconfig
|
||||
|
||||
Reference in New Issue
Block a user