mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-18 21:52:18 +02:00
Merge pull request #1972 from vector-im/disable_MatrixSDK_SwiftSupport
Disable 'MatrixSDK/SwiftSupport' pod
This commit is contained in:
@@ -23,18 +23,18 @@ $matrixKitVersion = '0.7.15'
|
||||
def import_MatrixKit
|
||||
if $matrixKitVersion == 'local'
|
||||
pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixSDK/SwiftSupport', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
#pod 'MatrixSDK/SwiftSupport', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixSDK/JingleCallStack', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixKit', :path => '../matrix-ios-kit/MatrixKit.podspec'
|
||||
else
|
||||
if $matrixKitVersion == 'develop'
|
||||
pod 'MatrixSDK', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixSDK/SwiftSupport', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
#pod 'MatrixSDK/SwiftSupport', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixSDK/JingleCallStack', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixKit', :git => 'https://github.com/matrix-org/matrix-ios-kit.git', :branch => 'develop'
|
||||
else
|
||||
pod 'MatrixKit', $matrixKitVersion
|
||||
pod 'MatrixSDK/SwiftSupport'
|
||||
#pod 'MatrixSDK/SwiftSupport'
|
||||
pod 'MatrixSDK/JingleCallStack'
|
||||
end
|
||||
end
|
||||
@@ -44,18 +44,18 @@ end
|
||||
def import_MatrixKitAppExtension
|
||||
if $matrixKitVersion == 'local'
|
||||
pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixSDK/SwiftSupport', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
#pod 'MatrixSDK/SwiftSupport', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixSDK/JingleCallStack', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
pod 'MatrixKit/AppExtension', :path => '../matrix-ios-kit/MatrixKit.podspec'
|
||||
else
|
||||
if $matrixKitVersion == 'develop'
|
||||
pod 'MatrixSDK', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixSDK/SwiftSupport', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
#pod 'MatrixSDK/SwiftSupport', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixSDK/JingleCallStack', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
|
||||
pod 'MatrixKit/AppExtension', :git => 'https://github.com/matrix-org/matrix-ios-kit.git', :branch => 'develop'
|
||||
else
|
||||
pod 'MatrixKit/AppExtension', $matrixKitVersion
|
||||
pod 'MatrixSDK/SwiftSupport'
|
||||
#pod 'MatrixSDK/SwiftSupport'
|
||||
pod 'MatrixSDK/JingleCallStack'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
3233F7461F3497E2006ACA81 /* JitsiMeet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3233F7441F3497DA006ACA81 /* JitsiMeet.framework */; };
|
||||
3233F7471F3497E2006ACA81 /* JitsiMeet.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3233F7441F3497DA006ACA81 /* JitsiMeet.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
3284A35120A07C210044F922 /* postMessageAPI.js in Resources */ = {isa = PBXBuildFile; fileRef = 3284A35020A07C210044F922 /* postMessageAPI.js */; };
|
||||
32C10340211DD1A100DFFB5D /* MatrixSDK+Swift.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C1033F211DD1A100DFFB5D /* MatrixSDK+Swift.m */; };
|
||||
68A2327678CA647A9A7739C7 /* Pods_RiotPods_Riot.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0FAA1A49F76B0CE15C5CBD8 /* Pods_RiotPods_Riot.framework */; };
|
||||
926FA53F1F4C132000F826C2 /* MXSession+Riot.m in Sources */ = {isa = PBXBuildFile; fileRef = 926FA53E1F4C132000F826C2 /* MXSession+Riot.m */; };
|
||||
92726A471F58737A004AD26F /* IntentHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 92726A461F58737A004AD26F /* IntentHandler.m */; };
|
||||
@@ -383,7 +384,7 @@
|
||||
24CBEC4E1F0EAD310093EABB /* RiotShareExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = RiotShareExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3233F7441F3497DA006ACA81 /* JitsiMeet.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JitsiMeet.framework; sourceTree = "<group>"; };
|
||||
3267EFB320E379FD00FF1CAA /* CHANGES.rst */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGES.rst; sourceTree = "<group>"; };
|
||||
3267EFB420E379FD00FF1CAA /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; path = Podfile; sourceTree = "<group>"; };
|
||||
3267EFB420E379FD00FF1CAA /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; path = Podfile; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
||||
3267EFB520E379FD00FF1CAA /* AUTHORS.rst */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS.rst; sourceTree = "<group>"; };
|
||||
3267EFB620E379FD00FF1CAA /* README.rst */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.rst; sourceTree = "<group>"; };
|
||||
3284A35020A07C210044F922 /* postMessageAPI.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = postMessageAPI.js; sourceTree = "<group>"; };
|
||||
@@ -393,6 +394,8 @@
|
||||
32BDC9A4211C34C90064AF51 /* sq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sq; path = sq.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
32BDC9A5211C34C90064AF51 /* sq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sq; path = sq.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
32BDC9A6211C34C90064AF51 /* sq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sq; path = sq.lproj/Vector.strings; sourceTree = "<group>"; };
|
||||
32C1033E211DD1A100DFFB5D /* MatrixSDK+Swift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MatrixSDK+Swift.h"; sourceTree = "<group>"; };
|
||||
32C1033F211DD1A100DFFB5D /* MatrixSDK+Swift.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "MatrixSDK+Swift.m"; sourceTree = "<group>"; };
|
||||
33F966BE1A83B32A2DFE24CA /* Pods-RiotPods-SiriIntents.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotPods-SiriIntents.release.xcconfig"; path = "Pods/Target Support Files/Pods-RiotPods-SiriIntents/Pods-RiotPods-SiriIntents.release.xcconfig"; sourceTree = "<group>"; };
|
||||
397BCA987893439918EBF330 /* Pods-SiriIntents.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SiriIntents.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SiriIntents/Pods-SiriIntents.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
4D1164C2F07EF74950DCDA7A /* Pods-SiriIntents.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SiriIntents.release.xcconfig"; path = "Pods/Target Support Files/Pods-SiriIntents/Pods-SiriIntents.release.xcconfig"; sourceTree = "<group>"; };
|
||||
@@ -2463,6 +2466,8 @@
|
||||
F083BBEC1E7009EC00A9B29C /* UIViewController+RiotSearch.m */,
|
||||
926FA53D1F4C132000F826C2 /* MXSession+Riot.h */,
|
||||
926FA53E1F4C132000F826C2 /* MXSession+Riot.m */,
|
||||
32C1033E211DD1A100DFFB5D /* MatrixSDK+Swift.h */,
|
||||
32C1033F211DD1A100DFFB5D /* MatrixSDK+Swift.m */,
|
||||
);
|
||||
path = Categories;
|
||||
sourceTree = "<group>";
|
||||
@@ -3123,6 +3128,7 @@
|
||||
B1B5590920EF768F00210D55 /* RoomEmptyBubbleCell.m in Sources */,
|
||||
B1B5574720EE6C4D00210D55 /* UsersDevicesViewController.m in Sources */,
|
||||
B1B558D220EF768F00210D55 /* RoomEncryptedDataBubbleCell.m in Sources */,
|
||||
32C10340211DD1A100DFFB5D /* MatrixSDK+Swift.m in Sources */,
|
||||
B1B558FA20EF768F00210D55 /* RoomMembershipBubbleCell.m in Sources */,
|
||||
B1B557BF20EF5B4500210D55 /* DisabledRoomInputToolbarView.m in Sources */,
|
||||
B1B5578620EF564900210D55 /* GroupTableViewCellWithSwitch.m in Sources */,
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
Copyright 2018 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#import <MatrixSDK/MatrixSDK.h>
|
||||
|
||||
/**
|
||||
IMPORTANT: This file must be removed once the pod 'MatrixSDK/SwiftSupport' can
|
||||
be pushed.
|
||||
|
||||
Methods are redefined here to skip NS_REFINED_FOR_SWIFT defined in their declaration.
|
||||
*/
|
||||
|
||||
@interface MXSession (Swift)
|
||||
|
||||
- (MXHTTPOperation*)createRoomFromSwift:(NSString*)name
|
||||
visibility:(MXRoomDirectoryVisibility)visibility
|
||||
roomAlias:(NSString*)roomAlias
|
||||
topic:(NSString*)topic
|
||||
invite:(NSArray<NSString*>*)inviteArray
|
||||
invite3PID:(NSArray<MXInvite3PID*>*)invite3PIDArray
|
||||
isDirect:(BOOL)isDirect
|
||||
preset:(MXRoomPreset)preset
|
||||
success:(void (^)(void))success
|
||||
failure:(void (^)(NSError *error))failure;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface MXRoomSummary (Swift)
|
||||
|
||||
@property (nonatomic, readonly) MXMembership membershipFromSwift;
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright 2018 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MatrixSDK+Swift.h"
|
||||
|
||||
@implementation MXSession (Swift)
|
||||
|
||||
- (MXHTTPOperation*)createRoomFromSwift:(NSString*)name
|
||||
visibility:(MXRoomDirectoryVisibility)visibility
|
||||
roomAlias:(NSString*)roomAlias
|
||||
topic:(NSString*)topic
|
||||
invite:(NSArray<NSString*>*)inviteArray
|
||||
invite3PID:(NSArray<MXInvite3PID*>*)invite3PIDArray
|
||||
isDirect:(BOOL)isDirect
|
||||
preset:(MXRoomPreset)preset
|
||||
success:(void (^)(void))success
|
||||
failure:(void (^)(NSError *error))failure
|
||||
{
|
||||
return [self createRoom:name visibility:visibility roomAlias:roomAlias topic:topic invite:inviteArray invite3PID:invite3PIDArray isDirect:isDirect preset:preset success:^(MXRoom *room) {
|
||||
|
||||
if (success)
|
||||
{
|
||||
success();
|
||||
}
|
||||
} failure:failure];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MXRoomSummary (Swift)
|
||||
|
||||
- (MXMembership)membershipFromSwift
|
||||
{
|
||||
return self.membership;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -49,21 +49,30 @@ final public class OnBoardingManager: NSObject {
|
||||
return
|
||||
}
|
||||
|
||||
// // Create DM room with Riot-bot
|
||||
//
|
||||
// let httpOperation = self.session.createRoom(name: nil, visibility: .private, alias: nil, topic: nil, invite: [Constants.riotBotMatrixId], invite3PID: nil, isDirect: true, preset: .trustedPrivateChat) { (response) in
|
||||
//
|
||||
// switch response {
|
||||
// case .success(_):
|
||||
// success?()
|
||||
// case .failure(let error):
|
||||
// NSLog("[OnBoardingManager] Create chat with riot-bot failed");
|
||||
// failure?(error)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // Make multipe tries, until we get a response
|
||||
// httpOperation.maxNumberOfTries = Constants.createRiotBotDMRequestMaxNumberOfTries
|
||||
|
||||
|
||||
// Create DM room with Riot-bot
|
||||
|
||||
let httpOperation = self.session.createRoom(name: nil, visibility: .private, alias: nil, topic: nil, invite: [Constants.riotBotMatrixId], invite3PID: nil, isDirect: true, preset: .trustedPrivateChat) { (response) in
|
||||
|
||||
switch response {
|
||||
case .success(_):
|
||||
success?()
|
||||
case .failure(let error):
|
||||
NSLog("[OnBoardingManager] Create chat with riot-bot failed");
|
||||
failure?(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let httpOperation = self.session.createRoom(fromSwift: nil, visibility: kMXRoomDirectoryVisibilityPrivate, roomAlias: nil, topic: nil, invite: [Constants.riotBotMatrixId], invite3PID: nil, isDirect: true, preset: kMXRoomPresetTrustedPrivateChat, success: success, failure: nil)
|
||||
|
||||
|
||||
// Make multipe tries, until we get a response
|
||||
httpOperation.maxNumberOfTries = Constants.createRiotBotDMRequestMaxNumberOfTries
|
||||
httpOperation?.maxNumberOfTries = Constants.createRiotBotDMRequestMaxNumberOfTries
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
@@ -76,12 +85,13 @@ final public class OnBoardingManager: NSObject {
|
||||
var isUSerJoinedARoom = false
|
||||
|
||||
for roomSummary in roomSummaries {
|
||||
if case .join = roomSummary.membership {
|
||||
// if case .join = roomSummary.membership {
|
||||
if case __MXMembershipJoin = roomSummary.membershipFromSwift {
|
||||
isUSerJoinedARoom = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return isUSerJoinedARoom
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
|
||||
@import MatrixSDK;
|
||||
#import "WebViewViewController.h"
|
||||
#import "MatrixSDK+Swift.h"
|
||||
|
||||
Reference in New Issue
Block a user