diff --git a/Podfile.lock b/Podfile.lock index ec63cf8d9c..eda667378c 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -108,10 +108,10 @@ PODS: - HKDFKit - SignalCoreKit - SwiftProtobuf - - SignalRingRTC (0.3.2): + - SignalRingRTC (0.3.3): - SignalCoreKit - - SignalRingRTC/WebRTC (= 0.3.2) - - SignalRingRTC/WebRTC (0.3.2): + - SignalRingRTC/WebRTC (= 0.3.3) + - SignalRingRTC/WebRTC (0.3.3): - SignalCoreKit - SignalServiceKit (0.9.0): - AFNetworking @@ -357,7 +357,7 @@ CHECKOUT OPTIONS: :commit: b72c2d1e6132501db906de2cffa8ded7803c54f4 :git: https://github.com/signalapp/Mantle SignalCoreKit: - :commit: b053c9ecb1579e34cb9bac89a9947f9eaeb75bfc + :commit: be8b50315a5cd18bc5474e8c63b5cb56c1140b6b :git: https://github.com/signalapp/SignalCoreKit.git SignalMetadataKit: :commit: 33dc101ee66b25ba6f4310dce04d48276a934781 @@ -395,7 +395,7 @@ SPEC CHECKSUMS: SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c SignalCoreKit: 4562b2bbd9830077439ca003f952a798457d4ea5 SignalMetadataKit: a7aacedf262d947c22e2c619f0fd217163d2a637 - SignalRingRTC: a6ebe5dd4e33a747a9ee63c9a99105e074e6344a + SignalRingRTC: 02c1229fa80b5168bbfb9a8541905dbfe1594046 SignalServiceKit: f8fa79a211d0bafa4d8b149b62fdea389b6eafc5 SQLCipher: 4636a257060f6f1b4e143a143028b61a2b462d0d SSZipArchive: 41455d4b8d2b6ab93990820b50dc697c2554a322 diff --git a/Pods b/Pods index 8816d55048..da05a60306 160000 --- a/Pods +++ b/Pods @@ -1 +1 @@ -Subproject commit 8816d5504804f60c4939b8cb038b609d69a4e1ed +Subproject commit da05a603066a00aa160bbeebdae432b508e1902b diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index 1eb52ab096..d0c58b5966 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -7,7 +7,7 @@ OSXVersion 10.15.2 WebRTCCommit - 7115a09728e023ca6132e14bd9d5f8bc5e1f0b92 Production build of v0.3.1 (Xcode 10.3) + 340f483e44db600c8055f2eaac44ff6c5e478297 Production build of v0.3.3 CFBundleDevelopmentRegion en @@ -45,7 +45,7 @@ CFBundleVersion - 3.3.0.2 + 3.3.0.5 ITSAppUsesNonExemptEncryption LOGS_EMAIL diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 05e940d4e2..028891a551 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -754,7 +754,8 @@ NSString *NSStringForLaunchFailure(LaunchFailure launchFailure) reminderVC.modalPresentationStyle = UIModalPresentationFullScreen; } - if ([frontmostViewController isKindOfClass:[reminderVC class]]) { + if ([frontmostViewController isKindOfClass:[OWSPinReminderViewController class]] || + [frontmostViewController isKindOfClass:[OWS2FAReminderViewController class]]) { // We're already presenting this return; } diff --git a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m index b3fe595324..e731bdfde5 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m @@ -30,7 +30,7 @@ typedef NS_CLOSED_ENUM(NSUInteger, KeyboardType) { KeyboardType_System, Keyboard static void *kConversationInputTextViewObservingContext = &kConversationInputTextViewObservingContext; -const CGFloat kMinTextViewHeight = 38; +const CGFloat kMinTextViewHeight = 36; const CGFloat kMinToolbarItemHeight = 44; const CGFloat kMaxTextViewHeight = 98; const CGFloat kMaxIPadTextViewHeight = 142; diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 8d8f577d5b..1ba4a48e2a 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -3829,7 +3829,9 @@ typedef enum : NSUInteger { - (void)showApprovalDialogForAttachments:(NSArray *)attachments { OWSNavigationController *modal = - [AttachmentApprovalViewController wrappedInNavControllerWithAttachments:attachments approvalDelegate:self]; + [AttachmentApprovalViewController wrappedInNavControllerWithAttachments:attachments + initialMessageText:self.inputToolbar.messageText + approvalDelegate:self]; [self presentFullScreenViewController:modal animated:YES completion:nil]; } diff --git a/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift b/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift index 448faf3dee..1dc703d3de 100644 --- a/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift +++ b/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift @@ -62,7 +62,7 @@ public class Onboarding2FAViewController: OnboardingBaseViewController { let titleText: String let explanationText: String - if (FeatureFlags.pinsForEveryone) { + if FeatureFlags.pinsForEveryone { titleText = NSLocalizedString("ONBOARDING_PIN_TITLE", comment: "Title of the 'onboarding PIN' view.") explanationText = NSLocalizedString("ONBOARDING_PIN_EXPLANATION", comment: "Title of the 'onboarding PIN' view.") } else { @@ -199,7 +199,7 @@ public class Onboarding2FAViewController: OnboardingBaseViewController { pinToUse = pinToUse?.substring(to: Int(kLegacyTruncated2FAv1PinLength)) } - guard let pin = pinToUse?.ows_stripped(), pin.count >= (isUsingKBS ? kMin2FAv2PinLength : kMin2FAPinLength) else { + guard let pin = pinToUse?.ows_stripped(), pin.count >= kMin2FAPinLength else { // Check if we're already in an invalid state, if so we can do nothing guard !attemptState.isInvalid else { return } attemptState = .invalid(remainingAttempts: nil) diff --git a/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentApprovalViewController.swift b/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentApprovalViewController.swift index 5f68464eaa..a6b6b620e7 100644 --- a/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentApprovalViewController.swift +++ b/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentApprovalViewController.swift @@ -130,6 +130,7 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC @objc public class func wrappedInNavController(attachments: [SignalAttachment], + initialMessageText: String?, approvalDelegate: AttachmentApprovalViewControllerDelegate) -> OWSNavigationController { @@ -137,6 +138,7 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC let vc = AttachmentApprovalViewController(options: [.hasCancel], sendButtonImageName: "send-solid-24", attachmentApprovalItems: attachmentApprovalItems) + vc.messageText = initialMessageText vc.approvalDelegate = approvalDelegate let navController = OWSNavigationController(rootViewController: vc) navController.ows_prefersStatusBarHidden = true diff --git a/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentCaptionViewController.swift b/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentCaptionViewController.swift index 39299346be..b43cd9eeb7 100644 --- a/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentCaptionViewController.swift +++ b/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentCaptionViewController.swift @@ -1,5 +1,5 @@ // -// Copyright (c) 2019 Open Whisper Systems. All rights reserved. +// Copyright (c) 2020 Open Whisper Systems. All rights reserved. // import UIKit @@ -294,7 +294,7 @@ extension AttachmentCaptionViewController: UITextViewDelegate { // Accept as much of the input as we can let charBudget: Int = Int(kMaxCaptionCharacterCount) - charsAfterDelete if charBudget >= 0 { - let acceptableNewText = String(text.prefix(charBudget)) + let acceptableNewText = text.safePrefix(charBudget) textView.text = (existingText as NSString).replacingCharacters(in: range, with: acceptableNewText) } diff --git a/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentTextToolbar.swift b/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentTextToolbar.swift index b91ef0cc39..c7ed57c3f2 100644 --- a/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentTextToolbar.swift +++ b/SignalMessaging/ViewControllers/AttachmentApproval/AttachmentTextToolbar.swift @@ -62,7 +62,7 @@ class AttachmentTextToolbar: UIView, UITextViewDelegate { // Layout Constants let kMinToolbarItemHeight: CGFloat = 40 - let kMinTextViewHeight: CGFloat = 38 + let kMinTextViewHeight: CGFloat = 36 var maxTextViewHeight: CGFloat { // About ~4 lines in portrait and ~3 lines in landscape. // Otherwise we risk obscuring too much of the content. diff --git a/SignalMessaging/ViewControllers/SharingThreadPickerViewController.m b/SignalMessaging/ViewControllers/SharingThreadPickerViewController.m index 2f52b0fb2f..0e226b9fd5 100644 --- a/SignalMessaging/ViewControllers/SharingThreadPickerViewController.m +++ b/SignalMessaging/ViewControllers/SharingThreadPickerViewController.m @@ -1,5 +1,5 @@ // -// Copyright (c) 2019 Open Whisper Systems. All rights reserved. +// Copyright (c) 2020 Open Whisper Systems. All rights reserved. // #import "SharingThreadPickerViewController.h" @@ -151,7 +151,9 @@ typedef void (^SendMessageBlock)(SendCompletionBlock completion); } OWSNavigationController *approvalModal = - [AttachmentApprovalViewController wrappedInNavControllerWithAttachments:self.attachments approvalDelegate:self]; + [AttachmentApprovalViewController wrappedInNavControllerWithAttachments:self.attachments + initialMessageText:nil + approvalDelegate:self]; [self presentViewController:approvalModal animated:YES completion:nil]; } diff --git a/SignalMessaging/attachments/AttachmentSharing.m b/SignalMessaging/attachments/AttachmentSharing.m index 4f4c698755..3131c533df 100644 --- a/SignalMessaging/attachments/AttachmentSharing.m +++ b/SignalMessaging/attachments/AttachmentSharing.m @@ -1,5 +1,5 @@ // -// Copyright (c) 2019 Open Whisper Systems. All rights reserved. +// Copyright (c) 2020 Open Whisper Systems. All rights reserved. // #import "AttachmentSharing.h" @@ -17,16 +17,14 @@ NS_ASSUME_NONNULL_BEGIN { OWSAssertDebug(stream); - [self showShareUIForURL:stream.originalMediaURL sender:sender]; + [self showShareUIForAttachments:@[ stream ] sender:sender]; } + (void)showShareUIForAttachments:(NSArray *)attachments sender:(nullable id)sender { OWSAssertDebug(attachments.count > 0); - [self showShareUIForURLs:[attachments map:^(TSAttachmentStream *attachment){ - return attachment.originalMediaURL; - }] sender:sender completion:nil]; + [self showShareUIForActivityItems:attachments sender:sender completion:nil]; } + (void)showShareUIForURL:(NSURL *)url sender:(nullable id)sender @@ -148,4 +146,34 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface TSAttachmentStream (AttachmentSharing) + +@end + +@implementation TSAttachmentStream (AttachmentSharing) + +// called to determine data type. only the class of the return type is consulted. it should match what +// -itemForActivityType: returns later +- (id)activityViewControllerPlaceholderItem:(UIActivityViewController *)activityViewController +{ + // HACK: If this is an image we want to provide the image object to + // the share sheet rather than the file path. This ensures that when + // the user saves multiple images to their camera roll the OS doesn't + // asynchronously read the files and save them to them in a random + // order. Note: when sharing a mixture of image and non-image data + // (e.g. an album with photos and videos) the OS will still incorrectly + // order the video items. I haven't found any way to work around this + // since videos may only be shared as URLs. + return self.isImage ? [UIImage new] : self.originalMediaURL; +} + +// called to fetch data after an activity is selected. you can return nil. +- (nullable id)activityViewController:(UIActivityViewController *)activityViewController + itemForActivityType:(nullable UIActivityType)activityType +{ + return self.isImage ? self.originalImage : self.originalMediaURL; +} + +@end + NS_ASSUME_NONNULL_END diff --git a/SignalMessaging/utils/DisplayableText.swift b/SignalMessaging/utils/DisplayableText.swift index cc5915c98c..37253ef147 100644 --- a/SignalMessaging/utils/DisplayableText.swift +++ b/SignalMessaging/utils/DisplayableText.swift @@ -157,7 +157,7 @@ import Foundation let truncatedContent: Content? if fullText.count > kMaxTextDisplayLength { // Trim whitespace before _AND_ after slicing the snipper from the string. - let snippet = String(fullText.prefix(kMaxTextDisplayLength)).ows_stripped() + let snippet = fullText.safePrefix(kMaxTextDisplayLength).ows_stripped() let truncatedText = String(format: NSLocalizedString("OVERSIZE_TEXT_DISPLAY_FORMAT", comment: "A display format for oversize text messages."), snippet) diff --git a/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.h b/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.h index c6f1bd3c3c..834f2fba59 100644 --- a/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.h +++ b/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.h @@ -151,7 +151,8 @@ typedef NS_ENUM(NSUInteger, TSVerificationTransport) { TSVerificationTransportVo enclaveName:(NSString *)enclaveName authUsername:(NSString *)authUsername authPassword:(NSString *)authPassword - cookies:(NSArray *)cookies; + cookies:(NSArray *)cookies + requestType:(NSString *)requestType; #pragma mark - UD diff --git a/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.m b/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.m index ab7f3c11c4..5db121001d 100644 --- a/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.m +++ b/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.m @@ -723,6 +723,7 @@ NSString *const OWSRequestKey_AuthKey = @"AuthKey"; authUsername:(NSString *)authUsername authPassword:(NSString *)authPassword cookies:(NSArray *)cookies + requestType:(NSString *)requestType { NSString *path = [NSString stringWithFormat:@"v1/backup/%@", enclaveName]; @@ -733,6 +734,7 @@ NSString *const OWSRequestKey_AuthKey = @"AuthKey"; @"data" : data.base64EncodedString, @"iv" : cryptIv.base64EncodedString, @"mac" : cryptMac.base64EncodedString, + @"type" : requestType }]; request.authUsername = authUsername; diff --git a/SignalServiceKit/src/Network/Receiving/GroupsV2MessageProcessor.swift b/SignalServiceKit/src/Network/Receiving/GroupsV2MessageProcessor.swift index 22590679d7..7d41f63fd9 100644 --- a/SignalServiceKit/src/Network/Receiving/GroupsV2MessageProcessor.swift +++ b/SignalServiceKit/src/Network/Receiving/GroupsV2MessageProcessor.swift @@ -174,6 +174,10 @@ class IncomingGroupsV2MessageQueue: NSObject { // Don't process queues. return } + guard FeatureFlags.incomingGroupsV2 else { + // Don't process this queue. + return + } // We want a value that is just high enough to yield perf benefits. let kIncomingMessageBatchSize: UInt = 32 @@ -644,6 +648,11 @@ public class GroupsV2MessageProcessor: NSObject { return } + guard FeatureFlags.incomingGroupsV2 else { + // Discard envelope. + return + } + // We need to persist the decrypted envelope data ASAP to prevent data loss. processingQueue.enqueue(envelopeData: envelopeData, plaintextData: plaintextData, diff --git a/SignalServiceKit/src/TSConstants.swift b/SignalServiceKit/src/TSConstants.swift index 9221d6d5a4..14b63b73e6 100644 --- a/SignalServiceKit/src/TSConstants.swift +++ b/SignalServiceKit/src/TSConstants.swift @@ -163,8 +163,8 @@ private class TSConstantsProduction: TSConstantsProtocol { return contactDiscoveryEnclaveName } - public let keyBackupEnclaveName = "f2e2a5004794a6c1bac5c4949eadbc243dd02e02d1a93f10fe24584fb70815d8" - public let keyBackupMrEnclave = "f51f435802ada769e67aaf5744372bb7e7d519eecf996d335eb5b46b872b5789" + public let keyBackupEnclaveName = "fe7c1bfae98f9b073d220366ea31163ee82f6d04bead774f71ca8e5c40847bfe" + public let keyBackupMrEnclave = "a3baab19ef6ce6f34ab9ebb25ba722725ae44a8872dc0ff08ad6d83a9489de87" public var keyBackupServiceId: String { return keyBackupEnclaveName } diff --git a/SignalServiceKit/src/Util/FeatureFlags.swift b/SignalServiceKit/src/Util/FeatureFlags.swift index b273d2016f..1645276236 100644 --- a/SignalServiceKit/src/Util/FeatureFlags.swift +++ b/SignalServiceKit/src/Util/FeatureFlags.swift @@ -18,7 +18,7 @@ extension FeatureBuild { } } -let build: FeatureBuild = OWSIsDebugBuild() ? .dev : .beta +let build: FeatureBuild = .production // MARK: - diff --git a/SignalServiceKit/src/Util/KeyBackupService.swift b/SignalServiceKit/src/Util/KeyBackupService.swift index 351aea6899..562aa31ba2 100644 --- a/SignalServiceKit/src/Util/KeyBackupService.swift +++ b/SignalServiceKit/src/Util/KeyBackupService.swift @@ -376,7 +376,7 @@ public class KeyBackupService: NSObject { var normalizedPin = pin.ows_stripped() // If this pin contains only numerals, ensure they are arabic numerals. - if pin.digitsOnly() == pin { normalizedPin = pin.ensureArabicNumerals } + if pin.digitsOnly() == normalizedPin { normalizedPin = normalizedPin.ensureArabicNumerals } // NFKD unicode normalization. return normalizedPin.decomposedStringWithCompatibilityMapping @@ -562,7 +562,8 @@ public class KeyBackupService: NSObject { enclaveName: remoteAttestation.enclaveName, authUsername: remoteAttestation.auth.username, authPassword: remoteAttestation.auth.password, - cookies: remoteAttestation.cookies + cookies: remoteAttestation.cookies, + requestType: RequestType.stringRepresentation ) return (request, remoteAttestation) @@ -850,6 +851,8 @@ private protocol KBSRequestOption { associatedtype ResponseOptionType static func responseOption(from response: KeyBackupProtoResponse) -> ResponseOptionType? func set(on builder: KeyBackupProtoRequest.KeyBackupProtoRequestBuilder) + + static var stringRepresentation: String { get } } extension KeyBackupProtoBackupRequest: KBSRequestOption { @@ -860,6 +863,7 @@ extension KeyBackupProtoBackupRequest: KBSRequestOption { func set(on builder: KeyBackupProtoRequest.KeyBackupProtoRequestBuilder) { builder.setBackup(self) } + static var stringRepresentation: String { "backup" } } extension KeyBackupProtoRestoreRequest: KBSRequestOption { typealias ResponseOptionType = KeyBackupProtoRestoreResponse @@ -869,6 +873,7 @@ extension KeyBackupProtoRestoreRequest: KBSRequestOption { func set(on builder: KeyBackupProtoRequest.KeyBackupProtoRequestBuilder) { builder.setRestore(self) } + static var stringRepresentation: String { "restore" } } extension KeyBackupProtoDeleteRequest: KBSRequestOption { typealias ResponseOptionType = KeyBackupProtoDeleteResponse @@ -878,4 +883,5 @@ extension KeyBackupProtoDeleteRequest: KBSRequestOption { func set(on builder: KeyBackupProtoRequest.KeyBackupProtoRequestBuilder) { builder.setDelete(self) } + static var stringRepresentation: String { "delete" } } diff --git a/SignalServiceKit/tests/Util/kbs_pin_sanitation_vectors.json b/SignalServiceKit/tests/Util/kbs_pin_sanitation_vectors.json index fb7d9cd8dd..88a58427ee 100644 --- a/SignalServiceKit/tests/Util/kbs_pin_sanitation_vectors.json +++ b/SignalServiceKit/tests/Util/kbs_pin_sanitation_vectors.json @@ -63,5 +63,15 @@ "name": "NFKD Test, Single Char", "pin": "Ä", "bytes": "41cc88" + }, + { + "name": "Leading and trailing spaces around non-arabic digits", + "pin": " ١٢٣٤٥ ", + "bytes": "3132333435" + }, + { + "name": "Space in non-arabic digits", + "pin": "١٢٣ ٤٥٦", + "bytes": "d9a1d9a2d9a320d9a4d9a5d9a6" } ] diff --git a/SignalServiceKit/tests/Util/kbs_vectors.json b/SignalServiceKit/tests/Util/kbs_vectors.json index 37865a346b..996512347e 100644 --- a/SignalServiceKit/tests/Util/kbs_vectors.json +++ b/SignalServiceKit/tests/Util/kbs_vectors.json @@ -17,4 +17,22 @@ "iv_and_cipher":"9d9b05402ea39c17ff1c9298c8a0e86784a352aa02a74943bf8bcf07ec0f4b574a5b786ad0182c8d308d9eb06538b8c9", "registration_lock":"4a458afa1b07493b23ee9b3f287b70416b2388ca39b5b8c27b4b7585bf73f413" }, + { + "pin": " Pass६örd ", + "backup_id": "cba811749042b303a6a7efa5ccd160aea5e3ea243c8d2692bd13d515732f51a8", + "argon2_hash": "54853336a666eb66fbe8eb7a224b3ad3f457991ed74895b22ea9c6a4a46eda40ab645acdccc1652a48a34b2ac6926340ff35c03034013f68760f20013f028dd8", + "master_key": "9571f3fde1e58588ba49bcf82be1b301ca3859a6f59076f79a8f47181ef952bf", + "kbs_access_key": "ab645acdccc1652a48a34b2ac6926340ff35c03034013f68760f20013f028dd8", + "iv_and_cipher": "11c0ba1834db15e47c172f6c987c64bd4cfc69c6047dd67a022afeec0165a10943f204d5b8f37b3cb7bab21c6dfc39c8", + "registration_lock": "577939bccb2b6638c39222d5a97998a867c5e154e30b82cc120f2dd07a3de987" + }, + { + "pin": " ६१८ ", + "backup_id": "717dc111a98423a57196512606822fca646c653facd037c10728f14ba0be2ab3", + "argon2_hash": "8e9082faa57488f9ef98a6423c416a9974fb4d7c6bfc5b4f24de8e93afea199cd2fedabd0d4c17a371491c9722578843a26be3b4923e28d452ab2fc5491e794b", + "master_key": "0432d735b32f66d0e3a70d4f9cc821a8529521a4937d26b987715d8eff4e4c54", + "kbs_access_key": "d2fedabd0d4c17a371491c9722578843a26be3b4923e28d452ab2fc5491e794b", + "iv_and_cipher": "877ef871ef1fc668401c717ef21aa12e8523579fb1ff4474b76f28c2293537c80cc7569996c9e0229bea7f378e3a824e", + "registration_lock": "23a75cb1df1a87df45cc2ed167c2bdc85ab1220b847c88761b0005cac907fce5" + } ] diff --git a/SignalShareExtension/Info.plist b/SignalShareExtension/Info.plist index ca9c38d3e1..760c903202 100644 --- a/SignalShareExtension/Info.plist +++ b/SignalShareExtension/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 3.3.0 CFBundleVersion - 3.3.0.2 + 3.3.0.5 ITSAppUsesNonExemptEncryption NSAppTransportSecurity diff --git a/SignalShareExtension/ShareViewController.swift b/SignalShareExtension/ShareViewController.swift index b168c493ab..061adedf07 100644 --- a/SignalShareExtension/ShareViewController.swift +++ b/SignalShareExtension/ShareViewController.swift @@ -679,6 +679,14 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed return UnloadedItem(itemProvider: itemProvider, itemType: .other) } + // Prefer a URL if available. If there's an image item and a URL item, + // the URL is generally more useful. e.g. when sharing an app from the + // App Store the image would be the app icon and the URL is the link + // to the application. + if let urlItem = itemsToLoad.first(where: { $0.itemType == .webUrl }) { + return [urlItem] + } + let visualMediaItems = itemsToLoad.filter { ShareViewController.isVisualMediaItem(itemProvider: $0.itemProvider) } // We only allow sharing 1 item, unless they are visual media items. And if they are diff --git a/ThirdParty/RingRTC b/ThirdParty/RingRTC index 939fff4cca..adbcd0196a 160000 --- a/ThirdParty/RingRTC +++ b/ThirdParty/RingRTC @@ -1 +1 @@ -Subproject commit 939fff4cca0d3b9703a4147226932a784e622d72 +Subproject commit adbcd0196a3afa589dd2e1e3ac50624ac6491752 diff --git a/ThirdParty/SignalRingRTC.podspec b/ThirdParty/SignalRingRTC.podspec index 2baef65c4b..2e2d791243 100644 --- a/ThirdParty/SignalRingRTC.podspec +++ b/ThirdParty/SignalRingRTC.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "SignalRingRTC" - s.version = "0.3.2" + s.version = "0.3.3" s.summary = "A Swift & Objective-C library used by the Signal iOS app for WebRTC interactions." s.description = <<-DESC diff --git a/ThirdParty/WebRTC b/ThirdParty/WebRTC index 7115a09728..340f483e44 160000 --- a/ThirdParty/WebRTC +++ b/ThirdParty/WebRTC @@ -1 +1 @@ -Subproject commit 7115a09728e023ca6132e14bd9d5f8bc5e1f0b92 +Subproject commit 340f483e44db600c8055f2eaac44ff6c5e478297