Skip to content

Commit eb175d7

Browse files
authored
Fix other alpha build configuration use cases (#15845)
2 parents 9726009 + 9b42f17 commit eb175d7

File tree

8 files changed

+24
-12
lines changed

8 files changed

+24
-12
lines changed

Modules/Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ let package = Package(
109109
.target(
110110
name: "Experiments",
111111
dependencies: [
112+
"WooFoundationCore",
112113
.product(name: "AutomatticTracks", package: "Automattic-Tracks-iOS"),
113114
]
114115
),

Modules/Sources/Experiments/DefaultFeatureFlagService.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import enum WooFoundationCore.BuildConfiguration
2+
13
public struct DefaultFeatureFlagService: FeatureFlagService {
24
public init() {}
35

Modules/Sources/Yosemite/Stores/JustInTimeMessageStore.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,12 @@ private extension JustInTimeMessageStore {
9595
}
9696

9797
func buildType() -> String? {
98-
#if DEBUG || ALPHA
99-
return "developer"
100-
#else
101-
return nil
102-
#endif
98+
switch BuildConfiguration.current {
99+
case .localDeveloper, .alpha:
100+
return "developer"
101+
case .appStore:
102+
return nil
103+
}
103104
}
104105

105106
func localeLanguageRegionIdentifier() -> String? {

WooCommerce/Classes/ViewRelated/MainTabBarController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import UIKit
33
import Yosemite
44
import WordPressUI
55
import Experiments
6+
import enum WooFoundationCore.BuildConfiguration
67
import protocol WooFoundation.Analytics
78

89

WooCommerce/Woo Watch App/App/Crash/WatchCrashLoggingStack.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,7 @@ class WatchCrashLoggingDataProvider: CrashLoggingDataProvider {
7474
var userHasOptedOut: Bool = false
7575

7676
var buildType: String {
77-
#if DEBUG
78-
"localDeveloper"
79-
#elseif ALPHA
80-
"alpha"
81-
#else
82-
"appStore"
83-
#endif
77+
BuildConfiguration.current.rawValue
8478
}
8579

8680
var currentUser: TracksUser?
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>BuildConfigurationName</key>
6+
<string>$(CONFIGURATION)</string>
7+
</dict>
8+
</plist>

WooCommerce/WooCommerce.xcodeproj/project.pbxproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3524,6 +3524,7 @@
35243524
026CAF7F2AC2B7FF002D23BB /* ConfigurableBundleProductView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigurableBundleProductView.swift; sourceTree = "<group>"; };
35253525
026CF638237E9ABE009563D4 /* ProductVariationsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductVariationsViewController.swift; sourceTree = "<group>"; };
35263526
026CF639237E9ABE009563D4 /* ProductVariationsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProductVariationsViewController.xib; sourceTree = "<group>"; };
3527+
026D09D92E131EC3003BF161 /* Woo-Watch-App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "Woo-Watch-App-Info.plist"; sourceTree = SOURCE_ROOT; };
35273528
026D4651295D763B0037F59A /* CountryCode+FlagEmoji.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CountryCode+FlagEmoji.swift"; sourceTree = "<group>"; };
35283529
026D4653295D79230037F59A /* CountryCode+FlagEmojiTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CountryCode+FlagEmojiTests.swift"; sourceTree = "<group>"; };
35293530
026D4A23280461960090164F /* CollectOrderPaymentUseCaseTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectOrderPaymentUseCaseTests.swift; sourceTree = "<group>"; };
@@ -8833,6 +8834,7 @@
88338834
26F81B162BE433A2009EC58E /* Woo Watch App */ = {
88348835
isa = PBXGroup;
88358836
children = (
8837+
026D09D92E131EC3003BF161 /* Woo-Watch-App-Info.plist */,
88368838
26B984D22BEECC460052658C /* Dependencies */,
88378839
26CFDED82C02930C005ABC31 /* App */,
88388840
26B984D52BEECF260052658C /* ConnectView.swift */,
@@ -18025,6 +18027,7 @@
1802518027
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1802618028
GCC_C_LANGUAGE_STANDARD = gnu17;
1802718029
GENERATE_INFOPLIST_FILE = YES;
18030+
INFOPLIST_FILE = "Woo-Watch-App-Info.plist";
1802818031
INFOPLIST_KEY_CFBundleDisplayName = Woo;
1802918032
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
1803018033
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = com.automattic.woocommerce;
@@ -18066,6 +18069,7 @@
1806618069
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1806718070
GCC_C_LANGUAGE_STANDARD = gnu17;
1806818071
GENERATE_INFOPLIST_FILE = YES;
18072+
INFOPLIST_FILE = "Woo-Watch-App-Info.plist";
1806918073
INFOPLIST_KEY_CFBundleDisplayName = Woo;
1807018074
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
1807118075
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = com.automattic.woocommerce;
@@ -18105,6 +18109,7 @@
1810518109
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1810618110
GCC_C_LANGUAGE_STANDARD = gnu17;
1810718111
GENERATE_INFOPLIST_FILE = YES;
18112+
INFOPLIST_FILE = "Woo-Watch-App-Info.plist";
1810818113
INFOPLIST_KEY_CFBundleDisplayName = Woo;
1810918114
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
1811018115
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = com.automattic.alpha.woocommerce;

0 commit comments

Comments
 (0)