From fba61750115a078e571996b8bf2729aeb72662db Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Tue, 27 Feb 2024 17:11:42 +0100 Subject: [PATCH 01/15] =?UTF-8?q?R=C3=A9activation=20des=20parties=20de=20?= =?UTF-8?q?code=20Live=20Location=20Sharing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Riot/Modules/Room/RoomCoordinator.swift | 324 ++++++++++++------------ Riot/Modules/Room/RoomViewController.h | 22 +- Riot/Modules/Room/RoomViewController.m | 8 +- Tchap/target.yml | 14 +- 4 files changed, 184 insertions(+), 184 deletions(-) diff --git a/Riot/Modules/Room/RoomCoordinator.swift b/Riot/Modules/Room/RoomCoordinator.swift index c94cdfb17..a988fef4f 100644 --- a/Riot/Modules/Room/RoomCoordinator.swift +++ b/Riot/Modules/Room/RoomCoordinator.swift @@ -315,166 +315,166 @@ final class RoomCoordinator: NSObject, RoomCoordinatorProtocol { } // Tchap: Disable Live location sharing -// private func showLiveLocationViewer() { -// guard let roomId = self.roomId else { -// return -// } -// -// self.showLiveLocationViewer(for: roomId) -// } -// -// private func showLiveLocationViewer(for roomId: String) { -// -// guard let mxSession = self.mxSession, let navigationRouter = self.navigationRouter else { -// return -// } -// -// guard mxSession.locationService.isSomeoneSharingDisplayableLocation(inRoomWithId: roomId) else { -// return -// } -// -// let parameters = LiveLocationSharingViewerCoordinatorParameters(session: mxSession, roomId: roomId, navigationRouter: nil) -// -// let coordinator = LiveLocationSharingViewerCoordinator(parameters: parameters) -// -// coordinator.completion = { [weak self, weak coordinator] in -// guard let self = self, let coordinator = coordinator else { -// return -// } -// -// self.navigationRouter?.dismissModule(animated: true, completion: nil) -// self.remove(childCoordinator: coordinator) -// } -// -// add(childCoordinator: coordinator) -// -// navigationRouter.present(coordinator, animated: true) -// coordinator.start() -// } -// -// private func stopLiveLocationSharing(forBeaconInfoEventId beaconInfoEventId: String? = nil, inRoomWithId roomId: String) { -// guard let session = self.mxSession else { -// return -// } -// -// let errorHandler: (Error) -> Void = { error in -// -// let viewController = self.roomViewController -// -// viewController.errorPresenter.presentError(from: viewController, title: VectorL10n.error, message: VectorL10n.locationSharingLiveStopSharingError, animated: true) { -// } -// } -// -// // TODO: Handle loading state on the banner by replacing stop button with a spinner -// self.showLocationSharingIndicator(withMessage: VectorL10n.locationSharingLiveStopSharingProgress) -// -// if let beaconInfoEventId = beaconInfoEventId { -// session.locationService.stopUserLocationSharing(withBeaconInfoEventId: beaconInfoEventId, roomId: roomId) { -// [weak self] response in -// -// self?.hideLocationSharingIndicator() -// -// switch response { -// case .success: -// break -// case .failure(let error): -// errorHandler(error) -// } -// } -// } else { -// session.locationService.stopUserLocationSharing(inRoomWithId: roomId) { [weak self] response in -// -// self?.hideLocationSharingIndicator() -// -// switch response { -// case .success: -// break -// case .failure(let error): -// errorHandler(error) -// } -// } -// } -// } -// -// private func showLocationCoordinatorWithEvent(_ event: MXEvent, bubbleData: MXKRoomBubbleCellDataStoring) { -// guard let mxSession = self.mxSession, -// let navigationRouter = self.navigationRouter, -// let mediaManager = mxSession.mediaManager, -// let locationContent = event.location else { -// MXLog.error("[RoomCoordinator] Invalid location showing coordinator parameters. Returning.") -// return -// } -// -// let avatarData = AvatarInput(mxContentUri: bubbleData.senderAvatarUrl, -// matrixItemId: bubbleData.senderId, -// displayName: bubbleData.senderDisplayName) -// -// -// let location = CLLocationCoordinate2D(latitude: locationContent.latitude, longitude: locationContent.longitude) -// let coordinateType = locationContent.assetType -// -// guard let locationSharingCoordinatetype = coordinateType.locationSharingCoordinateType() else { -// fatalError("[LocationSharingCoordinator] event asset type is not supported: \(coordinateType)") -// } -// -// let parameters = StaticLocationViewingCoordinatorParameters( -// session: mxSession, -// mediaManager: mediaManager, -// avatarData: avatarData, -// location: location, -// coordinateType: locationSharingCoordinatetype) -// -// let coordinator = StaticLocationViewingCoordinator(parameters: parameters) -// -// coordinator.completion = { [weak self, weak coordinator] in -// guard let self = self, let coordinator = coordinator else { -// return -// } -// -// self.navigationRouter?.dismissModule(animated: true, completion: nil) -// self.remove(childCoordinator: coordinator) -// } -// -// add(childCoordinator: coordinator) -// -// navigationRouter.present(coordinator, animated: true) -// coordinator.start() -// } -// -// private func startLocationCoordinator() { -// guard let mxSession = mxSession, -// let navigationRouter = self.navigationRouter, -// let mediaManager = mxSession.mediaManager, -// let user = mxSession.myUser else { -// MXLog.error("[RoomCoordinator] Invalid location sharing coordinator parameters. Returning.") -// return -// } -// -// let avatarData = AvatarInput(mxContentUri: user.avatarUrl, -// matrixItemId: user.userId, -// displayName: user.displayname) -// -// let parameters = LocationSharingCoordinatorParameters(session: mxSession, -// roomDataSource: roomViewController.roomDataSource, -// mediaManager: mediaManager, -// avatarData: avatarData) -// -// let coordinator = LocationSharingCoordinator(parameters: parameters) -// -// coordinator.completion = { [weak self, weak coordinator] in -// guard let self = self, let coordinator = coordinator else { -// return -// } -// -// self.navigationRouter?.dismissModule(animated: true, completion: nil) -// self.remove(childCoordinator: coordinator) -// } -// -// add(childCoordinator: coordinator) -// -// navigationRouter.present(coordinator, animated: true) -// coordinator.start() -// } + private func showLiveLocationViewer() { + guard let roomId = self.roomId else { + return + } + + self.showLiveLocationViewer(for: roomId) + } + + private func showLiveLocationViewer(for roomId: String) { + + guard let mxSession = self.mxSession, let navigationRouter = self.navigationRouter else { + return + } + + guard mxSession.locationService.isSomeoneSharingDisplayableLocation(inRoomWithId: roomId) else { + return + } + + let parameters = LiveLocationSharingViewerCoordinatorParameters(session: mxSession, roomId: roomId, navigationRouter: nil) + + let coordinator = LiveLocationSharingViewerCoordinator(parameters: parameters) + + coordinator.completion = { [weak self, weak coordinator] in + guard let self = self, let coordinator = coordinator else { + return + } + + self.navigationRouter?.dismissModule(animated: true, completion: nil) + self.remove(childCoordinator: coordinator) + } + + add(childCoordinator: coordinator) + + navigationRouter.present(coordinator, animated: true) + coordinator.start() + } + + private func stopLiveLocationSharing(forBeaconInfoEventId beaconInfoEventId: String? = nil, inRoomWithId roomId: String) { + guard let session = self.mxSession else { + return + } + + let errorHandler: (Error) -> Void = { error in + + let viewController = self.roomViewController + + viewController.errorPresenter.presentError(from: viewController, title: VectorL10n.error, message: VectorL10n.locationSharingLiveStopSharingError, animated: true) { + } + } + + // TODO: Handle loading state on the banner by replacing stop button with a spinner + self.showLocationSharingIndicator(withMessage: VectorL10n.locationSharingLiveStopSharingProgress) + + if let beaconInfoEventId = beaconInfoEventId { + session.locationService.stopUserLocationSharing(withBeaconInfoEventId: beaconInfoEventId, roomId: roomId) { + [weak self] response in + + self?.hideLocationSharingIndicator() + + switch response { + case .success: + break + case .failure(let error): + errorHandler(error) + } + } + } else { + session.locationService.stopUserLocationSharing(inRoomWithId: roomId) { [weak self] response in + + self?.hideLocationSharingIndicator() + + switch response { + case .success: + break + case .failure(let error): + errorHandler(error) + } + } + } + } + + private func showLocationCoordinatorWithEvent(_ event: MXEvent, bubbleData: MXKRoomBubbleCellDataStoring) { + guard let mxSession = self.mxSession, + let navigationRouter = self.navigationRouter, + let mediaManager = mxSession.mediaManager, + let locationContent = event.location else { + MXLog.error("[RoomCoordinator] Invalid location showing coordinator parameters. Returning.") + return + } + + let avatarData = AvatarInput(mxContentUri: bubbleData.senderAvatarUrl, + matrixItemId: bubbleData.senderId, + displayName: bubbleData.senderDisplayName) + + + let location = CLLocationCoordinate2D(latitude: locationContent.latitude, longitude: locationContent.longitude) + let coordinateType = locationContent.assetType + + guard let locationSharingCoordinatetype = coordinateType.locationSharingCoordinateType() else { + fatalError("[LocationSharingCoordinator] event asset type is not supported: \(coordinateType)") + } + + let parameters = StaticLocationViewingCoordinatorParameters( + session: mxSession, + mediaManager: mediaManager, + avatarData: avatarData, + location: location, + coordinateType: locationSharingCoordinatetype) + + let coordinator = StaticLocationViewingCoordinator(parameters: parameters) + + coordinator.completion = { [weak self, weak coordinator] in + guard let self = self, let coordinator = coordinator else { + return + } + + self.navigationRouter?.dismissModule(animated: true, completion: nil) + self.remove(childCoordinator: coordinator) + } + + add(childCoordinator: coordinator) + + navigationRouter.present(coordinator, animated: true) + coordinator.start() + } + + private func startLocationCoordinator() { + guard let mxSession = mxSession, + let navigationRouter = self.navigationRouter, + let mediaManager = mxSession.mediaManager, + let user = mxSession.myUser else { + MXLog.error("[RoomCoordinator] Invalid location sharing coordinator parameters. Returning.") + return + } + + let avatarData = AvatarInput(mxContentUri: user.avatarUrl, + matrixItemId: user.userId, + displayName: user.displayname) + + let parameters = LocationSharingCoordinatorParameters(session: mxSession, + roomDataSource: roomViewController.roomDataSource, + mediaManager: mediaManager, + avatarData: avatarData) + + let coordinator = LocationSharingCoordinator(parameters: parameters) + + coordinator.completion = { [weak self, weak coordinator] in + guard let self = self, let coordinator = coordinator else { + return + } + + self.navigationRouter?.dismissModule(animated: true, completion: nil) + self.remove(childCoordinator: coordinator) + } + + add(childCoordinator: coordinator) + + navigationRouter.present(coordinator, animated: true) + coordinator.start() + } private func startEditPollCoordinator(startEvent: MXEvent? = nil) { let parameters = PollEditFormCoordinatorParameters(room: roomViewController.roomDataSource.room, pollStartEvent: startEvent) @@ -635,7 +635,7 @@ extension RoomCoordinator: RoomViewControllerDelegate { } // Tchap: Disable Live location sharing -// showLiveLocationViewer(for: roomId) + showLiveLocationViewer(for: roomId) } func roomViewController(_ roomViewController: RoomViewController, locationShareActivityViewControllerFor event: MXEvent) -> UIActivityViewController? { @@ -682,7 +682,7 @@ extension RoomCoordinator: RoomViewControllerDelegate { return } -// self.stopLiveLocationSharing(forBeaconInfoEventId: beaconInfoEventId, inRoomWithId: roomId) + self.stopLiveLocationSharing(forBeaconInfoEventId: beaconInfoEventId, inRoomWithId: roomId) } func threadsCoordinator(for roomViewController: RoomViewController, threadId: String?) -> ThreadsCoordinatorBridgePresenter? { diff --git a/Riot/Modules/Room/RoomViewController.h b/Riot/Modules/Room/RoomViewController.h index 9029e33e7..a05b3a015 100644 --- a/Riot/Modules/Room/RoomViewController.h +++ b/Riot/Modules/Room/RoomViewController.h @@ -32,9 +32,9 @@ @protocol RoomViewControllerDelegate; @class RoomDisplayConfiguration; // Tchap: Disable Threads -// Tchap: Disable Live location sharing //@class ThreadsCoordinatorBridgePresenter; -//@class LiveLocationSharingBannerView; +// Tchap: Disable Live location sharing +@class LiveLocationSharingBannerView; @class VoiceBroadcastService; @class ComposerLinkActionBridgePresenter; @@ -108,11 +108,11 @@ extern NSTimeInterval const kResizeComposerAnimationDuration; @property (weak, nonatomic, nullable) IBOutlet UIStackView *topBannersStackView; // Tchap: Disable Live location sharing -// /// Indicate YES to show live location sharing banner -//@property (nonatomic, readonly) BOOL shouldShowLiveLocationSharingBannerView; -// -// /// Displayed live location sharing banner if any -//@property (nonatomic, weak) LiveLocationSharingBannerView *liveLocationSharingBannerView; + /// Indicate YES to show live location sharing banner +@property (nonatomic, readonly) BOOL shouldShowLiveLocationSharingBannerView; + + /// Displayed live location sharing banner if any +@property (nonatomic, weak) LiveLocationSharingBannerView *liveLocationSharingBannerView; // The customized room data source for Vector @property (nonatomic, nullable) RoomDataSource *customizedRoomDataSource; @@ -312,9 +312,9 @@ didRequestLocationPresentationForEvent:(MXEvent *)event bubbleData:(id)bubbleData; // Tchap: Disable Live location sharing -/// Ask the coordinator to present the live location sharing viewer. -//- (void)roomViewController:(RoomViewController *)roomViewController -//didRequestLiveLocationPresentationForBubbleData:(id)bubbleData; +// Ask the coordinator to present the live location sharing viewer. +- (void)roomViewController:(RoomViewController *)roomViewController +didRequestLiveLocationPresentationForBubbleData:(id)bubbleData; - (nullable UIActivityViewController *)roomViewController:(RoomViewController *)roomViewController locationShareActivityViewControllerForEvent:(MXEvent *)event; @@ -349,7 +349,7 @@ didRequestEditForPollWithStartEvent:(MXEvent *)startEvent; // Tchap: Disable Live location sharing /// User tap live location sharing stop action -//- (void)roomViewControllerDidStopLiveLocationSharing:(RoomViewController *)roomViewController beaconInfoEventId:(nullable NSString*)beaconInfoEventId; +- (void)roomViewControllerDidStopLiveLocationSharing:(RoomViewController *)roomViewController beaconInfoEventId:(nullable NSString*)beaconInfoEventId; /// User tap live location sharing banner - (void)roomViewControllerDidTapLiveLocationSharingBanner:(RoomViewController *)roomViewController; diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index b0024715e..28b067017 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -1657,10 +1657,10 @@ - (void)setMissedDiscussionsBadgeHidden:(BOOL)missedDiscussionsBadgeHidden{ } // Tchap: Disable Live location sharing -//- (BOOL)shouldShowLiveLocationSharingBannerView -//{ -// return self.customizedRoomDataSource.isCurrentUserSharingActiveLocation; -//} +- (BOOL)shouldShowLiveLocationSharingBannerView +{ + return self.customizedRoomDataSource.isCurrentUserSharingActiveLocation; +} - (void)setForceHideInputToolBar:(BOOL)forceHideInputToolBar { diff --git a/Tchap/target.yml b/Tchap/target.yml index b94a4cfd3..ca217337c 100644 --- a/Tchap/target.yml +++ b/Tchap/target.yml @@ -257,13 +257,13 @@ targetTemplates: - path: ../Riot/Modules/Rendezvous - path: ../Riot/Modules/Room excludes: - - "Location" - - "RoomViewController+LocationSharing.swift" - - "TimelineCells/LocationView" - - "TimelineCells/Styles/Plain/Cells/Location" - - "TimelineCells/Styles/Bubble/Cells/Location" - - "Views/BubbleCells/KeyVerification/SizingViewHeight.swift" - - "Views/BubbleCells/Location" +# - "Location" +# - "RoomViewController+LocationSharing.swift" +# - "TimelineCells/LocationView" +# - "TimelineCells/Styles/Plain/Cells/Location" +# - "TimelineCells/Styles/Bubble/Cells/Location" +# - "Views/BubbleCells/KeyVerification/SizingViewHeight.swift" +# - "Views/BubbleCells/Location" - path: ../Riot/Modules/Rooms - path: ../Riot/Modules/Secrets - path: ../Riot/Modules/SecureBackup From fb3571b0e8b5bd97504f011aa446f7474b537da3 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Wed, 28 Feb 2024 16:13:32 +0100 Subject: [PATCH 02/15] =?UTF-8?q?Int=C3=A9gration=20des=20fichiers=20Eleme?= =?UTF-8?q?nt=20n=C3=A9cessaires=20=C3=A0=20la=20compilation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HomeserverConfiguration.swift | 8 +++---- .../HomeserverConfigurationBuilder.swift | 22 +++++++++---------- Riot/Modules/Room/RoomCoordinator.swift | 2 +- RiotSwiftUI/target.yml | 2 +- .../RoomPreview/RoomPreviewCoordinator.swift | 9 ++++++++ Tchap/target.yml | 4 +++- 6 files changed, 29 insertions(+), 18 deletions(-) diff --git a/Riot/Model/HomeserverConfiguration/HomeserverConfiguration.swift b/Riot/Model/HomeserverConfiguration/HomeserverConfiguration.swift index a3bee4c8f..994e4fb2c 100644 --- a/Riot/Model/HomeserverConfiguration/HomeserverConfiguration.swift +++ b/Riot/Model/HomeserverConfiguration/HomeserverConfiguration.swift @@ -23,13 +23,13 @@ final class HomeserverConfiguration: NSObject { // Note: Use an object per configuration subject when there is multiple properties related let jitsi: HomeserverJitsiConfiguration let encryption: HomeserverEncryptionConfiguration -// let tileServer: HomeserverTileServerConfiguration + let tileServer: HomeserverTileServerConfiguration init(jitsi: HomeserverJitsiConfiguration, - encryption: HomeserverEncryptionConfiguration/*, - tileServer: HomeserverTileServerConfiguration*/) { + encryption: HomeserverEncryptionConfiguration, + tileServer: HomeserverTileServerConfiguration) { self.jitsi = jitsi self.encryption = encryption -// self.tileServer = tileServer + self.tileServer = tileServer } } diff --git a/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift b/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift index 494b50d0a..bc6182faa 100644 --- a/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift +++ b/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift @@ -78,15 +78,15 @@ final class HomeserverConfigurationBuilder: NSObject { // Tile server configuration -// let tileServerMapStyleURL: URL -// if let mapStyleURLString = wellKnown?.tileServer?.mapStyleURLString, -// let mapStyleURL = URL(string: mapStyleURLString) { -// tileServerMapStyleURL = mapStyleURL -// } else { -// tileServerMapStyleURL = BuildSettings.defaultTileServerMapStyleURL -// } -// -// let tileServerConfiguration = HomeserverTileServerConfiguration(mapStyleURL: tileServerMapStyleURL) + let tileServerMapStyleURL: URL + if let mapStyleURLString = wellKnown?.tileServer?.mapStyleURLString, + let mapStyleURL = URL(string: mapStyleURLString) { + tileServerMapStyleURL = mapStyleURL + } else { + tileServerMapStyleURL = BuildSettings.defaultTileServerMapStyleURL + } + + let tileServerConfiguration = HomeserverTileServerConfiguration(mapStyleURL: tileServerMapStyleURL) // Create HomeserverConfiguration @@ -95,8 +95,8 @@ final class HomeserverConfigurationBuilder: NSObject { useFor1To1Calls: useJitsiFor1To1Calls) return HomeserverConfiguration(jitsi: jitsiConfiguration, - encryption: encryptionConfiguration/*, - tileServer: tileServerConfiguration*/) + encryption: encryptionConfiguration, + tileServer: tileServerConfiguration) } // MARK: - Private diff --git a/Riot/Modules/Room/RoomCoordinator.swift b/Riot/Modules/Room/RoomCoordinator.swift index a988fef4f..cd09ddaa0 100644 --- a/Riot/Modules/Room/RoomCoordinator.swift +++ b/Riot/Modules/Room/RoomCoordinator.swift @@ -579,7 +579,7 @@ extension RoomCoordinator: UIAdaptivePresentationControllerDelegate { // MARK: - RoomViewControllerDelegate extension RoomCoordinator: RoomViewControllerDelegate { - + func roomViewController(_ roomViewController: RoomViewController, showRoomWithId roomID: String, eventId eventID: String?) { self.delegate?.roomCoordinator(self, didSelectRoomWithId: roomID, eventId: eventID) } diff --git a/RiotSwiftUI/target.yml b/RiotSwiftUI/target.yml index d7f17f313..ca8d623c7 100644 --- a/RiotSwiftUI/target.yml +++ b/RiotSwiftUI/target.yml @@ -65,7 +65,7 @@ targets: - path: ../Riot/Categories/Codable.swift - path: ../Riot/Assets/en.lproj/Vector.strings - path: ../Riot/Modules/Analytics/AnalyticsScreen.swift - - path: ../Riot/Modules/LocationSharing/LocationAuthorizationStatus.swift + - path: ../Riot/Modules/LocationSharing/ - path: ../Riot/Modules/QRCode/QRCodeGenerator.swift - path: ../Riot/Modules/VoiceBroadcast/VoiceBroadcastSDK/MatrixSDK/VoiceBroadcastInfoState.swift - path: ../Riot/Assets/en.lproj/Untranslated.strings diff --git a/Tchap/Modules/RoomPreview/RoomPreviewCoordinator.swift b/Tchap/Modules/RoomPreview/RoomPreviewCoordinator.swift index c0103af40..5c345ebed 100644 --- a/Tchap/Modules/RoomPreview/RoomPreviewCoordinator.swift +++ b/Tchap/Modules/RoomPreview/RoomPreviewCoordinator.swift @@ -220,6 +220,15 @@ final class RoomPreviewCoordinator: NSObject, RoomPreviewCoordinatorType { // MARK: - RoomViewControllerDelegate extension RoomPreviewCoordinator: RoomViewControllerDelegate { + + func roomViewController(_ roomViewController: RoomViewController, didRequestLiveLocationPresentationForBubbleData bubbleData: MXKRoomBubbleCellDataStoring) { + // + } + + func roomViewControllerDidStopLiveLocationSharing(_ roomViewController: RoomViewController, beaconInfoEventId: String?) { + // + } + func roomViewController(_ roomViewController: RoomViewController, showRoomWithId roomID: String, eventId eventID: String?) { // } diff --git a/Tchap/target.yml b/Tchap/target.yml index ca217337c..9f497793c 100644 --- a/Tchap/target.yml +++ b/Tchap/target.yml @@ -53,6 +53,7 @@ targetTemplates: - package: SwiftOGG - package: WysiwygComposer - package: AnalyticsEvents + - package: Mapbox preBuildScripts: - name: 🛠 Environment @@ -245,6 +246,7 @@ targetTemplates: - path: ../Riot/Modules/KeyBackup - path: ../Riot/Modules/KeyVerification - path: ../Riot/Modules/LaunchLoading + - path: ../Riot/Modules/LocationSharing - path: ../Riot/Modules/MatrixKit - path: ../Riot/Modules/MediaPicker - path: ../Riot/Modules/MediaPickerV2 @@ -294,7 +296,7 @@ targetTemplates: excludes: - "**/Test/**" - "Common/Locale/LocaleProvider.swift" - - "LocationSharing" +# - "LocationSharing" - "Room/LiveLocationSharingViewer" - "Room/LocationSharing" - "Room/StaticLocationSharingViewer" From 64913dbe19f533b6d29b4467b811c4ce17c202e6 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Mon, 11 Mar 2024 11:34:35 +0100 Subject: [PATCH 03/15] Activer le partage de localisation dans les settings et renseigner le bon fournisseur de fonds de carte --- Btchap/Config/BuildSettings.swift | 4 ++-- Config/BuildSettings.swift | 6 +++--- DevTchap/Config/BuildSettings.swift | 6 +++--- RiotNSE/BuildSettings.swift | 6 +++--- RiotShareExtension/BuildSettings.swift | 6 +++--- Tchap/Config/BuildSettings.swift | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Btchap/Config/BuildSettings.swift b/Btchap/Config/BuildSettings.swift index f577db02a..7616ed7bd 100644 --- a/Btchap/Config/BuildSettings.swift +++ b/Btchap/Config/BuildSettings.swift @@ -413,9 +413,9 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://api.maptiler.com/maps/streets/style.json?key=")! + static let defaultTileServerMapStyleURL = URL(string: "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json")! - static let locationSharingEnabled = false // Currently disabled in Tchap. + static let locationSharingEnabled = true // MARK: - Voice Broadcast static let voiceBroadcastChunkLength: Int = 120 diff --git a/Config/BuildSettings.swift b/Config/BuildSettings.swift index b73ee1f6a..62b061671 100644 --- a/Config/BuildSettings.swift +++ b/Config/BuildSettings.swift @@ -423,9 +423,9 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://api.maptiler.com/maps/streets/style.json?key=")! - - static let locationSharingEnabled = false // Currently disabled in Tchap. + static let defaultTileServerMapStyleURL = URL(string: "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json")! + + static let locationSharingEnabled = true // MARK: - Voice Broadcast static let voiceBroadcastChunkLength: Int = 120 diff --git a/DevTchap/Config/BuildSettings.swift b/DevTchap/Config/BuildSettings.swift index 58ee2009f..3c6e0c6d8 100644 --- a/DevTchap/Config/BuildSettings.swift +++ b/DevTchap/Config/BuildSettings.swift @@ -414,9 +414,9 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://api.maptiler.com/maps/streets/style.json?key=")! - - static let locationSharingEnabled = false // Currently disabled in Tchap. + static let defaultTileServerMapStyleURL = URL(string: "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json")! + + static let locationSharingEnabled = true // MARK: - Voice Broadcast static let voiceBroadcastChunkLength: Int = 120 diff --git a/RiotNSE/BuildSettings.swift b/RiotNSE/BuildSettings.swift index 15bd01100..a43c9911b 100644 --- a/RiotNSE/BuildSettings.swift +++ b/RiotNSE/BuildSettings.swift @@ -452,9 +452,9 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://api.maptiler.com/maps/streets/style.json?key=")! - - static let locationSharingEnabled = false // Currently disabled in Tchap. + static let defaultTileServerMapStyleURL = URL(string: "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json")! + + static let locationSharingEnabled = true // MARK: - Voice Broadcast static let voiceBroadcastChunkLength: Int = 120 diff --git a/RiotShareExtension/BuildSettings.swift b/RiotShareExtension/BuildSettings.swift index 15bd01100..a43c9911b 100644 --- a/RiotShareExtension/BuildSettings.swift +++ b/RiotShareExtension/BuildSettings.swift @@ -452,9 +452,9 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://api.maptiler.com/maps/streets/style.json?key=")! - - static let locationSharingEnabled = false // Currently disabled in Tchap. + static let defaultTileServerMapStyleURL = URL(string: "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json")! + + static let locationSharingEnabled = true // MARK: - Voice Broadcast static let voiceBroadcastChunkLength: Int = 120 diff --git a/Tchap/Config/BuildSettings.swift b/Tchap/Config/BuildSettings.swift index 15bd01100..a43c9911b 100644 --- a/Tchap/Config/BuildSettings.swift +++ b/Tchap/Config/BuildSettings.swift @@ -452,9 +452,9 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://api.maptiler.com/maps/streets/style.json?key=")! - - static let locationSharingEnabled = false // Currently disabled in Tchap. + static let defaultTileServerMapStyleURL = URL(string: "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json")! + + static let locationSharingEnabled = true // MARK: - Voice Broadcast static let voiceBroadcastChunkLength: Int = 120 From 1863e8382b78fe1946bcf882ff95e812a46198ae Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Mon, 11 Mar 2024 11:35:24 +0100 Subject: [PATCH 04/15] =?UTF-8?q?Renseigner=20les=20alertes=20utilisateurs?= =?UTF-8?q?=20iOS=20d'activation=20de=20g=C3=A9olocalisation=20(=C3=A0=20c?= =?UTF-8?q?ompl=C3=A9ter)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tchap/SupportingFiles/Info.plist | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tchap/SupportingFiles/Info.plist b/Tchap/SupportingFiles/Info.plist index 87e719493..badb92e61 100644 --- a/Tchap/SupportingFiles/Info.plist +++ b/Tchap/SupportingFiles/Info.plist @@ -53,12 +53,19 @@ In order to show who among your contacts already uses Tchap, we can exploit the e-mail addresses of your address book. These data will not be stored. For more information, please visit the privacy policy page in the app settings NSFaceIDUsageDescription Face ID is used to access your app. + NSLocationAlwaysAndWhenInUseUsageDescription + Please, allow Tchap to share your location + NSLocationAlwaysUsageDescription + Please, allow Tchap to share your location + NSLocationWhenInUseUsageDescription + Please, allow Tchap to share your location NSMicrophoneUsageDescription Tchap needs to access your microphone to take videos, and record voice messages. NSPhotoLibraryUsageDescription This allows you to select pictures or videos from the photo library, and send them in your conversations. You can also use one of these pictures to set your profile picture. UIBackgroundModes + location remote-notification voip From 2eceef5e89b39c4fcd16df6b650c7decf0a12e74 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Mon, 11 Mar 2024 11:36:05 +0100 Subject: [PATCH 05/15] =?UTF-8?q?Activer=20les=20callbacks=20de=20g=C3=A9o?= =?UTF-8?q?localisation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Riot/Modules/Room/RoomCoordinator.swift | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Riot/Modules/Room/RoomCoordinator.swift b/Riot/Modules/Room/RoomCoordinator.swift index cd09ddaa0..40dede162 100644 --- a/Riot/Modules/Room/RoomCoordinator.swift +++ b/Riot/Modules/Room/RoomCoordinator.swift @@ -621,11 +621,11 @@ extension RoomCoordinator: RoomViewControllerDelegate { } func roomViewControllerDidRequestLocationSharingFormPresentation(_ roomViewController: RoomViewController) { -// startLocationCoordinator() + startLocationCoordinator() } func roomViewController(_ roomViewController: RoomViewController, didRequestLocationPresentationFor event: MXEvent, bubbleData: MXKRoomBubbleCellDataStoring) { -// showLocationCoordinatorWithEvent(event, bubbleData: bubbleData) + showLocationCoordinatorWithEvent(event, bubbleData: bubbleData) } func roomViewController(_ roomViewController: RoomViewController, didRequestLiveLocationPresentationForBubbleData bubbleData: MXKRoomBubbleCellDataStoring) { @@ -643,8 +643,7 @@ extension RoomCoordinator: RoomViewControllerDelegate { return nil } - // Tchap: Location Sharing is disabled in Tchap - return nil// LocationSharingCoordinator.shareLocationActivityController(CLLocationCoordinate2D(latitude: location.latitude, longitude: location.longitude)) + return LocationSharingCoordinator.shareLocationActivityController(CLLocationCoordinate2D(latitude: location.latitude, longitude: location.longitude)) } func roomViewController(_ roomViewController: RoomViewController, canEndPollWithEventIdentifier eventIdentifier: String) -> Bool { @@ -672,8 +671,7 @@ extension RoomCoordinator: RoomViewControllerDelegate { } func roomViewControllerDidTapLiveLocationSharingBanner(_ roomViewController: RoomViewController) { - -// showLiveLocationViewer() + showLiveLocationViewer() } func roomViewControllerDidStopLiveLocationSharing(_ roomViewController: RoomViewController, beaconInfoEventId: String?) { From b2d4453364ca92a051210f5f6296c00e53d00cc7 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Mon, 11 Mar 2024 11:37:22 +0100 Subject: [PATCH 06/15] =?UTF-8?q?Activer=20les=20mod=C3=A8les=20d'affichag?= =?UTF-8?q?e=20des=20cellules=20de=20g=C3=A9olocalisation=20dans=20la=20ti?= =?UTF-8?q?meline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Bubble/BubbleRoomTimelineCellProvider.m | 20 +++++++++---------- .../Plain/PlainRoomTimelineCellProvider.m | 12 +++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineCellProvider.m b/Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineCellProvider.m index 2dc24aa91..1e2acac96 100644 --- a/Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineCellProvider.m +++ b/Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineCellProvider.m @@ -110,14 +110,14 @@ - (void)registerPollCellsForTableView:(UITableView *)tableView - (void)registerLocationCellsForTableView:(UITableView*)tableView { -// // Incoming -// [tableView registerClass:LocationIncomingBubbleCell.class forCellReuseIdentifier:LocationIncomingBubbleCell.defaultReuseIdentifier]; -// [tableView registerClass:LocationIncomingWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:LocationIncomingWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; -// [tableView registerClass:LocationIncomingWithPaginationTitleBubbleCell.class forCellReuseIdentifier:LocationIncomingWithPaginationTitleBubbleCell.defaultReuseIdentifier]; -// -// // Outgoing -// [tableView registerClass:LocationOutgoingWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:LocationOutgoingWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; -// [tableView registerClass:LocationOutgoingWithPaginationTitleBubbleCell.class forCellReuseIdentifier:LocationOutgoingWithPaginationTitleBubbleCell.defaultReuseIdentifier]; + // Incoming + [tableView registerClass:LocationIncomingBubbleCell.class forCellReuseIdentifier:LocationIncomingBubbleCell.defaultReuseIdentifier]; + [tableView registerClass:LocationIncomingWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:LocationIncomingWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; + [tableView registerClass:LocationIncomingWithPaginationTitleBubbleCell.class forCellReuseIdentifier:LocationIncomingWithPaginationTitleBubbleCell.defaultReuseIdentifier]; + + // Outgoing + [tableView registerClass:LocationOutgoingWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:LocationOutgoingWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; + [tableView registerClass:LocationOutgoingWithPaginationTitleBubbleCell.class forCellReuseIdentifier:LocationOutgoingWithPaginationTitleBubbleCell.defaultReuseIdentifier]; } - (void)registerFileWithoutThumbnailCellsForTableView:(UITableView*)tableView @@ -299,7 +299,7 @@ - (void)registerVoiceBroadcastRecorderCellsForTableView:(UITableView*)tableView - (NSDictionary*)locationCellsMapping { - return @{/* + return @{ // Incoming @(RoomTimelineCellIdentifierIncomingLocation) : LocationIncomingBubbleCell.class, @(RoomTimelineCellIdentifierIncomingLocationWithoutSenderInfo) : LocationIncomingWithoutSenderInfoBubbleCell.class, @@ -307,7 +307,7 @@ - (void)registerVoiceBroadcastRecorderCellsForTableView:(UITableView*)tableView // Outgoing @(RoomTimelineCellIdentifierOutgoingLocation) : LocationOutgoingWithoutSenderInfoBubbleCell.class, @(RoomTimelineCellIdentifierOutgoingLocationWithoutSenderInfo) : LocationOutgoingWithoutSenderInfoBubbleCell.class, - @(RoomTimelineCellIdentifierOutgoingLocationWithPaginationTitle) : LocationOutgoingWithPaginationTitleBubbleCell.class*/ + @(RoomTimelineCellIdentifierOutgoingLocationWithPaginationTitle) : LocationOutgoingWithPaginationTitleBubbleCell.class }; } diff --git a/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m b/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m index e178d7723..b53aa3a9b 100644 --- a/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m +++ b/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m @@ -580,13 +580,13 @@ - (void)registerVoiceBroadcastRecorderCellsForTableView:(UITableView*)tableView { return @{ // Incoming -// @(RoomTimelineCellIdentifierIncomingLocation) : LocationPlainCell.class, -// @(RoomTimelineCellIdentifierIncomingLocationWithoutSenderInfo) : LocationWithoutSenderInfoPlainCell.class, -// @(RoomTimelineCellIdentifierIncomingLocationWithPaginationTitle) : LocationWithPaginationTitlePlainCell.class, + @(RoomTimelineCellIdentifierIncomingLocation) : LocationPlainCell.class, + @(RoomTimelineCellIdentifierIncomingLocationWithoutSenderInfo) : LocationWithoutSenderInfoPlainCell.class, + @(RoomTimelineCellIdentifierIncomingLocationWithPaginationTitle) : LocationWithPaginationTitlePlainCell.class, // Outgoing -// @(RoomTimelineCellIdentifierOutgoingLocation) : LocationPlainCell.class, -// @(RoomTimelineCellIdentifierOutgoingLocationWithoutSenderInfo) : LocationWithoutSenderInfoPlainCell.class, -// @(RoomTimelineCellIdentifierOutgoingLocationWithPaginationTitle) : LocationWithPaginationTitlePlainCell.class + @(RoomTimelineCellIdentifierOutgoingLocation) : LocationPlainCell.class, + @(RoomTimelineCellIdentifierOutgoingLocationWithoutSenderInfo) : LocationWithoutSenderInfoPlainCell.class, + @(RoomTimelineCellIdentifierOutgoingLocationWithPaginationTitle) : LocationWithPaginationTitlePlainCell.class }; } From 53193df7faaaad0c7ebaaed72e3bd0e01604ba37 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Mon, 11 Mar 2024 11:38:02 +0100 Subject: [PATCH 07/15] =?UTF-8?q?Activer=20les=20appels=20d'affichage=20de?= =?UTF-8?q?s=20cellules=20de=20g=C3=A9olocalisation=20dans=20la=20timeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Riot/Modules/Room/RoomViewController.m | 66 +++++++++++++------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 28b067017..d8ddf730a 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -3330,39 +3330,39 @@ - (RoomTimelineCellIdentifier)cellIdentifierForCellData:(MXKCellData*)cellData a } } } -// else if (bubbleData.tag == RoomBubbleCellDataTagLocation || bubbleData.tag == RoomBubbleCellDataTagLiveLocation) -// { -// if (bubbleData.isIncoming) -// { -// if (bubbleData.isPaginationFirstBubble) -// { -// cellIdentifier = RoomTimelineCellIdentifierIncomingLocationWithPaginationTitle; -// } -// else if (bubbleData.shouldHideSenderInformation) -// { -// cellIdentifier = RoomTimelineCellIdentifierIncomingLocationWithoutSenderInfo; -// } -// else -// { -// cellIdentifier = RoomTimelineCellIdentifierIncomingLocation; -// } -// } -// else -// { -// if (bubbleData.isPaginationFirstBubble) -// { -// cellIdentifier = RoomTimelineCellIdentifierOutgoingLocationWithPaginationTitle; -// } -// else if (bubbleData.shouldHideSenderInformation) -// { -// cellIdentifier = RoomTimelineCellIdentifierOutgoingLocationWithoutSenderInfo; -// } -// else -// { -// cellIdentifier = RoomTimelineCellIdentifierOutgoingLocation; -// } -// } -// } + else if (bubbleData.tag == RoomBubbleCellDataTagLocation || bubbleData.tag == RoomBubbleCellDataTagLiveLocation) + { + if (bubbleData.isIncoming) + { + if (bubbleData.isPaginationFirstBubble) + { + cellIdentifier = RoomTimelineCellIdentifierIncomingLocationWithPaginationTitle; + } + else if (bubbleData.shouldHideSenderInformation) + { + cellIdentifier = RoomTimelineCellIdentifierIncomingLocationWithoutSenderInfo; + } + else + { + cellIdentifier = RoomTimelineCellIdentifierIncomingLocation; + } + } + else + { + if (bubbleData.isPaginationFirstBubble) + { + cellIdentifier = RoomTimelineCellIdentifierOutgoingLocationWithPaginationTitle; + } + else if (bubbleData.shouldHideSenderInformation) + { + cellIdentifier = RoomTimelineCellIdentifierOutgoingLocationWithoutSenderInfo; + } + else + { + cellIdentifier = RoomTimelineCellIdentifierOutgoingLocation; + } + } + } // else if (bubbleData.tag == RoomBubbleCellDataTagVoiceBroadcastPlayback) // { // if (bubbleData.isIncoming) From 86f62c130ff42e24880aa096e7c24f2e6fd5ef8b Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Mon, 11 Mar 2024 15:30:34 +0100 Subject: [PATCH 08/15] =?UTF-8?q?Activer=20le=20partage=20de=20g=C3=A9oloc?= =?UTF-8?q?alisation=20par=20featureFlag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Btchap/Config/BuildSettings.swift | 1 + DevTchap/Config/BuildSettings.swift | 1 + Riot/Modules/Room/RoomViewController.m | 5 ++++- RiotNSE/BuildSettings.swift | 6 +++++- RiotShareExtension/BuildSettings.swift | 6 +++++- Tchap/Config/BuildSettings.swift | 6 +++++- 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Btchap/Config/BuildSettings.swift b/Btchap/Config/BuildSettings.swift index 7616ed7bd..f36a27664 100644 --- a/Btchap/Config/BuildSettings.swift +++ b/Btchap/Config/BuildSettings.swift @@ -237,6 +237,7 @@ final class BuildSettings: NSObject { static let tchapFeatureNotificationByEmail = "tchapFeatureNotificationByEmail" static let tchapFeatureVoiceOverIP = "tchapFeatureVoiceOverIP" static let tchapFeatureVideoOverIP = "tchapFeatureVideoOverIP" // Tchap: in pre-prod, allow any feature to any instance. + static let tchapFeatureGeolocationSharing = "tchapFeatureGeolocationSharing" // linked to `locationSharingEnabled` property (see above) static var tchapFeaturesAllowedHomeServersForFeature: [String: [String]] = [ tchapFeatureAnyFeature: [ tchapFeatureAnyHomeServer ] ] diff --git a/DevTchap/Config/BuildSettings.swift b/DevTchap/Config/BuildSettings.swift index 3c6e0c6d8..d064555b3 100644 --- a/DevTchap/Config/BuildSettings.swift +++ b/DevTchap/Config/BuildSettings.swift @@ -238,6 +238,7 @@ final class BuildSettings: NSObject { static let tchapFeatureNotificationByEmail = "tchapFeatureNotificationByEmail" static let tchapFeatureVoiceOverIP = "tchapFeatureVoiceOverIP" static let tchapFeatureVideoOverIP = "tchapFeatureVideoOverIP" // Tchap: in Dev, allow any feature to any instance. + static let tchapFeatureGeolocationSharing = "tchapFeatureGeolocationSharing" // linked to `locationSharingEnabled` property (see above) static var tchapFeaturesAllowedHomeServersForFeature: [String: [String]] = [ tchapFeatureAnyFeature: [ tchapFeatureAnyHomeServer ] ] diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index d8ddf730a..2103286ca 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -2425,7 +2425,10 @@ - (void)setupActions { [self.delegate roomViewControllerDidRequestPollCreationFormPresentation:self]; }]]; } - if (BuildSettings.locationSharingEnabled && !self.isNewDirectChat) + // Tchap: allow location sharing by feature flag +// if (BuildSettings.locationSharingEnabled && !self.isNewDirectChat) + MXKAccount *account = MXKAccountManager.sharedManager.activeAccounts.firstObject; + if ([account isFeatureActivated:BuildSettings.tchapFeatureGeolocationSharing] && BuildSettings.locationSharingEnabled && !self.isNewDirectChat) { [actionItems addObject:[[RoomActionItem alloc] initWithImage:AssetImages.actionLocation.image andAction:^{ MXStrongifyAndReturnIfNil(self); diff --git a/RiotNSE/BuildSettings.swift b/RiotNSE/BuildSettings.swift index a43c9911b..0c5d9ff41 100644 --- a/RiotNSE/BuildSettings.swift +++ b/RiotNSE/BuildSettings.swift @@ -267,17 +267,21 @@ final class BuildSettings: NSObject { static let tchapFeatureNotificationByEmail = "tchapFeatureNotificationByEmail" static let tchapFeatureVoiceOverIP = "tchapFeatureVoiceOverIP" static let tchapFeatureVideoOverIP = "tchapFeatureVideoOverIP" + static let tchapFeatureGeolocationSharing = "tchapFeatureGeolocationSharing" // linked to `locationSharingEnabled` property (see above) static var tchapFeaturesAllowedHomeServersForFeature: [String: [String]] = [ tchapFeatureNotificationByEmail: [ "agent.dinum.tchap.gouv.fr" ], tchapFeatureVoiceOverIP: [ "agent.dinum.tchap.gouv.fr" - ] + ], // No activation of video calls actually in Tchap Production. // tchapFeatureVideoOverIP: [ // "agent.dinum.tchap.gouv.fr" // ], + tchapFeatureGeolocationSharing: [ + tchapFeatureAnyHomeServer + ] ] // MARK: - Side Menu diff --git a/RiotShareExtension/BuildSettings.swift b/RiotShareExtension/BuildSettings.swift index a43c9911b..0c5d9ff41 100644 --- a/RiotShareExtension/BuildSettings.swift +++ b/RiotShareExtension/BuildSettings.swift @@ -267,17 +267,21 @@ final class BuildSettings: NSObject { static let tchapFeatureNotificationByEmail = "tchapFeatureNotificationByEmail" static let tchapFeatureVoiceOverIP = "tchapFeatureVoiceOverIP" static let tchapFeatureVideoOverIP = "tchapFeatureVideoOverIP" + static let tchapFeatureGeolocationSharing = "tchapFeatureGeolocationSharing" // linked to `locationSharingEnabled` property (see above) static var tchapFeaturesAllowedHomeServersForFeature: [String: [String]] = [ tchapFeatureNotificationByEmail: [ "agent.dinum.tchap.gouv.fr" ], tchapFeatureVoiceOverIP: [ "agent.dinum.tchap.gouv.fr" - ] + ], // No activation of video calls actually in Tchap Production. // tchapFeatureVideoOverIP: [ // "agent.dinum.tchap.gouv.fr" // ], + tchapFeatureGeolocationSharing: [ + tchapFeatureAnyHomeServer + ] ] // MARK: - Side Menu diff --git a/Tchap/Config/BuildSettings.swift b/Tchap/Config/BuildSettings.swift index a43c9911b..0c5d9ff41 100644 --- a/Tchap/Config/BuildSettings.swift +++ b/Tchap/Config/BuildSettings.swift @@ -267,17 +267,21 @@ final class BuildSettings: NSObject { static let tchapFeatureNotificationByEmail = "tchapFeatureNotificationByEmail" static let tchapFeatureVoiceOverIP = "tchapFeatureVoiceOverIP" static let tchapFeatureVideoOverIP = "tchapFeatureVideoOverIP" + static let tchapFeatureGeolocationSharing = "tchapFeatureGeolocationSharing" // linked to `locationSharingEnabled` property (see above) static var tchapFeaturesAllowedHomeServersForFeature: [String: [String]] = [ tchapFeatureNotificationByEmail: [ "agent.dinum.tchap.gouv.fr" ], tchapFeatureVoiceOverIP: [ "agent.dinum.tchap.gouv.fr" - ] + ], // No activation of video calls actually in Tchap Production. // tchapFeatureVideoOverIP: [ // "agent.dinum.tchap.gouv.fr" // ], + tchapFeatureGeolocationSharing: [ + tchapFeatureAnyHomeServer + ] ] // MARK: - Side Menu From 3e9c498767c581cfbc9aa2c1dd0041d41baf4f7f Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Mon, 11 Mar 2024 15:31:09 +0100 Subject: [PATCH 09/15] =?UTF-8?q?R=C3=A9activer=20la=20fonction=20LABS=20E?= =?UTF-8?q?lement=20de=20g=C3=A9olocalisation=20(pr=C3=A9-accord=20de=20pa?= =?UTF-8?q?rtage=20de=20localisation=20en=20temps=20r=C3=A9el)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Riot/Modules/Settings/SettingsViewController.m | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index e76ab67ac..1d8bc5614 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -190,8 +190,7 @@ typedef NS_ENUM(NSUInteger, LABS_ENABLE) LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX = 0, LABS_ENABLE_THREADS_INDEX, LABS_ENABLE_AUTO_REPORT_DECRYPTION_ERRORS, - // Tchap: Location sharing is disabled in Tchap -// LABS_ENABLE_LIVE_LOCATION_SHARING, + LABS_ENABLE_LIVE_LOCATION_SHARING, LABS_ENABLE_NEW_SESSION_MANAGER, LABS_ENABLE_NEW_CLIENT_INFO_FEATURE, LABS_ENABLE_WYSIWYG_COMPOSER, @@ -681,8 +680,7 @@ - (void)updateSections [sectionLabs addRowWithTag:LABS_ENABLE_AUTO_REPORT_DECRYPTION_ERRORS]; if (BuildSettings.locationSharingEnabled) { - // Tchap: Location sharing is disabled in Tchap -// [sectionLabs addRowWithTag:LABS_ENABLE_LIVE_LOCATION_SHARING]; + [sectionLabs addRowWithTag:LABS_ENABLE_LIVE_LOCATION_SHARING]; } [sectionLabs addRowWithTag:LABS_ENABLE_NEW_SESSION_MANAGER]; [sectionLabs addRowWithTag:LABS_ENABLE_NEW_CLIENT_INFO_FEATURE]; @@ -2691,11 +2689,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N { cell = [self buildAutoReportDecryptionErrorsCellForTableView:tableView atIndexPath:indexPath]; } - // Tchap: Location sharing is disabled in Tchap -// else if (row == LABS_ENABLE_LIVE_LOCATION_SHARING) -// { -// cell = [self buildLiveLocationSharingCellForTableView:tableView atIndexPath:indexPath]; -// } + else if (row == LABS_ENABLE_LIVE_LOCATION_SHARING) + { + cell = [self buildLiveLocationSharingCellForTableView:tableView atIndexPath:indexPath]; + } else if (row == LABS_ENABLE_NEW_SESSION_MANAGER) { MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath]; From 27412688ec2b2e5c1e86bc4bb0cdd124fd3714c1 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Mon, 11 Mar 2024 15:47:54 +0100 Subject: [PATCH 10/15] =?UTF-8?q?Traduction=20des=20messages=20d'autorisat?= =?UTF-8?q?ion=20pour=20activer=20la=20g=C3=A9olocalisation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Riot/Assets/en.lproj/InfoPlist.strings | 4 ++-- Riot/Assets/fr.lproj/InfoPlist.strings | 2 ++ RiotSwiftUI/Info.plist | 4 ++-- Tchap/SupportingFiles/Info.plist | 6 ++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Riot/Assets/en.lproj/InfoPlist.strings b/Riot/Assets/en.lproj/InfoPlist.strings index edab7c375..c26e49651 100644 --- a/Riot/Assets/en.lproj/InfoPlist.strings +++ b/Riot/Assets/en.lproj/InfoPlist.strings @@ -21,5 +21,5 @@ "NSContactsUsageDescription" = "In order to show who among your contacts already uses Tchap, we can exploit the e-mail addresses of your address book. These data will not be stored. For more information, please visit the privacy policy page in the app settings."; "NSCalendarsUsageDescription" = "See your scheduled meetings in the app."; "NSFaceIDUsageDescription" = "Face ID is used to access your app."; -"NSLocationWhenInUseUsageDescription" = "When you share your location to people, Element needs access to show them a map."; -"NSLocationAlwaysAndWhenInUseUsageDescription" = "When you share your location to people, Element needs access to show them a map."; +"NSLocationWhenInUseUsageDescription" = "When you share your location to people, Tchap needs access to show them a map."; +"NSLocationAlwaysAndWhenInUseUsageDescription" = "When you share your location to people, Tchap needs access to show them a map."; diff --git a/Riot/Assets/fr.lproj/InfoPlist.strings b/Riot/Assets/fr.lproj/InfoPlist.strings index 74885bea3..be710f7e8 100644 --- a/Riot/Assets/fr.lproj/InfoPlist.strings +++ b/Riot/Assets/fr.lproj/InfoPlist.strings @@ -4,3 +4,5 @@ "NSMicrophoneUsageDescription" = "Tchap nécessite l'accès au microphone pour réaliser des vidéos avec la caméra, ou pour enregistrer des messages vocaux."; "NSContactsUsageDescription" = "Afin d’afficher qui parmi vos contacts utilise déjà Tchap, nous pouvons exploiter les adresses e-mails de votre carnet d'adresse. Ces données ne seront pas mémorisées. Pour plus d'informations, veuillez consulter les Termes et Conditions disponibles dans les paramètres de l'application."; "NSFaceIDUsageDescription" = "Face ID est utilisé pour accéder à votre application."; +"NSLocationWhenInUseUsageDescription" = "Lorsque vous partagez votre position, Tchap a besoin de votre autorisation pour l'afficher sur une carte."; +"NSLocationAlwaysAndWhenInUseUsageDescription" = "Lorsque vous partagez votre position, Tchap a besoin de votre autorisation pour l'afficher sur une carte."; diff --git a/RiotSwiftUI/Info.plist b/RiotSwiftUI/Info.plist index a74d21864..df3ec702a 100644 --- a/RiotSwiftUI/Info.plist +++ b/RiotSwiftUI/Info.plist @@ -23,8 +23,8 @@ CFBundleDisplayName RiotSwiftUI NSLocationWhenInUseUsageDescription - When you share your location to people, Element needs access to show them a map. + When you share your location to people, Tchap needs access to show them a map. NSLocationAlwaysAndWhenInUseUsageDescription - When you share your location to people, Element needs access to show them a map. + When you share your location to people, Tchap needs access to show them a map. diff --git a/Tchap/SupportingFiles/Info.plist b/Tchap/SupportingFiles/Info.plist index badb92e61..666cd9835 100644 --- a/Tchap/SupportingFiles/Info.plist +++ b/Tchap/SupportingFiles/Info.plist @@ -54,11 +54,9 @@ NSFaceIDUsageDescription Face ID is used to access your app. NSLocationAlwaysAndWhenInUseUsageDescription - Please, allow Tchap to share your location - NSLocationAlwaysUsageDescription - Please, allow Tchap to share your location + When you share your location to people, Tchap needs access to show them a map. NSLocationWhenInUseUsageDescription - Please, allow Tchap to share your location + When you share your location to people, Tchap needs access to show them a map. NSMicrophoneUsageDescription Tchap needs to access your microphone to take videos, and record voice messages. NSPhotoLibraryUsageDescription From a6683f505515faaf03578cdebbd0d8ee230d9f6e Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Mon, 11 Mar 2024 17:56:42 +0100 Subject: [PATCH 11/15] Ajout du changelog --- changelog.d/970.change | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/970.change diff --git a/changelog.d/970.change b/changelog.d/970.change new file mode 100644 index 000000000..03d602ea1 --- /dev/null +++ b/changelog.d/970.change @@ -0,0 +1 @@ +Activation du partage de géolocalisation \ No newline at end of file From e2ad23df8e23236a7de4a0e92e64693719a6217d Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Mon, 11 Mar 2024 18:25:49 +0100 Subject: [PATCH 12/15] Traduction de "Element" en "Tchap" dans un message d'alerte --- Riot/Assets/en.lproj/Vector.strings | 4 ++-- Riot/Assets/fr.lproj/Vector.strings | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 0cb9b07a5..805a5881e 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -2453,8 +2453,8 @@ Tap the + to start adding people."; "location_sharing_settings_toggle_title" = "Enable location sharing"; "location_sharing_allow_background_location_title" = "Allow access"; -"location_sharing_allow_background_location_message" = "If you’d like to share your Live location, Element needs location access when the app is in the background. -To enable access, tap Settings> Location and select Always"; +"location_sharing_allow_background_location_message" = "If you’d like to share your Live location, Tchap needs location access when the app is in the background. +To enable access, tap Settings> Location and select Always"; // Tchap "location_sharing_allow_background_location_validate_action" = "Settings"; "location_sharing_allow_background_location_cancel_action" = "Not now"; "location_sharing_map_credits_title" = "© Copyright"; diff --git a/Riot/Assets/fr.lproj/Vector.strings b/Riot/Assets/fr.lproj/Vector.strings index e48f772de..87430368c 100644 --- a/Riot/Assets/fr.lproj/Vector.strings +++ b/Riot/Assets/fr.lproj/Vector.strings @@ -2324,7 +2324,7 @@ "authentication_registration_title" = "Créez votre compte"; "room_access_settings_screen_upgrade_alert_title" = "Mettre à niveau le salon"; "room_access_settings_screen_upgrade_required" = "Mise à niveau requise"; -"location_sharing_allow_background_location_message" = "Si vous voulez partager votre localisation en temps réel, Element doit avoir accès à vos données de localisation lorsque l’application est en arrière-plan. Pour lui donner accès, rendez-vous dans Réglages > Position et sélectionnez Toujours"; +"location_sharing_allow_background_location_message" = "Si vous voulez partager votre localisation en temps réel, Tchap doit avoir accès à vos données de localisation lorsque l’application est en arrière-plan. Pour lui donner accès, rendez-vous dans Réglages > Position et sélectionnez Toujours"; // Tchap "settings_timeline" = "HISTORIQUE"; "authentication_server_selection_login_title" = "Connexion à un serveur d’accueil"; "message_reply_to_sender_sent_their_live_location" = "Localisation en temps réel."; From 34559b0e1e58b9de8c1f9d09fa6f50aeba4a1078 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Tue, 12 Mar 2024 18:42:33 +0100 Subject: [PATCH 13/15] =?UTF-8?q?R=C3=A9activer=20l'arr=C3=AAt=20du=20part?= =?UTF-8?q?age=20de=20localisation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Riot/Modules/Room/RoomViewController.m | 48 +++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 2103286ca..653d5899b 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -3633,26 +3633,26 @@ - (void)dataSource:(MXKDataSource *)dataSource didRecognizeAction:(NSString *)ac [self mention:roomMember]; } } -// else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellStopShareButtonPressed]) -// { -// NSString *beaconInfoEventId; -// -// if ([bubbleData isKindOfClass:[RoomBubbleCellData class]]) -// { -// RoomBubbleCellData *roomBubbleCellData = (RoomBubbleCellData*)bubbleData; -// beaconInfoEventId = roomBubbleCellData.beaconInfoSummary.id; -// } -// -// [self.delegate roomViewControllerDidStopLiveLocationSharing:self beaconInfoEventId:beaconInfoEventId]; -// } -// else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellRetryShareButtonPressed]) -// { -// MXEvent *selectedEvent = userInfo[kMXKRoomBubbleCellEventKey]; -// if (selectedEvent) -// { -// // TODO: - Implement retry live location action -// } -// } + else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellStopShareButtonPressed]) + { + NSString *beaconInfoEventId; + + if ([bubbleData isKindOfClass:[RoomBubbleCellData class]]) + { + RoomBubbleCellData *roomBubbleCellData = (RoomBubbleCellData*)bubbleData; + beaconInfoEventId = roomBubbleCellData.beaconInfoSummary.id; + } + + [self.delegate roomViewControllerDidStopLiveLocationSharing:self beaconInfoEventId:beaconInfoEventId]; + } + else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellRetryShareButtonPressed]) + { + MXEvent *selectedEvent = userInfo[kMXKRoomBubbleCellEventKey]; + if (selectedEvent) + { + // TODO: - Implement retry live location action + } + } else if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellTapOnMessageTextView] || [actionIdentifier isEqualToString:kMXKRoomBubbleCellTapOnContentView]) { // Retrieve the tapped event @@ -3663,10 +3663,10 @@ - (void)dataSource:(MXKDataSource *)dataSource didRecognizeAction:(NSString *)ac { [self cancelEventSelection]; } -// else if (bubbleData.tag == RoomBubbleCellDataTagLiveLocation) -// { -// [self.delegate roomViewController:self didRequestLiveLocationPresentationForBubbleData:bubbleData]; -// } + else if (bubbleData.tag == RoomBubbleCellDataTagLiveLocation) + { + [self.delegate roomViewController:self didRequestLiveLocationPresentationForBubbleData:bubbleData]; + } else if (tappedEvent) { if (tappedEvent.eventType == MXEventTypeRoomCreate) From c7ce4f553fe1bba3528eff03a51a28b4d093647b Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Thu, 14 Mar 2024 21:25:49 +0100 Subject: [PATCH 14/15] Activation du partage de localisation --- Riot/Modules/Spaces/SpaceRoomList/ExploreRoomCoordinator.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoomCoordinator.swift b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoomCoordinator.swift index a5cde02ff..24125ae49 100644 --- a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoomCoordinator.swift +++ b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoomCoordinator.swift @@ -428,8 +428,7 @@ extension ExploreRoomCoordinator: RoomViewControllerDelegate { guard let location = event.location else { return nil } - // Tchap: No location sharing available in Tchap - return nil// LocationSharingCoordinator.shareLocationActivityController(CLLocationCoordinate2D(latitude: location.latitude, longitude: location.longitude)) + return LocationSharingCoordinator.shareLocationActivityController(CLLocationCoordinate2D(latitude: location.latitude, longitude: location.longitude)) } func roomViewController(_ roomViewController: RoomViewController, canEditPollWithEventIdentifier eventIdentifier: String) -> Bool { From d308851b48dfab6ab09847e938c0ec3e421201a0 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Tue, 26 Mar 2024 15:31:20 +0100 Subject: [PATCH 15/15] =?UTF-8?q?Possibilit=C3=A9=20de=20choisir=20=C3=A0?= =?UTF-8?q?=20la=20compilation=20entre=202=20provider=20de=20map=20(seul?= =?UTF-8?q?=20geo.data.gouv.fr=20est=20valid=C3=A9=20=C3=A0=20aujourd'hui)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Btchap/Config/BuildSettings.swift | 9 +++++++-- Config/BuildSettings.swift | 7 ++++++- DevTchap/Config/BuildSettings.swift | 7 ++++++- Tchap/Config/BuildSettings.swift | 7 ++++++- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Btchap/Config/BuildSettings.swift b/Btchap/Config/BuildSettings.swift index f36a27664..32ddc2f78 100644 --- a/Btchap/Config/BuildSettings.swift +++ b/Btchap/Config/BuildSettings.swift @@ -414,8 +414,13 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json")! - + // Tchap: handle different map providers. + private enum TchapMapProvider: String { + case geoDataGouv = "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json" + case ign = "https://data.geopf.fr/annexes/ressources/vectorTiles/styles/PLAN.IGN/standard.json" + } + static let defaultTileServerMapStyleURL = URL(string: TchapMapProvider.geoDataGouv.rawValue)! + static let locationSharingEnabled = true // MARK: - Voice Broadcast diff --git a/Config/BuildSettings.swift b/Config/BuildSettings.swift index 62b061671..9abdd1f5f 100644 --- a/Config/BuildSettings.swift +++ b/Config/BuildSettings.swift @@ -423,7 +423,12 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json")! + // Tchap: handle different map providers. + private enum TchapMapProvider: String { + case geoDataGouv = "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json" + case ign = "https://data.geopf.fr/annexes/ressources/vectorTiles/styles/PLAN.IGN/standard.json" + } + static let defaultTileServerMapStyleURL = URL(string: TchapMapProvider.geoDataGouv.rawValue)! static let locationSharingEnabled = true diff --git a/DevTchap/Config/BuildSettings.swift b/DevTchap/Config/BuildSettings.swift index d064555b3..08f236910 100644 --- a/DevTchap/Config/BuildSettings.swift +++ b/DevTchap/Config/BuildSettings.swift @@ -415,7 +415,12 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json")! + // Tchap: handle different map providers. + private enum TchapMapProvider: String { + case geoDataGouv = "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json" + case ign = "https://data.geopf.fr/annexes/ressources/vectorTiles/styles/PLAN.IGN/standard.json" + } + static let defaultTileServerMapStyleURL = URL(string: TchapMapProvider.geoDataGouv.rawValue)! static let locationSharingEnabled = true diff --git a/Tchap/Config/BuildSettings.swift b/Tchap/Config/BuildSettings.swift index 0c5d9ff41..21d774684 100644 --- a/Tchap/Config/BuildSettings.swift +++ b/Tchap/Config/BuildSettings.swift @@ -456,7 +456,12 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json")! + // Tchap: handle different map providers. + private enum TchapMapProvider: String { + case geoDataGouv = "https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json" + case ign = "https://data.geopf.fr/annexes/ressources/vectorTiles/styles/PLAN.IGN/standard.json" + } + static let defaultTileServerMapStyleURL = URL(string: TchapMapProvider.geoDataGouv.rawValue)! static let locationSharingEnabled = true