Make InfoDictionaryProviding protocol less likely to produce conflicts

Summary: The NSBundle basis for this protocol creates a risk of conflict if we make any of the referenced symbols more abstract

Reviewed By: joesus

Differential Revision: D37358716

fbshipit-source-id: 2ca5885075e89bddbab664a1e6b785772577f6cd
This commit is contained in:
Sam Odom
2022-06-23 13:40:22 -07:00
committed by Facebook GitHub Bot
parent 5eb5ba7116
commit bb29366ee2
14 changed files with 126 additions and 46 deletions

View File

@@ -17,7 +17,8 @@ public final class TestBundle: NSObject, InfoDictionaryProviding {
public var capturedKeys = [String]()
public var didAccessInfoDictionary = false
public var infoDictionary: [String: Any]? {
// swiftlint:disable:next identifier_name
public var fb_infoDictionary: [String: Any]? {
get {
didAccessInfoDictionary = true
return stubbedInfoDictionary
@@ -35,12 +36,13 @@ public final class TestBundle: NSObject, InfoDictionaryProviding {
stubbedInfoDictionary = infoDictionary
}
public var bundleIdentifier: String?
// swiftlint:disable:next identifier_name
public var fb_bundleIdentifier: String?
public func object(forInfoDictionaryKey key: String) -> Any? {
public func fb_object(forInfoDictionaryKey key: String) -> Any? {
lastCapturedKey = key
capturedKeys.append(key)
return infoDictionary?[key] as Any?
return fb_infoDictionary?[key] as Any?
}
public func reset() {