Skip to content

Commit c166e5b

Browse files
committed
Merge branch 'release/1.11.2/master'
2 parents f6b85b8 + 3f27e0b commit c166e5b

File tree

19 files changed

+188
-60
lines changed

19 files changed

+188
-60
lines changed

BroadcastUploadExtension/target.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ targets:
3838
sources:
3939
- path: .
4040
- path: ../Config/BuildSettings.swift
41+
- path: ../Config/MDMSettings.swift
4142
- path: ../Riot/Categories/Bundle.swift
4243
- path: ../Riot/Modules/Room/TimelineCells/Styles/RoomTimelineStyleIdentifier.swift

CHANGES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## Changes in 1.11.2 (2023-09-12)
2+
3+
🙌 Improvements
4+
5+
- Upgrade MatrixSDK version ([v0.27.2](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.27.2)).
6+
7+
🐛 Bugfixes
8+
9+
- Fix an issue where rooms were not correctly sorted after forwarding a message. ([#7641](https://github.com/vector-im/element-ios/issues/7641))
10+
- Add phone number UI and explanatory text is hidden if the 3 pid changes capability is disabled. ([#7670](https://github.com/vector-im/element-ios/issues/7670))
11+
12+
113
## Changes in 1.11.1 (2023-08-29)
214

315
✨ Features

Config/AppVersion.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
//
1616

1717
// Version
18-
MARKETING_VERSION = 1.11.1
19-
CURRENT_PROJECT_VERSION = 1.11.1
18+
MARKETING_VERSION = 1.11.2
19+
CURRENT_PROJECT_VERSION = 1.11.2

Config/BuildSettings.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,16 @@ final class BuildSettings: NSObject {
102102
static let forceHomeserverSelection = false
103103

104104
/// Default server proposed on the authentication screen
105-
static let serverConfigDefaultHomeserverUrlString = "https://matrix.org"
105+
static var serverConfigDefaultHomeserverUrlString: String {
106+
MDMSettings.serverConfigDefaultHomeserverUrlString ?? "https://matrix.org"
107+
}
106108

107109
/// Default identity server
108110
static let serverConfigDefaultIdentityServerUrlString = "https://vector.im"
109111

110-
static let serverConfigSygnalAPIUrlString = "https://matrix.org/_matrix/push/v1/notify"
111-
112+
static var serverConfigSygnalAPIUrlString: String {
113+
MDMSettings.serverConfigSygnalAPIUrlString ?? "https://matrix.org/_matrix/push/v1/notify"
114+
}
112115

113116
// MARK: - Legal URLs
114117

@@ -144,7 +147,9 @@ final class BuildSettings: NSObject {
144147
// This baseURL is used to generate permalinks within the app (E.g. timeline message permalinks).
145148
// Optional String that when set is used as permalink base, when nil matrix.to format is used.
146149
// Example value would be "https://www.example.com", note there is no trailing '/'.
147-
static let clientPermalinkBaseUrl: String? = nil
150+
static var clientPermalinkBaseUrl: String? {
151+
MDMSettings.clientPermalinkBaseUrl
152+
}
148153

149154
// MARK: - VoIP
150155
static var allowVoIPUsage: Bool {

Config/MDMSettings.swift

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
//
2+
// Copyright 2023 New Vector Ltd
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
import Foundation
18+
19+
enum MDMSettings {
20+
private static let appleManagedConfigurationKey = "com.apple.configuration.managed"
21+
22+
private enum Key: String {
23+
case serverConfigDefaultHomeserverUrlString = "im.vector.app.serverConfigDefaultHomeserverUrlString"
24+
case serverConfigSygnalAPIUrlString = "im.vector.app.serverConfigSygnalAPIUrlString"
25+
case clientPermalinkBaseUrl = "im.vector.app.clientPermalinkBaseUrl"
26+
}
27+
28+
static var serverConfigDefaultHomeserverUrlString: String? {
29+
valueForKey(.serverConfigDefaultHomeserverUrlString) as? String
30+
}
31+
32+
static var serverConfigSygnalAPIUrlString: String? {
33+
valueForKey(.serverConfigSygnalAPIUrlString) as? String
34+
}
35+
36+
static var clientPermalinkBaseUrl: String? {
37+
valueForKey(.clientPermalinkBaseUrl) as? String
38+
}
39+
40+
// MARK: - Private
41+
42+
static private func valueForKey(_ key: Key) -> Any? {
43+
guard let managedConfiguration = UserDefaults.standard.dictionary(forKey: appleManagedConfigurationKey) else {
44+
print("MDM configuration missing")
45+
return nil
46+
}
47+
48+
print("Retrieved MDM configuration: \(managedConfiguration)")
49+
50+
return managedConfiguration[key.rawValue]
51+
}
52+
}

INSTALL.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,25 @@ Be sure to use compatible branches for Element iOS and MatrixSDK. For example, i
7171

7272
**Important**: By working with [XcodeGen](https://github.com/yonaskolb/XcodeGen) you will need to use the _New Build System_ in Xcode, to have your some of the xcconfig variables taken into account. It should be enabled by default on the latest Xcode versions, but if you need to enable it go to Xcode menu and select `File > Workspace Settings… > Build System` and then choose `New Build System`.
7373

74+
- **Running a local rust MatrixCryptoSDK locally**
75+
76+
If you want to debug locally or test local changes of the rust `MatrixSDKCrypto` with a local `MatrixSDK`, you must checkout [matrix-rust-sdk](https://github.com/matrix-org/matrix-rust-sdk), and follow the [instructions in the repository](https://github.com/matrix-org/matrix-rust-sdk/tree/main/bindings/apple).
77+
78+
Once the framework is built using `./build_crypto_xcframework.sh` you will have to move `bindings/apple/MatrixSDKCrypto-Local.podspec` to the root of the `matrix-rust-sdk` folder and rename it to `MatrixSDKCrypto.podspec` then update `s.version` with the current pod version:
79+
80+
```
81+
s.version = "0.3.12"
82+
```
83+
84+
Then in the element-ios `Podfile`, add the following line under the existing `pod 'MatrixSDK' [..]`:
85+
86+
```
87+
pod 'MatrixSDKCrypto', :path => '../matrix-rust-sdk/MatrixSDKCrypto.podspec'
88+
```
89+
90+
Run `pod install` to refresh all.
91+
92+
7493
### `$matrixSDKVersion` Modification
7594

7695
Every time you change the `$matrixSDKVersion` variable in the `Podfile`, you have to run the `pod install` command again.

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use_frameworks!
1616
# - `{ :specHash => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for MatrixSDK repo. Used by Fastfile during CI
1717
#
1818
# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it
19-
$matrixSDKVersion = '= 0.27.1'
19+
$matrixSDKVersion = '= 0.27.2'
2020
# $matrixSDKVersion = :local
2121
# $matrixSDKVersion = { :branch => 'develop'}
2222
# $matrixSDKVersion = { :specHash => { git: 'https://git.io/fork123', branch: 'fix' } }

Podfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ PODS:
3939
- LoggerAPI (1.9.200):
4040
- Logging (~> 1.1)
4141
- Logging (1.4.0)
42-
- MatrixSDK (0.27.1):
43-
- MatrixSDK/Core (= 0.27.1)
44-
- MatrixSDK/Core (0.27.1):
42+
- MatrixSDK (0.27.2):
43+
- MatrixSDK/Core (= 0.27.2)
44+
- MatrixSDK/Core (0.27.2):
4545
- AFNetworking (~> 4.0.0)
4646
- GZIP (~> 1.3.0)
4747
- libbase58 (~> 0.1.4)
4848
- MatrixSDKCrypto (= 0.3.12)
4949
- OLMKit (~> 3.2.5)
5050
- Realm (= 10.27.0)
5151
- SwiftyBeaver (= 1.9.5)
52-
- MatrixSDK/JingleCallStack (0.27.1):
52+
- MatrixSDK/JingleCallStack (0.27.2):
5353
- JitsiMeetSDKLite (= 8.1.2-lite)
5454
- MatrixSDK/Core
5555
- MatrixSDKCrypto (0.3.12)
@@ -102,8 +102,8 @@ DEPENDENCIES:
102102
- KeychainAccess (~> 4.2.2)
103103
- KTCenterFlowLayout (~> 1.3.1)
104104
- libPhoneNumber-iOS (~> 0.9.13)
105-
- MatrixSDK (= 0.27.1)
106-
- MatrixSDK/JingleCallStack (= 0.27.1)
105+
- MatrixSDK (= 0.27.2)
106+
- MatrixSDK/JingleCallStack (= 0.27.2)
107107
- OLMKit
108108
- PostHog (~> 2.0.0)
109109
- ReadMoreTextView (~> 3.0.1)
@@ -187,7 +187,7 @@ SPEC CHECKSUMS:
187187
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
188188
LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
189189
Logging: beeb016c9c80cf77042d62e83495816847ef108b
190-
MatrixSDK: f6c197ca06aab29ff69d1105965a57d277dfcd9d
190+
MatrixSDK: a39e229a03a00394e055ffa7490e9602d45f8a44
191191
MatrixSDKCrypto: 25929a40733b4ab54f659aaf6a730552a0a06504
192192
OLMKit: da115f16582e47626616874e20f7bb92222c7a51
193193
PostHog: 660ec6c9d80cec17b685e148f17f6785a88b597d
@@ -208,6 +208,6 @@ SPEC CHECKSUMS:
208208
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
209209
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
210210

211-
PODFILE CHECKSUM: ce6afe3dea7ea9b073a7ad0406b2cc5615646746
211+
PODFILE CHECKSUM: b926e281576aabcdbc2bdcb40ef3ad3e0991abe8
212212

213213
COCOAPODS: 1.11.3

Riot/Modules/Room/RoomViewController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4577,7 +4577,8 @@ - (void)presentEventForwardingDialogForSelectedEvent:(MXEvent *)selectedEvent
45774577
{
45784578
ForwardingShareItemSender *shareItemSender = [[ForwardingShareItemSender alloc] initWithEvent:selectedEvent];
45794579
self.shareManager = [[ShareManager alloc] initWithShareItemSender:shareItemSender
4580-
type:ShareManagerTypeForward];
4580+
type:ShareManagerTypeForward
4581+
session:self.mainSession];
45814582

45824583
MXWeakify(self);
45834584
[self.shareManager setCompletionCallback:^(ShareManagerResult result) {

Riot/Modules/Settings/SettingsViewController.m

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -371,23 +371,24 @@ - (void)updateSections
371371
{
372372
[sectionUserSettings addRowWithTag: USER_SETTINGS_PHONENUMBERS_OFFSET + index];
373373
}
374-
if (BuildSettings.settingsScreenAllowAddingEmailThreepids &&
375-
// If the threePidChanges is nil we assume the capability to be true
376-
(!self.mainSession.homeserverCapabilities.threePidChanges ||
377-
self.mainSession.homeserverCapabilities.threePidChanges.enabled))
378-
{
379-
[sectionUserSettings addRowWithTag:USER_SETTINGS_ADD_EMAIL_INDEX];
380-
}
381-
if (BuildSettings.settingsScreenAllowAddingPhoneThreepids)
382-
{
383-
[sectionUserSettings addRowWithTag:USER_SETTINGS_ADD_PHONENUMBER_INDEX];
384-
}
385-
if (BuildSettings.settingsScreenShowThreepidExplanatory)
386-
{
387-
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:[VectorL10n settingsThreePidsManagementInformationPart1] attributes:@{}];
388-
[attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:[VectorL10n settingsThreePidsManagementInformationPart2] attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.tintColor}]];
389-
[attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:[VectorL10n settingsThreePidsManagementInformationPart3] attributes:@{}]];
390-
sectionUserSettings.attributedFooterTitle = attributedString;
374+
// If the threePidChanges is nil we assume the capability to be true
375+
if (!self.mainSession.homeserverCapabilities.threePidChanges ||
376+
self.mainSession.homeserverCapabilities.threePidChanges.enabled) {
377+
if (BuildSettings.settingsScreenAllowAddingEmailThreepids)
378+
{
379+
[sectionUserSettings addRowWithTag:USER_SETTINGS_ADD_EMAIL_INDEX];
380+
}
381+
if (BuildSettings.settingsScreenAllowAddingPhoneThreepids)
382+
{
383+
[sectionUserSettings addRowWithTag:USER_SETTINGS_ADD_PHONENUMBER_INDEX];
384+
}
385+
if (BuildSettings.settingsScreenShowThreepidExplanatory)
386+
{
387+
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:[VectorL10n settingsThreePidsManagementInformationPart1] attributes:@{}];
388+
[attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:[VectorL10n settingsThreePidsManagementInformationPart2] attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.tintColor}]];
389+
[attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:[VectorL10n settingsThreePidsManagementInformationPart3] attributes:@{}]];
390+
sectionUserSettings.attributedFooterTitle = attributedString;
391+
}
391392
}
392393

393394
sectionUserSettings.headerTitle = [VectorL10n settingsUserSettings];

0 commit comments

Comments
 (0)