Merge branch 'mkirk/fix-build-warnings'

This commit is contained in:
Michael Kirk 2018-06-11 09:56:48 -04:00
commit 1db1d76d98
24 changed files with 69 additions and 15 deletions

View file

@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithPhoneNumbers:(NSArray<NSString *> *)phoneNumbers NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSBlockedPhoneNumbersMessage.h"
@ -15,6 +15,11 @@ NS_ASSUME_NONNULL_BEGIN
@implementation OWSBlockedPhoneNumbersMessage
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (instancetype)initWithPhoneNumbers:(NSArray<NSString *> *)phoneNumbers
{
self = [super init];

View file

@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithReadReceipts:(NSArray<OWSLinkedDeviceReadReceipt *> *)readReceipts NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end

View file

@ -28,6 +28,11 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{
OWSSignalServiceProtosSyncMessageBuilder *syncMessageBuilder = [OWSSignalServiceProtosSyncMessageBuilder new];

View file

@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithVerificationState:(OWSVerificationState)verificationState
identityKey:(NSData *)identityKey
verificationForRecipientId:(NSString *)recipientId NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
// This is a clunky name, but we want to differentiate it from `recipientIdentifier` inherited from `TSOutgoingMessage`
@property (nonatomic, readonly) NSString *verificationForRecipientId;

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSVerificationStateSyncMessage.h"
@ -49,6 +49,11 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{
OWSAssert(self.identityKey.length == kIdentityKeyLength);

View file

@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithOutgoingMessage:(TSOutgoingMessage *)message NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end

View file

@ -48,6 +48,11 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{
OWSSignalServiceProtosSyncMessageBuilder *syncMessageBuilder = [OWSSignalServiceProtosSyncMessageBuilder new];

View file

@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
contactShare:(nullable OWSContact *)contactShare NS_UNAVAILABLE;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end

View file

@ -12,14 +12,9 @@ NS_ASSUME_NONNULL_BEGIN
@implementation OWSOutgoingSyncMessage
- (instancetype)initWithCoder:(NSCoder *)coder
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
self = [super initWithCoder:coder];
if (self) {
}
return self;
return [super initWithCoder:coder];
}
- (instancetype)init

View file

@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithReadReceiptsEnabled:(BOOL)readReceiptsEnabled NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSSyncConfigurationMessage.h"
@ -27,6 +27,11 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{

View file

@ -19,6 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
identityManager:(OWSIdentityManager *)identityManager
profileManager:(id<ProfileManagerProtocol>)profileManager NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (NSData *)buildPlainTextAttachmentData;
@end

View file

@ -42,6 +42,11 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{
if (self.attachmentIds.count != 1) {

View file

@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface OWSSyncGroupsMessage : OWSOutgoingSyncMessage
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (NSData *)buildPlainTextAttachmentDataWithTransaction:(YapDatabaseReadTransaction *)transaction;

View file

@ -20,6 +20,11 @@ NS_ASSUME_NONNULL_BEGIN
return [super init];
}
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{

View file

@ -21,6 +21,7 @@ NS_SWIFT_NAME(EndSessionMessage)
contactShare:(nullable OWSContact *)contactShare NS_UNAVAILABLE;
- (instancetype)initWithTimestamp:(uint64_t)timestamp inThread:(nullable TSThread *)thread NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end

View file

@ -36,7 +36,7 @@ typedef NS_ENUM(int32_t, TSErrorMessageType) {
quotedMessage:(nullable TSQuotedMessage *)quotedMessage
contactShare:(nullable OWSContact *)contact NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(TSThread *)thread

View file

@ -27,7 +27,7 @@ NSUInteger TSErrorMessageSchemaVersion = 1;
@implementation TSErrorMessage
- (instancetype)initWithCoder:(NSCoder *)coder
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
self = [super initWithCoder:coder];
if (!self) {

View file

@ -88,7 +88,7 @@ typedef NS_ENUM(NSInteger, TSGroupMetaMessage) {
quotedMessage:(nullable TSQuotedMessage *)quotedMessage
contactShare:(nullable OWSContact *)contactShare NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
+ (instancetype)outgoingMessageInThread:(nullable TSThread *)thread
messageBody:(nullable NSString *)body

View file

@ -91,7 +91,7 @@ NSString *NSStringForOutgoingMessageRecipientState(OWSOutgoingMessageRecipientSt
@implementation TSOutgoingMessage
- (instancetype)initWithCoder:(NSCoder *)coder
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
self = [super initWithCoder:coder];

View file

@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
contactShare:(nullable OWSContact *)contactShare NS_UNAVAILABLE;
- (instancetype)initWithTimestamp:(uint64_t)timestamp inThread:(nullable TSThread *)thread NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end

View file

@ -26,6 +26,11 @@ NS_ASSUME_NONNULL_BEGIN
contactShare:nil];
}
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (BOOL)shouldBeSaved
{
return NO;

View file

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "TSRecipient.h"
@ -8,6 +8,14 @@ NS_ASSUME_NONNULL_BEGIN
@implementation TSRecipient
- (void)encodeWithCoder:(nonnull NSCoder *)aCoder {
return;
}
- (nullable instancetype)initWithCoder:(nonnull NSCoder *)aDecoder {
return nil;
}
@end
NS_ASSUME_NONNULL_END