mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
ac395372a1
33 changed files with 702 additions and 482 deletions
148
Podfile
148
Podfile
|
@ -3,104 +3,80 @@ platform :ios, "8.0"
|
|||
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
|
||||
target "Riot" do
|
||||
|
||||
# Different flavours of pods to MatrixKit
|
||||
# The tagged version on which this version of Riot has been built
|
||||
pod 'MatrixKit', '0.6.3'
|
||||
|
||||
# The lastest release available on the CocoaPods repository
|
||||
#pod 'MatrixKit'
|
||||
# The current MatrixKit pod version
|
||||
$matrixKitVersion = '0.6.3'
|
||||
|
||||
# The develop branch version
|
||||
#pod 'MatrixSDK', :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'
|
||||
#$matrixKitVersion = 'develop'
|
||||
|
||||
# The one used for developing both MatrixSDK and MatrixKit
|
||||
# Note that MatrixSDK must be cloned into a folder called matrix-ios-sdk next to the MatrixKit folder
|
||||
#pod 'MatrixKit', :path => '../matrix-ios-kit/MatrixKit.podspec'
|
||||
#pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
#$matrixKitVersion = 'local'
|
||||
|
||||
pod 'GBDeviceInfo', '~> 4.4.0'
|
||||
|
||||
pod 'GoogleAnalytics'
|
||||
# Method to import the right MatrixKit flavour
|
||||
def import_MatrixKit
|
||||
if $matrixKitVersion == 'local'
|
||||
pod 'MatrixSDK', :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 'MatrixKit', :git => 'https://github.com/matrix-org/matrix-ios-kit.git', :branch => 'develop'
|
||||
else
|
||||
pod 'MatrixKit', $matrixKitVersion
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# The Google WebRTC stack
|
||||
pod 'WebRTC', '58.17.16937'
|
||||
# Method to import the right MatrixKit/AppExtension flavour
|
||||
def import_MatrixKitAppExtension
|
||||
if $matrixKitVersion == 'local'
|
||||
pod 'MatrixSDK', :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 'MatrixKit/AppExtension', :git => 'https://github.com/matrix-org/matrix-ios-kit.git', :branch => 'develop'
|
||||
else
|
||||
pod 'MatrixKit/AppExtension', $matrixKitVersion
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# OLMKit for crypto
|
||||
pod 'OLMKit'
|
||||
#pod 'OLMKit', :path => '../olm/OLMKit.podspec'
|
||||
pod 'Realm', '~> 2.10.2'
|
||||
|
||||
# Remove warnings from "bad" pods
|
||||
pod 'OLMKit', :inhibit_warnings => true
|
||||
pod 'cmark', :inhibit_warnings => true
|
||||
pod 'DTCoreText', :inhibit_warnings => true
|
||||
abstract_target 'RiotPods' do
|
||||
|
||||
pod 'GBDeviceInfo', '~> 4.4.0'
|
||||
pod 'GoogleAnalytics'
|
||||
|
||||
# The Google WebRTC stack
|
||||
pod 'WebRTC', '61.5.19063'
|
||||
|
||||
# OLMKit for crypto
|
||||
pod 'OLMKit'
|
||||
#pod 'OLMKit', :path => '../olm/OLMKit.podspec'
|
||||
pod 'Realm', '~> 3.0.0'
|
||||
|
||||
# Remove warnings from "bad" pods
|
||||
pod 'OLMKit', :inhibit_warnings => true
|
||||
pod 'cmark', :inhibit_warnings => true
|
||||
pod 'DTCoreText', :inhibit_warnings => true
|
||||
|
||||
|
||||
target "Riot" do
|
||||
import_MatrixKit
|
||||
end
|
||||
|
||||
target "RiotShareExtension" do
|
||||
import_MatrixKitAppExtension
|
||||
end
|
||||
|
||||
target "SiriIntents" do
|
||||
import_MatrixKitAppExtension
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
target "RiotShareExtension" do
|
||||
|
||||
pod 'GoogleAnalytics'
|
||||
# The Google WebRTC stack
|
||||
pod 'WebRTC', '58.17.16937'
|
||||
# OLMKit for crypto
|
||||
pod 'OLMKit'
|
||||
#pod 'OLMKit', :path => '../olm/OLMKit.podspec'
|
||||
pod 'Realm', '~> 2.10.2'
|
||||
|
||||
# The tagged version on which this version of Riot share extension has been built
|
||||
pod 'MatrixKit/AppExtension', '0.6.3'
|
||||
|
||||
# The lastest release available on the CocoaPods repository
|
||||
#pod 'MatrixKit/AppExtension'
|
||||
|
||||
# The develop branch version
|
||||
#pod 'MatrixSDK', :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'
|
||||
|
||||
# The one used for developing both MatrixSDK and MatrixKit
|
||||
# Note that MatrixSDK must be cloned into a folder called matrix-ios-sdk next to the MatrixKit folder
|
||||
#pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
#pod 'MatrixKit/AppExtension', :path => '../matrix-ios-kit/MatrixKit.podspec'
|
||||
|
||||
# Remove warnings from "bad" pods
|
||||
pod 'OLMKit', :inhibit_warnings => true
|
||||
pod 'cmark', :inhibit_warnings => true
|
||||
|
||||
end
|
||||
|
||||
|
||||
target "SiriIntents" do
|
||||
|
||||
pod 'GoogleAnalytics'
|
||||
# The Google WebRTC stack
|
||||
pod 'WebRTC', '58.17.16937'
|
||||
# OLMKit for crypto
|
||||
pod 'OLMKit'
|
||||
#pod 'OLMKit', :path => '../olm/OLMKit.podspec'
|
||||
pod 'Realm', '~> 2.10.2'
|
||||
|
||||
# The tagged version on which this version of Riot share extension has been built
|
||||
pod 'MatrixKit/AppExtension', '0.6.3'
|
||||
|
||||
# The lastest release available on the CocoaPods repository
|
||||
#pod 'MatrixKit/AppExtension'
|
||||
|
||||
# The develop branch version
|
||||
#pod 'MatrixSDK', :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'
|
||||
|
||||
# The one used for developing both MatrixSDK and MatrixKit
|
||||
# Note that MatrixSDK must be cloned into a folder called matrix-ios-sdk next to the MatrixKit folder
|
||||
#pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
|
||||
#pod 'MatrixKit/AppExtension', :path => '../matrix-ios-kit/MatrixKit.podspec'
|
||||
|
||||
# Remove warnings from "bad" pods
|
||||
pod 'OLMKit', :inhibit_warnings => true
|
||||
pod 'cmark', :inhibit_warnings => true
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
05D592A32FF1D1877B89F73C /* libPods-Riot.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD9D0BDE9232898950554DD5 /* libPods-Riot.a */; };
|
||||
2435179C1F375B9400D0683E /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2466B7551F2F80B800AE27B0 /* Info.plist */; };
|
||||
2435179F1F375C0F00D0683E /* Vector.strings in Resources */ = {isa = PBXBuildFile; fileRef = 327382C01F276AED00356143 /* Vector.strings */; };
|
||||
2439DD621F6BBE760090F42D /* RecentRoomTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2439DD611F6BBE760090F42D /* RecentRoomTableViewCell.m */; };
|
||||
|
@ -36,6 +35,8 @@
|
|||
24EEE5AF1F25F0F500B3C705 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F083BBEF1E7009EC00A9B29C /* Images.xcassets */; };
|
||||
24EEE5B41F2607C000B3C705 /* SegmentedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BC4E1E7009EC00A9B29C /* SegmentedViewController.m */; };
|
||||
24EEE5B51F2607C500B3C705 /* SegmentedViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F083BC4F1E7009EC00A9B29C /* SegmentedViewController.xib */; };
|
||||
268F9A229B0162F9C8AEBE34 /* libPods-RiotPods-Riot.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 714B084D44A5553C13D855BA /* libPods-RiotPods-Riot.a */; };
|
||||
319F86690284AA02FC397A15 /* libPods-RiotPods-SiriIntents.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C1A4A3DCE26410A60959E96 /* libPods-RiotPods-SiriIntents.a */; };
|
||||
3205ED7D1E976C8A003D65FA /* DirectoryServerPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3205ED7C1E976C8A003D65FA /* DirectoryServerPickerViewController.m */; };
|
||||
3205ED841E97725E003D65FA /* DirectoryServerTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3205ED821E97725E003D65FA /* DirectoryServerTableViewCell.m */; };
|
||||
3205ED851E97725E003D65FA /* DirectoryServerTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3205ED831E97725E003D65FA /* DirectoryServerTableViewCell.xib */; };
|
||||
|
@ -68,6 +69,9 @@
|
|||
32918EAA1F473BDB0076CA16 /* Vector.strings in Resources */ = {isa = PBXBuildFile; fileRef = 32918EA71F473BDB0076CA16 /* Vector.strings */; };
|
||||
32935CB11F6056FD006888C8 /* IntegrationManagerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32935CB01F6056FD006888C8 /* IntegrationManagerViewController.m */; };
|
||||
32935CB41F628BCE006888C8 /* IntegrationManager.js in Resources */ = {isa = PBXBuildFile; fileRef = 32935CB31F628BCE006888C8 /* IntegrationManager.js */; };
|
||||
329DCE191F988F8100468420 /* riot_icon_callkit.png in Resources */ = {isa = PBXBuildFile; fileRef = 329DCE161F988F8100468420 /* riot_icon_callkit.png */; };
|
||||
329DCE1A1F988F8100468420 /* riot_icon_callkit@2.png in Resources */ = {isa = PBXBuildFile; fileRef = 329DCE171F988F8100468420 /* riot_icon_callkit@2.png */; };
|
||||
329DCE1B1F988F8100468420 /* riot_icon_callkit@3.png in Resources */ = {isa = PBXBuildFile; fileRef = 329DCE181F988F8100468420 /* riot_icon_callkit@3.png */; };
|
||||
32AE61E41F0A971B007255F4 /* RoomMembershipBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 32AE61E21F0A971B007255F4 /* RoomMembershipBubbleCell.m */; };
|
||||
32AE61E51F0A971B007255F4 /* RoomMembershipBubbleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 32AE61E31F0A971B007255F4 /* RoomMembershipBubbleCell.xib */; };
|
||||
32AE61E91F0CE099007255F4 /* RoomMembershipWithPaginationTitleBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 32AE61E71F0CE099007255F4 /* RoomMembershipWithPaginationTitleBubbleCell.m */; };
|
||||
|
@ -84,7 +88,7 @@
|
|||
32F3AE1A1F6FF4E600F0F004 /* WidgetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32F3AE191F6FF4E600F0F004 /* WidgetViewController.m */; };
|
||||
32FD0A3D1EB0CD9B0072B066 /* BugReportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32FD0A3B1EB0CD9B0072B066 /* BugReportViewController.m */; };
|
||||
32FD0A3E1EB0CD9B0072B066 /* BugReportViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 32FD0A3C1EB0CD9B0072B066 /* BugReportViewController.xib */; };
|
||||
714F6391AC0AA86C0AEB3F43 /* libPods-SiriIntents.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5666C1236223F54D4C635C54 /* libPods-SiriIntents.a */; };
|
||||
40D7564A9783FD6C28C157CE /* libPods-RiotPods-RiotShareExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AF0A0746EF74FF15B8B79658 /* libPods-RiotPods-RiotShareExtension.a */; };
|
||||
83711A7C1F6F8E7D008F0D4D /* KeyboardGrowingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83711A7B1F6F8E7D008F0D4D /* KeyboardGrowingTextView.m */; };
|
||||
92324BE31F4F66D3009DE194 /* IncomingCallView.m in Sources */ = {isa = PBXBuildFile; fileRef = 92324BE21F4F66D3009DE194 /* IncomingCallView.m */; };
|
||||
92324BE61F4F6A60009DE194 /* CircleButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 92324BE51F4F6A60009DE194 /* CircleButton.m */; };
|
||||
|
@ -92,7 +96,6 @@
|
|||
92726A471F58737A004AD26F /* IntentHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 92726A461F58737A004AD26F /* IntentHandler.m */; };
|
||||
92726A4B1F58737A004AD26F /* SiriIntents.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 92726A431F58737A004AD26F /* SiriIntents.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
92726A511F587410004AD26F /* Intents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92726A501F587410004AD26F /* Intents.framework */; };
|
||||
A27ECCE3FC4971745D2CB78D /* libPods-RiotShareExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7246451C668D6782166E22EC /* libPods-RiotShareExtension.a */; };
|
||||
F0131DE51F2200D600CBF707 /* RiotSplitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0131DE41F2200D600CBF707 /* RiotSplitViewController.m */; };
|
||||
F02C1A861E8EB04C0045A404 /* PeopleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F02C1A841E8EB04C0045A404 /* PeopleViewController.m */; };
|
||||
F04AF26A1F83A4C100D20F4D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F04AF25F1F83A4C000D20F4D /* InfoPlist.strings */; };
|
||||
|
@ -604,6 +607,7 @@
|
|||
|
||||
/* Begin PBXFileReference section */
|
||||
12AA0005C8B3D8D8162584C5 /* Pods-RiotShareExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotShareExtension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RiotShareExtension/Pods-RiotShareExtension.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
22D76C11C202B6BC5917A049 /* Pods-RiotPods-RiotShareExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotPods-RiotShareExtension.release.xcconfig"; path = "Pods/Target Support Files/Pods-RiotPods-RiotShareExtension/Pods-RiotPods-RiotShareExtension.release.xcconfig"; sourceTree = "<group>"; };
|
||||
2439DD601F6BBE760090F42D /* RecentRoomTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecentRoomTableViewCell.h; sourceTree = "<group>"; };
|
||||
2439DD611F6BBE760090F42D /* RecentRoomTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RecentRoomTableViewCell.m; sourceTree = "<group>"; };
|
||||
2439DD631F6BBEA50090F42D /* RecentRoomTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RecentRoomTableViewCell.xib; sourceTree = "<group>"; };
|
||||
|
@ -669,6 +673,9 @@
|
|||
32935CAF1F6056FD006888C8 /* IntegrationManagerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntegrationManagerViewController.h; sourceTree = "<group>"; };
|
||||
32935CB01F6056FD006888C8 /* IntegrationManagerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IntegrationManagerViewController.m; sourceTree = "<group>"; };
|
||||
32935CB31F628BCE006888C8 /* IntegrationManager.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = IntegrationManager.js; sourceTree = "<group>"; };
|
||||
329DCE161F988F8100468420 /* riot_icon_callkit.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = riot_icon_callkit.png; sourceTree = "<group>"; };
|
||||
329DCE171F988F8100468420 /* riot_icon_callkit@2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "riot_icon_callkit@2.png"; sourceTree = "<group>"; };
|
||||
329DCE181F988F8100468420 /* riot_icon_callkit@3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "riot_icon_callkit@3.png"; sourceTree = "<group>"; };
|
||||
32AE61E11F0A971B007255F4 /* RoomMembershipBubbleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomMembershipBubbleCell.h; sourceTree = "<group>"; };
|
||||
32AE61E21F0A971B007255F4 /* RoomMembershipBubbleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomMembershipBubbleCell.m; sourceTree = "<group>"; };
|
||||
32AE61E31F0A971B007255F4 /* RoomMembershipBubbleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomMembershipBubbleCell.xib; sourceTree = "<group>"; };
|
||||
|
@ -691,11 +698,15 @@
|
|||
32FD0A3A1EB0CD9B0072B066 /* BugReportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BugReportViewController.h; sourceTree = "<group>"; };
|
||||
32FD0A3B1EB0CD9B0072B066 /* BugReportViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BugReportViewController.m; sourceTree = "<group>"; };
|
||||
32FD0A3C1EB0CD9B0072B066 /* BugReportViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BugReportViewController.xib; 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>"; };
|
||||
5666C1236223F54D4C635C54 /* libPods-SiriIntents.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SiriIntents.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
61BB7CD1741206BEAAA6D4C7 /* Pods-RiotPods-SiriIntents.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotPods-SiriIntents.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RiotPods-SiriIntents/Pods-RiotPods-SiriIntents.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
714B084D44A5553C13D855BA /* libPods-RiotPods-Riot.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RiotPods-Riot.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7246451C668D6782166E22EC /* libPods-RiotShareExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RiotShareExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
765F5104DB3EC39713DEB3A4 /* Pods-RiotShareExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotShareExtension.release.xcconfig"; path = "Pods/Target Support Files/Pods-RiotShareExtension/Pods-RiotShareExtension.release.xcconfig"; sourceTree = "<group>"; };
|
||||
7C1A4A3DCE26410A60959E96 /* libPods-RiotPods-SiriIntents.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RiotPods-SiriIntents.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
83711A7B1F6F8E7D008F0D4D /* KeyboardGrowingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeyboardGrowingTextView.m; sourceTree = "<group>"; };
|
||||
839BB91240D350D5607D55BA /* Pods-Riot.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Riot.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Riot/Pods-Riot.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
92324BE11F4F66D3009DE194 /* IncomingCallView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncomingCallView.h; sourceTree = "<group>"; };
|
||||
|
@ -710,7 +721,10 @@
|
|||
92726A481F58737A004AD26F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
92726A4F1F587393004AD26F /* SiriIntents.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = SiriIntents.entitlements; sourceTree = "<group>"; };
|
||||
92726A501F587410004AD26F /* Intents.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Intents.framework; path = System/Library/Frameworks/Intents.framework; sourceTree = SDKROOT; };
|
||||
A5030B7C3C0B6EB83A9257BD /* Pods-RiotPods-Riot.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotPods-Riot.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RiotPods-Riot/Pods-RiotPods-Riot.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
AF0A0746EF74FF15B8B79658 /* libPods-RiotPods-RiotShareExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RiotPods-RiotShareExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C195C53961EA28E6900AEB68 /* Pods-Riot.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Riot.release.xcconfig"; path = "Pods/Target Support Files/Pods-Riot/Pods-Riot.release.xcconfig"; sourceTree = "<group>"; };
|
||||
C5258DFF261AA3AB228A3F11 /* Pods-RiotPods-RiotShareExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotPods-RiotShareExtension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RiotPods-RiotShareExtension/Pods-RiotPods-RiotShareExtension.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
F0131DE31F2200D600CBF707 /* RiotSplitViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RiotSplitViewController.h; sourceTree = "<group>"; };
|
||||
F0131DE41F2200D600CBF707 /* RiotSplitViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RiotSplitViewController.m; sourceTree = "<group>"; };
|
||||
F02C1A831E8EB04C0045A404 /* PeopleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PeopleViewController.h; sourceTree = "<group>"; };
|
||||
|
@ -1292,6 +1306,7 @@
|
|||
F0E05A2D1EA0F9EB004B83FB /* tab_rooms.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tab_rooms.png; sourceTree = "<group>"; };
|
||||
F0E05A2E1EA0F9EB004B83FB /* tab_rooms@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_rooms@2x.png"; sourceTree = "<group>"; };
|
||||
F0E05A2F1EA0F9EB004B83FB /* tab_rooms@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_rooms@3x.png"; sourceTree = "<group>"; };
|
||||
F546BCBBB9BBEE67DB28878A /* Pods-RiotPods-Riot.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotPods-Riot.release.xcconfig"; path = "Pods/Target Support Files/Pods-RiotPods-Riot/Pods-RiotPods-Riot.release.xcconfig"; sourceTree = "<group>"; };
|
||||
FD9D0BDE9232898950554DD5 /* libPods-Riot.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Riot.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
|
@ -1300,7 +1315,7 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A27ECCE3FC4971745D2CB78D /* libPods-RiotShareExtension.a in Frameworks */,
|
||||
40D7564A9783FD6C28C157CE /* libPods-RiotPods-RiotShareExtension.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -1309,7 +1324,7 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
92726A511F587410004AD26F /* Intents.framework in Frameworks */,
|
||||
714F6391AC0AA86C0AEB3F43 /* libPods-SiriIntents.a in Frameworks */,
|
||||
319F86690284AA02FC397A15 /* libPods-RiotPods-SiriIntents.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -1317,8 +1332,8 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
05D592A32FF1D1877B89F73C /* libPods-Riot.a in Frameworks */,
|
||||
3233F7461F3497E2006ACA81 /* JitsiMeet.framework in Frameworks */,
|
||||
268F9A229B0162F9C8AEBE34 /* libPods-RiotPods-Riot.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -1507,6 +1522,9 @@
|
|||
FD9D0BDE9232898950554DD5 /* libPods-Riot.a */,
|
||||
7246451C668D6782166E22EC /* libPods-RiotShareExtension.a */,
|
||||
5666C1236223F54D4C635C54 /* libPods-SiriIntents.a */,
|
||||
714B084D44A5553C13D855BA /* libPods-RiotPods-Riot.a */,
|
||||
AF0A0746EF74FF15B8B79658 /* libPods-RiotPods-RiotShareExtension.a */,
|
||||
7C1A4A3DCE26410A60959E96 /* libPods-RiotPods-SiriIntents.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1520,6 +1538,12 @@
|
|||
765F5104DB3EC39713DEB3A4 /* Pods-RiotShareExtension.release.xcconfig */,
|
||||
397BCA987893439918EBF330 /* Pods-SiriIntents.debug.xcconfig */,
|
||||
4D1164C2F07EF74950DCDA7A /* Pods-SiriIntents.release.xcconfig */,
|
||||
A5030B7C3C0B6EB83A9257BD /* Pods-RiotPods-Riot.debug.xcconfig */,
|
||||
F546BCBBB9BBEE67DB28878A /* Pods-RiotPods-Riot.release.xcconfig */,
|
||||
C5258DFF261AA3AB228A3F11 /* Pods-RiotPods-RiotShareExtension.debug.xcconfig */,
|
||||
22D76C11C202B6BC5917A049 /* Pods-RiotPods-RiotShareExtension.release.xcconfig */,
|
||||
61BB7CD1741206BEAAA6D4C7 /* Pods-RiotPods-SiriIntents.debug.xcconfig */,
|
||||
33F966BE1A83B32A2DFE24CA /* Pods-RiotPods-SiriIntents.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1544,8 +1568,8 @@
|
|||
92726A481F58737A004AD26F /* Info.plist */,
|
||||
);
|
||||
path = SiriIntents;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F04AF25E1F83A4C000D20F4D /* zh_Hans.lproj */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -1827,6 +1851,9 @@
|
|||
F083BBAD1E7009EC00A9B29C /* remove_icon_pink.png */,
|
||||
F083BBAE1E7009EC00A9B29C /* remove_icon_pink@2x.png */,
|
||||
F083BBAF1E7009EC00A9B29C /* remove_icon_pink@3x.png */,
|
||||
329DCE161F988F8100468420 /* riot_icon_callkit.png */,
|
||||
329DCE171F988F8100468420 /* riot_icon_callkit@2.png */,
|
||||
329DCE181F988F8100468420 /* riot_icon_callkit@3.png */,
|
||||
F083BBB01E7009EC00A9B29C /* riot_icon.png */,
|
||||
F083BBB11E7009EC00A9B29C /* riot_icon@2x.png */,
|
||||
F083BBB21E7009EC00A9B29C /* riot_icon@3x.png */,
|
||||
|
@ -2696,6 +2723,7 @@
|
|||
F083BD3D1E7009ED00A9B29C /* call_hangup_icon@2x.png in Resources */,
|
||||
F083BE551E7009ED00A9B29C /* RoomOutgoingEncryptedTextMsgWithoutSenderNameBubbleCell.xib in Resources */,
|
||||
32471CDD1F1373A100BDF50A /* RoomMembershipCollapsedWithPaginationTitleBubbleCell.xib in Resources */,
|
||||
329DCE191F988F8100468420 /* riot_icon_callkit.png in Resources */,
|
||||
3233F7321F31F4BF006ACA81 /* JitsiViewController.xib in Resources */,
|
||||
F083BD301E7009ED00A9B29C /* bubbles_bg_landscape.png in Resources */,
|
||||
F083BDA41E7009ED00A9B29C /* notifications.png in Resources */,
|
||||
|
@ -2759,6 +2787,7 @@
|
|||
F083BE751E7009ED00A9B29C /* RoomOutgoingTextMsgWithoutSenderNameBubbleCell.xib in Resources */,
|
||||
F04AF26A1F83A4C100D20F4D /* InfoPlist.strings in Resources */,
|
||||
F083BD261E7009ED00A9B29C /* admin_icon@2x.png in Resources */,
|
||||
329DCE1B1F988F8100468420 /* riot_icon_callkit@3.png in Resources */,
|
||||
3205ED851E97725E003D65FA /* DirectoryServerTableViewCell.xib in Resources */,
|
||||
F083BD761E7009ED00A9B29C /* e2e_verified@3x.png in Resources */,
|
||||
F083BE181E7009ED00A9B29C /* MediaPickerViewController.xib in Resources */,
|
||||
|
@ -2853,6 +2882,7 @@
|
|||
F083BDB11E7009ED00A9B29C /* priorityHigh@2x.png in Resources */,
|
||||
F0614A0E1EDDCCE700F5DC9A /* jump_to_unread@2x.png in Resources */,
|
||||
F083BDC21E7009ED00A9B29C /* scrollup.png in Resources */,
|
||||
329DCE1A1F988F8100468420 /* riot_icon_callkit@2.png in Resources */,
|
||||
F083BD521E7009ED00A9B29C /* camera_stop@2x.png in Resources */,
|
||||
327382C21F276AED00356143 /* InfoPlist.strings in Resources */,
|
||||
327382B81F276AD200356143 /* InfoPlist.strings in Resources */,
|
||||
|
@ -3039,7 +3069,7 @@
|
|||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Riot-checkManifestLockResult.txt",
|
||||
"$(DERIVED_FILE_DIR)/Pods-RiotPods-Riot-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
|
@ -3057,7 +3087,7 @@
|
|||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-RiotShareExtension-checkManifestLockResult.txt",
|
||||
"$(DERIVED_FILE_DIR)/Pods-RiotPods-RiotShareExtension-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
|
@ -3070,7 +3100,7 @@
|
|||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-Riot/Pods-Riot-resources.sh",
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-RiotPods-Riot/Pods-RiotPods-Riot-resources.sh",
|
||||
"${PODS_ROOT}/MatrixKit/MatrixKit/Controllers/MXKAccountDetailsViewController.xib",
|
||||
"${PODS_ROOT}/MatrixKit/MatrixKit/Controllers/MXKAttachmentsViewController.xib",
|
||||
"${PODS_ROOT}/MatrixKit/MatrixKit/Controllers/MXKAuthenticationViewController.xib",
|
||||
|
@ -3140,7 +3170,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Riot/Pods-Riot-resources.sh\"\n";
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RiotPods-Riot/Pods-RiotPods-Riot-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
6AA0024D4D5FAE30C2E1F311 /* [CP] Check Pods Manifest.lock */ = {
|
||||
|
@ -3154,7 +3184,7 @@
|
|||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-SiriIntents-checkManifestLockResult.txt",
|
||||
"$(DERIVED_FILE_DIR)/Pods-RiotPods-SiriIntents-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
|
@ -3167,7 +3197,7 @@
|
|||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-Riot/Pods-Riot-frameworks.sh",
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-RiotPods-Riot/Pods-RiotPods-Riot-frameworks.sh",
|
||||
"${PODS_ROOT}/WebRTC/WebRTC.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
|
@ -3176,7 +3206,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Riot/Pods-Riot-frameworks.sh\"\n";
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RiotPods-Riot/Pods-RiotPods-Riot-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
807A0ABF153A23C2FC22F977 /* [CP] Copy Pods Resources */ = {
|
||||
|
@ -3185,7 +3215,7 @@
|
|||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-SiriIntents/Pods-SiriIntents-resources.sh",
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-RiotPods-SiriIntents/Pods-RiotPods-SiriIntents-resources.sh",
|
||||
"${PODS_ROOT}/MatrixSDK/MatrixSDK/Data/Store/MXCoreDataStore/MXCoreDataStore.xcdatamodeld",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
|
@ -3194,7 +3224,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SiriIntents/Pods-SiriIntents-resources.sh\"\n";
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RiotPods-SiriIntents/Pods-RiotPods-SiriIntents-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
8EA19F5011654D3BD5EDAC33 /* [CP] Copy Pods Resources */ = {
|
||||
|
@ -3203,7 +3233,7 @@
|
|||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-RiotShareExtension/Pods-RiotShareExtension-resources.sh",
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-RiotPods-RiotShareExtension/Pods-RiotPods-RiotShareExtension-resources.sh",
|
||||
"${PODS_ROOT}/MatrixSDK/MatrixSDK/Data/Store/MXCoreDataStore/MXCoreDataStore.xcdatamodeld",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
|
@ -3212,7 +3242,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RiotShareExtension/Pods-RiotShareExtension-resources.sh\"\n";
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RiotPods-RiotShareExtension/Pods-RiotPods-RiotShareExtension-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
@ -3603,7 +3633,7 @@
|
|||
/* Begin XCBuildConfiguration section */
|
||||
24CBEC5A1F0EAD310093EABB /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 12AA0005C8B3D8D8162584C5 /* Pods-RiotShareExtension.debug.xcconfig */;
|
||||
baseConfigurationReference = C5258DFF261AA3AB228A3F11 /* Pods-RiotPods-RiotShareExtension.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
|
@ -3625,7 +3655,7 @@
|
|||
};
|
||||
24CBEC5B1F0EAD310093EABB /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 765F5104DB3EC39713DEB3A4 /* Pods-RiotShareExtension.release.xcconfig */;
|
||||
baseConfigurationReference = 22D76C11C202B6BC5917A049 /* Pods-RiotPods-RiotShareExtension.release.xcconfig */;
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
|
@ -3648,7 +3678,7 @@
|
|||
};
|
||||
92726A4C1F58737A004AD26F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 397BCA987893439918EBF330 /* Pods-SiriIntents.debug.xcconfig */;
|
||||
baseConfigurationReference = 61BB7CD1741206BEAAA6D4C7 /* Pods-RiotPods-SiriIntents.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
|
@ -3668,7 +3698,7 @@
|
|||
};
|
||||
92726A4D1F58737A004AD26F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 4D1164C2F07EF74950DCDA7A /* Pods-SiriIntents.release.xcconfig */;
|
||||
baseConfigurationReference = 33F966BE1A83B32A2DFE24CA /* Pods-RiotPods-SiriIntents.release.xcconfig */;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
|
@ -3774,7 +3804,7 @@
|
|||
};
|
||||
F094A9C91B78D8F000B1FBBF /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 839BB91240D350D5607D55BA /* Pods-Riot.debug.xcconfig */;
|
||||
baseConfigurationReference = A5030B7C3C0B6EB83A9257BD /* Pods-RiotPods-Riot.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = Riot/Riot.entitlements;
|
||||
|
@ -3797,7 +3827,7 @@
|
|||
};
|
||||
F094A9CA1B78D8F000B1FBBF /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = C195C53961EA28E6900AEB68 /* Pods-Riot.release.xcconfig */;
|
||||
baseConfigurationReference = F546BCBBB9BBEE67DB28878A /* Pods-RiotPods-Riot.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = Riot/Riot.entitlements;
|
||||
|
|
|
@ -162,6 +162,13 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
*/
|
||||
NSMutableDictionary <NSNumber *, MXOnNotification> *notificationListenerBlocks;
|
||||
|
||||
/**
|
||||
The list of the events which need to be notified at the end of the background sync.
|
||||
There is one list per MXSession.
|
||||
The key is an identifier of the MXSession. The value, an array of dictionaries (eventId, roomId... for each event).
|
||||
*/
|
||||
NSMutableDictionary <NSNumber *, NSMutableArray <NSDictionary *> *> *eventsToNotify;
|
||||
|
||||
/**
|
||||
Currently displayed "Call not supported" alert.
|
||||
*/
|
||||
|
@ -180,13 +187,12 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
}
|
||||
|
||||
@property (strong, nonatomic) UIAlertController *mxInAppNotification;
|
||||
@property (strong, nonatomic) UIAlertController *incomingCallNotification;
|
||||
|
||||
@property (nonatomic, nullable, copy) void (^registrationForRemoteNotificationsCompletion)(NSError *);
|
||||
|
||||
|
||||
@property (nonatomic, strong) PKPushRegistry *pushRegistry;
|
||||
@property (nonatomic) BOOL hasPendingLocalNotifications;
|
||||
@property (nonatomic) NSMutableArray <NSString *> *incomingPushEventIds;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -328,6 +334,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
mxSessionArray = [NSMutableArray array];
|
||||
callEventsListeners = [NSMutableDictionary dictionary];
|
||||
notificationListenerBlocks = [NSMutableDictionary dictionary];
|
||||
eventsToNotify = [NSMutableDictionary dictionary];
|
||||
|
||||
// To simplify navigation into the app, we retrieve here the main navigation controller and the tab bar controller.
|
||||
UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
|
||||
|
@ -368,6 +375,9 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
// Configure Google Analytics here if the option is enabled
|
||||
[self startGoogleAnalytics];
|
||||
|
||||
// Prepare Pushkit handling
|
||||
_incomingPushEventIds = [NSMutableArray array];
|
||||
|
||||
// Add matrix observers, and initialize matrix sessions if the app is not launched in background.
|
||||
[self initMatrixSessions];
|
||||
|
||||
|
@ -462,6 +472,9 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
{
|
||||
NSLog(@"[AppDelegate] applicationWillEnterForeground");
|
||||
|
||||
// Flush all the pending push notifications.
|
||||
[self.incomingPushEventIds removeAllObjects];
|
||||
|
||||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
||||
|
||||
_isAppForeground = YES;
|
||||
|
@ -474,8 +487,6 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
{
|
||||
NSLog(@"[AppDelegate] applicationDidBecomeActive");
|
||||
|
||||
_hasPendingLocalNotifications = NO;
|
||||
|
||||
// Check if there is crash log to send
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enableCrashReport"])
|
||||
{
|
||||
|
@ -1073,57 +1084,184 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
|
||||
- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type
|
||||
{
|
||||
// Handle the local notifications by triggering a background sync.
|
||||
[self handleLocalNotifications];
|
||||
// Display local notifications only when the app is running in background.
|
||||
if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground)
|
||||
{
|
||||
NSLog(@"[AppDelegate] didReceiveIncomingPushWithPayload while app is in background");
|
||||
|
||||
// Check whether an event id is provided.
|
||||
NSString *eventId = payload.dictionaryPayload[@"event_id"];
|
||||
if (eventId)
|
||||
{
|
||||
// Store the event identifier.
|
||||
[self.incomingPushEventIds addObject:eventId];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"[AppDelegate] didReceiveIncomingPushWithPayload - Unexpected payload %@", payload.dictionaryPayload);
|
||||
}
|
||||
|
||||
// Trigger a background sync to handle notifications.
|
||||
[self launchBackgroundSync];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleLocalNotifications
|
||||
- (void)launchBackgroundSync
|
||||
{
|
||||
_hasPendingLocalNotifications = NO;
|
||||
|
||||
// Check whether the application is running in background.
|
||||
if ([UIApplication sharedApplication].applicationState != UIApplicationStateBackground)
|
||||
return;
|
||||
|
||||
// Launch a background sync for all existing matrix sessions
|
||||
NSArray *mxAccounts = [MXKAccountManager sharedManager].activeAccounts;
|
||||
for (MXKAccount *account in mxAccounts)
|
||||
{
|
||||
// Check the current session state
|
||||
if (account.mxSession.state != MXSessionStatePaused)
|
||||
if (account.mxSession.state == MXSessionStatePaused)
|
||||
{
|
||||
NSLog(@"[AppDelegate] handleLocalNotifications: delay the background sync");
|
||||
// Turn on the flag used to trigger a new background sync when a session is paused.
|
||||
_hasPendingLocalNotifications = YES;
|
||||
NSLog(@"[AppDelegate] launchBackgroundSync");
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
[account backgroundSync:20000 success:^{
|
||||
|
||||
// Sanity check
|
||||
if (!weakSelf)
|
||||
{
|
||||
return;
|
||||
}
|
||||
typeof(self) self = weakSelf;
|
||||
|
||||
NSLog(@"[AppDelegate] launchBackgroundSync: the background sync succeeds");
|
||||
|
||||
// Trigger local notifcations
|
||||
[self handleLocalNotificationsForAccount:account];
|
||||
|
||||
// Update app icon badge number
|
||||
[self refreshApplicationIconBadgeNumber];
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
NSLog(@"[AppDelegate] launchBackgroundSync: the background sync fails");
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
[account backgroundSync:20000 success:^{
|
||||
|
||||
NSLog(@"[AppDelegate] handleLocalNotifications: the background sync succeeds");
|
||||
|
||||
// Update icon badge number
|
||||
[UIApplication sharedApplication].applicationIconBadgeNumber = [account.mxSession riot_missedDiscussionsCount];
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
NSLog(@"[AppDelegate] handleLocalNotifications: the background sync fails");
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (nullable NSString *)notificationBodyForEvent:(MXEvent *)event withRoomState:(MXRoomState *)roomState pushRule:(MXPushRule*)rule inAccount:(MXKAccount*)account
|
||||
- (void)handleLocalNotificationsForAccount:(MXKAccount*)account
|
||||
{
|
||||
NSLog(@"[AppDelegate] handleLocalNotificationsForAccount: %@", account.mxCredentials.userId);
|
||||
|
||||
// The call invite are handled here only when the callkit is not active.
|
||||
BOOL isCallKitActive = [MXCallKitAdapter callKitAvailable] && [MXKAppSettings standardAppSettings].isCallKitEnabled;
|
||||
|
||||
NSMutableArray *eventsArray = eventsToNotify[@(account.mxSession.hash)];
|
||||
|
||||
// Display a local notification for each event retrieved by the bg sync.
|
||||
for (NSUInteger index = 0; index < eventsArray.count; index++)
|
||||
{
|
||||
NSDictionary *eventDict = eventsArray[index];
|
||||
NSString *eventId = eventDict[@"event_id"];
|
||||
NSString *roomId = eventDict[@"room_id"];
|
||||
BOOL checkReadEvent = YES;
|
||||
MXEvent *event;
|
||||
|
||||
if (eventId && roomId)
|
||||
{
|
||||
event = [account.mxSession.store eventWithEventId:eventId inRoom:roomId];
|
||||
}
|
||||
|
||||
if (event)
|
||||
{
|
||||
// Ignore redacted event.
|
||||
if (event.isRedactedEvent)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Consider here the call invites
|
||||
if (event.eventType == MXEventTypeCallInvite)
|
||||
{
|
||||
// Ignore call invite when callkit is active.
|
||||
if (isCallKitActive)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Retrieve the current call state from the call manager
|
||||
MXCallInviteEventContent *callInviteEventContent = [MXCallInviteEventContent modelFromJSON:event.content];
|
||||
MXCall *call = [account.mxSession.callManager callWithCallId:callInviteEventContent.callId];
|
||||
|
||||
if (call.state <= MXCallStateRinging)
|
||||
{
|
||||
// Keep display a local notification even if the event has been read on another device.
|
||||
checkReadEvent = NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (checkReadEvent)
|
||||
{
|
||||
// Ignore event which has been read on another device.
|
||||
MXReceiptData *readReceipt = [account.mxSession.store getReceiptInRoom:roomId forUserId:account.mxCredentials.userId];
|
||||
if (readReceipt)
|
||||
{
|
||||
MXEvent *readReceiptEvent = [account.mxSession.store eventWithEventId:readReceipt.eventId inRoom:roomId];
|
||||
if (event.originServerTs <= readReceiptEvent.originServerTs)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare the local notification
|
||||
MXPushRule *rule = eventDict[@"push_rule"];
|
||||
|
||||
NSString *notificationBody = [self notificationBodyForEvent:event pushRule:rule inAccount:account];
|
||||
if (notificationBody)
|
||||
{
|
||||
// Printf style escape characters are stripped from the string prior to display;
|
||||
// to include a percent symbol (%) in the message, use two percent symbols (%%).
|
||||
notificationBody = [notificationBody stringByReplacingOccurrencesOfString:@"%" withString:@"%%"];
|
||||
|
||||
UILocalNotification *eventNotification = [[UILocalNotification alloc] init];
|
||||
eventNotification.alertBody = notificationBody;
|
||||
eventNotification.userInfo = @{ @"room_id" : event.roomId };
|
||||
|
||||
// Set sound name based on the value provided in action of MXPushRule
|
||||
for (MXPushRuleAction *action in rule.actions)
|
||||
{
|
||||
if (action.actionType == MXPushRuleActionTypeSetTweak)
|
||||
{
|
||||
if ([action.parameters[@"set_tweak"] isEqualToString:@"sound"])
|
||||
{
|
||||
NSString *soundName = action.parameters[@"value"];
|
||||
if ([soundName isEqualToString:@"default"])
|
||||
soundName = UILocalNotificationDefaultSoundName;
|
||||
|
||||
eventNotification.soundName = soundName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[[UIApplication sharedApplication] scheduleLocalNotification:eventNotification];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[eventsArray removeAllObjects];
|
||||
}
|
||||
|
||||
- (nullable NSString *)notificationBodyForEvent:(MXEvent *)event pushRule:(MXPushRule*)rule inAccount:(MXKAccount*)account
|
||||
{
|
||||
if (!event.content || !event.content.count)
|
||||
return nil;
|
||||
|
||||
MXRoom *room = [account.mxSession roomWithRoomId:event.roomId];
|
||||
MXRoomState *roomState = room.state;
|
||||
|
||||
NSString *notificationBody;
|
||||
NSString *eventSenderName = [roomState memberName:event.sender];
|
||||
|
||||
if (event.eventType == MXEventTypeRoomMessage || event.eventType == MXEventTypeRoomEncrypted)
|
||||
{
|
||||
MXRoom *room = [account.mxSession roomWithRoomId:event.roomId];
|
||||
|
||||
if (room.isMentionsOnly)
|
||||
{
|
||||
// A local notification will be displayed only for highlighted notification.
|
||||
|
@ -1203,13 +1341,10 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
}
|
||||
else if (event.eventType == MXEventTypeRoomMember)
|
||||
{
|
||||
NSString *roomName = roomState.name;
|
||||
NSString *roomAlias = roomState.aliases.firstObject;
|
||||
NSString *roomDisplayName = room.summary.displayname;
|
||||
|
||||
if (roomName)
|
||||
notificationBody = [NSString stringWithFormat:NSLocalizedString(@"USER_INVITE_TO_NAMED_ROOM", nil), eventSenderName, roomName];
|
||||
else if (roomAlias)
|
||||
notificationBody = [NSString stringWithFormat:NSLocalizedString(@"USER_INVITE_TO_NAMED_ROOM", nil), eventSenderName, roomAlias];
|
||||
if (roomDisplayName.length && ![roomDisplayName isEqualToString:eventSenderName])
|
||||
notificationBody = [NSString stringWithFormat:NSLocalizedString(@"USER_INVITE_TO_NAMED_ROOM", nil), eventSenderName, roomDisplayName];
|
||||
else
|
||||
notificationBody = [NSString stringWithFormat:NSLocalizedString(@"USER_INVITE_TO_CHAT", nil), eventSenderName];
|
||||
}
|
||||
|
@ -1625,9 +1760,6 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
|
||||
MXSDKOptions *sdkOptions = [MXSDKOptions sharedInstance];
|
||||
|
||||
// Set the App Group identifier.
|
||||
sdkOptions.applicationGroupIdentifier = @"group.im.vector";
|
||||
|
||||
// Define the media cache version
|
||||
sdkOptions.mediaCacheAppVersion = 0;
|
||||
|
||||
|
@ -1646,9 +1778,6 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
// Get modular widget events in rooms histories
|
||||
[[MXKAppSettings standardAppSettings] addSupportedEventTypes:@[kWidgetEventTypeString]];
|
||||
|
||||
// Use shared container to share data with app extensions
|
||||
sdkOptions.applicationGroupIdentifier = @"group.im.vector";
|
||||
|
||||
// Disable long press on event in bubble cells
|
||||
[MXKRoomBubbleTableViewCell disableLongPressGestureOnEvent:YES];
|
||||
|
||||
|
@ -1744,16 +1873,23 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
if (account.mxSession == mxSession)
|
||||
{
|
||||
[account pauseInBackgroundTask];
|
||||
|
||||
// Trigger local notifcations (Indeed the app finishs here an initial sync in background, the user has missed some notifcations)
|
||||
[self handleLocalNotificationsForAccount:account];
|
||||
|
||||
// Update app icon badge number
|
||||
[self refreshApplicationIconBadgeNumber];
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mxSession.state == MXSessionStatePaused)
|
||||
{
|
||||
// Check whether some local notifications must be handled by triggering a background sync.
|
||||
if (_hasPendingLocalNotifications)
|
||||
// Check whether some push notifications are pending.
|
||||
if (self.incomingPushEventIds.count)
|
||||
{
|
||||
[self handleLocalNotifications];
|
||||
[self launchBackgroundSync];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1974,6 +2110,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
{
|
||||
self.pushRegistry = nil;
|
||||
isPushRegistered = NO;
|
||||
[self.incomingPushEventIds removeAllObjects];
|
||||
|
||||
// Clear cache
|
||||
[MXMediaManager clearCache];
|
||||
|
@ -2038,11 +2175,11 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
{
|
||||
MXCall *mxCall = (MXCall*)notif.object;
|
||||
|
||||
BOOL isCallKitAvailable = [MXCallKitAdapter callKitAvailable] && [MXKAppSettings standardAppSettings].isCallKitEnabled;
|
||||
BOOL isCallKitEnabled = [MXCallKitAdapter callKitAvailable] && [MXKAppSettings standardAppSettings].isCallKitEnabled;
|
||||
|
||||
// Prepare the call view controller
|
||||
currentCallViewController = [CallViewController callViewController:nil];
|
||||
currentCallViewController.playRingtone = !isCallKitAvailable;
|
||||
currentCallViewController.playRingtone = !isCallKitEnabled;
|
||||
currentCallViewController.mxCall = mxCall;
|
||||
currentCallViewController.delegate = self;
|
||||
|
||||
|
@ -2075,77 +2212,32 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
}
|
||||
}];
|
||||
}
|
||||
|
||||
if (mxCall.isIncoming && !isCallKitAvailable)
|
||||
{
|
||||
// Prompt user before presenting the call view controller
|
||||
NSString *callPromptFormat = mxCall.isVideoCall ? NSLocalizedStringFromTable(@"call_incoming_video_prompt", @"Vector", nil) : NSLocalizedStringFromTable(@"call_incoming_voice_prompt", @"Vector", nil);
|
||||
NSString *callerName = currentCallViewController.peer.displayname;
|
||||
if (!callerName.length)
|
||||
{
|
||||
callerName = currentCallViewController.peer.userId;
|
||||
}
|
||||
NSString *callPrompt = [NSString stringWithFormat:callPromptFormat, callerName];
|
||||
|
||||
// Removing existing notification (if any)
|
||||
[_incomingCallNotification dismissViewControllerAnimated:NO completion:nil];
|
||||
|
||||
_incomingCallNotification = [UIAlertController alertControllerWithTitle:callPrompt
|
||||
message:nil
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
[_incomingCallNotification addAction:[UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"decline", @"Vector", nil)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
typeof(self) self = weakSelf;
|
||||
|
||||
// Reject the call.
|
||||
// Note: Do not reset the incoming call notification before this operation, because it is used to release properly the dismissed call view controller.
|
||||
if (self->currentCallViewController)
|
||||
{
|
||||
[self->currentCallViewController onButtonPressed:self->currentCallViewController.rejectCallButton];
|
||||
|
||||
currentCallViewController = nil;
|
||||
}
|
||||
|
||||
self.incomingCallNotification = nil;
|
||||
|
||||
mxCall.delegate = nil;
|
||||
}
|
||||
|
||||
}]];
|
||||
|
||||
[_incomingCallNotification addAction:[UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"accept", @"Vector", nil)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
typeof(self) self = weakSelf;
|
||||
|
||||
self.incomingCallNotification = nil;
|
||||
|
||||
if (self->currentCallViewController)
|
||||
{
|
||||
[self->currentCallViewController onButtonPressed:self->currentCallViewController.answerCallButton];
|
||||
|
||||
[self presentCallViewController:nil];
|
||||
}
|
||||
}
|
||||
|
||||
}]];
|
||||
|
||||
[_incomingCallNotification mxk_setAccessibilityIdentifier:@"AppDelegateIncomingCallAlert"];
|
||||
[self showNotificationAlert:_incomingCallNotification];
|
||||
if (mxCall.isIncoming && isCallKitEnabled)
|
||||
{
|
||||
// Let's CallKit display the system incoming call screen
|
||||
// Show the callVC only after the user answered the call
|
||||
__weak NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
|
||||
__block id token = [[NSNotificationCenter defaultCenter] addObserverForName:kMXCallStateDidChange
|
||||
object:mxCall
|
||||
queue:nil
|
||||
usingBlock:^(NSNotification * _Nonnull note) {
|
||||
MXCall *call = (MXCall *)note.object;
|
||||
|
||||
NSLog(@"XXXX call.state: %@", call);
|
||||
|
||||
if (call.state == MXCallStateCreateAnswer)
|
||||
{
|
||||
[notificationCenter removeObserver:token];
|
||||
|
||||
NSLog(@"XXXX presentCallViewController");
|
||||
[self presentCallViewController:NO completion:nil];
|
||||
}
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self presentCallViewController:nil];
|
||||
[self presentCallViewController:YES completion:nil];
|
||||
}
|
||||
}
|
||||
}];
|
||||
|
@ -2257,8 +2349,10 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
{
|
||||
if (enable)
|
||||
{
|
||||
// Create adapter with default configuration for a while
|
||||
MXCallKitAdapter *callKitAdapter = [[MXCallKitAdapter alloc] init];
|
||||
// Create adapter for Riot
|
||||
MXCallKitConfiguration *callKitConfiguration = [[MXCallKitConfiguration alloc] init];
|
||||
callKitConfiguration.iconName = @"riot_icon_callkit";
|
||||
MXCallKitAdapter *callKitAdapter = [[MXCallKitAdapter alloc] initWithConfiguration:callKitConfiguration];
|
||||
|
||||
id<MXCallAudioSessionConfigurator> audioSessionConfigurator;
|
||||
|
||||
|
@ -2278,68 +2372,36 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
|
||||
- (void)enableLocalNotificationsFromMatrixSession:(MXSession*)mxSession
|
||||
{
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
// Look for the account related to this session.
|
||||
NSArray *mxAccounts = [MXKAccountManager sharedManager].activeAccounts;
|
||||
MXKAccount *account;
|
||||
for (account in mxAccounts)
|
||||
{
|
||||
if (account.mxSession == mxSession)
|
||||
{
|
||||
break;
|
||||
}
|
||||
account = nil;
|
||||
}
|
||||
|
||||
// Prepare listener block.
|
||||
MXOnNotification notificationListenerBlock = ^(MXEvent *event, MXRoomState *roomState, MXPushRule *rule) {
|
||||
|
||||
// Do not display local notification if the app is not running in background.
|
||||
// Ignore this event if the app is not running in background.
|
||||
if ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Do not display local notifications during the initial sync.
|
||||
if (!account.mxSession.isEventStreamInitialised)
|
||||
// Sanity check
|
||||
if (event.eventId && event.roomId && rule)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// For all type of event show local notifications besides the situation
|
||||
// when the type of event is call invite and we have CallKit support
|
||||
BOOL isCallKitActive = [MXCallKitAdapter callKitAvailable] && [MXKAppSettings standardAppSettings].isCallKitEnabled;
|
||||
if (!(event.eventType == MXEventTypeCallInvite && isCallKitActive))
|
||||
{
|
||||
NSString *notificationBody = [weakSelf notificationBodyForEvent:event withRoomState:roomState pushRule:rule inAccount:account];
|
||||
if (notificationBody)
|
||||
// Check whether this event corresponds to a pending push.
|
||||
NSUInteger index = [self.incomingPushEventIds indexOfObject:event.eventId];
|
||||
if (index != NSNotFound)
|
||||
{
|
||||
UILocalNotification *eventNotification = [[UILocalNotification alloc] init];
|
||||
eventNotification.fireDate = [NSDate dateWithTimeIntervalSince1970:event.originServerTs / 1000];
|
||||
eventNotification.alertBody = notificationBody;
|
||||
eventNotification.userInfo = @{ @"room_id" : event.roomId };
|
||||
|
||||
// Set sound name based on the value provided in action of MXPushRule
|
||||
for (MXPushRuleAction *action in rule.actions)
|
||||
{
|
||||
if (action.actionType == MXPushRuleActionTypeSetTweak)
|
||||
{
|
||||
if ([action.parameters[@"set_tweak"] isEqualToString:@"sound"])
|
||||
{
|
||||
NSString *soundName = action.parameters[@"value"];
|
||||
if ([soundName isEqualToString:@"default"])
|
||||
soundName = UILocalNotificationDefaultSoundName;
|
||||
|
||||
eventNotification.soundName = soundName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[[UIApplication sharedApplication] scheduleLocalNotification:eventNotification];
|
||||
// Remove it from the pending list.
|
||||
[self.incomingPushEventIds removeObjectAtIndex:index];
|
||||
}
|
||||
|
||||
// Add it to the list of the events to notify.
|
||||
[eventsToNotify[@(mxSession.hash)] addObject:@{@"event_id": event.eventId, @"room_id": event.roomId, @"push_rule": rule}];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"WARNING: wrong event to notify %@ %@ %@", event, event.roomId, rule);
|
||||
}
|
||||
};
|
||||
|
||||
eventsToNotify[@(mxSession.hash)] = [NSMutableArray array];
|
||||
[mxSession.notificationCenter listenToNotifications:notificationListenerBlock];
|
||||
notificationListenerBlocks[@(mxSession.hash)] = notificationListenerBlock;
|
||||
}
|
||||
|
@ -2349,9 +2411,9 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
// Stop listening to notification of this session
|
||||
[mxSession.notificationCenter removeListener:notificationListenerBlocks[@(mxSession.hash)]];
|
||||
[notificationListenerBlocks removeObjectForKey:@(mxSession.hash)];
|
||||
[eventsToNotify removeObjectForKey:@(mxSession.hash)];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/**
|
||||
|
@ -2784,7 +2846,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
|
||||
// Workaround to manage the "back to call" banner: present temporarily the call screen.
|
||||
// This will correctly manage the navigation bar layout.
|
||||
[self presentCallViewController:^{
|
||||
[self presentCallViewController:YES completion:^{
|
||||
|
||||
[self dismissCallViewController:currentCallViewController completion:completion];
|
||||
|
||||
|
@ -2961,7 +3023,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
{
|
||||
if (currentCallViewController)
|
||||
{
|
||||
[self presentCallViewController:nil];
|
||||
[self presentCallViewController:YES completion:nil];
|
||||
}
|
||||
else if (_jitsiViewController)
|
||||
{
|
||||
|
@ -2969,7 +3031,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
}
|
||||
}
|
||||
|
||||
- (void)presentCallViewController:(void (^)())completion
|
||||
- (void)presentCallViewController:(BOOL)animated completion:(void (^)())completion
|
||||
{
|
||||
[self removeCallStatusBar];
|
||||
|
||||
|
@ -2977,11 +3039,11 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
|||
{
|
||||
if (self.window.rootViewController.presentedViewController)
|
||||
{
|
||||
[self.window.rootViewController.presentedViewController presentViewController:currentCallViewController animated:YES completion:completion];
|
||||
[self.window.rootViewController.presentedViewController presentViewController:currentCallViewController animated:animated completion:completion];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self.window.rootViewController presentViewController:currentCallViewController animated:YES completion:completion];
|
||||
[self.window.rootViewController presentViewController:currentCallViewController animated:animated completion:completion];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
BIN
Riot/Assets/Images/riot_icon_callkit.png
Normal file
BIN
Riot/Assets/Images/riot_icon_callkit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
BIN
Riot/Assets/Images/riot_icon_callkit@2.png
Normal file
BIN
Riot/Assets/Images/riot_icon_callkit@2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5 KiB |
BIN
Riot/Assets/Images/riot_icon_callkit@3.png
Normal file
BIN
Riot/Assets/Images/riot_icon_callkit@3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
|
@ -126,8 +126,8 @@
|
|||
"directory_cell_title" = "浏览目录";
|
||||
"directory_cell_description" = "%tu 个聊天室";
|
||||
"directory_search_results_title" = "浏览目录结果";
|
||||
"directory_search_results" = "为 %@ 找到 %tu 个结果";
|
||||
"directory_search_results_more_than" = "> 为 %@ 找到 %tu 个结果";
|
||||
"directory_search_results" = "为 %2$@ 找到 %1$tu 个结果";
|
||||
"directory_search_results_more_than" = "> 为 %2$@ 找到 %1$tu 个结果";
|
||||
"directory_searching_title" = "正在搜索目录…";
|
||||
"directory_search_fail" = "获取数据失败";
|
||||
// Contacts
|
||||
|
|
|
@ -86,8 +86,8 @@
|
|||
[_roomDataSource finalizeInitialization];
|
||||
_roomDataSource.markTimelineInitialEvent = YES;
|
||||
|
||||
_roomName = peekingRoom.summary.displayname;
|
||||
_roomAvatarUrl = peekingRoom.summary.avatar;
|
||||
_roomName = peekingRoom.state.name;
|
||||
_roomAvatarUrl = peekingRoom.state.avatar;
|
||||
|
||||
_roomTopic = [MXTools stripNewlineCharacters:peekingRoom.state.topic];;
|
||||
_roomAliases = peekingRoom.state.aliases;
|
||||
|
|
|
@ -302,6 +302,14 @@
|
|||
userInfo[@"default_app_language"] = [[NSBundle mainBundle] preferredLocalizations][0]; // The language chosen by the OS
|
||||
userInfo[@"app_language"] = [NSBundle mxk_language] ? [NSBundle mxk_language] : userInfo[@"default_app_language"]; // The language chosen by the user
|
||||
|
||||
NSDate *currentDate = [NSDate date];
|
||||
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
|
||||
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
|
||||
userInfo[@"local_time"] = [dateFormatter stringFromDate:currentDate];
|
||||
|
||||
[dateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]];
|
||||
userInfo[@"utc_time"] = [dateFormatter stringFromDate:currentDate];
|
||||
|
||||
bugReportRestClient.others = userInfo;
|
||||
|
||||
// Screenshot
|
||||
|
|
|
@ -34,6 +34,7 @@ typedef enum : NSUInteger
|
|||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *contactAvatarHeaderBackgroundHeightConstraint;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *headerView;
|
||||
@property (weak, nonatomic) IBOutlet MXKImageView *contactAvatar;
|
||||
@property (weak, nonatomic) IBOutlet UIView *contactAvatarMask;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *contactNameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIView *contactNameLabelMask;
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
@interface ContactDetailsViewController () <RoomMemberTitleViewDelegate>
|
||||
{
|
||||
RoomMemberTitleView* contactTitleView;
|
||||
MXKImageView *contactAvatar;
|
||||
|
||||
// HTTP Request
|
||||
MXHTTPOperation *roomCreationRequest;
|
||||
|
@ -134,9 +133,9 @@
|
|||
|
||||
contactTitleView = [RoomMemberTitleView roomMemberTitleView];
|
||||
contactTitleView.delegate = self;
|
||||
contactAvatar = contactTitleView.memberAvatar;
|
||||
contactAvatar.contentMode = UIViewContentModeScaleAspectFill;
|
||||
contactAvatar.defaultBackgroundColor = [UIColor clearColor];
|
||||
|
||||
self.contactAvatar.contentMode = UIViewContentModeScaleAspectFill;
|
||||
self.contactAvatar.defaultBackgroundColor = [UIColor clearColor];
|
||||
|
||||
if (@available(iOS 11.0, *))
|
||||
{
|
||||
|
@ -194,17 +193,16 @@
|
|||
[tap setNumberOfTouchesRequired:1];
|
||||
[tap setNumberOfTapsRequired:1];
|
||||
[tap setDelegate:self];
|
||||
[contactAvatar addGestureRecognizer:tap];
|
||||
contactAvatar.userInteractionEnabled = YES;
|
||||
|
||||
// Need to listen tap gesture on the area part of the avatar image that is outside
|
||||
// of the navigation bar, its parent but smaller view.
|
||||
[self.contactAvatarMask addGestureRecognizer:tap];
|
||||
self.contactAvatarMask.userInteractionEnabled = YES;
|
||||
|
||||
// Need to listen to the tap gesture in the title view too.
|
||||
tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)];
|
||||
[tap setNumberOfTouchesRequired:1];
|
||||
[tap setNumberOfTapsRequired:1];
|
||||
[tap setDelegate:self];
|
||||
[self.contactAvatarMask addGestureRecognizer:tap];
|
||||
self.contactAvatarMask.userInteractionEnabled = YES;
|
||||
[contactTitleView.memberAvatarMask addGestureRecognizer:tap];
|
||||
contactTitleView.memberAvatarMask.userInteractionEnabled = YES;
|
||||
|
||||
// Register collection view cell class
|
||||
[self.tableView registerClass:TableViewCellWithButton.class forCellReuseIdentifier:[TableViewCellWithButton defaultReuseIdentifier]];
|
||||
|
@ -368,10 +366,10 @@
|
|||
{
|
||||
// Adjust the header height by taking into account the actual position of the member avatar in title view
|
||||
// This position depends automatically on the screen orientation.
|
||||
CGRect memberAvatarFrame = contactTitleView.memberAvatar.frame;
|
||||
CGPoint memberAvatarActualPosition = [contactTitleView convertPoint:memberAvatarFrame.origin toView:self.view];
|
||||
CGPoint memberAvatarOriginInTitleView = contactTitleView.memberAvatarMask.frame.origin;
|
||||
CGPoint memberAvatarActualPosition = [contactTitleView convertPoint:memberAvatarOriginInTitleView toView:self.view];
|
||||
|
||||
CGFloat avatarHeaderHeight = memberAvatarActualPosition.y + memberAvatarFrame.size.height;
|
||||
CGFloat avatarHeaderHeight = memberAvatarActualPosition.y + self.contactAvatar.frame.size.height;
|
||||
if (_contactAvatarHeaderBackgroundHeightConstraint.constant != avatarHeaderHeight)
|
||||
{
|
||||
_contactAvatarHeaderBackgroundHeightConstraint.constant = avatarHeaderHeight;
|
||||
|
@ -496,7 +494,7 @@
|
|||
|
||||
- (void)refreshContactThumbnail
|
||||
{
|
||||
UIImage* image = [_contact thumbnailWithPreferedSize:contactAvatar.frame.size];
|
||||
UIImage* image = [_contact thumbnailWithPreferedSize:self.contactAvatar.frame.size];
|
||||
|
||||
if (!image)
|
||||
{
|
||||
|
@ -512,9 +510,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
contactAvatar.image = image;
|
||||
[contactAvatar.layer setCornerRadius:contactAvatar.frame.size.width / 2];
|
||||
[contactAvatar setClipsToBounds:YES];
|
||||
self.contactAvatar.image = image;
|
||||
[self.contactAvatar.layer setCornerRadius:self.contactAvatar.frame.size.width / 2];
|
||||
[self.contactAvatar setClipsToBounds:YES];
|
||||
}
|
||||
|
||||
- (void)refreshContactDisplayName
|
||||
|
@ -1148,7 +1146,7 @@
|
|||
self.contactNameLabel.text = _contact.displayName;
|
||||
}
|
||||
}
|
||||
else if (view == contactAvatar || view == self.contactAvatarMask)
|
||||
else if (view == contactTitleView.memberAvatarMask || view == self.contactAvatarMask)
|
||||
{
|
||||
// Show the avatar in full screen
|
||||
__block MXKImageView * avatarFullScreenView = [[MXKImageView alloc] initWithFrame:CGRectZero];
|
||||
|
@ -1177,7 +1175,7 @@
|
|||
[avatarFullScreenView setImageURL:avatarURL
|
||||
withType:nil
|
||||
andImageOrientation:UIImageOrientationUp
|
||||
previewImage:contactAvatar.image];
|
||||
previewImage:self.contactAvatar.image];
|
||||
|
||||
[avatarFullScreenView showFullScreen];
|
||||
isStatusBarHidden = YES;
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1108" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ContactDetailsViewController">
|
||||
<connections>
|
||||
<outlet property="bottomImageView" destination="7Dc-jk-9sT" id="BVN-bt-VXI"/>
|
||||
<outlet property="contactAvatar" destination="HFg-gC-lBP" id="CII-Wb-38w"/>
|
||||
<outlet property="contactAvatarHeaderBackground" destination="ouj-VM-zdT" id="bEq-oW-fal"/>
|
||||
<outlet property="contactAvatarHeaderBackgroundHeightConstraint" destination="dBL-G6-Yec" id="WWx-dy-WtS"/>
|
||||
<outlet property="contactAvatarMask" destination="xHv-tg-mOt" id="lX8-ju-K6W"/>
|
||||
|
@ -41,10 +43,23 @@
|
|||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xHv-tg-mOt">
|
||||
<rect key="frame" x="137.5" y="0.0" width="100" height="125"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="HFg-gC-lBP" customClass="MXKImageView">
|
||||
<rect key="frame" x="7.5" y="31" width="84" height="84"/>
|
||||
<color key="backgroundColor" red="0.6886889638" green="1" blue="0.74383144840000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="MemberAvatar"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="HFg-gC-lBP" secondAttribute="height" multiplier="1:1" id="EMi-8B-uQv"/>
|
||||
<constraint firstAttribute="width" constant="84" id="ugh-Rg-dGz"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="ContactDetailsVCAvatarMask"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="100" id="5BQ-kA-kNt"/>
|
||||
<constraint firstItem="HFg-gC-lBP" firstAttribute="centerX" secondItem="xHv-tg-mOt" secondAttribute="centerX" id="FGc-kn-wNk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="HFg-gC-lBP" secondAttribute="bottom" constant="10" id="wfW-Ky-Kfc"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="92g-hC-6jB">
|
||||
|
|
|
@ -166,9 +166,6 @@
|
|||
[NSLayoutConstraint activateConstraints:@[topConstraint, bottomConstraint, leadingConstraint, trailingConstraint]];
|
||||
}
|
||||
|
||||
// Handle the member avatar at the view controller level.
|
||||
self.memberThumbnail = memberTitleView.memberAvatar;
|
||||
|
||||
// Add tap gesture on member's name
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)];
|
||||
[tap setNumberOfTouchesRequired:1];
|
||||
|
@ -182,17 +179,16 @@
|
|||
[tap setNumberOfTouchesRequired:1];
|
||||
[tap setNumberOfTapsRequired:1];
|
||||
[tap setDelegate:self];
|
||||
[self.memberThumbnail addGestureRecognizer:tap];
|
||||
self.memberThumbnail.userInteractionEnabled = YES;
|
||||
|
||||
// Need to listen tap gesture on the area part of the avatar image that is outside
|
||||
// of the navigation bar, its parent but smaller view.
|
||||
[self.roomMemberAvatarMask addGestureRecognizer:tap];
|
||||
self.roomMemberAvatarMask.userInteractionEnabled = YES;
|
||||
|
||||
// Need to listen to the tap gesture in the title view too.
|
||||
tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)];
|
||||
[tap setNumberOfTouchesRequired:1];
|
||||
[tap setNumberOfTapsRequired:1];
|
||||
[tap setDelegate:self];
|
||||
[self.roomMemberAvatarMask addGestureRecognizer:tap];
|
||||
self.roomMemberAvatarMask.userInteractionEnabled = YES;
|
||||
[memberTitleView.memberAvatarMask addGestureRecognizer:tap];
|
||||
memberTitleView.memberAvatarMask.userInteractionEnabled = YES;
|
||||
|
||||
// Register collection view cell class
|
||||
[self.tableView registerClass:TableViewCellWithButton.class forCellReuseIdentifier:[TableViewCellWithButton defaultReuseIdentifier]];
|
||||
|
@ -341,10 +337,10 @@
|
|||
{
|
||||
// Adjust the header height by taking into account the actual position of the member avatar in title view
|
||||
// This position depends automatically on the screen orientation.
|
||||
CGRect memberAvatarFrame = memberTitleView.memberAvatar.frame;
|
||||
CGPoint memberAvatarActualPosition = [memberTitleView convertPoint:memberAvatarFrame.origin toView:self.view];
|
||||
CGPoint memberAvatarOriginInTitleView = memberTitleView.memberAvatarMask.frame.origin;
|
||||
CGPoint memberAvatarActualPosition = [memberTitleView convertPoint:memberAvatarOriginInTitleView toView:self.view];
|
||||
|
||||
CGFloat avatarHeaderHeight = memberAvatarActualPosition.y + memberAvatarFrame.size.height;
|
||||
CGFloat avatarHeaderHeight = memberAvatarActualPosition.y + self.memberThumbnail.frame.size.height;
|
||||
if (_roomMemberAvatarHeaderBackgroundHeightConstraint.constant != avatarHeaderHeight)
|
||||
{
|
||||
_roomMemberAvatarHeaderBackgroundHeightConstraint.constant = avatarHeaderHeight;
|
||||
|
@ -955,7 +951,7 @@
|
|||
self.roomMemberNameLabel.text = self.mxRoomMember.displayname;
|
||||
}
|
||||
}
|
||||
else if (view == self.memberThumbnail || view == self.roomMemberAvatarMask)
|
||||
else if (view == memberTitleView.memberAvatarMask || view == self.roomMemberAvatarMask)
|
||||
{
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1108" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
|
@ -13,6 +14,7 @@
|
|||
<connections>
|
||||
<outlet property="bottomImageView" destination="7Dc-jk-9sT" id="BVN-bt-VXI"/>
|
||||
<outlet property="memberHeaderView" destination="YXr-As-Mqh" id="Eqb-qr-iAo"/>
|
||||
<outlet property="memberThumbnail" destination="GQ1-rP-ckr" id="abr-hr-C3p"/>
|
||||
<outlet property="roomMemberAvatarHeaderBackground" destination="ouj-VM-zdT" id="YeD-zt-8y5"/>
|
||||
<outlet property="roomMemberAvatarHeaderBackgroundHeightConstraint" destination="dBL-G6-Yec" id="QXZ-ZP-0Rn"/>
|
||||
<outlet property="roomMemberAvatarMask" destination="MAS-3M-3cg" id="nLI-7d-5Hu"/>
|
||||
|
@ -41,9 +43,22 @@
|
|||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MAS-3M-3cg">
|
||||
<rect key="frame" x="137.5" y="0.0" width="100" height="125"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GQ1-rP-ckr" customClass="MXKImageView">
|
||||
<rect key="frame" x="7.5" y="31" width="84" height="84"/>
|
||||
<color key="backgroundColor" red="0.6886889638" green="1" blue="0.74383144840000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="MemberAvatar"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="84" id="HfP-Pj-zLa"/>
|
||||
<constraint firstAttribute="width" secondItem="GQ1-rP-ckr" secondAttribute="height" multiplier="1:1" id="a1T-Y0-Iic"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="RoomMemberDetailsVCAvatarMask"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="GQ1-rP-ckr" secondAttribute="bottom" constant="10" id="3pC-So-WvO"/>
|
||||
<constraint firstItem="GQ1-rP-ckr" firstAttribute="centerX" secondItem="MAS-3M-3cg" secondAttribute="centerX" id="ZGI-nR-gGx"/>
|
||||
<constraint firstAttribute="width" constant="100" id="fwv-qE-IV1"/>
|
||||
</constraints>
|
||||
</view>
|
||||
|
@ -82,13 +97,11 @@
|
|||
<constraint firstItem="wEo-Mk-SgZ" firstAttribute="centerY" secondItem="92g-hC-6jB" secondAttribute="centerY" id="3Zt-MD-sZK"/>
|
||||
<constraint firstItem="5le-5e-Vml" firstAttribute="top" secondItem="92g-hC-6jB" secondAttribute="bottom" constant="7" id="5zX-1T-n38"/>
|
||||
<constraint firstItem="92g-hC-6jB" firstAttribute="centerX" secondItem="YXr-As-Mqh" secondAttribute="centerX" id="7Is-d0-FZp"/>
|
||||
<constraint firstItem="MAS-3M-3cg" firstAttribute="centerY" secondItem="YXr-As-Mqh" secondAttribute="centerY" id="Ciw-T9-XBe"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="92g-hC-6jB" secondAttribute="trailing" constant="32" id="Eyx-UF-fYc"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ouj-VM-zdT" secondAttribute="trailing" id="FRy-TL-gS2"/>
|
||||
<constraint firstItem="wEo-Mk-SgZ" firstAttribute="centerX" secondItem="92g-hC-6jB" secondAttribute="centerX" id="K1f-RX-kpp"/>
|
||||
<constraint firstItem="wEo-Mk-SgZ" firstAttribute="width" secondItem="YXr-As-Mqh" secondAttribute="width" id="P5e-q6-OIS"/>
|
||||
<constraint firstItem="92g-hC-6jB" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="YXr-As-Mqh" secondAttribute="leading" constant="32" id="QZB-ue-Sih"/>
|
||||
<constraint firstItem="MAS-3M-3cg" firstAttribute="centerY" secondItem="YXr-As-Mqh" secondAttribute="centerY" id="Vh6-q9-uJZ"/>
|
||||
<constraint firstItem="5le-5e-Vml" firstAttribute="centerX" secondItem="YXr-As-Mqh" secondAttribute="centerX" id="bmA-Fq-uxO"/>
|
||||
<constraint firstItem="5le-5e-Vml" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="YXr-As-Mqh" secondAttribute="leading" constant="42" id="ioz-jk-jrE"/>
|
||||
<constraint firstAttribute="bottom" secondItem="5le-5e-Vml" secondAttribute="bottom" constant="18" id="j10-rX-tMf"/>
|
||||
|
@ -99,15 +112,7 @@
|
|||
<constraint firstItem="MAS-3M-3cg" firstAttribute="bottom" secondItem="92g-hC-6jB" secondAttribute="top" id="rgU-C1-YMW"/>
|
||||
<constraint firstItem="ouj-VM-zdT" firstAttribute="top" secondItem="YXr-As-Mqh" secondAttribute="top" id="srY-tD-AhJ"/>
|
||||
<constraint firstItem="MAS-3M-3cg" firstAttribute="centerX" secondItem="YXr-As-Mqh" secondAttribute="centerX" id="vNM-7Z-K2b"/>
|
||||
<constraint firstAttribute="bottom" secondItem="MAS-3M-3cg" secondAttribute="bottom" id="xEt-kv-tJd"/>
|
||||
</constraints>
|
||||
<variation key="default">
|
||||
<mask key="constraints">
|
||||
<exclude reference="Ciw-T9-XBe"/>
|
||||
<exclude reference="Vh6-q9-uJZ"/>
|
||||
<exclude reference="xEt-kv-tJd"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RBF-EK-dhz">
|
||||
<rect key="frame" x="0.0" y="317" width="375" height="33"/>
|
||||
|
|
|
@ -669,14 +669,14 @@
|
|||
if (self.expandedHeaderContainer.isHidden == NO)
|
||||
{
|
||||
// Adjust the expanded header height by taking into account the actual position of the room avatar
|
||||
// This position depends automaticcaly on the screen orientation.
|
||||
// This position depends automatically on the screen orientation.
|
||||
if ([self.titleView isKindOfClass:[RoomAvatarTitleView class]])
|
||||
{
|
||||
RoomAvatarTitleView *avatarTitleView = (RoomAvatarTitleView*)self.titleView;
|
||||
CGRect roomAvatarFrame = avatarTitleView.roomAvatar.frame;
|
||||
CGPoint roomAvatarActualPosition = [avatarTitleView convertPoint:roomAvatarFrame.origin toView:self.view];
|
||||
CGPoint roomAvatarOriginInTitleView = avatarTitleView.roomAvatarMask.frame.origin;
|
||||
CGPoint roomAvatarActualPosition = [avatarTitleView convertPoint:roomAvatarOriginInTitleView toView:self.view];
|
||||
|
||||
CGFloat avatarHeaderHeight = roomAvatarActualPosition.y + roomAvatarFrame.size.height;
|
||||
CGFloat avatarHeaderHeight = roomAvatarActualPosition.y + expandedHeader.roomAvatar.frame.size.height;
|
||||
if (expandedHeader.roomAvatarHeaderBackgroundHeightConstraint.constant != avatarHeaderHeight)
|
||||
{
|
||||
expandedHeader.roomAvatarHeaderBackgroundHeightConstraint.constant = avatarHeaderHeight;
|
||||
|
@ -1358,15 +1358,13 @@
|
|||
// setBackgroundImage:forBarMetrics: method. If the default background image is used, then the default shadow
|
||||
// image will be used regardless of the value of this property.
|
||||
UIImage *shadowImage = nil;
|
||||
MXKImageView *roomAvatarView = nil;
|
||||
|
||||
if (isVisible)
|
||||
{
|
||||
[self setRoomTitleViewClass:RoomAvatarTitleView.class];
|
||||
// Note the avatar title view does not define tap gesture.
|
||||
|
||||
roomAvatarView = ((RoomAvatarTitleView*)self.titleView).roomAvatar;
|
||||
roomAvatarView.alpha = 0.0;
|
||||
expandedHeader.roomAvatar.alpha = 0.0;
|
||||
|
||||
shadowImage = [[UIImage alloc] init];
|
||||
|
||||
|
@ -1395,10 +1393,7 @@
|
|||
self.bubblesTableViewTopConstraint.constant = (isVisible ? self.expandedHeaderContainerHeightConstraint.constant - self.bubblesTableView.mxk_adjustedContentInset.top : 0);
|
||||
self.jumpToLastUnreadBannerContainerTopConstraint.constant = (isVisible ? self.expandedHeaderContainerHeightConstraint.constant : self.bubblesTableView.mxk_adjustedContentInset.top);
|
||||
|
||||
if (roomAvatarView)
|
||||
{
|
||||
roomAvatarView.alpha = 1;
|
||||
}
|
||||
expandedHeader.roomAvatar.alpha = 1;
|
||||
|
||||
// Force to render the view
|
||||
[self forceLayoutRefresh];
|
||||
|
@ -1554,23 +1549,22 @@
|
|||
|
||||
RoomAvatarTitleView *roomAvatarTitleView = (RoomAvatarTitleView*)self.titleView;
|
||||
|
||||
roomAvatarView = roomAvatarTitleView.roomAvatar;
|
||||
roomAvatarView.alpha = 0.0;
|
||||
previewHeader.roomAvatar.alpha = 0.0;
|
||||
|
||||
// Set the avatar provided in preview data
|
||||
if (roomPreviewData.roomAvatarUrl)
|
||||
{
|
||||
NSString *roomAvatarUrl = [self.mainSession.matrixRestClient urlOfContentThumbnail:roomPreviewData.roomAvatarUrl toFitViewSize:roomAvatarView.frame.size withMethod:MXThumbnailingMethodCrop];
|
||||
NSString *roomAvatarUrl = [self.mainSession.matrixRestClient urlOfContentThumbnail:roomPreviewData.roomAvatarUrl toFitViewSize:previewHeader.roomAvatar.frame.size withMethod:MXThumbnailingMethodCrop];
|
||||
|
||||
roomAvatarTitleView.roomAvatarURL = roomAvatarUrl;
|
||||
previewHeader.roomAvatarURL = roomAvatarUrl;
|
||||
}
|
||||
else if (roomPreviewData.roomId && roomPreviewData.roomName)
|
||||
{
|
||||
roomAvatarTitleView.roomAvatarPlaceholder = [AvatarGenerator generateAvatarForMatrixItem:roomPreviewData.roomId withDisplayName:roomPreviewData.roomName];
|
||||
previewHeader.roomAvatarPlaceholder = [AvatarGenerator generateAvatarForMatrixItem:roomPreviewData.roomId withDisplayName:roomPreviewData.roomName];
|
||||
}
|
||||
else
|
||||
{
|
||||
roomAvatarTitleView.roomAvatarPlaceholder = [UIImage imageNamed:@"placeholder"];
|
||||
previewHeader.roomAvatarPlaceholder = [UIImage imageNamed:@"placeholder"];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1602,10 +1596,7 @@
|
|||
self.bubblesTableViewTopConstraint.constant = self.previewHeaderContainerHeightConstraint.constant - self.bubblesTableView.mxk_adjustedContentInset.top;
|
||||
self.jumpToLastUnreadBannerContainerTopConstraint.constant = self.previewHeaderContainerHeightConstraint.constant;
|
||||
|
||||
if (roomAvatarView)
|
||||
{
|
||||
roomAvatarView.alpha = 1;
|
||||
}
|
||||
previewHeader.roomAvatar.alpha = 1;
|
||||
|
||||
// Force to render the view
|
||||
[self forceLayoutRefresh];
|
||||
|
@ -3186,11 +3177,9 @@
|
|||
// Starting to move the local preview view
|
||||
selectedRoomSettingsField = RoomSettingsViewControllerFieldTopic;
|
||||
}
|
||||
else if ([self.titleView isKindOfClass:[RoomAvatarTitleView class]])
|
||||
else
|
||||
{
|
||||
RoomAvatarTitleView *avatarTitleView = (RoomAvatarTitleView*)self.titleView;
|
||||
CGRect roomAvatarFrame = avatarTitleView.roomAvatar.frame;
|
||||
roomAvatarFrame.origin = [avatarTitleView convertPoint:roomAvatarFrame.origin toView:self.expandedHeaderContainer];
|
||||
CGRect roomAvatarFrame = expandedHeader.roomAvatar.frame;
|
||||
if (CGRectContainsPoint(roomAvatarFrame, point))
|
||||
{
|
||||
// Starting to move the local preview view
|
||||
|
|
|
@ -48,9 +48,9 @@
|
|||
*/
|
||||
+ (instancetype)roomMemberTitleView;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet MXKImageView *memberAvatar;
|
||||
@property (weak, nonatomic) IBOutlet UIView *memberAvatarMask;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *memberBadge;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *memberAvatarCenterXConstraint;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *memberAvatarMaskCenterXConstraint;
|
||||
|
||||
/**
|
||||
The delegate.
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
CGSize navBarSize = navigationBar.frame.size;
|
||||
CGFloat superviewCenterX = frame.origin.x + (frame.size.width / 2);
|
||||
|
||||
self.memberAvatarCenterXConstraint.constant = (navBarSize.width / 2) - superviewCenterX;
|
||||
self.memberAvatarMaskCenterXConstraint.constant = (navBarSize.width / 2) - superviewCenterX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,51 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1108" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="BkF-x3-7fX" customClass="RoomMemberTitleView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="117"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7U9-Y6-cEm" customClass="MXKImageView">
|
||||
<rect key="frame" x="258" y="11" width="84" height="84"/>
|
||||
<color key="backgroundColor" red="0.6886889638" green="1" blue="0.74383144840000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="MemberAvatar"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="7U9-Y6-cEm" secondAttribute="height" multiplier="1:1" id="9ct-O9-7am"/>
|
||||
<constraint firstAttribute="width" constant="84" id="BeT-JY-cq1"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="f6h-pw-FvU">
|
||||
<rect key="frame" x="322" y="6" width="30" height="32"/>
|
||||
<rect key="frame" x="209" y="6" width="30" height="32"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="MemberBadge"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="Rz8-gR-gAm"/>
|
||||
<constraint firstAttribute="height" constant="32" id="dHM-zo-WVT"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VJM-ib-LUP">
|
||||
<rect key="frame" x="132" y="11" width="110" height="33"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="RoomMemberDetailsVCAvatarMask"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="110" id="IYH-gQ-dbK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="RoomMemberTitleView"/>
|
||||
<constraints>
|
||||
<constraint firstItem="7U9-Y6-cEm" firstAttribute="centerX" secondItem="BkF-x3-7fX" secondAttribute="centerX" id="C5g-ho-90L"/>
|
||||
<constraint firstItem="7U9-Y6-cEm" firstAttribute="top" secondItem="BkF-x3-7fX" secondAttribute="top" constant="11" id="Kwt-Sd-REk"/>
|
||||
<constraint firstItem="f6h-pw-FvU" firstAttribute="trailing" secondItem="7U9-Y6-cEm" secondAttribute="trailing" constant="10" id="V4L-tJ-obt"/>
|
||||
<constraint firstItem="7U9-Y6-cEm" firstAttribute="top" secondItem="f6h-pw-FvU" secondAttribute="top" constant="5" id="lPk-ot-k5l"/>
|
||||
<constraint firstItem="f6h-pw-FvU" firstAttribute="top" secondItem="VJM-ib-LUP" secondAttribute="top" constant="-5" id="0pn-Nk-1zK"/>
|
||||
<constraint firstAttribute="bottom" secondItem="VJM-ib-LUP" secondAttribute="bottom" id="5EZ-YP-0he"/>
|
||||
<constraint firstItem="VJM-ib-LUP" firstAttribute="centerX" secondItem="BkF-x3-7fX" secondAttribute="centerX" id="I5C-UZ-BnC"/>
|
||||
<constraint firstItem="VJM-ib-LUP" firstAttribute="top" secondItem="BkF-x3-7fX" secondAttribute="top" constant="11" id="gGL-UL-DHn"/>
|
||||
<constraint firstItem="f6h-pw-FvU" firstAttribute="trailing" secondItem="VJM-ib-LUP" secondAttribute="trailing" constant="-3" id="ilt-qd-gIW"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="memberAvatar" destination="7U9-Y6-cEm" id="8PP-8r-xoI"/>
|
||||
<outlet property="memberAvatarCenterXConstraint" destination="C5g-ho-90L" id="ILx-zG-Dbj"/>
|
||||
<outlet property="memberAvatarMask" destination="VJM-ib-LUP" id="cnl-NC-4DH"/>
|
||||
<outlet property="memberAvatarMaskCenterXConstraint" destination="I5C-UZ-BnC" id="rc9-oe-GrK"/>
|
||||
<outlet property="memberBadge" destination="f6h-pw-FvU" id="pDM-O6-238"/>
|
||||
</connections>
|
||||
</view>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
@interface ExpandedRoomTitleView : RoomTitleView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet MXKImageView *roomAvatar;
|
||||
@property (weak, nonatomic) IBOutlet UIView *roomAvatarHeaderBackground;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *roomAvatarHeaderBackgroundHeightConstraint;
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
#import "RiotDesignValues.h"
|
||||
|
||||
#import "MXRoomSummary+Riot.h"
|
||||
|
||||
@implementation ExpandedRoomTitleView
|
||||
|
||||
+ (UINib *)nib
|
||||
|
@ -47,6 +49,8 @@
|
|||
|
||||
if (self.mxRoom)
|
||||
{
|
||||
[self.mxRoom.summary setRoomAvatarImageIn:self.roomAvatar];
|
||||
|
||||
self.displayNameTextField.text = self.mxRoom.summary.displayname;
|
||||
if (!self.displayNameTextField.text.length)
|
||||
{
|
||||
|
@ -104,10 +108,18 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
self.roomAvatar.image = nil;
|
||||
|
||||
self.roomTopic.text = nil;
|
||||
self.roomMembers.text = nil;
|
||||
}
|
||||
|
||||
// Round image view for thumbnail
|
||||
self.roomAvatar.layer.cornerRadius = self.roomAvatar.frame.size.width / 2;
|
||||
self.roomAvatar.clipsToBounds = YES;
|
||||
|
||||
self.roomAvatar.defaultBackgroundColor = kRiotSecondaryBgColor;
|
||||
|
||||
// Force the layout of subviews to update the position of 'bottomBorderView' which is used to define the actual height of the preview container.
|
||||
[self layoutIfNeeded];
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
@ -13,19 +13,32 @@
|
|||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="BkF-x3-7fX" customClass="ExpandedRoomTitleView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="215"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="193"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uSp-YH-L18">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="117"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="95"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="eEk-n9-4dA" customClass="MXKImageView">
|
||||
<rect key="frame" x="258" y="11" width="84" height="84"/>
|
||||
<color key="backgroundColor" red="0.6886889638" green="1" blue="0.74383144840000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="MemberAvatar"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="eEk-n9-4dA" secondAttribute="height" multiplier="1:1" id="2HI-Mo-nH4"/>
|
||||
<constraint firstAttribute="width" constant="84" id="Yye-G1-hCH"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="RoomAvatarHeaderBackground"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="117" id="DzD-aR-3eV"/>
|
||||
<constraint firstAttribute="height" constant="95" id="DzD-aR-3eV"/>
|
||||
<constraint firstItem="eEk-n9-4dA" firstAttribute="centerX" secondItem="uSp-YH-L18" secondAttribute="centerX" id="W1w-ZX-f2d"/>
|
||||
<constraint firstAttribute="bottom" secondItem="eEk-n9-4dA" secondAttribute="bottom" id="hXd-bM-Bbb"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Room Name" textAlignment="center" adjustsFontSizeToFit="NO" minimumFontSize="14" translatesAutoresizingMaskIntoConstraints="NO" id="6uH-I3-RQg">
|
||||
<rect key="frame" x="249" y="125" width="103" height="23"/>
|
||||
<rect key="frame" x="249" y="103" width="103" height="23"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="DisplayNameTextField"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
|
@ -35,21 +48,21 @@
|
|||
</connections>
|
||||
</textField>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qD3-kA-DSI">
|
||||
<rect key="frame" x="282" y="153" width="36" height="17"/>
|
||||
<rect key="frame" x="282" y="131" width="36" height="17"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="RoomTopic"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ou0-3Z-weL">
|
||||
<rect key="frame" x="282" y="184" width="36" height="17"/>
|
||||
<rect key="frame" x="282" y="162" width="36" height="17"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="RoomMembers"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="members_list_icon.png" translatesAutoresizingMaskIntoConstraints="NO" id="S3Y-wJ-HOe">
|
||||
<rect key="frame" x="260" y="185.5" width="15" height="15"/>
|
||||
<rect key="frame" x="260" y="163.5" width="15" height="15"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="RoomMembersDetailsIcon"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="15" id="XTx-6p-2wB"/>
|
||||
|
@ -57,22 +70,22 @@
|
|||
</constraints>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ckb-7c-sTg">
|
||||
<rect key="frame" x="0.0" y="214" width="600" height="1"/>
|
||||
<rect key="frame" x="0.0" y="192" width="600" height="1"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="D7c-fR-aRY"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8HH-9b-1yH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="177"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="155"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MFb-0F-eO8">
|
||||
<rect key="frame" x="0.0" y="177" width="322" height="38"/>
|
||||
<rect key="frame" x="0.0" y="155" width="322" height="38"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tsg-nl-P3k">
|
||||
<rect key="frame" x="322" y="173.5" width="38" height="38"/>
|
||||
<rect key="frame" x="322" y="151.5" width="38" height="38"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add_participant.png" translatesAutoresizingMaskIntoConstraints="NO" id="i40-fd-AlH">
|
||||
<rect key="frame" x="10" y="10" width="18" height="18"/>
|
||||
|
@ -133,6 +146,7 @@
|
|||
<outlet property="addParticipantMask" destination="tsg-nl-P3k" id="ADj-t1-9wf"/>
|
||||
<outlet property="bottomBorderView" destination="Ckb-7c-sTg" id="2Ky-GN-bO0"/>
|
||||
<outlet property="displayNameTextField" destination="6uH-I3-RQg" id="MfX-LQ-C2K"/>
|
||||
<outlet property="roomAvatar" destination="eEk-n9-4dA" id="5jd-Dx-tXE"/>
|
||||
<outlet property="roomAvatarHeaderBackground" destination="uSp-YH-L18" id="sfW-ED-5bD"/>
|
||||
<outlet property="roomAvatarHeaderBackgroundHeightConstraint" destination="DzD-aR-3eV" id="SuC-mO-epX"/>
|
||||
<outlet property="roomDetailsMask" destination="MFb-0F-eO8" id="ajK-sr-qf7"/>
|
||||
|
@ -144,6 +158,6 @@
|
|||
</objects>
|
||||
<resources>
|
||||
<image name="add_participant.png" width="58" height="58"/>
|
||||
<image name="members_list_icon.png" width="12" height="12"/>
|
||||
<image name="members_list_icon.png" width="15" height="15"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
@property (weak, nonatomic) IBOutlet UIView *mainHeaderContainer;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet MXKImageView *roomAvatar;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *roomTopic;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *roomMembers;
|
||||
@property (weak, nonatomic) IBOutlet UIView *roomMembersDetailsIcon;
|
||||
|
@ -34,4 +35,7 @@
|
|||
@property (weak, nonatomic) IBOutlet UILabel *subNoticeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIView *bottomBorderView;
|
||||
|
||||
@end
|
||||
@property (nonatomic) NSString *roomAvatarURL;
|
||||
@property (nonatomic) UIImage *roomAvatarPlaceholder;
|
||||
|
||||
@end
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
#import "RiotDesignValues.h"
|
||||
|
||||
#import "MXRoomSummary+Riot.h"
|
||||
|
||||
@implementation PreviewRoomTitleView
|
||||
|
||||
+ (UINib *)nib
|
||||
|
@ -93,6 +95,15 @@
|
|||
// Consider in priority the preview data (if any)
|
||||
if (self.roomPreviewData)
|
||||
{
|
||||
if (self.roomAvatarURL)
|
||||
{
|
||||
[self.roomAvatar setImageURL:self.roomAvatarURL withType:nil andImageOrientation:UIImageOrientationUp previewImage:[UIImage imageNamed:@"placeholder"]];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.roomAvatar.image = self.roomAvatarPlaceholder;
|
||||
}
|
||||
|
||||
// Room topic
|
||||
self.roomTopic.text = self.roomPreviewData.roomTopic;
|
||||
|
||||
|
@ -142,6 +153,8 @@
|
|||
}
|
||||
else if (self.mxRoom)
|
||||
{
|
||||
[self.mxRoom.summary setRoomAvatarImageIn:self.roomAvatar];
|
||||
|
||||
// The user is here invited to join a room (This invitation has been received from server sync)
|
||||
self.displayNameTextField.text = self.mxRoom.summary.displayname;
|
||||
if (!self.displayNameTextField.text.length)
|
||||
|
@ -206,13 +219,35 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
self.roomAvatar.image = self.roomAvatarPlaceholder;
|
||||
|
||||
self.roomMembers.text = nil;
|
||||
self.roomTopic.text = nil;
|
||||
self.previewLabel.text = nil;
|
||||
}
|
||||
|
||||
// Round image view for thumbnail
|
||||
self.roomAvatar.layer.cornerRadius = self.roomAvatar.frame.size.width / 2;
|
||||
self.roomAvatar.clipsToBounds = YES;
|
||||
|
||||
self.roomAvatar.defaultBackgroundColor = kRiotSecondaryBgColor;
|
||||
|
||||
// Force the layout of subviews to update the position of 'bottomBorderView' which is used to define the actual height of the preview container.
|
||||
[self layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)setRoomAvatarURL:(NSString *)roomAvatarURL
|
||||
{
|
||||
_roomAvatarURL = roomAvatarURL;
|
||||
|
||||
[self refreshDisplay];
|
||||
}
|
||||
|
||||
- (void)setRoomAvatarPlaceholder:(UIImage *)roomAvatarPlaceholder
|
||||
{
|
||||
_roomAvatarPlaceholder = roomAvatarPlaceholder;
|
||||
|
||||
[self refreshDisplay];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1108" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
@ -27,6 +28,15 @@
|
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BkF-x3-7fX">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="215"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="4yt-FK-V2Z" customClass="MXKImageView">
|
||||
<rect key="frame" x="258" y="34" width="84" height="84"/>
|
||||
<color key="backgroundColor" red="0.6886889638" green="1" blue="0.74383144840000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="MemberAvatar"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="84" id="bVm-6i-oVQ"/>
|
||||
<constraint firstAttribute="width" secondItem="4yt-FK-V2Z" secondAttribute="height" multiplier="1:1" id="hvA-vY-Mhn"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Room Name" textAlignment="center" adjustsFontSizeToFit="NO" minimumFontSize="14" translatesAutoresizingMaskIntoConstraints="NO" id="6uH-I3-RQg">
|
||||
<rect key="frame" x="249" y="126" width="103" height="22"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
@ -72,8 +82,10 @@
|
|||
<constraint firstItem="S3Y-wJ-HOe" firstAttribute="leading" secondItem="ou0-3Z-weL" secondAttribute="trailing" constant="7" id="JrS-kW-PJv"/>
|
||||
<constraint firstItem="6uH-I3-RQg" firstAttribute="top" secondItem="BkF-x3-7fX" secondAttribute="top" constant="126" id="Piq-rp-Pae"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Tk0-pA-9a0" secondAttribute="trailing" constant="31" id="RNL-2W-QLd"/>
|
||||
<constraint firstItem="4yt-FK-V2Z" firstAttribute="centerX" secondItem="BkF-x3-7fX" secondAttribute="centerX" id="Scs-DA-3V9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ou0-3Z-weL" secondAttribute="bottom" constant="14" id="Sxa-8V-tnQ"/>
|
||||
<constraint firstItem="Tk0-pA-9a0" firstAttribute="top" secondItem="6uH-I3-RQg" secondAttribute="bottom" constant="5" id="TUS-xE-O6O"/>
|
||||
<constraint firstItem="6uH-I3-RQg" firstAttribute="top" secondItem="4yt-FK-V2Z" secondAttribute="bottom" constant="8" id="Wsd-KT-hxy"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="6uH-I3-RQg" secondAttribute="trailing" constant="31" id="aK3-vQ-EVu"/>
|
||||
<constraint firstItem="ou0-3Z-weL" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="BkF-x3-7fX" secondAttribute="leading" constant="31" id="c9h-h2-VEs"/>
|
||||
<constraint firstItem="6uH-I3-RQg" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="BkF-x3-7fX" secondAttribute="leading" constant="31" id="gnq-cO-l4Y"/>
|
||||
|
@ -174,6 +186,7 @@
|
|||
<outlet property="mainHeaderContainer" destination="BkF-x3-7fX" id="1fp-xz-ETJ"/>
|
||||
<outlet property="previewLabel" destination="gIX-nY-f6M" id="Bxi-6M-rTb"/>
|
||||
<outlet property="rightButton" destination="461-vO-hLZ" id="u8R-Rg-WAv"/>
|
||||
<outlet property="roomAvatar" destination="4yt-FK-V2Z" id="epr-4f-7cE"/>
|
||||
<outlet property="roomMembers" destination="ou0-3Z-weL" id="lRs-fz-QXc"/>
|
||||
<outlet property="roomMembersDetailsIcon" destination="S3Y-wJ-HOe" id="QjQ-wY-EOS"/>
|
||||
<outlet property="roomTopic" destination="Tk0-pA-9a0" id="iAe-bC-f6X"/>
|
||||
|
|
|
@ -18,10 +18,7 @@
|
|||
|
||||
@interface RoomAvatarTitleView : MXKRoomTitleView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet MXKImageView *roomAvatar;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *roomAvatarCenterXConstraint;
|
||||
@property (weak, nonatomic) IBOutlet UIView *roomAvatarMask;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *roomAvatarMaskCenterXConstraint;
|
||||
|
||||
@property (nonatomic) NSString *roomAvatarURL;
|
||||
@property (nonatomic) UIImage *roomAvatarPlaceholder;
|
||||
|
||||
@end
|
||||
@end
|
||||
|
|
|
@ -85,52 +85,10 @@
|
|||
CGSize navBarSize = navigationBar.frame.size;
|
||||
CGFloat superviewCenterX = frame.origin.x + (frame.size.width / 2);
|
||||
|
||||
self.roomAvatarCenterXConstraint.constant = (navBarSize.width / 2) - superviewCenterX;
|
||||
self.roomAvatarMaskCenterXConstraint.constant = (navBarSize.width / 2) - superviewCenterX;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)refreshDisplay
|
||||
{
|
||||
[super refreshDisplay];
|
||||
|
||||
if (self.mxRoom)
|
||||
{
|
||||
[self.mxRoom.summary setRoomAvatarImageIn:self.roomAvatar];
|
||||
}
|
||||
else if (self.roomAvatarURL)
|
||||
{
|
||||
[self.roomAvatar setImageURL:self.roomAvatarURL withType:nil andImageOrientation:UIImageOrientationUp previewImage:[UIImage imageNamed:@"placeholder"]];
|
||||
}
|
||||
else if (self.roomAvatarPlaceholder)
|
||||
{
|
||||
self.roomAvatar.image = self.roomAvatarPlaceholder;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.roomAvatar.image = nil;
|
||||
}
|
||||
|
||||
// Round image view for thumbnail
|
||||
self.roomAvatar.layer.cornerRadius = self.roomAvatar.frame.size.width / 2;
|
||||
self.roomAvatar.clipsToBounds = YES;
|
||||
|
||||
self.roomAvatar.defaultBackgroundColor = kRiotSecondaryBgColor;
|
||||
}
|
||||
|
||||
- (void)setRoomAvatarURL:(NSString *)roomAvatarURL
|
||||
{
|
||||
_roomAvatarURL = roomAvatarURL;
|
||||
|
||||
[self refreshDisplay];
|
||||
}
|
||||
|
||||
- (void)setRoomAvatarPlaceholder:(UIImage *)roomAvatarPlaceholder
|
||||
{
|
||||
_roomAvatarPlaceholder = roomAvatarPlaceholder;
|
||||
|
||||
[self refreshDisplay];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,41 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1108" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11762"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13196"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="BkF-x3-7fX" customClass="RoomAvatarTitleView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="117"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7U9-Y6-cEm" customClass="MXKImageView">
|
||||
<rect key="frame" x="258" y="11" width="84" height="84"/>
|
||||
<color key="backgroundColor" red="0.6886889638" green="1" blue="0.74383144840000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="RoomAvatar"/>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cCf-8Q-ono">
|
||||
<rect key="frame" x="132" y="11" width="110" height="33"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="RoomMemberDetailsVCAvatarMask"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="7U9-Y6-cEm" secondAttribute="height" multiplier="1:1" id="9ct-O9-7am"/>
|
||||
<constraint firstAttribute="width" constant="84" id="BeT-JY-cq1"/>
|
||||
<constraint firstAttribute="width" constant="110" id="pWS-KO-25W"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="RoomTitle"/>
|
||||
<constraints>
|
||||
<constraint firstItem="7U9-Y6-cEm" firstAttribute="centerX" secondItem="BkF-x3-7fX" secondAttribute="centerX" id="C5g-ho-90L"/>
|
||||
<constraint firstItem="7U9-Y6-cEm" firstAttribute="top" secondItem="BkF-x3-7fX" secondAttribute="top" constant="11" id="Kwt-Sd-REk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="cCf-8Q-ono" secondAttribute="bottom" id="Aog-XC-o0k"/>
|
||||
<constraint firstItem="cCf-8Q-ono" firstAttribute="centerX" secondItem="BkF-x3-7fX" secondAttribute="centerX" id="WFK-47-fKx"/>
|
||||
<constraint firstItem="cCf-8Q-ono" firstAttribute="top" secondItem="BkF-x3-7fX" secondAttribute="top" constant="11" id="bS7-H7-pxo"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="roomAvatar" destination="7U9-Y6-cEm" id="VWF-cH-9Jv"/>
|
||||
<outlet property="roomAvatarCenterXConstraint" destination="C5g-ho-90L" id="D2d-zo-km6"/>
|
||||
<outlet property="roomAvatarMask" destination="cCf-8Q-ono" id="7m3-ou-P9k"/>
|
||||
<outlet property="roomAvatarMaskCenterXConstraint" destination="WFK-47-fKx" id="q9A-QQ-30L"/>
|
||||
</connections>
|
||||
</view>
|
||||
</objects>
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
int main(int argc, char * argv[]) {
|
||||
@autoreleasepool {
|
||||
|
||||
// Set the App Group identifier.
|
||||
MXSDKOptions *sdkOptions = [MXSDKOptions sharedInstance];
|
||||
sdkOptions.applicationGroupIdentifier = @"group.im.vector";
|
||||
|
||||
// Redirect NSLogs to files only if we are not debugging
|
||||
if (!isatty(STDERR_FILENO)) {
|
||||
[MXLogger redirectNSLogToFiles:YES];
|
||||
|
|
|
@ -57,12 +57,17 @@
|
|||
|
||||
NSMutableArray *cellData = [NSMutableArray array];
|
||||
|
||||
// Add a fake matrix session to each room summary to provide it a REST client (used to handle correctly the room avatar).
|
||||
MXSession *session = [[MXSession alloc] initWithMatrixRestClient:[[MXRestClient alloc] initWithCredentials:[ShareExtensionManager sharedManager].userAccount.mxCredentials andOnUnrecognizedCertificateBlock:nil]];
|
||||
|
||||
for (MXRoomSummary *roomSummary in roomsSummaries)
|
||||
{
|
||||
MXKRecentCellData *recentCellData = [[MXKRecentCellData alloc] initWithRoomSummary:roomSummary andRecentListDataSource:nil];
|
||||
|
||||
if ((self.dataSourceMode == DataSourceModeRooms) ^ roomSummary.isDirect)
|
||||
{
|
||||
[roomSummary setMatrixSession:session];
|
||||
|
||||
MXKRecentCellData *recentCellData = [[MXKRecentCellData alloc] initWithRoomSummary:roomSummary andRecentListDataSource:nil];
|
||||
|
||||
[cellData addObject:recentCellData];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,13 @@ typedef NS_ENUM(NSInteger, ImageCompressionMode)
|
|||
sdkOptions.disableIdenticonUseForUserAvatar = YES;
|
||||
// Enable e2e encryption for newly created MXSession
|
||||
sdkOptions.enableCryptoWhenStartingMXSession = YES;
|
||||
|
||||
|
||||
// NSLog -> console.log file when not debugging the app
|
||||
if (!isatty(STDERR_FILENO))
|
||||
{
|
||||
[MXLogger setSubLogName:@"share"];
|
||||
[MXLogger redirectNSLogToFiles:YES];
|
||||
}
|
||||
});
|
||||
return sharedInstance;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<array>
|
||||
<string>INStartAudioCallIntent</string>
|
||||
<string>INStartVideoCallIntent</string>
|
||||
<string>INSendMessageIntent</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>NSExtensionPointIdentifier</key>
|
||||
|
|
|
@ -19,9 +19,10 @@
|
|||
#import "MXKAccount.h"
|
||||
#import "MXKAccountManager.h"
|
||||
#import "MXFileStore.h"
|
||||
#import "MXRestClient.h"
|
||||
#import "MXSession.h"
|
||||
|
||||
@interface IntentHandler () <INStartAudioCallIntentHandling, INStartVideoCallIntentHandling>
|
||||
@interface IntentHandler () <INStartAudioCallIntentHandling, INStartVideoCallIntentHandling, INSendMessageIntentHandling>
|
||||
|
||||
@end
|
||||
|
||||
|
@ -33,6 +34,13 @@
|
|||
if (self)
|
||||
{
|
||||
[MXSDKOptions sharedInstance].applicationGroupIdentifier = @"group.im.vector";
|
||||
|
||||
// NSLog -> console.log file when not debugging the app
|
||||
if (!isatty(STDERR_FILENO))
|
||||
{
|
||||
[MXLogger setSubLogName:@"siri"];
|
||||
[MXLogger redirectNSLogToFiles:YES];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -57,7 +65,7 @@
|
|||
if (account)
|
||||
{
|
||||
#if defined MX_CALL_STACK_OPENWEBRTC || defined MX_CALL_STACK_ENDPOINT || defined MX_CALL_STACK_JINGLE
|
||||
NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:NSStringFromClass(INStartAudioCallIntent.class)];
|
||||
NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:NSStringFromClass([INStartAudioCallIntent class])];
|
||||
response = [[INStartAudioCallIntentResponse alloc] initWithCode:INStartAudioCallIntentResponseCodeReady userActivity:userActivity];
|
||||
#else
|
||||
response = [[INStartAudioCallIntentResponse alloc] initWithCode:INStartAudioCallIntentResponseCodeFailureCallingServiceNotAvailable userActivity:nil];
|
||||
|
@ -108,7 +116,7 @@
|
|||
if (account)
|
||||
{
|
||||
#if defined MX_CALL_STACK_OPENWEBRTC || defined MX_CALL_STACK_ENDPOINT || defined MX_CALL_STACK_JINGLE
|
||||
NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:NSStringFromClass(INStartVideoCallIntent.class)];
|
||||
NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:NSStringFromClass([INStartVideoCallIntent class])];
|
||||
response = [[INStartVideoCallIntentResponse alloc] initWithCode:INStartVideoCallIntentResponseCodeReady userActivity:userActivity];
|
||||
#else
|
||||
response = [[INStartVideoCallIntentResponse alloc] initWithCode:INStartVideoCallIntentResponseCodeFailureCallingServiceNotAvailable userActivity:nil];
|
||||
|
@ -144,6 +152,94 @@
|
|||
completion(response);
|
||||
}
|
||||
|
||||
#pragma mark - INSendMessageIntentHandling
|
||||
|
||||
- (void)resolveRecipientsForSendMessage:(INSendMessageIntent *)intent withCompletion:(void (^)(NSArray<INPersonResolutionResult *> * _Nonnull))completion
|
||||
{
|
||||
[self resolveContacts:intent.recipients withCompletion:completion];
|
||||
}
|
||||
|
||||
- (void)resolveContentForSendMessage:(INSendMessageIntent *)intent withCompletion:(void (^)(INStringResolutionResult * _Nonnull))completion
|
||||
{
|
||||
NSString *message = intent.content;
|
||||
if (message && ![message isEqualToString:@""])
|
||||
completion([INStringResolutionResult successWithResolvedString:message]);
|
||||
else
|
||||
completion([INStringResolutionResult needsValue]);
|
||||
}
|
||||
|
||||
- (void)confirmSendMessage:(INSendMessageIntent *)intent completion:(void (^)(INSendMessageIntentResponse * _Nonnull))completion
|
||||
{
|
||||
INSendMessageIntentResponse *response = nil;
|
||||
|
||||
MXKAccount *account = [MXKAccountManager sharedManager].activeAccounts.firstObject;
|
||||
if (account)
|
||||
{
|
||||
NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:NSStringFromClass([INSendMessageIntent class])];
|
||||
response = [[INSendMessageIntentResponse alloc] initWithCode:INSendMessageIntentResponseCodeReady userActivity:userActivity];
|
||||
}
|
||||
else
|
||||
{
|
||||
// User hasn't logged in
|
||||
response = [[INSendMessageIntentResponse alloc] initWithCode:INSendMessageIntentResponseCodeFailureRequiringAppLaunch userActivity:nil];
|
||||
}
|
||||
|
||||
completion(response);
|
||||
}
|
||||
|
||||
- (void)handleSendMessage:(INSendMessageIntent *)intent completion:(void (^)(INSendMessageIntentResponse * _Nonnull))completion
|
||||
{
|
||||
void (^completeWithCode)(INSendMessageIntentResponseCode) = ^(INSendMessageIntentResponseCode code) {
|
||||
NSUserActivity *userActivity = nil;
|
||||
if (code == INSendMessageIntentResponseCodeSuccess)
|
||||
userActivity = [[NSUserActivity alloc] initWithActivityType:NSStringFromClass([INSendMessageIntent class])];
|
||||
INSendMessageIntentResponse *response = [[INSendMessageIntentResponse alloc] initWithCode:INSendMessageIntentResponseCodeSuccess
|
||||
userActivity:userActivity];
|
||||
completion(response);
|
||||
};
|
||||
|
||||
INPerson *person = intent.recipients.firstObject;
|
||||
if (person && person.customIdentifier)
|
||||
{
|
||||
MXKAccount *account = [MXKAccountManager sharedManager].activeAccounts.firstObject;
|
||||
MXFileStore *fileStore = [[MXFileStore alloc] initWithCredentials:account.mxCredentials];
|
||||
[fileStore asyncRoomsSummaries:^(NSArray<MXRoomSummary *> * _Nonnull roomsSummaries) {
|
||||
NSString *roomID = person.customIdentifier;
|
||||
|
||||
BOOL isEncrypted = NO;
|
||||
for (MXRoomSummary *roomSummary in roomsSummaries)
|
||||
{
|
||||
if ([roomSummary.roomId isEqualToString:roomID])
|
||||
{
|
||||
isEncrypted = roomSummary.isEncrypted;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isEncrypted)
|
||||
{
|
||||
completeWithCode(INSendMessageIntentResponseCodeFailureMessageServiceNotAvailable);
|
||||
return;
|
||||
}
|
||||
|
||||
[account.mxRestClient sendTextMessageToRoom:roomID
|
||||
text:intent.content
|
||||
success:^(NSString *eventId) {
|
||||
completeWithCode(INSendMessageIntentResponseCodeSuccess);
|
||||
}
|
||||
failure:^(NSError *error) {
|
||||
completeWithCode(INSendMessageIntentResponseCodeFailure);
|
||||
}];
|
||||
|
||||
}
|
||||
failure:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
completeWithCode(INSendMessageIntentResponseCodeFailure);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)resolveContacts:(nullable NSArray<INPerson *> *)contacts withCompletion:(void (^)(NSArray<INPersonResolutionResult *> * _Nonnull))completion
|
||||
|
|
|
@ -8,9 +8,5 @@ echo Moving Podfile to develop Matrix pods
|
|||
# Podfile.lock will be obsolete reset it
|
||||
rm -f Podfile.lock
|
||||
|
||||
# Disable the active pods
|
||||
sed -i '' -E "s!^(pod)(.*MatrixSDK)!#\1\2!g" Podfile
|
||||
sed -i '' -E "s!^(pod)(.*MatrixKit)!#\1\2!g" Podfile
|
||||
# And enable the develop ones
|
||||
sed -i '' -E "s!^(#pod)(.*MatrixSDK)(.*develop)!pod\2\3!g" Podfile
|
||||
sed -i '' -E "s!^(#pod)(.*MatrixKit)(.*develop)!pod\2\3!g" Podfile
|
||||
# Enable the develop one
|
||||
sed -i '' -E "s!^(#)(.*'develop')!\2!g" Podfile
|
Loading…
Reference in a new issue