mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Merge tag '2.38.1.2'
This commit is contained in:
commit
501e2c761f
15 changed files with 99 additions and 69 deletions
|
@ -60,9 +60,15 @@ def main():
|
||||||
'2.34.0.10', '2.34.0.11', '2.34.0.12', '2.34.0.13', '2.34.0.15', '2.34.0.16', '2.34.0.17', '2.34.0.18', '2.34.0.19', '2.34.0.20', '2.34.0.6', '2.34.0.7', '2.34.0.8', '2.34.0.9',
|
'2.34.0.10', '2.34.0.11', '2.34.0.12', '2.34.0.13', '2.34.0.15', '2.34.0.16', '2.34.0.17', '2.34.0.18', '2.34.0.19', '2.34.0.20', '2.34.0.6', '2.34.0.7', '2.34.0.8', '2.34.0.9',
|
||||||
'2.37.3.0',
|
'2.37.3.0',
|
||||||
'2.37.4.0',
|
'2.37.4.0',
|
||||||
|
# these were internal release only tags, now we include "-internal" in the tag name to avoid this
|
||||||
'2.38.0.2.1',
|
'2.38.0.2.1',
|
||||||
'2.38.0.3.1',
|
'2.38.0.3.1',
|
||||||
'2.38.0.4.1'
|
'2.38.0.4.1',
|
||||||
|
# the work in these tags was moved to the 2.38.1 release instead
|
||||||
|
'2.38.0.12',
|
||||||
|
'2.38.0.13',
|
||||||
|
'2.38.0.14',
|
||||||
|
#
|
||||||
]
|
]
|
||||||
tags_of_concern = [tag for tag in tags_of_concern if tag not in tags_to_ignore]
|
tags_of_concern = [tag for tag in tags_of_concern if tag not in tags_to_ignore]
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.38.0</string>
|
<string>2.38.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>2.38.0.11</string>
|
<string>2.38.1.2</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>LOGS_EMAIL</key>
|
<key>LOGS_EMAIL</key>
|
||||||
|
|
|
@ -484,19 +484,6 @@ const CGFloat kMaxTextViewHeight = 98;
|
||||||
// This is okay because there's only space on screen to perform the
|
// This is okay because there's only space on screen to perform the
|
||||||
// gesture in one direction.
|
// gesture in one direction.
|
||||||
CGFloat xOffset = fabs(self.voiceMemoGestureStartLocation.x - location.x);
|
CGFloat xOffset = fabs(self.voiceMemoGestureStartLocation.x - location.x);
|
||||||
// The lower this value, the easier it is to cancel by accident.
|
|
||||||
// The higher this value, the harder it is to cancel.
|
|
||||||
const CGFloat kCancelOffsetPoints = 100.f;
|
|
||||||
CGFloat cancelAlpha = xOffset / kCancelOffsetPoints;
|
|
||||||
BOOL isCancelled = cancelAlpha >= 1.f;
|
|
||||||
if (isCancelled) {
|
|
||||||
self.voiceMemoRecordingState = VoiceMemoRecordingState_Idle;
|
|
||||||
[self.inputToolbarDelegate voiceMemoGestureDidCancel];
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
[self.inputToolbarDelegate voiceMemoGestureDidUpdateCancelWithRatioComplete:cancelAlpha];
|
|
||||||
}
|
|
||||||
|
|
||||||
CGFloat yOffset = fabs(self.voiceMemoGestureStartLocation.y - location.y);
|
CGFloat yOffset = fabs(self.voiceMemoGestureStartLocation.y - location.y);
|
||||||
|
|
||||||
// require a certain threshold before we consider the user to be
|
// require a certain threshold before we consider the user to be
|
||||||
|
@ -524,6 +511,19 @@ const CGFloat kMaxTextViewHeight = 98;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
[self.voiceMemoLockView updateWithRatioComplete:lockAlpha];
|
[self.voiceMemoLockView updateWithRatioComplete:lockAlpha];
|
||||||
|
|
||||||
|
// The lower this value, the easier it is to cancel by accident.
|
||||||
|
// The higher this value, the harder it is to cancel.
|
||||||
|
const CGFloat kCancelOffsetPoints = 100.f;
|
||||||
|
CGFloat cancelAlpha = xOffset / kCancelOffsetPoints;
|
||||||
|
BOOL isCancelled = cancelAlpha >= 1.f;
|
||||||
|
if (isCancelled) {
|
||||||
|
self.voiceMemoRecordingState = VoiceMemoRecordingState_Idle;
|
||||||
|
[self.inputToolbarDelegate voiceMemoGestureDidCancel];
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
[self.inputToolbarDelegate voiceMemoGestureDidUpdateCancelWithRatioComplete:cancelAlpha];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -569,7 +569,7 @@ const CGFloat kMaxTextViewHeight = 98;
|
||||||
self.voiceMemoUI = [UIView new];
|
self.voiceMemoUI = [UIView new];
|
||||||
self.voiceMemoUI.backgroundColor = Theme.toolbarBackgroundColor;
|
self.voiceMemoUI.backgroundColor = Theme.toolbarBackgroundColor;
|
||||||
[self addSubview:self.voiceMemoUI];
|
[self addSubview:self.voiceMemoUI];
|
||||||
self.voiceMemoUI.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
|
[self.voiceMemoUI autoPinEdgesToSuperviewEdges];
|
||||||
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _voiceMemoUI);
|
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _voiceMemoUI);
|
||||||
|
|
||||||
self.voiceMemoContentView = [UIView new];
|
self.voiceMemoContentView = [UIView new];
|
||||||
|
@ -671,8 +671,7 @@ const CGFloat kMaxTextViewHeight = 98;
|
||||||
[self.recordingLabel autoPinLeadingToTrailingEdgeOfView:imageView offset:5.f];
|
[self.recordingLabel autoPinLeadingToTrailingEdgeOfView:imageView offset:5.f];
|
||||||
[cancelLabel autoVCenterInSuperview];
|
[cancelLabel autoVCenterInSuperview];
|
||||||
[cancelLabel autoHCenterInSuperview];
|
[cancelLabel autoHCenterInSuperview];
|
||||||
[self.voiceMemoUI setNeedsLayout];
|
[self.voiceMemoUI layoutIfNeeded];
|
||||||
[self.voiceMemoUI layoutSubviews];
|
|
||||||
|
|
||||||
// Slide in the "slide to cancel" label.
|
// Slide in the "slide to cancel" label.
|
||||||
CGRect cancelLabelStartFrame = cancelLabel.frame;
|
CGRect cancelLabelStartFrame = cancelLabel.frame;
|
||||||
|
|
|
@ -2938,6 +2938,13 @@ typedef enum : NSUInteger {
|
||||||
didApproveAttachments:(NSArray<SignalAttachment *> *)attachments
|
didApproveAttachments:(NSArray<SignalAttachment *> *)attachments
|
||||||
messageText:(nullable NSString *)messageText
|
messageText:(nullable NSString *)messageText
|
||||||
{
|
{
|
||||||
|
OWSAssertDebug(self.isFirstResponder);
|
||||||
|
if (@available(iOS 10, *)) {
|
||||||
|
// do nothing
|
||||||
|
} else {
|
||||||
|
[self reloadInputViews];
|
||||||
|
}
|
||||||
|
|
||||||
[self tryToSendAttachments:attachments messageText:messageText];
|
[self tryToSendAttachments:attachments messageText:messageText];
|
||||||
[self.inputToolbar clearTextMessageAnimated:NO];
|
[self.inputToolbar clearTextMessageAnimated:NO];
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "OWSBackup.h"
|
#import "OWSBackup.h"
|
||||||
|
@ -138,6 +138,10 @@ NSError *OWSBackupErrorWithDescription(NSString *description)
|
||||||
|
|
||||||
- (void)setup
|
- (void)setup
|
||||||
{
|
{
|
||||||
|
if (!OWSBackup.isFeatureEnabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
[OWSBackupAPI setup];
|
[OWSBackupAPI setup];
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
|
|
@ -252,7 +252,7 @@
|
||||||
"BLOCK_LIST_UNBLOCK_BUTTON" = "Deblokiraj";
|
"BLOCK_LIST_UNBLOCK_BUTTON" = "Deblokiraj";
|
||||||
|
|
||||||
/* Action sheet body when confirming you want to unblock a group */
|
/* Action sheet body when confirming you want to unblock a group */
|
||||||
"BLOCK_LIST_UNBLOCK_GROUP_BODY" = "Existing members will be able to add you to the group again.";
|
"BLOCK_LIST_UNBLOCK_GROUP_BODY" = "Postojeći članovi moći će Vas ponovo uvrstiti u grupu.";
|
||||||
|
|
||||||
/* Action sheet title when confirming you want to unblock a group. */
|
/* Action sheet title when confirming you want to unblock a group. */
|
||||||
"BLOCK_LIST_UNBLOCK_GROUP_TITLE" = "Unblock This Group?";
|
"BLOCK_LIST_UNBLOCK_GROUP_TITLE" = "Unblock This Group?";
|
||||||
|
@ -435,7 +435,7 @@
|
||||||
"COMPOSE_MESSAGE_CONTACT_SECTION_TITLE" = "Kontakti";
|
"COMPOSE_MESSAGE_CONTACT_SECTION_TITLE" = "Kontakti";
|
||||||
|
|
||||||
/* Table section header for group listing when composing a new message */
|
/* Table section header for group listing when composing a new message */
|
||||||
"COMPOSE_MESSAGE_GROUP_SECTION_TITLE" = "Groups";
|
"COMPOSE_MESSAGE_GROUP_SECTION_TITLE" = "Grupe";
|
||||||
|
|
||||||
/* Table section header for invite listing when composing a new message */
|
/* Table section header for invite listing when composing a new message */
|
||||||
"COMPOSE_MESSAGE_INVITE_SECTION_TITLE" = "Pozivnica";
|
"COMPOSE_MESSAGE_INVITE_SECTION_TITLE" = "Pozivnica";
|
||||||
|
@ -516,10 +516,10 @@
|
||||||
"CONTACT_FIELD_MIDDLE_NAME" = "Middle Name";
|
"CONTACT_FIELD_MIDDLE_NAME" = "Middle Name";
|
||||||
|
|
||||||
/* Label for the 'name prefix' field of a contact. */
|
/* Label for the 'name prefix' field of a contact. */
|
||||||
"CONTACT_FIELD_NAME_PREFIX" = "Prefix";
|
"CONTACT_FIELD_NAME_PREFIX" = "Prefiks";
|
||||||
|
|
||||||
/* Label for the 'name suffix' field of a contact. */
|
/* Label for the 'name suffix' field of a contact. */
|
||||||
"CONTACT_FIELD_NAME_SUFFIX" = "Suffix";
|
"CONTACT_FIELD_NAME_SUFFIX" = "Sufiks";
|
||||||
|
|
||||||
/* Label for the 'organization' field of a contact. */
|
/* Label for the 'organization' field of a contact. */
|
||||||
"CONTACT_FIELD_ORGANIZATION" = "Organization";
|
"CONTACT_FIELD_ORGANIZATION" = "Organization";
|
||||||
|
|
|
@ -1515,7 +1515,7 @@
|
||||||
"ONBOARDING_PERMISSIONS_ENABLE_PERMISSIONS_BUTTON" = "Accorder les autorisations";
|
"ONBOARDING_PERMISSIONS_ENABLE_PERMISSIONS_BUTTON" = "Accorder les autorisations";
|
||||||
|
|
||||||
/* Explanation in the 'onboarding permissions' view. */
|
/* Explanation in the 'onboarding permissions' view. */
|
||||||
"ONBOARDING_PERMISSIONS_EXPLANATION" = "Les informations de vos contacts sont toujours transmises de façon sécurisée.";
|
"ONBOARDING_PERMISSIONS_EXPLANATION" = "Les renseignements de vos contacts sont toujours transmises de façon sécurisée.";
|
||||||
|
|
||||||
/* Label for the 'not now' button in the 'onboarding permissions' view. */
|
/* Label for the 'not now' button in the 'onboarding permissions' view. */
|
||||||
"ONBOARDING_PERMISSIONS_NOT_NOW_BUTTON" = "Pas maintenant";
|
"ONBOARDING_PERMISSIONS_NOT_NOW_BUTTON" = "Pas maintenant";
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"ACTION_SEND_MESSAGE" = "Invia messaggio";
|
"ACTION_SEND_MESSAGE" = "Invia messaggio";
|
||||||
|
|
||||||
/* Label for 'share contact' button. */
|
/* Label for 'share contact' button. */
|
||||||
"ACTION_SHARE_CONTACT" = "Condivi contatto";
|
"ACTION_SHARE_CONTACT" = "Condividi contatto";
|
||||||
|
|
||||||
/* Label for 'video call' button in contact view. */
|
/* Label for 'video call' button in contact view. */
|
||||||
"ACTION_VIDEO_CALL" = "Videochiamata";
|
"ACTION_VIDEO_CALL" = "Videochiamata";
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
"ATTACHMENT_APPROVAL_CAPTION_PLACEHOLDER" = "キャプションの追加...";
|
"ATTACHMENT_APPROVAL_CAPTION_PLACEHOLDER" = "キャプションの追加...";
|
||||||
|
|
||||||
/* Title for 'caption' mode of the attachment approval view. */
|
/* Title for 'caption' mode of the attachment approval view. */
|
||||||
"ATTACHMENT_APPROVAL_CAPTION_TITLE" = "Caption";
|
"ATTACHMENT_APPROVAL_CAPTION_TITLE" = "キャプション";
|
||||||
|
|
||||||
/* Format string for file extension label in call interstitial view */
|
/* Format string for file extension label in call interstitial view */
|
||||||
"ATTACHMENT_APPROVAL_FILE_EXTENSION_FORMAT" = "ファイルの種類:%@";
|
"ATTACHMENT_APPROVAL_FILE_EXTENSION_FORMAT" = "ファイルの種類:%@";
|
||||||
|
@ -351,7 +351,7 @@
|
||||||
"CALL_VIEW_DECLINE_INCOMING_CALL_LABEL" = "着信を拒否する";
|
"CALL_VIEW_DECLINE_INCOMING_CALL_LABEL" = "着信を拒否する";
|
||||||
|
|
||||||
/* tooltip label when remote party has enabled their video */
|
/* tooltip label when remote party has enabled their video */
|
||||||
"CALL_VIEW_ENABLE_VIDEO_HINT" = "Tap here to turn on your video";
|
"CALL_VIEW_ENABLE_VIDEO_HINT" = "動画再生はここをタップ";
|
||||||
|
|
||||||
/* Accessibility label for hang up call */
|
/* Accessibility label for hang up call */
|
||||||
"CALL_VIEW_HANGUP_LABEL" = "通話を切る";
|
"CALL_VIEW_HANGUP_LABEL" = "通話を切る";
|
||||||
|
@ -564,13 +564,13 @@
|
||||||
"CONVERSATION_DELETE_CONFIRMATION_ALERT_TITLE" = "消去しますか?";
|
"CONVERSATION_DELETE_CONFIRMATION_ALERT_TITLE" = "消去しますか?";
|
||||||
|
|
||||||
/* keyboard toolbar label when no messages match the search string */
|
/* keyboard toolbar label when no messages match the search string */
|
||||||
"CONVERSATION_SEARCH_NO_RESULTS" = "No matches";
|
"CONVERSATION_SEARCH_NO_RESULTS" = "見つかりません";
|
||||||
|
|
||||||
/* keyboard toolbar label when exactly 1 message matches the search string */
|
/* keyboard toolbar label when exactly 1 message matches the search string */
|
||||||
"CONVERSATION_SEARCH_ONE_RESULT" = "1 match";
|
"CONVERSATION_SEARCH_ONE_RESULT" = "ありました";
|
||||||
|
|
||||||
/* keyboard toolbar label when more than 1 message matches the search string. Embeds {{number/position of the 'currently viewed' result}} and the {{total number of results}} */
|
/* keyboard toolbar label when more than 1 message matches the search string. Embeds {{number/position of the 'currently viewed' result}} and the {{total number of results}} */
|
||||||
"CONVERSATION_SEARCH_RESULTS_FORMAT" = "%d of %d matches";
|
"CONVERSATION_SEARCH_RESULTS_FORMAT" = "%d ( %d のうち)";
|
||||||
|
|
||||||
/* title for conversation settings screen */
|
/* title for conversation settings screen */
|
||||||
"CONVERSATION_SETTINGS" = "会話設定";
|
"CONVERSATION_SETTINGS" = "会話設定";
|
||||||
|
@ -624,7 +624,7 @@
|
||||||
"CONVERSATION_SETTINGS_NEW_CONTACT" = "新規の連絡先を作る";
|
"CONVERSATION_SETTINGS_NEW_CONTACT" = "新規の連絡先を作る";
|
||||||
|
|
||||||
/* Table cell label in conversation settings which returns the user to the conversation with 'search mode' activated */
|
/* Table cell label in conversation settings which returns the user to the conversation with 'search mode' activated */
|
||||||
"CONVERSATION_SETTINGS_SEARCH" = "Search Conversation";
|
"CONVERSATION_SETTINGS_SEARCH" = "会話の検索";
|
||||||
|
|
||||||
/* Label for button that opens conversation settings. */
|
/* Label for button that opens conversation settings. */
|
||||||
"CONVERSATION_SETTINGS_TAP_TO_CHANGE" = "タップして変える";
|
"CONVERSATION_SETTINGS_TAP_TO_CHANGE" = "タップして変える";
|
||||||
|
@ -1641,13 +1641,13 @@
|
||||||
"PHONE_NUMBER_TYPE_WORK_FAX" = "職場FAX";
|
"PHONE_NUMBER_TYPE_WORK_FAX" = "職場FAX";
|
||||||
|
|
||||||
/* alert title, generic error preventing user from capturing a photo */
|
/* alert title, generic error preventing user from capturing a photo */
|
||||||
"PHOTO_CAPTURE_GENERIC_ERROR" = "Unable to capture image.";
|
"PHOTO_CAPTURE_GENERIC_ERROR" = "画像はキャプチャできません";
|
||||||
|
|
||||||
/* alert title */
|
/* alert title */
|
||||||
"PHOTO_CAPTURE_UNABLE_TO_CAPTURE_IMAGE" = "Unable to capture image.";
|
"PHOTO_CAPTURE_UNABLE_TO_CAPTURE_IMAGE" = "画像はキャプチャできません";
|
||||||
|
|
||||||
/* alert title */
|
/* alert title */
|
||||||
"PHOTO_CAPTURE_UNABLE_TO_INITIALIZE_CAMERA" = "Failed to configure camera.";
|
"PHOTO_CAPTURE_UNABLE_TO_INITIALIZE_CAMERA" = "カメラの設定ができませんでした";
|
||||||
|
|
||||||
/* label for system photo collections which have no name. */
|
/* label for system photo collections which have no name. */
|
||||||
"PHOTO_PICKER_UNNAMED_COLLECTION" = "無名のアルバム";
|
"PHOTO_PICKER_UNNAMED_COLLECTION" = "無名のアルバム";
|
||||||
|
@ -2484,7 +2484,7 @@
|
||||||
"UPGRADE_EXPERIENCE_VIDEO_TITLE" = "安全なビデオ電話にようこそ!";
|
"UPGRADE_EXPERIENCE_VIDEO_TITLE" = "安全なビデオ電話にようこそ!";
|
||||||
|
|
||||||
/* Message for the alert indicating that user should upgrade iOS. */
|
/* Message for the alert indicating that user should upgrade iOS. */
|
||||||
"UPGRADE_IOS_ALERT_MESSAGE" = "Signal will soon require iOS 10 or later. Please upgrade in Settings app >> General >> Software Update.";
|
"UPGRADE_IOS_ALERT_MESSAGE" = "Signalは、まもなくiOS 10以上だけの対応になります。アップデートしてください。";
|
||||||
|
|
||||||
/* Title for the alert indicating that user should upgrade iOS. */
|
/* Title for the alert indicating that user should upgrade iOS. */
|
||||||
"UPGRADE_IOS_ALERT_TITLE" = "iOSを更新する";
|
"UPGRADE_IOS_ALERT_TITLE" = "iOSを更新する";
|
||||||
|
|
|
@ -1233,10 +1233,19 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
NSURL *avatarUrlPath =
|
NSURL *avatarUrl = [NSURL URLWithString:userProfile.avatarUrlPath relativeToURL:self.avatarHTTPManager.baseURL];
|
||||||
[NSURL URLWithString:userProfile.avatarUrlPath relativeToURL:self.avatarHTTPManager.baseURL];
|
NSError *serializationError;
|
||||||
NSURLRequest *request = [NSURLRequest requestWithURL:avatarUrlPath];
|
NSMutableURLRequest *request =
|
||||||
NSURLSessionDownloadTask *downloadTask = [self.avatarHTTPManager downloadTaskWithRequest:request
|
[self.avatarHTTPManager.requestSerializer requestWithMethod:@"GET"
|
||||||
|
URLString:avatarUrl.absoluteString
|
||||||
|
parameters:nil
|
||||||
|
error:&serializationError];
|
||||||
|
if (serializationError) {
|
||||||
|
OWSFailDebug(@"serializationError: %@", serializationError);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
__block NSURLSessionDownloadTask *downloadTask = [self.avatarHTTPManager downloadTaskWithRequest:request
|
||||||
progress:^(NSProgress *_Nonnull downloadProgress) {
|
progress:^(NSProgress *_Nonnull downloadProgress) {
|
||||||
OWSLogVerbose(
|
OWSLogVerbose(
|
||||||
@"Downloading avatar for %@ %f", userProfile.recipientId, downloadProgress.fractionCompleted);
|
@"Downloading avatar for %@ %f", userProfile.recipientId, downloadProgress.fractionCompleted);
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
//
|
//
|
||||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@class AFSecurityPolicy;
|
@class AFSecurityPolicy;
|
||||||
|
|
||||||
extern NSString *const OWSCensorshipConfiguration_SouqFrontingHost;
|
extern NSString *const OWSFrontingHost_GoogleEgypt;
|
||||||
extern NSString *const OWSCensorshipConfiguration_YahooViewFrontingHost;
|
extern NSString *const OWSFrontingHost_GoogleUAE;
|
||||||
extern NSString *const OWSCensorshipConfiguration_DefaultFrontingHost;
|
extern NSString *const OWSFrontingHost_GoogleOman;
|
||||||
|
extern NSString *const OWSFrontingHost_GoogleQatar;
|
||||||
|
|
||||||
@interface OWSCensorshipConfiguration : NSObject
|
@interface OWSCensorshipConfiguration : NSObject
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "OWSCensorshipConfiguration.h"
|
#import "OWSCensorshipConfiguration.h"
|
||||||
|
@ -11,9 +11,11 @@
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
NSString *const OWSCensorshipConfiguration_SouqFrontingHost = @"cms.souqcdn.com";
|
NSString *const OWSFrontingHost_GoogleEgypt = @"www.google.com.eg";
|
||||||
NSString *const OWSCensorshipConfiguration_YahooViewFrontingHost = @"view.yahoo.com";
|
NSString *const OWSFrontingHost_GoogleUAE = @"www.google.ae";
|
||||||
NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipConfiguration_YahooViewFrontingHost;
|
NSString *const OWSFrontingHost_GoogleOman = @"www.google.com.om";
|
||||||
|
NSString *const OWSFrontingHost_GoogleQatar = @"www.google.com.qa";
|
||||||
|
NSString *const OWSFrontingHost_Default = @"www.google.com";
|
||||||
|
|
||||||
@implementation OWSCensorshipConfiguration
|
@implementation OWSCensorshipConfiguration
|
||||||
|
|
||||||
|
@ -25,7 +27,6 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return [self censorshipConfigurationWithCountryCode:countryCode];
|
return [self censorshipConfigurationWithCountryCode:countryCode];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,10 +46,9 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
|
||||||
baseURL = [NSURL URLWithString:frontingURLString];
|
baseURL = [NSURL URLWithString:frontingURLString];
|
||||||
securityPolicy = [self securityPolicyForDomain:(NSString *)specifiedDomain];
|
securityPolicy = [self securityPolicyForDomain:(NSString *)specifiedDomain];
|
||||||
} else {
|
} else {
|
||||||
NSString *frontingURLString =
|
NSString *frontingURLString = [NSString stringWithFormat:@"https://%@", OWSFrontingHost_Default];
|
||||||
[NSString stringWithFormat:@"https://%@", OWSCensorshipConfiguration_DefaultFrontingHost];
|
|
||||||
baseURL = [NSURL URLWithString:frontingURLString];
|
baseURL = [NSURL URLWithString:frontingURLString];
|
||||||
securityPolicy = [self securityPolicyForDomain:OWSCensorshipConfiguration_DefaultFrontingHost];
|
securityPolicy = [self securityPolicyForDomain:OWSFrontingHost_Default];
|
||||||
}
|
}
|
||||||
|
|
||||||
OWSAssertDebug(baseURL);
|
OWSAssertDebug(baseURL);
|
||||||
|
@ -135,13 +135,17 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
|
||||||
// If the security policy requires new certificates, include them in the SSK bundle
|
// If the security policy requires new certificates, include them in the SSK bundle
|
||||||
+ (AFSecurityPolicy *)securityPolicyForDomain:(NSString *)domain
|
+ (AFSecurityPolicy *)securityPolicyForDomain:(NSString *)domain
|
||||||
{
|
{
|
||||||
if ([domain isEqualToString:OWSCensorshipConfiguration_SouqFrontingHost]) {
|
if ([domain isEqualToString:OWSFrontingHost_GoogleEgypt]) {
|
||||||
return [self souqPinningPolicy];
|
return self.googlePinningPolicy;
|
||||||
} else if ([domain isEqualToString:OWSCensorshipConfiguration_YahooViewFrontingHost]) {
|
} else if ([domain isEqualToString:OWSFrontingHost_GoogleQatar]) {
|
||||||
return [self yahooViewPinningPolicy];
|
return self.googlePinningPolicy;
|
||||||
|
} else if ([domain isEqualToString:OWSFrontingHost_GoogleOman]) {
|
||||||
|
return self.googlePinningPolicy;
|
||||||
|
} else if ([domain isEqualToString:OWSFrontingHost_GoogleUAE]) {
|
||||||
|
return self.googlePinningPolicy;
|
||||||
} else {
|
} else {
|
||||||
OWSFailDebug(@"unknown pinning domain.");
|
OWSFailDebug(@"unknown pinning domain.");
|
||||||
return [self yahooViewPinningPolicy];
|
return self.googlePinningPolicy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +201,7 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
|
||||||
return certData;
|
return certData;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (AFSecurityPolicy *)yahooViewPinningPolicy
|
+ (AFSecurityPolicy *)yahooViewPinningPolicy_deprecated
|
||||||
{
|
{
|
||||||
static AFSecurityPolicy *securityPolicy = nil;
|
static AFSecurityPolicy *securityPolicy = nil;
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
|
@ -209,7 +213,7 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
|
||||||
return securityPolicy;
|
return securityPolicy;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (AFSecurityPolicy *)souqPinningPolicy
|
+ (AFSecurityPolicy *)souqPinningPolicy_deprecated
|
||||||
{
|
{
|
||||||
static AFSecurityPolicy *securityPolicy = nil;
|
static AFSecurityPolicy *securityPolicy = nil;
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
|
@ -221,7 +225,7 @@ NSString *const OWSCensorshipConfiguration_DefaultFrontingHost = OWSCensorshipCo
|
||||||
return securityPolicy;
|
return securityPolicy;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (AFSecurityPolicy *)googlePinningPolicy_deprecated
|
+ (AFSecurityPolicy *)googlePinningPolicy
|
||||||
{
|
{
|
||||||
static AFSecurityPolicy *securityPolicy = nil;
|
static AFSecurityPolicy *securityPolicy = nil;
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "OWSCountryMetadata.h"
|
#import "OWSCountryMetadata.h"
|
||||||
|
@ -63,7 +63,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Andorra" tld:@".ad" frontingDomain:nil countryCode:@"AD"],
|
[OWSCountryMetadata countryMetadataWithName:@"Andorra" tld:@".ad" frontingDomain:nil countryCode:@"AD"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"United Arab Emirates"
|
[OWSCountryMetadata countryMetadataWithName:@"United Arab Emirates"
|
||||||
tld:@".ae"
|
tld:@".ae"
|
||||||
frontingDomain:OWSCensorshipConfiguration_SouqFrontingHost
|
frontingDomain:OWSFrontingHost_GoogleUAE
|
||||||
countryCode:@"AE"],
|
countryCode:@"AE"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Afghanistan" tld:@".af" frontingDomain:nil countryCode:@"AF"],
|
[OWSCountryMetadata countryMetadataWithName:@"Afghanistan" tld:@".af" frontingDomain:nil countryCode:@"AF"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Antigua and Barbuda"
|
[OWSCountryMetadata countryMetadataWithName:@"Antigua and Barbuda"
|
||||||
|
@ -157,7 +157,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Estonia" tld:@".ee" frontingDomain:nil countryCode:@"EE"],
|
[OWSCountryMetadata countryMetadataWithName:@"Estonia" tld:@".ee" frontingDomain:nil countryCode:@"EE"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Egypt"
|
[OWSCountryMetadata countryMetadataWithName:@"Egypt"
|
||||||
tld:@".eg"
|
tld:@".eg"
|
||||||
frontingDomain:OWSCensorshipConfiguration_SouqFrontingHost
|
frontingDomain:OWSFrontingHost_GoogleEgypt
|
||||||
countryCode:@"EG"],
|
countryCode:@"EG"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Spain" tld:@".es" frontingDomain:nil countryCode:@"ES"],
|
[OWSCountryMetadata countryMetadataWithName:@"Spain" tld:@".es" frontingDomain:nil countryCode:@"ES"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Ethiopia" tld:@".et" frontingDomain:nil countryCode:@"ET"],
|
[OWSCountryMetadata countryMetadataWithName:@"Ethiopia" tld:@".et" frontingDomain:nil countryCode:@"ET"],
|
||||||
|
@ -255,7 +255,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"New Zealand" tld:@".nz" frontingDomain:nil countryCode:@"NZ"],
|
[OWSCountryMetadata countryMetadataWithName:@"New Zealand" tld:@".nz" frontingDomain:nil countryCode:@"NZ"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Oman"
|
[OWSCountryMetadata countryMetadataWithName:@"Oman"
|
||||||
tld:@".om"
|
tld:@".om"
|
||||||
frontingDomain:OWSCensorshipConfiguration_SouqFrontingHost
|
frontingDomain:OWSFrontingHost_GoogleOman
|
||||||
countryCode:@"OM"],
|
countryCode:@"OM"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Pakistan" tld:@".pk" frontingDomain:nil countryCode:@"PK"],
|
[OWSCountryMetadata countryMetadataWithName:@"Pakistan" tld:@".pk" frontingDomain:nil countryCode:@"PK"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Panama" tld:@".pa" frontingDomain:nil countryCode:@"PA"],
|
[OWSCountryMetadata countryMetadataWithName:@"Panama" tld:@".pa" frontingDomain:nil countryCode:@"PA"],
|
||||||
|
@ -279,7 +279,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Paraguay" tld:@".py" frontingDomain:nil countryCode:@"PY"],
|
[OWSCountryMetadata countryMetadataWithName:@"Paraguay" tld:@".py" frontingDomain:nil countryCode:@"PY"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Qatar"
|
[OWSCountryMetadata countryMetadataWithName:@"Qatar"
|
||||||
tld:@".qa"
|
tld:@".qa"
|
||||||
frontingDomain:OWSCensorshipConfiguration_SouqFrontingHost
|
frontingDomain:OWSFrontingHost_GoogleQatar
|
||||||
countryCode:@"QA"],
|
countryCode:@"QA"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Romania" tld:@".ro" frontingDomain:nil countryCode:@"RO"],
|
[OWSCountryMetadata countryMetadataWithName:@"Romania" tld:@".ro" frontingDomain:nil countryCode:@"RO"],
|
||||||
[OWSCountryMetadata countryMetadataWithName:@"Serbia" tld:@".rs" frontingDomain:nil countryCode:@"RS"],
|
[OWSCountryMetadata countryMetadataWithName:@"Serbia" tld:@".rs" frontingDomain:nil countryCode:@"RS"],
|
||||||
|
|
|
@ -29,8 +29,8 @@ typedef NS_ENUM(NSInteger, TSWhisperMessageType) {
|
||||||
#define textSecureServerURL @"https://textsecure-service.whispersystems.org/"
|
#define textSecureServerURL @"https://textsecure-service.whispersystems.org/"
|
||||||
#define textSecureCDNServerURL @"https://cdn.signal.org"
|
#define textSecureCDNServerURL @"https://cdn.signal.org"
|
||||||
// Use same reflector for service and CDN
|
// Use same reflector for service and CDN
|
||||||
#define textSecureServiceReflectorHost @"textsecure-service-reflected.whispersystems.org"
|
#define textSecureServiceReflectorHost @"europe-west1-signal-cdn-reflector.cloudfunctions.net"
|
||||||
#define textSecureCDNReflectorHost @"textsecure-service-reflected.whispersystems.org"
|
#define textSecureCDNReflectorHost @"europe-west1-signal-cdn-reflector.cloudfunctions.net"
|
||||||
#define contactDiscoveryURL @"https://api.directory.signal.org"
|
#define contactDiscoveryURL @"https://api.directory.signal.org"
|
||||||
#define kUDTrustRoot @"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF"
|
#define kUDTrustRoot @"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF"
|
||||||
#define USING_PRODUCTION_SERVICE
|
#define USING_PRODUCTION_SERVICE
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>XPC!</string>
|
<string>XPC!</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.38.0</string>
|
<string>2.38.1</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>2.38.0.11</string>
|
<string>2.38.1.2</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSAppTransportSecurity</key>
|
||||||
|
|
Loading…
Reference in a new issue