Skip to content

Commit

Permalink
Merge branch 'release/v0.15.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
SBiOSoftWhare committed Nov 6, 2019
2 parents 5665490 + b6df054 commit 779c171
Show file tree
Hide file tree
Showing 37 changed files with 758 additions and 384 deletions.
19 changes: 19 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Changes in Matrix iOS SDK in 0.15.0 (2019-11-06)
===============================================

Improvements:
* MX3PidAddManager: Add User-Interactive Auth to /account/3pid/add (vector-im/riot-ios#2744).
* MXSession: On resume, make the first /sync request trigger earlier (vector-im/riot-ios#2793).
* MXCrypto: Do not fail to decrypt when there is nothing to decrypt (redacted events).
* MXBackgroundModeHandler: Update interface and now return a MXBackgroundTask, a protocol describing a background task regardless of the plartform used.

Bug fix:
* Room members who left are listed with the actual members (vector-im/riot-ios#2737).
* MX3PidAddManager: Add User-Interactive Auth to /account/3pid/add (vector-im/riot-ios#2744).
* MXHTTPOperation: Make urlResponseFromError return the url response in case of MXError.
* MXHTTPOperation: Fix a crash in `-mutateTo:` method when operation parameter is nil.
* VoIP: Fix regression when using a TURN server (vector-im/riot-ios#2796).

API break:
* MXBackgroundModeHandler: Update interface and now use a single method that return a MXBackgroundTask.

Changes in Matrix iOS SDK in 0.14.0 (2019-10-11)
===============================================

Expand Down
26 changes: 13 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ GEM
atomos (0.1.3)
babosa (1.0.3)
claide (1.0.3)
cocoapods (1.8.3)
cocoapods (1.8.4)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.8.3)
cocoapods-core (= 1.8.4)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -34,7 +34,7 @@ GEM
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.11.1, < 2.0)
cocoapods-core (1.8.3)
cocoapods-core (1.8.4)
activesupport (>= 4.0.2, < 6)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
Expand Down Expand Up @@ -63,16 +63,16 @@ GEM
dotenv (2.7.5)
emoji_regex (1.0.1)
escape (0.0.4)
excon (0.67.0)
faraday (0.15.4)
excon (0.68.0)
faraday (0.17.0)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.7)
fastlane (2.133.0)
fastlane (2.134.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
Expand All @@ -82,9 +82,9 @@ GEM
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 2.0)
excon (>= 0.45.0, < 1.0.0)
faraday (< 0.16.0)
faraday (~> 0.17)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (< 0.16.0)
faraday_middleware (~> 0.13.1)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.21.2, < 0.24.0)
Expand Down Expand Up @@ -120,7 +120,7 @@ GEM
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.9)
google-cloud-core (1.3.1)
google-cloud-core (1.3.2)
google-cloud-env (~> 1.0)
google-cloud-env (1.2.1)
faraday (~> 0.11)
Expand All @@ -147,11 +147,11 @@ GEM
memoist (0.16.0)
mime-types (3.3)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0904)
mime-types-data (3.2019.1009)
mini_magick (4.9.5)
minitest (5.12.2)
minitest (5.13.0)
molinillo (0.6.6)
multi_json (1.13.1)
multi_json (1.14.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
nanaimo (0.2.6)
Expand Down Expand Up @@ -195,7 +195,7 @@ GEM
unf_ext (0.0.7.6)
unicode-display_width (1.6.0)
word_wrap (1.0.0)
xcodeproj (1.12.0)
xcodeproj (1.13.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand Down
6 changes: 3 additions & 3 deletions MatrixSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "MatrixSDK"
s.version = "0.14.0"
s.version = "0.15.0"
s.summary = "The iOS SDK to build apps compatible with Matrix (https://www.matrix.org)"

s.description = <<-DESC
Expand Down Expand Up @@ -36,7 +36,7 @@ Pod::Spec.new do |s|

# Requirements for e2e encryption
ss.dependency 'OLMKit', '~> 3.1.0'
ss.dependency 'Realm', '~> 3.13.1'
ss.dependency 'Realm', '~> 3.17.3'
ss.dependency 'libbase58', '~> 0.1.4'
end

Expand All @@ -53,7 +53,7 @@ Pod::Spec.new do |s|
#ss.ios.dependency 'GoogleWebRTC', '~>1.1.21820'

# Use WebRTC framework included in Jitsi Meet SDK
ss.ios.dependency 'JitsiMeetSDK', '~> 2.1.0'
ss.ios.dependency 'JitsiMeetSDK', '~> 2.3.1'

end

Expand Down
10 changes: 10 additions & 0 deletions MatrixSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@
B17982FB2119E4A2001FD722 /* MXRoomPredecessorInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = B17982F32119E4A1001FD722 /* MXRoomPredecessorInfo.m */; };
B17982FC2119E4A2001FD722 /* MXRoomPowerLevels.m in Sources */ = {isa = PBXBuildFile; fileRef = B17982F42119E4A2001FD722 /* MXRoomPowerLevels.m */; };
B1798304211B3649001FD722 /* MXRoomSummary.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1798303211B3649001FD722 /* MXRoomSummary.swift */; };
B17B2BDC2369FC81009D6650 /* MXUIKitBackgroundTask.h in Headers */ = {isa = PBXBuildFile; fileRef = B17B2BDA2369FC81009D6650 /* MXUIKitBackgroundTask.h */; };
B17B2BDD2369FC81009D6650 /* MXUIKitBackgroundTask.m in Sources */ = {isa = PBXBuildFile; fileRef = B17B2BDB2369FC81009D6650 /* MXUIKitBackgroundTask.m */; };
B182B08723167A640057972E /* MXIdentityServerHashDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = B182B08523167A640057972E /* MXIdentityServerHashDetails.h */; settings = {ATTRIBUTES = (Public, ); }; };
B182B08823167A640057972E /* MXIdentityServerHashDetails.m in Sources */ = {isa = PBXBuildFile; fileRef = B182B08623167A640057972E /* MXIdentityServerHashDetails.m */; };
B18D18C22152B8E4003677D1 /* MXRoomMember.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18D18C12152B8E4003677D1 /* MXRoomMember.swift */; };
Expand Down Expand Up @@ -876,6 +878,7 @@
B1136961230AC9D900E2B2FA /* MXIdentityService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXIdentityService.m; sourceTree = "<group>"; };
B1136966230C1E8600E2B2FA /* MXIdentityService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MXIdentityService.swift; sourceTree = "<group>"; };
B11556ED230C45C600B2A2CF /* MXIdentityServerRestClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MXIdentityServerRestClient.swift; sourceTree = "<group>"; };
B11976FD236B27220001EC86 /* MXBackgroundTask.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MXBackgroundTask.h; sourceTree = "<group>"; };
B11BD44622CB56790064D8B0 /* MXReplyEventParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MXReplyEventParser.h; sourceTree = "<group>"; };
B11BD44722CB56790064D8B0 /* MXReplyEventParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MXReplyEventParser.m; sourceTree = "<group>"; };
B11BD44A22CB56E80064D8B0 /* MXReplyEventParts.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MXReplyEventParts.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -931,6 +934,8 @@
B17982F32119E4A1001FD722 /* MXRoomPredecessorInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXRoomPredecessorInfo.m; sourceTree = "<group>"; };
B17982F42119E4A2001FD722 /* MXRoomPowerLevels.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXRoomPowerLevels.m; sourceTree = "<group>"; };
B1798303211B3649001FD722 /* MXRoomSummary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MXRoomSummary.swift; sourceTree = "<group>"; };
B17B2BDA2369FC81009D6650 /* MXUIKitBackgroundTask.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MXUIKitBackgroundTask.h; sourceTree = "<group>"; };
B17B2BDB2369FC81009D6650 /* MXUIKitBackgroundTask.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MXUIKitBackgroundTask.m; sourceTree = "<group>"; };
B182B08523167A640057972E /* MXIdentityServerHashDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MXIdentityServerHashDetails.h; sourceTree = "<group>"; };
B182B08623167A640057972E /* MXIdentityServerHashDetails.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXIdentityServerHashDetails.m; sourceTree = "<group>"; };
B18D18C12152B8E4003677D1 /* MXRoomMember.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MXRoomMember.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1136,6 +1141,9 @@
32A9E8231EF4026E0081358A /* MXUIKitBackgroundModeHandler.m */,
32A9770221626E5C00919CC0 /* MXServerNotices.h */,
32A9770321626E5C00919CC0 /* MXServerNotices.m */,
B11976FD236B27220001EC86 /* MXBackgroundTask.h */,
B17B2BDA2369FC81009D6650 /* MXUIKitBackgroundTask.h */,
B17B2BDB2369FC81009D6650 /* MXUIKitBackgroundTask.m */,
);
path = Utils;
sourceTree = "<group>";
Expand Down Expand Up @@ -2089,6 +2097,7 @@
3294FD9F22F321B0007F1E60 /* MXServiceTermsRestClient.h in Headers */,
32954019216385F100E300FC /* MXServerNoticeContent.h in Headers */,
327187851DA7D0220071C818 /* MXOlmDecryption.h in Headers */,
B17B2BDC2369FC81009D6650 /* MXUIKitBackgroundTask.h in Headers */,
32D7767D1A27860600FC4AA2 /* MXMemoryStore.h in Headers */,
327E9AD72284803100A98BC1 /* MXEventAnnotationChunk.h in Headers */,
3252DCBD224D144C0032264F /* MXKeyVerificationAccept.h in Headers */,
Expand Down Expand Up @@ -2494,6 +2503,7 @@
B11BD45522CB583E0064D8B0 /* MXReplyEventBodyParts.m in Sources */,
32F945F51FAB83D900622468 /* MXIncomingRoomKeyRequestCancellation.m in Sources */,
32D776821A27877300FC4AA2 /* MXMemoryRoomStore.m in Sources */,
B17B2BDD2369FC81009D6650 /* MXUIKitBackgroundTask.m in Sources */,
3293C701214BBA4F009B3DDB /* MXPeekingRoomSummary.m in Sources */,
C602B58C1F2268F700B67D87 /* MXRoom.swift in Sources */,
32E402BA21C957D2004E87A6 /* MXOlmSession.m in Sources */,
Expand Down
5 changes: 3 additions & 2 deletions MatrixSDK/Contrib/Swift/MXRestClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1381,13 +1381,14 @@ public extension MXRestClient {
- parameters:
- sid: the session id provided during the 3PID validation session.
- clientSecret: the same secret key used in the validation session.
- authParameters: The additional authentication information for the user-interactive authentication API.
- completion: A block object called when the operation completes.
- response: Indicates whether the operation was successful.

- returns: a `MXHTTPOperation` instance.
*/
@nonobjc @discardableResult func addThirdPartyIdentifierOnly(withSessionId sid: String, clientSecret: String, completion: @escaping (_ response: MXResponse<Void>) -> Void) -> MXHTTPOperation {
return __add3PIDOnly(withSessionId: sid, clientSecret: clientSecret, success: currySuccess(completion), failure: curryFailure(completion))
@nonobjc @discardableResult func addThirdPartyIdentifierOnly(withSessionId sid: String, clientSecret: String, authParameters: [String: Any]?, completion: @escaping (_ response: MXResponse<Void>) -> Void) -> MXHTTPOperation {
return __add3PIDOnly(withSessionId: sid, clientSecret: clientSecret, authParams: authParameters, success: currySuccess(completion), failure: curryFailure(completion))
}

/**
Expand Down
15 changes: 15 additions & 0 deletions MatrixSDK/Contrib/Swift/ThreePidAdd/MX3PidAddManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ public extension MX3PidAddManager {
return __tryFinaliseAddEmailSession(session, success: currySuccess(completion), failure: curryFailure(completion))
}

@nonobjc func tryFinaliseAddEmailSession(_ session: MX3PidAddSession, password: String?, completion: @escaping (_ response: MXResponse<Void>) -> Void) -> Void {
return __tryFinaliseAddEmailSession(session, withPassword: password, success: currySuccess(completion), failure: curryFailure(completion))
}

@nonobjc func tryFinaliseAddEmailSession(_ session: MX3PidAddSession, authParams: [String: Any]?, completion: @escaping (_ response: MXResponse<Void>) -> Void) -> Void {
return __tryFinaliseAddEmailSession(session, authParams: authParams, success: currySuccess(completion), failure: curryFailure(completion))
}

// MARK: - Add MSISDN
@nonobjc @discardableResult func startAddPhoneNumberSession(_ phoneNumber: String, countryCode: String?, completion: @escaping (_ response: MXResponse<Void>) -> Void) -> MX3PidAddSession {
Expand All @@ -46,6 +53,14 @@ public extension MX3PidAddManager {
return __finaliseAddPhoneNumber(session, withToken: token, success: currySuccess(completion), failure: curryFailure(completion))
}

@nonobjc func finaliseAddPhoneNumberSession(_ session: MX3PidAddSession, token: String, password: String?, completion: @escaping (_ response: MXResponse<Void>) -> Void) -> Void {
return __finaliseAddPhoneNumber(session, withToken: token, password: password, success: currySuccess(completion), failure: curryFailure(completion))
}

@nonobjc func finaliseAddPhoneNumberSession(_ session: MX3PidAddSession, token: String, authParams: [String: Any]?, completion: @escaping (_ response: MXResponse<Void>) -> Void) -> Void {
return __finaliseAddPhoneNumber(session, withToken: token, authParams: authParams, success: currySuccess(completion), failure: curryFailure(completion))
}


// MARK: - Bind Email
@nonobjc @discardableResult func startIdentityServerSession(withEmail email: String, bind: Bool, completion: @escaping (_ response: MXResponse<Bool>) -> Void) -> MX3PidAddSession {
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Crypto/Algorithms/MXDecryptionResult.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
NSString* const MXDecryptingErrorUnableToEncrypt = @"Unable to encrypt";
NSString* const MXDecryptingErrorUnableToEncryptReason = @"Unable to encrypt %@";
NSString* const MXDecryptingErrorUnableToDecrypt = @"Unable to decrypt";
NSString* const MXDecryptingErrorUnableToDecryptReason = @"Unable to decrypt %@. Algoritm: %@";
NSString* const MXDecryptingErrorUnableToDecryptReason = @"Unable to decrypt %@. Algorithm: %@";
NSString* const MXDecryptingErrorOlm = @"Error: OLM.%@";
NSString* const MXDecryptingErrorOlmReason = @"Unable to decrypt %@. OLM error: %@";
NSString* const MXDecryptingErrorUnknownInboundSessionIdReason = @"Unknown inbound session id";
Expand Down
7 changes: 2 additions & 5 deletions MatrixSDK/Crypto/Algorithms/Megolm/MXMegolmEncryption.m
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,8 @@ - (MXHTTPOperation*)ensureSessionForUsers:(NSArray<NSString*>*)users
}

} failure:failure];

if (operation2)
{
[operation mutateTo:operation2];
}

[operation mutateTo:operation2];

} failure:failure];

Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Crypto/Data/MXDeviceList.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ - (MXHTTPOperation*)downloadKeys:(NSArray<NSString*>*)userIds forceDownload:(BOO
success:(void (^)(MXUsersDevicesMap<MXDeviceInfo*> *usersDevicesInfoMap))success
failure:(void (^)(NSError *error))failure
{
NSLog(@"[MXDeviceList] downloadKeys(forceDownload: %tu) for %tu users", forceDownload, userIds.count);
NSLog(@"[MXDeviceList] downloadKeys(forceDownload: %d) for %tu users", forceDownload, userIds.count);

NSMutableArray *usersToDownload = [NSMutableArray array];
BOOL doANewQuery = NO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ - (instancetype)initWithCredentials:(MXCredentials *)credentials
}
}

NSLog(@"[MXRealmCryptoStore] Schema version: %tu", account.realm.configuration.schemaVersion);
NSLog(@"[MXRealmCryptoStore] Schema version: %llu", account.realm.configuration.schemaVersion);
}
return self;
}
Expand Down Expand Up @@ -1129,7 +1129,7 @@ + (RLMRealm*)realmForUser:(NSString*)userId

if (oldSchemaVersion < kMXRealmCryptoStoreVersion)
{
NSLog(@"[MXRealmCryptoStore] Required migration detected. oldSchemaVersion: %tu - current: %tu", oldSchemaVersion, kMXRealmCryptoStoreVersion);
NSLog(@"[MXRealmCryptoStore] Required migration detected. oldSchemaVersion: %llu - current: %tu", oldSchemaVersion, kMXRealmCryptoStoreVersion);

switch (oldSchemaVersion)
{
Expand Down
21 changes: 6 additions & 15 deletions MatrixSDK/Crypto/KeyBackup/MXKeyBackup.m
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,8 @@ - (MXHTTPOperation*)createKeyBackupVersion:(MXMegolmBackupCreationInfo*)keyBacku
});
}
}];

if (operation2)
{
[operation mutateTo:operation2];
}

[operation mutateTo:operation2];
});

return operation;
Expand Down Expand Up @@ -541,11 +538,8 @@ - (MXHTTPOperation*)deleteKeyBackupVersion:(NSString*)version
});
}
}];

if (operation2)
{
[operation mutateTo:operation2];
}

[operation mutateTo:operation2];
});

return operation;
Expand Down Expand Up @@ -806,11 +800,8 @@ - (MXHTTPOperation*)restoreKeyBackup:(MXKeyBackupVersion*)keyBackupVersion
});
}
}];

if (operation2)
{
[operation mutateTo:operation2];
}

[operation mutateTo:operation2];
});

return operation;
Expand Down
Loading

0 comments on commit 779c171

Please sign in to comment.