From 2a52b900a1b71d57fc68624a989145f57abefdf1 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 10 Oct 2024 09:48:04 -0700 Subject: [PATCH] [ObjC] Breaking Change: Remove deprecated apis. PiperOrigin-RevId: 684478480 --- objectivec/GPBDescriptor.h | 3 --- objectivec/GPBDescriptor.m | 1 - objectivec/GPBMessage.h | 15 --------------- objectivec/GPBMessage.m | 9 --------- objectivec/GPBWellKnownTypes.h | 11 ----------- objectivec/GPBWellKnownTypes.m | 12 ------------ 6 files changed, 51 deletions(-) diff --git a/objectivec/GPBDescriptor.h b/objectivec/GPBDescriptor.h index c59f2c0715638..957b3af830af1 100644 --- a/objectivec/GPBDescriptor.h +++ b/objectivec/GPBDescriptor.h @@ -114,9 +114,6 @@ __attribute__((objc_subclassing_restricted)) @property(nonatomic, readonly, copy) NSString *package; /** The objc prefix declared in the proto file. */ @property(nonatomic, readonly, copy, nullable) NSString *objcPrefix; -/** The syntax of the proto file, this property will be removed in the future. */ -@property(nonatomic, readonly) GPBFileSyntax syntax - __attribute__((deprecated("Syntax will be removed in the future."))); @end diff --git a/objectivec/GPBDescriptor.m b/objectivec/GPBDescriptor.m index 0085b348b6c02..775083710532e 100644 --- a/objectivec/GPBDescriptor.m +++ b/objectivec/GPBDescriptor.m @@ -319,7 +319,6 @@ @implementation GPBFileDescriptor { @synthesize package = package_; @synthesize objcPrefix = objcPrefix_; -@synthesize syntax = syntax_; - (instancetype)initWithPackage:(NSString *)package objcPrefix:(NSString *)objcPrefix diff --git a/objectivec/GPBMessage.h b/objectivec/GPBMessage.h index 795037e642a74..f206bf360659c 100644 --- a/objectivec/GPBMessage.h +++ b/objectivec/GPBMessage.h @@ -241,21 +241,6 @@ CF_EXTERN_C_END (nullable id)extensionRegistry error:(NSError **)errorPtr; -/** - * Parses the given data as this message's class, and merges those values into - * this message. - * - * @param data The binary representation of the message to merge. - * @param extensionRegistry The extension registry to use to look up extensions. - * - * @exception GPBCodedInputStreamException Exception thrown when parsing was - * unsuccessful. - **/ -- (void)mergeFromData:(NSData *)data - extensionRegistry:(nullable id)extensionRegistry - __attribute__((deprecated( - "Use -mergeFromData:extensionRegistry:error: instead, especaily if calling from Swift."))); - /** * Parses the given data as this message's class, and merges those values into * this message. diff --git a/objectivec/GPBMessage.m b/objectivec/GPBMessage.m index 9cd77f8077d4a..656f35c297962 100644 --- a/objectivec/GPBMessage.m +++ b/objectivec/GPBMessage.m @@ -2227,15 +2227,6 @@ - (void)clearExtension:(GPBExtensionDescriptor *)extension { #pragma mark - mergeFrom -- (void)mergeFromData:(NSData *)data extensionRegistry:(id)extensionRegistry { - GPBCodedInputStream *input = [[GPBCodedInputStream alloc] initWithData:data]; - @try { - [self mergeFromCodedInputStream:input extensionRegistry:extensionRegistry endingTag:0]; - } @finally { - [input release]; - } -} - - (BOOL)mergeFromData:(NSData *)data extensionRegistry:(nullable id)extensionRegistry error:(NSError **)errorPtr { diff --git a/objectivec/GPBWellKnownTypes.h b/objectivec/GPBWellKnownTypes.h index 4cf5bcffd8b0c..64a7fb9b3c65f 100644 --- a/objectivec/GPBWellKnownTypes.h +++ b/objectivec/GPBWellKnownTypes.h @@ -88,17 +88,6 @@ typedef NS_ENUM(NSInteger, GPBWellKnownTypesErrorCode) { **/ - (instancetype)initWithTimeInterval:(NSTimeInterval)timeInterval; -// These next two methods are deprecated because GBPDuration has no need of a -// "base" time. The older methods were about symmetry with GBPTimestamp, but -// the unix epoch usage is too confusing. - -/** Deprecated, use timeInterval instead. */ -@property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970 - __attribute__((deprecated("Use timeInterval"))); -/** Deprecated, use initWithTimeInterval: instead. */ -- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970 - __attribute__((deprecated("Use initWithTimeInterval:"))); - @end #pragma mark - GPBAny diff --git a/objectivec/GPBWellKnownTypes.m b/objectivec/GPBWellKnownTypes.m index f725bca896373..d758702ce3beb 100644 --- a/objectivec/GPBWellKnownTypes.m +++ b/objectivec/GPBWellKnownTypes.m @@ -114,10 +114,6 @@ - (instancetype)initWithTimeInterval:(NSTimeInterval)timeInterval { return self; } -- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970 { - return [self initWithTimeInterval:timeIntervalSince1970]; -} - - (NSTimeInterval)timeInterval { return TimeIntervalFromSecondsAndNanos(self.seconds, self.nanos); } @@ -129,14 +125,6 @@ - (void)setTimeInterval:(NSTimeInterval)timeInterval { self.nanos = nanos; } -- (NSTimeInterval)timeIntervalSince1970 { - return self.timeInterval; -} - -- (void)setTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970 { - self.timeInterval = timeIntervalSince1970; -} - @end #pragma mark - GPBAny