Skip to content

Commit 970b4c4

Browse files
authored
Deprecate, not remove, unused API (#10263)
1 parent 43c62f0 commit 970b4c4

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

FirebaseStorage/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
`open func reference(forURL url: String) -> StorageReference` except it throws instead of
66
erroring. (#6974)
77
- [changed] The `FirebaseStorageInternal` CocoaPod has been discontinued.
8-
- [changed] Remove the `storageReference` property of `StorageMetadata`. It had never been implemented
8+
- [changed] Deprecate the `storageReference` property of `StorageMetadata`. It had never been implemented
99
and always returned `nil`.
1010
- [changed] Storage APIs that previously threw an Objective-C exception now generate a Swift
1111
`fatalError`.

FirebaseStorage/Sources/StorageMetadata.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ import Foundation
100100
*/
101101
@objc public let updated: Date?
102102

103+
/**
104+
* Never used API
105+
*/
106+
@available(*, deprecated) @objc public let storageReference: StorageReference? = nil
107+
103108
/**
104109
* Creates a Dictionary from the contents of the metadata.
105110
* @return A Dictionary that represents the contents of the metadata.

FirebaseStorage/Tests/ObjCIntegration/ObjCAPITests.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ - (void)FIRStorageMetadataApis {
169169
[metadata size];
170170
[metadata timeCreated];
171171
[metadata updated];
172+
#pragma clang diagnostic push
173+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
174+
[metadata storageReference];
175+
#pragma clang diagnostic pop
172176
FIRStorageMetadata __unused *ref2 = [metadata initWithDictionary:@{}];
173177
NSDictionary<NSString *, id> __unused *dict = [metadata dictionaryRepresentation];
174178
[metadata isFile];

0 commit comments

Comments
 (0)