Fix UI tests.

This commit is contained in:
SBiOSoftWhare 2022-05-16 18:18:13 +02:00
parent dfd57a55da
commit ebf4458c23
4 changed files with 38 additions and 10 deletions

View file

@ -21,16 +21,6 @@ protocol LocationManagerDelegate: AnyObject {
func locationManager(_ manager: LocationManager, didUpdateLocation location: CLLocation)
}
typealias LocationAuthorizationHandler = (_ authorizationStatus: LocationAuthorizationStatus) -> Void
/// Location authorization status
enum LocationAuthorizationStatus {
case unknown
case denied
case authorizedInForeground
case authorizedAlways
}
/// Location accuracy
enum LocationManagerAccuracy {
case full

View file

@ -0,0 +1,33 @@
//
// Copyright 2022 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 Foundation
/// Location authorization status
enum LocationAuthorizationStatus {
/// Location status unknown
case unknown
/// Location access is denied
case denied
/// Location only authorized in foreground
case authorizedInForeground
/// Location only authorized in foreground and background
case authorizedAlways
}

View file

@ -18,7 +18,11 @@ import Foundation
import Combine
import CoreLocation
/// Location authorization request handler
typealias LocationAuthorizationHandler = (_ authorizationStatus: LocationAuthorizationStatus) -> Void
protocol LocationSharingServiceProtocol {
/// Request location authorization
func requestAuthorization(_ handler: @escaping LocationAuthorizationHandler)
}

View file

@ -62,6 +62,7 @@ targets:
- path: ../Riot/Categories/UIColor.swift
- path: ../Riot/Categories/UISearchBar.swift
- path: ../Riot/Categories/UIView.swift
- path: ../Riot/Categories/UIApplication.swift
- path: ../Riot/Assets/en.lproj/Vector.strings
- path: ../Riot/Modules/Analytics/AnalyticsScreen.swift
- path: ../Riot/Assets/en.lproj/Untranslated.strings