mirror of
https://github.com/zhigang1992/facebook-ios-sdk.git
synced 2026-01-12 17:22:28 +08:00
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:
committed by
Facebook GitHub Bot
parent
5eb5ba7116
commit
bb29366ee2
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user