Skip to content

Commit 43b6dd6

Browse files
authored
Merge pull request #1786 from firebase/nc/abtesting-rename
chore(abtesting): Rename iOS ABTesting scheme for easier infra
2 parents 4b3ec2f + 4623486 commit 43b6dd6

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

abtesting/ABTestingExample.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@
266266
/* End PBXGroup section */
267267

268268
/* Begin PBXNativeTarget section */
269-
4125B7C6268E2E7C00232B67 /* ABTestingExample (iOS) */ = {
269+
4125B7C6268E2E7C00232B67 /* ABTestingExample */ = {
270270
isa = PBXNativeTarget;
271-
buildConfigurationList = 4125B7EA268E2E7C00232B67 /* Build configuration list for PBXNativeTarget "ABTestingExample (iOS)" */;
271+
buildConfigurationList = 4125B7EA268E2E7C00232B67 /* Build configuration list for PBXNativeTarget "ABTestingExample" */;
272272
buildPhases = (
273273
4125B7C3268E2E7C00232B67 /* Sources */,
274274
4125B7C4268E2E7C00232B67 /* Frameworks */,
@@ -278,7 +278,7 @@
278278
);
279279
dependencies = (
280280
);
281-
name = "ABTestingExample (iOS)";
281+
name = ABTestingExample;
282282
packageProductDependencies = (
283283
4125B7F9268E319D00232B67 /* FirebaseInstallations */,
284284
4125B7FB268E319D00232B67 /* FirebaseRemoteConfig */,
@@ -544,7 +544,7 @@
544544
projectDirPath = "";
545545
projectRoot = "";
546546
targets = (
547-
4125B7C6268E2E7C00232B67 /* ABTestingExample (iOS) */,
547+
4125B7C6268E2E7C00232B67 /* ABTestingExample */,
548548
4125B7D1268E2E7C00232B67 /* Tests (iOS) */,
549549
4174272226D89C7E00966D7D /* ABTestingExample (tvOS) */,
550550
4174273926D89E1B00966D7D /* Tests (tvOS) */,
@@ -740,7 +740,7 @@
740740
/* Begin PBXTargetDependency section */
741741
4125B7D4268E2E7C00232B67 /* PBXTargetDependency */ = {
742742
isa = PBXTargetDependency;
743-
target = 4125B7C6268E2E7C00232B67 /* ABTestingExample (iOS) */;
743+
target = 4125B7C6268E2E7C00232B67 /* ABTestingExample */;
744744
targetProxy = 4125B7D3268E2E7C00232B67 /* PBXContainerItemProxy */;
745745
};
746746
41394CE826DF75D200C54DAE /* PBXTargetDependency */ = {
@@ -1423,7 +1423,7 @@
14231423
defaultConfigurationIsVisible = 0;
14241424
defaultConfigurationName = Release;
14251425
};
1426-
4125B7EA268E2E7C00232B67 /* Build configuration list for PBXNativeTarget "ABTestingExample (iOS)" */ = {
1426+
4125B7EA268E2E7C00232B67 /* Build configuration list for PBXNativeTarget "ABTestingExample" */ = {
14271427
isa = XCConfigurationList;
14281428
buildConfigurations = (
14291429
4125B7EB268E2E7C00232B67 /* Debug */,

abtesting/ABTestingExample.xcodeproj/xcshareddata/xcschemes/ABTestingExample (watchOS).xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
BuildableIdentifier = "primary"
3131
BlueprintIdentifier = "4125B7C6268E2E7C00232B67"
3232
BuildableName = "ABTestingExample.app"
33-
BlueprintName = "ABTestingExample (iOS)"
33+
BlueprintName = "ABTestingExample"
3434
ReferencedContainer = "container:ABTestingExample.xcodeproj">
3535
</BuildableReference>
3636
</BuildActionEntry>

abtesting/ABTestingExample.xcodeproj/xcshareddata/xcschemes/ABTestingExample (iOS).xcscheme renamed to abtesting/ABTestingExample.xcodeproj/xcshareddata/xcschemes/ABTestingExample.xcscheme

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
BuildableIdentifier = "primary"
1717
BlueprintIdentifier = "4125B7C6268E2E7C00232B67"
1818
BuildableName = "ABTestingExample.app"
19-
BlueprintName = "ABTestingExample (iOS)"
19+
BlueprintName = "ABTestingExample"
2020
ReferencedContainer = "container:ABTestingExample.xcodeproj">
2121
</BuildableReference>
2222
</BuildActionEntry>
@@ -61,7 +61,7 @@
6161
BuildableIdentifier = "primary"
6262
BlueprintIdentifier = "4125B7C6268E2E7C00232B67"
6363
BuildableName = "ABTestingExample.app"
64-
BlueprintName = "ABTestingExample (iOS)"
64+
BlueprintName = "ABTestingExample"
6565
ReferencedContainer = "container:ABTestingExample.xcodeproj">
6666
</BuildableReference>
6767
</BuildableProductRunnable>
@@ -78,7 +78,7 @@
7878
BuildableIdentifier = "primary"
7979
BlueprintIdentifier = "4125B7C6268E2E7C00232B67"
8080
BuildableName = "ABTestingExample.app"
81-
BlueprintName = "ABTestingExample (iOS)"
81+
BlueprintName = "ABTestingExample"
8282
ReferencedContainer = "container:ABTestingExample.xcodeproj">
8383
</BuildableReference>
8484
</BuildableProductRunnable>

abtesting/Shared/AppConfig.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AppConfig: ObservableObject {
2222
@Published var colorScheme: ColorScheme
2323

2424
init() {
25-
let value = RemoteConfig.remoteConfig()["color_scheme"].stringValue
25+
let value = RemoteConfig.remoteConfig()["color_scheme"].stringValue ?? "light"
2626
colorScheme = ColorScheme(value)
2727
#if !targetEnvironment(macCatalyst) && DEBUG
2828
NotificationCenter.default.addObserver(self,
@@ -38,13 +38,13 @@ class AppConfig: ObservableObject {
3838

3939
func updateFromRemoteConfig() {
4040
let remoteConfig = RemoteConfig.remoteConfig()
41-
let oldValue = remoteConfig["color_scheme"].stringValue
41+
let oldValue = remoteConfig["color_scheme"].stringValue ?? "light"
4242
remoteConfig.fetchAndActivate { status, error in
4343
print("Fetch-and-activate completed with status: \(status.debugDescription)")
4444
if let error = error {
4545
print("Error fetching and activating config: \(error)")
4646
} else {
47-
let newValue = remoteConfig["color_scheme"].stringValue
47+
let newValue = remoteConfig["color_scheme"].stringValue ?? "light"
4848
if newValue != oldValue {
4949
print("Remote Config changed to: \(newValue)")
5050
DispatchQueue.main.async { self.colorScheme = ColorScheme(newValue) }
@@ -59,11 +59,11 @@ class AppConfig: ObservableObject {
5959
@available(iOS 15, tvOS 15, macOS 12, watchOS 8, *)
6060
func updateFromRemoteConfigAsync() async {
6161
let remoteConfig = RemoteConfig.remoteConfig()
62-
let oldValue = remoteConfig["color_scheme"].stringValue
62+
let oldValue = remoteConfig["color_scheme"].stringValue ?? "light"
6363
do {
6464
let status = try await remoteConfig.fetchAndActivate()
6565
print("Fetch-and-activate completed with status: \(status.debugDescription)")
66-
let newValue = remoteConfig["color_scheme"].stringValue
66+
let newValue = remoteConfig["color_scheme"].stringValue ?? "light"
6767
if newValue != oldValue {
6868
print("Remote Config changed to: \(newValue)")
6969
Task.detached { @MainActor in self.colorScheme = ColorScheme(newValue) }

0 commit comments

Comments
 (0)