diff --git a/Podfile b/Podfile index ea9bb5988..3c16abf00 100644 --- a/Podfile +++ b/Podfile @@ -8,9 +8,9 @@ target "Riot" do # Different flavours of pods to MatrixKit # The tagged version on which this version of Riot has been built -#pod 'MatrixKit', '0.5.2' +pod 'MatrixKit', '0.5.2' -# The lastest release available on the CocoaPods repository +# The lastest release available on the CocoaPods repository #pod 'MatrixKit' # The develop branch version @@ -19,8 +19,8 @@ target "Riot" do # 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' +#pod 'MatrixKit', :path => '../matrix-ios-kit/MatrixKit.podspec' +#pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec' pod 'GBDeviceInfo', '~> 4.3.0' @@ -55,6 +55,13 @@ pod 'Realm', '~> 2.8.1' pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec' pod 'MatrixKit/AppExtension', :path => '../matrix-ios-kit/MatrixKit.podspec' +# The lastest release available on the CocoaPods repository +#pod 'MatrixKit' + +# 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' + # Remove warnings from "bad" pods pod 'OLMKit', :inhibit_warnings => true pod 'cmark', :inhibit_warnings => true diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index 20c21ea25..2dc65fff9 100644 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -8,25 +8,26 @@ /* Begin PBXBuildFile section */ 05D592A32FF1D1877B89F73C /* libPods-Riot.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD9D0BDE9232898950554DD5 /* libPods-Riot.a */; }; - 2466B73C1F2DFA3000AE27B0 /* FallbackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2466B7381F2DF78B00AE27B0 /* FallbackViewController.m */; }; - 2466B73D1F2DFA3900AE27B0 /* FallbackViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2466B7391F2DF78B00AE27B0 /* FallbackViewController.xib */; }; 2466B73E1F2DFAC100AE27B0 /* animatedLogo-4.png in Resources */ = {isa = PBXBuildFile; fileRef = F083BB201E7009EC00A9B29C /* animatedLogo-4.png */; }; + 2466B75E1F2F80B800AE27B0 /* FallbackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2466B7531F2F80B800AE27B0 /* FallbackViewController.m */; }; + 2466B75F1F2F80B800AE27B0 /* FallbackViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2466B7541F2F80B800AE27B0 /* FallbackViewController.xib */; }; + 2466B7601F2F80B800AE27B0 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2466B7551F2F80B800AE27B0 /* Info.plist */; }; + 2466B7611F2F80B800AE27B0 /* RoomsListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2466B7581F2F80B800AE27B0 /* RoomsListViewController.m */; }; + 2466B7621F2F80B800AE27B0 /* SharePresentingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2466B75A1F2F80B800AE27B0 /* SharePresentingViewController.m */; }; + 2466B7631F2F80B800AE27B0 /* ShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2466B75C1F2F80B800AE27B0 /* ShareViewController.m */; }; + 2466B7641F2F80B800AE27B0 /* ShareViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2466B75D1F2F80B800AE27B0 /* ShareViewController.xib */; }; 24B5103E1EFA7083004C6AD2 /* ReadReceiptsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24B5103D1EFA7083004C6AD2 /* ReadReceiptsViewController.m */; }; 24B510401EFA88CC004C6AD2 /* ReadReceiptsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24B5103F1EFA88CC004C6AD2 /* ReadReceiptsViewController.xib */; }; - 24CBEC521F0EAD310093EABB /* ShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24CBEC511F0EAD310093EABB /* ShareViewController.m */; }; 24CBEC591F0EAD310093EABB /* RiotShareExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 24CBEC4E1F0EAD310093EABB /* RiotShareExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 24EEE5A01F23A08900B3C705 /* RoomTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BCED1E7009EC00A9B29C /* RoomTableViewCell.m */; }; 24EEE5A11F23A09A00B3C705 /* RiotDesignValues.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BC171E7009EC00A9B29C /* RiotDesignValues.m */; }; 24EEE5A21F23A8B400B3C705 /* MXRoom+Riot.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BBE81E7009EC00A9B29C /* MXRoom+Riot.m */; }; 24EEE5A31F23A8C300B3C705 /* AvatarGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BC111E7009EC00A9B29C /* AvatarGenerator.m */; }; - 24EEE5A41F24C06E00B3C705 /* Vector.strings in Resources */ = {isa = PBXBuildFile; fileRef = F083BB131E7009EC00A9B29C /* Vector.strings */; }; - 24EEE5A71F24E03400B3C705 /* ShareViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24EEE5A51F24DD5500B3C705 /* ShareViewController.xib */; }; + 24EEE5A41F24C06E00B3C705 /* (null) in Resources */ = {isa = PBXBuildFile; }; 24EEE5A81F25529600B3C705 /* cancel@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0614A121EDEE65000F5DC9A /* cancel@3x.png */; }; 24EEE5A91F25529900B3C705 /* cancel@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0614A111EDEE65000F5DC9A /* cancel@2x.png */; }; 24EEE5AA1F25529C00B3C705 /* cancel.png in Resources */ = {isa = PBXBuildFile; fileRef = F0614A101EDEE65000F5DC9A /* cancel.png */; }; - 24EEE5AE1F25ED3600B3C705 /* SharePresentingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24EEE5AC1F25ED2E00B3C705 /* SharePresentingViewController.m */; }; 24EEE5AF1F25F0F500B3C705 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F083BBEF1E7009EC00A9B29C /* Images.xcassets */; }; - 24EEE5B31F2607AB00B3C705 /* RoomsListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24EEE5B11F25FF0400B3C705 /* RoomsListViewController.m */; }; 24EEE5B41F2607C000B3C705 /* SegmentedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BC4E1E7009EC00A9B29C /* SegmentedViewController.m */; }; 24EEE5B51F2607C500B3C705 /* SegmentedViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F083BC4F1E7009EC00A9B29C /* SegmentedViewController.xib */; }; 3205ED7D1E976C8A003D65FA /* DirectoryServerPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3205ED7C1E976C8A003D65FA /* DirectoryServerPickerViewController.m */; }; @@ -537,22 +538,22 @@ /* 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 = ""; }; - 2466B7371F2DF78B00AE27B0 /* FallbackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FallbackViewController.h; sourceTree = ""; }; - 2466B7381F2DF78B00AE27B0 /* FallbackViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FallbackViewController.m; sourceTree = ""; }; - 2466B7391F2DF78B00AE27B0 /* FallbackViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FallbackViewController.xib; sourceTree = ""; }; + 2466B7521F2F80B800AE27B0 /* FallbackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FallbackViewController.h; path = RiotShareExtension/FallbackViewController.h; sourceTree = SOURCE_ROOT; }; + 2466B7531F2F80B800AE27B0 /* FallbackViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FallbackViewController.m; path = RiotShareExtension/FallbackViewController.m; sourceTree = SOURCE_ROOT; }; + 2466B7541F2F80B800AE27B0 /* FallbackViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = FallbackViewController.xib; path = RiotShareExtension/FallbackViewController.xib; sourceTree = SOURCE_ROOT; }; + 2466B7551F2F80B800AE27B0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RiotShareExtension/Info.plist; sourceTree = SOURCE_ROOT; }; + 2466B7561F2F80B800AE27B0 /* RiotShareExtension.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; name = RiotShareExtension.entitlements; path = RiotShareExtension/RiotShareExtension.entitlements; sourceTree = SOURCE_ROOT; }; + 2466B7571F2F80B800AE27B0 /* RoomsListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RoomsListViewController.h; path = RiotShareExtension/RoomsListViewController.h; sourceTree = SOURCE_ROOT; }; + 2466B7581F2F80B800AE27B0 /* RoomsListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RoomsListViewController.m; path = RiotShareExtension/RoomsListViewController.m; sourceTree = SOURCE_ROOT; }; + 2466B7591F2F80B800AE27B0 /* SharePresentingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharePresentingViewController.h; path = RiotShareExtension/SharePresentingViewController.h; sourceTree = SOURCE_ROOT; }; + 2466B75A1F2F80B800AE27B0 /* SharePresentingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SharePresentingViewController.m; path = RiotShareExtension/SharePresentingViewController.m; sourceTree = SOURCE_ROOT; }; + 2466B75B1F2F80B800AE27B0 /* ShareViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ShareViewController.h; path = RiotShareExtension/ShareViewController.h; sourceTree = SOURCE_ROOT; }; + 2466B75C1F2F80B800AE27B0 /* ShareViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ShareViewController.m; path = RiotShareExtension/ShareViewController.m; sourceTree = SOURCE_ROOT; }; + 2466B75D1F2F80B800AE27B0 /* ShareViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ShareViewController.xib; path = RiotShareExtension/ShareViewController.xib; sourceTree = SOURCE_ROOT; }; 24B5103C1EFA7083004C6AD2 /* ReadReceiptsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadReceiptsViewController.h; sourceTree = ""; }; 24B5103D1EFA7083004C6AD2 /* ReadReceiptsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReadReceiptsViewController.m; sourceTree = ""; }; 24B5103F1EFA88CC004C6AD2 /* ReadReceiptsViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ReadReceiptsViewController.xib; sourceTree = ""; }; 24CBEC4E1F0EAD310093EABB /* RiotShareExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = RiotShareExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 24CBEC501F0EAD310093EABB /* ShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareViewController.h; sourceTree = ""; }; - 24CBEC511F0EAD310093EABB /* ShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareViewController.m; sourceTree = ""; }; - 24CBEC561F0EAD310093EABB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 24CBEC5E1F0EB15D0093EABB /* Riot Share Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Riot Share Extension.entitlements"; sourceTree = ""; }; - 24EEE5A51F24DD5500B3C705 /* ShareViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ShareViewController.xib; sourceTree = ""; }; - 24EEE5AB1F25ED2E00B3C705 /* SharePresentingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharePresentingViewController.h; sourceTree = ""; }; - 24EEE5AC1F25ED2E00B3C705 /* SharePresentingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SharePresentingViewController.m; sourceTree = ""; }; - 24EEE5B01F25FF0400B3C705 /* RoomsListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomsListViewController.h; sourceTree = ""; }; - 24EEE5B11F25FF0400B3C705 /* RoomsListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomsListViewController.m; sourceTree = ""; }; 3205ED7B1E976C8A003D65FA /* DirectoryServerPickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryServerPickerViewController.h; sourceTree = ""; }; 3205ED7C1E976C8A003D65FA /* DirectoryServerPickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DirectoryServerPickerViewController.m; sourceTree = ""; }; 3205ED811E97725E003D65FA /* DirectoryServerTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryServerTableViewCell.h; sourceTree = ""; }; @@ -1194,22 +1195,23 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 24CBEC4F1F0EAD310093EABB /* Riot Share Extension */ = { + 24CBEC4F1F0EAD310093EABB /* RiotShareExtension */ = { isa = PBXGroup; children = ( - 24CBEC5E1F0EB15D0093EABB /* Riot Share Extension.entitlements */, - 24CBEC561F0EAD310093EABB /* Info.plist */, - 24EEE5AB1F25ED2E00B3C705 /* SharePresentingViewController.h */, - 24EEE5AC1F25ED2E00B3C705 /* SharePresentingViewController.m */, - 24CBEC501F0EAD310093EABB /* ShareViewController.h */, - 24CBEC511F0EAD310093EABB /* ShareViewController.m */, - 24EEE5A51F24DD5500B3C705 /* ShareViewController.xib */, - 24EEE5B01F25FF0400B3C705 /* RoomsListViewController.h */, - 24EEE5B11F25FF0400B3C705 /* RoomsListViewController.m */, - 2466B7371F2DF78B00AE27B0 /* FallbackViewController.h */, - 2466B7381F2DF78B00AE27B0 /* FallbackViewController.m */, - 2466B7391F2DF78B00AE27B0 /* FallbackViewController.xib */, + 2466B7551F2F80B800AE27B0 /* Info.plist */, + 2466B7561F2F80B800AE27B0 /* RiotShareExtension.entitlements */, + 2466B7591F2F80B800AE27B0 /* SharePresentingViewController.h */, + 2466B75A1F2F80B800AE27B0 /* SharePresentingViewController.m */, + 2466B75B1F2F80B800AE27B0 /* ShareViewController.h */, + 2466B75C1F2F80B800AE27B0 /* ShareViewController.m */, + 2466B75D1F2F80B800AE27B0 /* ShareViewController.xib */, + 2466B7571F2F80B800AE27B0 /* RoomsListViewController.h */, + 2466B7581F2F80B800AE27B0 /* RoomsListViewController.m */, + 2466B7521F2F80B800AE27B0 /* FallbackViewController.h */, + 2466B7531F2F80B800AE27B0 /* FallbackViewController.m */, + 2466B7541F2F80B800AE27B0 /* FallbackViewController.xib */, ); + name = RiotShareExtension; path = "Riot Share Extension"; sourceTree = ""; }; @@ -2132,7 +2134,7 @@ children = ( F083BB081E7009EC00A9B29C /* Riot */, F083BB021E7005FD00A9B29C /* RiotTests */, - 24CBEC4F1F0EAD310093EABB /* Riot Share Extension */, + 24CBEC4F1F0EAD310093EABB /* RiotShareExtension */, F094A9A31B78D8F000B1FBBF /* Products */, 7471DF3720D498384A068DA7 /* Pods */, 5FC42FA41F5186AFFB6A2404 /* Frameworks */, @@ -2280,13 +2282,11 @@ files = ( 24EEE5B51F2607C500B3C705 /* SegmentedViewController.xib in Resources */, 24EEE5A91F25529900B3C705 /* cancel@2x.png in Resources */, - 2466B73D1F2DFA3900AE27B0 /* FallbackViewController.xib in Resources */, - 24EEE5A71F24E03400B3C705 /* ShareViewController.xib in Resources */, 24EEE5A81F25529600B3C705 /* cancel@3x.png in Resources */, 2466B73E1F2DFAC100AE27B0 /* animatedLogo-4.png in Resources */, 24EEE5AF1F25F0F500B3C705 /* Images.xcassets in Resources */, 24EEE5AA1F25529C00B3C705 /* cancel.png in Resources */, - 24EEE5A41F24C06E00B3C705 /* Vector.strings in Resources */, + 24EEE5A41F24C06E00B3C705 /* (null) in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2641,6 +2641,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 2466B7601F2F80B800AE27B0 /* Info.plist in Resources */, + 2466B7641F2F80B800AE27B0 /* ShareViewController.xib in Resources */, + 2466B75F1F2F80B800AE27B0 /* FallbackViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2731,13 +2734,9 @@ files = ( 24EEE5A01F23A08900B3C705 /* RoomTableViewCell.m in Sources */, 24EEE5A31F23A8C300B3C705 /* AvatarGenerator.m in Sources */, - 24CBEC521F0EAD310093EABB /* ShareViewController.m in Sources */, - 24EEE5B31F2607AB00B3C705 /* RoomsListViewController.m in Sources */, 24EEE5A11F23A09A00B3C705 /* RiotDesignValues.m in Sources */, 24EEE5A21F23A8B400B3C705 /* MXRoom+Riot.m in Sources */, - 24EEE5AE1F25ED3600B3C705 /* SharePresentingViewController.m in Sources */, 24EEE5B41F2607C000B3C705 /* SegmentedViewController.m in Sources */, - 2466B73C1F2DFA3000AE27B0 /* FallbackViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2885,7 +2884,11 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 2466B75E1F2F80B800AE27B0 /* FallbackViewController.m in Sources */, F083BEA51E70356E00A9B29C /* RiotTests.m in Sources */, + 2466B7611F2F80B800AE27B0 /* RoomsListViewController.m in Sources */, + 2466B7631F2F80B800AE27B0 /* ShareViewController.m in Sources */, + 2466B7621F2F80B800AE27B0 /* SharePresentingViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3029,7 +3032,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CODE_SIGN_ENTITLEMENTS = "Riot Share Extension/Riot Share Extension.entitlements"; + CODE_SIGN_ENTITLEMENTS = RiotShareExtension/RiotShareExtension.entitlements; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 7J4U792NQT; ENABLE_BITCODE = NO; @@ -3051,7 +3054,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CODE_SIGN_ENTITLEMENTS = "Riot Share Extension/Riot Share Extension.entitlements"; + CODE_SIGN_ENTITLEMENTS = RiotShareExtension/RiotShareExtension.entitlements; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 7J4U792NQT; diff --git a/Riot/ViewController/SegmentedViewController.m b/Riot/ViewController/SegmentedViewController.m index 5245a13dd..31d89753a 100644 --- a/Riot/ViewController/SegmentedViewController.m +++ b/Riot/ViewController/SegmentedViewController.m @@ -18,8 +18,6 @@ #import "SegmentedViewController.h" #import "RiotDesignValues.h" -//#import "RageShakeManager.h" -//#import "AppDelegate.h" @interface SegmentedViewController () { @@ -131,7 +129,6 @@ // Setup `MXKViewControllerHandling` properties self.enableBarTintColorStatusChange = NO; - //self.rageShakeManager = [RageShakeManager sharedManager]; } - (void)viewDidLoad diff --git a/Riot Share Extension/FallbackViewController.h b/RiotShareExtension/FallbackViewController.h similarity index 100% rename from Riot Share Extension/FallbackViewController.h rename to RiotShareExtension/FallbackViewController.h diff --git a/Riot Share Extension/FallbackViewController.m b/RiotShareExtension/FallbackViewController.m similarity index 100% rename from Riot Share Extension/FallbackViewController.m rename to RiotShareExtension/FallbackViewController.m diff --git a/Riot Share Extension/FallbackViewController.xib b/RiotShareExtension/FallbackViewController.xib similarity index 100% rename from Riot Share Extension/FallbackViewController.xib rename to RiotShareExtension/FallbackViewController.xib diff --git a/Riot Share Extension/Info.plist b/RiotShareExtension/Info.plist similarity index 100% rename from Riot Share Extension/Info.plist rename to RiotShareExtension/Info.plist diff --git a/Riot Share Extension/Riot Share Extension.entitlements b/RiotShareExtension/RiotShareExtension.entitlements similarity index 100% rename from Riot Share Extension/Riot Share Extension.entitlements rename to RiotShareExtension/RiotShareExtension.entitlements diff --git a/Riot Share Extension/RoomsListViewController.h b/RiotShareExtension/RoomsListViewController.h similarity index 100% rename from Riot Share Extension/RoomsListViewController.h rename to RiotShareExtension/RoomsListViewController.h diff --git a/Riot Share Extension/RoomsListViewController.m b/RiotShareExtension/RoomsListViewController.m similarity index 87% rename from Riot Share Extension/RoomsListViewController.m rename to RiotShareExtension/RoomsListViewController.m index 4abae61eb..474eeb766 100644 --- a/Riot Share Extension/RoomsListViewController.m +++ b/RiotShareExtension/RoomsListViewController.m @@ -141,9 +141,19 @@ [self showFailureAlert]; return; } - //send the image + //Send the image UIImage *image = [[UIImage alloc] initWithData:imageData]; - [room sendImage:imageData withImageSize:image.size mimeType:mimeType andThumbnail:image localEcho:nil success:^(NSString *eventId) + UIImage *thumbnail = nil; + // Thumbnail is useful only in case of encrypted room + if (room.state.isEncrypted) + { + thumbnail = [MXKTools reduceImage:image toFitInSize:CGSizeMake(800, 600)]; + if (thumbnail == image) + { + thumbnail = nil; + } + } + [room sendImage:imageData withImageSize:image.size mimeType:mimeType andThumbnail:thumbnail localEcho:nil success:^(NSString *eventId) { [self.shareExtensionContext completeRequestReturningItems:@[item] completionHandler:nil]; } @@ -163,7 +173,18 @@ [self showFailureAlert]; return; } - [room sendVideo:videoLocalUrl withThumbnail:nil localEcho:nil success:^(NSString *eventId) { + + // Retrieve the video frame at 1 sec to define the video thumbnail + AVURLAsset *urlAsset = [[AVURLAsset alloc] initWithURL:videoLocalUrl options:nil]; + AVAssetImageGenerator *assetImageGenerator = [AVAssetImageGenerator assetImageGeneratorWithAsset:urlAsset]; + assetImageGenerator.appliesPreferredTrackTransform = YES; + CMTime time = CMTimeMake(1, 1); + CGImageRef imageRef = [assetImageGenerator copyCGImageAtTime:time actualTime:NULL error:nil]; + // Finalize video attachment + UIImage *videoThumbnail = [[UIImage alloc] initWithCGImage:imageRef]; + CFRelease(imageRef); + + [room sendVideo:videoLocalUrl withThumbnail:videoThumbnail localEcho:nil success:^(NSString *eventId) { [self.shareExtensionContext completeRequestReturningItems:@[item] completionHandler:nil]; } failure:^(NSError *error) { NSLog(@"[RoomsListViewController] sendVideo failed."); diff --git a/Riot Share Extension/SharePresentingViewController.h b/RiotShareExtension/SharePresentingViewController.h similarity index 100% rename from Riot Share Extension/SharePresentingViewController.h rename to RiotShareExtension/SharePresentingViewController.h diff --git a/Riot Share Extension/SharePresentingViewController.m b/RiotShareExtension/SharePresentingViewController.m similarity index 100% rename from Riot Share Extension/SharePresentingViewController.m rename to RiotShareExtension/SharePresentingViewController.m diff --git a/Riot Share Extension/ShareViewController.h b/RiotShareExtension/ShareViewController.h similarity index 100% rename from Riot Share Extension/ShareViewController.h rename to RiotShareExtension/ShareViewController.h diff --git a/Riot Share Extension/ShareViewController.m b/RiotShareExtension/ShareViewController.m similarity index 99% rename from Riot Share Extension/ShareViewController.m rename to RiotShareExtension/ShareViewController.m index a2edb832f..8c18b34f9 100644 --- a/Riot Share Extension/ShareViewController.m +++ b/RiotShareExtension/ShareViewController.m @@ -70,7 +70,7 @@ [accountManager prepareSessionForActiveAccounts]; // Resume all existing matrix sessions - NSArray *mxAccounts;// = accountManager.activeAccounts; + NSArray *mxAccounts = accountManager.activeAccounts; for (MXKAccount *account in mxAccounts) { [account resume]; diff --git a/Riot Share Extension/ShareViewController.xib b/RiotShareExtension/ShareViewController.xib similarity index 100% rename from Riot Share Extension/ShareViewController.xib rename to RiotShareExtension/ShareViewController.xib