-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update/move URLs for C1 and C3 WPB-9748 (#1718)
Co-authored-by: François Benaiteau <netbe@users.noreply.github.com>
- Loading branch information
1 parent
06e1b84
commit 174fe5b
Showing
35 changed files
with
262 additions
and
222 deletions.
There are no files selected for viewing
Submodule wire-ios-build-assets
updated
from 2e295e to 5f39ec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,22 @@ | ||
{ | ||
"wireAppOnItunes": "https://geo.itunes.apple.com/us/app/wire/id930944768?mt=8", | ||
"appOnItunes": "https://geo.itunes.apple.com/us/app/wire/id930944768?mt=8", | ||
"support": "https://support.wire.com", | ||
"randomProfilePictureSource": "https://source.unsplash.com/800x800/?landscape" | ||
"searchSupport": "https://support.wire.com/hc", | ||
"website": "https://wire.com", | ||
"emailAlreadyInUse": "https://support.wire.com/hc/articles/115004082129-My-email-address-is-already-in-use-and-I-cannot-create-an-account-What-can-I-do-", | ||
"whyToVerifyFingerprintArticle": "https://support.wire.com/hc/articles/207859815-Why-should-I-verify-my-conversations", | ||
"howToVerifyFingerprintArticle": "https://support.wire.com/hc/articles/207692235-How-can-I-compare-key-fingerprints-", | ||
"privacyPolicy": "https://wire.com/privacy-policy", | ||
"legal": "https://wire.com/legal", | ||
"licenseInformation": "https://start.wire.com/en-us/en-us/terms-of-use-personal-0-0", | ||
"passwordReset": "https://account.wire.com/forgot", | ||
"askSupportArticle": "https://support.wire.com/hc/requests/new", | ||
"reportAbuse": "https://support.wire.com/hc/requests/new", | ||
"wireEnterpriseInfo": "https://wire.com/pricing", | ||
"legalHoldInfo": "https://support.wire.com/hc/articles/360002018278-What-is-legal-hold-", | ||
"guestLinksInfo": "https://support.wire.com/hc/articles/360000574069-Share-a-link-with-a-person-without-a-Wire-account-to-join-a-guest-room-conversation-in-my-team", | ||
"unreachableBackendInfo": "https://support.wire.com/hc/articles/9357718008093-Backend", | ||
"federationInfo": "https://support.wire.com/hc/categories/4719917054365-Federation", | ||
"mlsInfo": "https://support.wire.com/hc/articles/12434725011485-Messaging-Layer-Security-MLS-", | ||
"endToEndIdentityInfo": "https://support.wire.com/hc/articles/9211300150685-End-to-end-identity" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// Wire | ||
// Copyright (C) 2024 Wire Swiss GmbH | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see http://www.gnu.org/licenses/. | ||
// | ||
|
||
import XCTest | ||
import WireCommonComponents | ||
@testable import Wire | ||
|
||
final class URLsTests: XCTestCase { | ||
|
||
func testUrlFileContainsAllKeys() throws { | ||
// Given | ||
guard let fileURL = Bundle.fileURL(for: "url", with: "json") else { | ||
XCTFail("Failed to load url.json file") | ||
return | ||
} | ||
|
||
// When / Then | ||
XCTAssertNoThrow(try fileURL.decode(WireURLs.self)) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
wire-ios/Wire-iOS/Sources/Helpers/Bundle/Bundle+WireURLs.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
// | ||
// Wire | ||
// Copyright (C) 2024 Wire Swiss GmbH | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see http://www.gnu.org/licenses/. | ||
// | ||
|
||
import Foundation | ||
import WireSystem | ||
|
||
/// This struct contains various URLs used in the app. All links are defined in the `url.json` configuration file. | ||
/// | ||
/// IMPORTANT: If you change or add a new property to this struct, you will also need to update the corresponding | ||
/// link with the same key in the existing URL configuration files. | ||
/// Failure to do so may cause the application to crash. | ||
struct WireURLs: Codable { | ||
|
||
/// Link to the app on the App store. | ||
let appOnItunes: URL | ||
|
||
/// Link to the main support page. | ||
let support: URL | ||
|
||
/// Link to the help desk support page. | ||
let searchSupport: URL | ||
|
||
/// Link to the app's homepage. | ||
let website: URL | ||
|
||
/// Shown when the user tries to create an account with an email that is already in use. | ||
/// Links to support page explaining issue and what can be done. | ||
let emailAlreadyInUse: URL | ||
|
||
/// Link to an article explaining why a user should verify conversations using fingerprints. | ||
let whyToVerifyFingerprintArticle: URL | ||
|
||
/// Link to an article explaining how to manually verify conversations using fingerprints. | ||
let howToVerifyFingerprintArticle: URL | ||
|
||
/// Link to the privacy policy page. | ||
let privacyPolicy: URL | ||
|
||
/// Link to app's homepage for legal information, e.g terms of use and data processing addendum. | ||
let legal: URL | ||
|
||
/// Link to the license information page. | ||
let licenseInformation: URL | ||
|
||
/// Link to the password reset page. | ||
let passwordReset: URL | ||
|
||
/// Link to the support page where the user can submit a support request for various issues. | ||
let askSupportArticle: URL | ||
|
||
/// Link to the support page where a user can report an abuse issue. | ||
let reportAbuse: URL | ||
|
||
/// Link to an article explaining the various features of Wire. | ||
let wireEnterpriseInfo: URL | ||
|
||
/// Link to an article explaining legal hold. | ||
let legalHoldInfo: URL | ||
|
||
/// Link to an article explaining how to create, share, and revoke a group conversation link. | ||
let guestLinksInfo: URL | ||
|
||
/// Shown when a user tries to send a message or create a group with users from different backends when one of the backends is not reachable. | ||
/// Links to a support page that explains the issue when one of the backend is offline. | ||
let unreachableBackendInfo: URL | ||
|
||
/// Links to a support page explaining what Federation is. | ||
let federationInfo: URL | ||
|
||
/// Link to the article about Messaging Layer Security (MLS). | ||
/// Shown in various places (e.g. system messages, warnings, error messages). | ||
let mlsInfo: URL | ||
|
||
/// Link to the article about end-to-end identity. | ||
/// Shown in various places (e.g. system messages, warnings, error messages). | ||
let endToEndIdentityInfo: URL | ||
|
||
static var shared: WireURLs = { | ||
do { | ||
return try WireURLs(forResource: "url", withExtension: "json") | ||
} catch { | ||
fatalError("\(error)") | ||
} | ||
}() | ||
|
||
private init(forResource resource: String, withExtension fileExtension: String) throws { | ||
guard let fileURL = Bundle.fileURL(for: resource, with: fileExtension) else { | ||
throw WireURLsError.fileNotFound | ||
} | ||
|
||
self = try fileURL.decode(WireURLs.self) | ||
} | ||
|
||
enum CodingKeys: String, CodingKey, CaseIterable { | ||
case appOnItunes | ||
case support | ||
case searchSupport | ||
case website | ||
case emailAlreadyInUse | ||
case whyToVerifyFingerprintArticle | ||
case howToVerifyFingerprintArticle | ||
case privacyPolicy | ||
case legal | ||
case licenseInformation | ||
case passwordReset | ||
case askSupportArticle | ||
case reportAbuse | ||
case wireEnterpriseInfo | ||
case legalHoldInfo | ||
case guestLinksInfo | ||
case unreachableBackendInfo | ||
case federationInfo | ||
case mlsInfo | ||
case endToEndIdentityInfo | ||
} | ||
|
||
enum WireURLsError: Error { | ||
case fileNotFound | ||
} | ||
|
||
} |
Oops, something went wrong.