Skip to content

Commit 54267c8

Browse files
authored
Merge 61265ab into 0f07947
2 parents 0f07947 + 61265ab commit 54267c8

30 files changed

+1218
-1341
lines changed

FirebaseRemoteConfig.podspec

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,13 @@ app update.
105105
}
106106
swift_api.source_files = ['FirebaseRemoteConfig/Tests/Swift/SwiftAPI/*.swift',
107107
'FirebaseRemoteConfig/Tests/Swift/FakeUtils/*.swift',
108-
'FirebaseRemoteConfig/Tests/Swift/ObjC/*.[hm]',
109108
]
110109
# Excludes tests that cannot be include in API tests because it requires fetch remote values from
111110
# a real console but only one test can be run without polluting other tests' remote values.
112111
swift_api.exclude_files = ['FirebaseRemoteConfig/Tests/Swift/SwiftAPI/PropertyWrapperTests.swift']
113112
swift_api.resources = 'FirebaseRemoteConfig/Tests/Swift/Defaults-testInfo.plist'
114113
swift_api.requires_app_host = true
115114
swift_api.pod_target_xcconfig = {
116-
'SWIFT_OBJC_BRIDGING_HEADER' => '$(PODS_TARGET_SRCROOT)/FirebaseRemoteConfig/Tests/Swift/ObjC/Bridging-Header.h',
117115
'OTHER_SWIFT_FLAGS' => "$(inherited) #{ENV.key?('USE_REAL_CONSOLE') ? '-D USE_REAL_CONSOLE' : ''}",
118116
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"'
119117
}
@@ -131,12 +129,10 @@ app update.
131129
fake_console.source_files = ['FirebaseRemoteConfig/Tests/Swift/SwiftAPI/*.swift',
132130
'FirebaseRemoteConfig/Tests/Swift/FakeUtils/*.swift',
133131
'FirebaseRemoteConfig/Tests/Swift/FakeConsole/*.swift',
134-
'FirebaseRemoteConfig/Tests/Swift/ObjC/*.[hm]',
135132
]
136133
fake_console.resources = 'FirebaseRemoteConfig/Tests/Swift/Defaults-testInfo.plist'
137134
fake_console.requires_app_host = true
138135
fake_console.pod_target_xcconfig = {
139-
'SWIFT_OBJC_BRIDGING_HEADER' => '$(PODS_TARGET_SRCROOT)/FirebaseRemoteConfig/Tests/Swift/ObjC/Bridging-Header.h',
140136
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"'
141137
}
142138
fake_console.dependency 'OCMock'

FirebaseRemoteConfig/Sources/FIRRemoteConfig.m

Lines changed: 3 additions & 700 deletions
Large diffs are not rendered by default.

FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h

Lines changed: 0 additions & 49 deletions
This file was deleted.

FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FIRRemoteConfig.h

Lines changed: 2 additions & 317 deletions
Large diffs are not rendered by default.

FirebaseRemoteConfig/Sources/RCNConfigConstants.h

Lines changed: 0 additions & 72 deletions
This file was deleted.

FirebaseRemoteConfig/Sources/RCNConfigDefines.h

Lines changed: 0 additions & 37 deletions
This file was deleted.

FirebaseRemoteConfig/Sources/RCNConstants3P.m

Lines changed: 0 additions & 21 deletions
This file was deleted.

FirebaseRemoteConfig/SwiftNew/ConfigConstants.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ enum ConfigConstants {
2323

2424
static let remoteConfigQueueLabel = "com.google.GoogleConfigService.FIRRemoteConfig"
2525

26+
/// Remote Config Error Domain.
27+
static let remoteConfigErrorDomain = "com.google.remoteconfig.ErrorDomain"
28+
// Remote Config Realtime Error Domain
29+
static let remoteConfigUpdateErrorDomain = "com.google.remoteconfig.update.ErrorDomain"
30+
2631
// MARK: - Fetch Response Keys
2732

2833
static let fetchResponseKeyEntries = "entries"

FirebaseRemoteConfig/SwiftNew/ConfigExperiment.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import Foundation
3434
private let experimentStartTimeDateFormatter: DateFormatter
3535

3636
/// Designated initializer;
37-
@objc public init(DBManager: ConfigDBManager,
37+
@objc public init(dbManager: ConfigDBManager,
3838
experimentController controller: ExperimentController?) {
3939
experimentPayloads = []
4040
experimentMetadata = [:]
@@ -48,7 +48,7 @@ import Foundation
4848
dateFormatter.timeZone = TimeZone(abbreviation: "UTC")
4949
return dateFormatter
5050
}()
51-
dbManager = DBManager
51+
self.dbManager = dbManager
5252
experimentController = controller
5353
super.init()
5454
loadExperimentFromTable()

FirebaseRemoteConfig/SwiftNew/ConfigFetch.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ extension URLSession: RCNConfigFetchSession {
8383
@objc(RCNConfigFetch) public class ConfigFetch: NSObject {
8484
private let content: ConfigContent
8585

86-
private let settings: ConfigSettings
86+
let settings: ConfigSettings
8787

8888
private let analytics: (any FIRAnalyticsInterop)?
8989

@@ -241,11 +241,11 @@ extension URLSession: RCNConfigFetchSession {
241241
if strongSelf.settings.shouldThrottle() && !hasDeviceContextChanged {
242242
// Must set lastFetchStatus before FailReason.
243243
strongSelf.settings.lastFetchStatus = .throttled
244-
strongSelf.settings.lastFetchError = .throttled
244+
strongSelf.settings.lastFetchError = RemoteConfigError.throttled
245245
let throttledEndTime = strongSelf.settings.exponentialBackoffThrottleEndTime
246246

247247
let error = NSError(
248-
domain: RemoteConfigErrorDomain,
248+
domain: ConfigConstants.remoteConfigErrorDomain,
249249
code: RemoteConfigError.throttled.rawValue,
250250
userInfo: [throttledEndTimeInSecondsKey: throttledEndTime]
251251
)
@@ -291,11 +291,11 @@ extension URLSession: RCNConfigFetchSession {
291291
if strongSelf.settings.shouldThrottle() && !hasDeviceContextChanged {
292292
// Must set lastFetchStatus before FailReason.
293293
strongSelf.settings.lastFetchStatus = .throttled
294-
strongSelf.settings.lastFetchError = .throttled
294+
strongSelf.settings.lastFetchError = RemoteConfigError.throttled
295295
let throttledEndTime = strongSelf.settings.exponentialBackoffThrottleEndTime
296296

297297
let error = NSError(
298-
domain: RemoteConfigErrorDomain,
298+
domain: ConfigConstants.remoteConfigErrorDomain,
299299
code: RemoteConfigError.throttled.rawValue,
300300
userInfo: [throttledEndTimeInSecondsKey: throttledEndTime]
301301
)
@@ -339,7 +339,7 @@ extension URLSession: RCNConfigFetchSession {
339339
on: completionHandler,
340340
status: .failure,
341341
error: NSError(
342-
domain: RemoteConfigErrorDomain,
342+
domain: ConfigConstants.remoteConfigErrorDomain,
343343
code: RemoteConfigError.internalError.rawValue,
344344
userInfo: [NSLocalizedDescriptionKey: errorDescription]
345345
)
@@ -366,7 +366,7 @@ extension URLSession: RCNConfigFetchSession {
366366
on: completionHandler,
367367
status: .failure,
368368
error: NSError(
369-
domain: RemoteConfigErrorDomain,
369+
domain: ConfigConstants.remoteConfigErrorDomain,
370370
code: RemoteConfigError.internalError.rawValue,
371371
userInfo: userInfo
372372
)
@@ -400,7 +400,7 @@ extension URLSession: RCNConfigFetchSession {
400400
on: completionHandler,
401401
status: .failure,
402402
error: NSError(
403-
domain: RemoteConfigErrorDomain,
403+
domain: ConfigConstants.remoteConfigErrorDomain,
404404
code: RemoteConfigError.internalError.rawValue,
405405
userInfo: userInfo
406406
)
@@ -502,7 +502,7 @@ extension URLSession: RCNConfigFetchSession {
502502
let errorString = "Failed to compress the config request."
503503
RCLog.warning("I-RCN000033", errorString)
504504
let error = NSError(
505-
domain: RemoteConfigErrorDomain,
505+
domain: ConfigConstants.remoteConfigErrorDomain,
506506
code: RemoteConfigError.internalError.rawValue,
507507
userInfo: [NSLocalizedDescriptionKey: errorString]
508508
)
@@ -566,11 +566,11 @@ extension URLSession: RCNConfigFetchSession {
566566
if strongSelf.settings.shouldThrottle() {
567567
// Must set lastFetchStatus before FailReason.
568568
strongSelf.settings.lastFetchStatus = .throttled
569-
strongSelf.settings.lastFetchError = .throttled
569+
strongSelf.settings.lastFetchError = RemoteConfigError.throttled
570570
let throttledEndTime = strongSelf.settings.exponentialBackoffThrottleEndTime
571571

572572
let error = NSError(
573-
domain: RemoteConfigErrorDomain,
573+
domain: ConfigConstants.remoteConfigErrorDomain,
574574
code: RemoteConfigError.throttled.rawValue,
575575
userInfo: [throttledEndTimeInSecondsKey: throttledEndTime]
576576
)
@@ -600,7 +600,7 @@ extension URLSession: RCNConfigFetchSession {
600600
status: .failure,
601601
update: nil,
602602
error: NSError(
603-
domain: RemoteConfigErrorDomain,
603+
domain: ConfigConstants.remoteConfigErrorDomain,
604604
code: RemoteConfigError.internalError.rawValue,
605605
userInfo: userInfo
606606
),
@@ -651,7 +651,7 @@ extension URLSession: RCNConfigFetchSession {
651651
}
652652
RCLog.error("I-RCN000044", errStr + ".")
653653
let error = NSError(
654-
domain: RemoteConfigErrorDomain,
654+
domain: ConfigConstants.remoteConfigErrorDomain,
655655
code: RemoteConfigError.internalError.rawValue,
656656
userInfo: [NSLocalizedDescriptionKey: errStr]
657657
)

0 commit comments

Comments
 (0)