Skip to content

Commit 9b42f17

Browse files
committed
Support build configuration in watch app by adding BuildConfigurationName to the watch app's Info.plist.
1 parent bf5f3ce commit 9b42f17

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

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
@@ -3517,6 +3517,7 @@
35173517
026CAF7F2AC2B7FF002D23BB /* ConfigurableBundleProductView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigurableBundleProductView.swift; sourceTree = "<group>"; };
35183518
026CF638237E9ABE009563D4 /* ProductVariationsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductVariationsViewController.swift; sourceTree = "<group>"; };
35193519
026CF639237E9ABE009563D4 /* ProductVariationsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProductVariationsViewController.xib; sourceTree = "<group>"; };
3520+
026D09D92E131EC3003BF161 /* Woo-Watch-App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "Woo-Watch-App-Info.plist"; sourceTree = SOURCE_ROOT; };
35203521
026D4651295D763B0037F59A /* CountryCode+FlagEmoji.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CountryCode+FlagEmoji.swift"; sourceTree = "<group>"; };
35213522
026D4653295D79230037F59A /* CountryCode+FlagEmojiTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CountryCode+FlagEmojiTests.swift"; sourceTree = "<group>"; };
35223523
026D4A23280461960090164F /* CollectOrderPaymentUseCaseTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectOrderPaymentUseCaseTests.swift; sourceTree = "<group>"; };
@@ -8817,6 +8818,7 @@
88178818
26F81B162BE433A2009EC58E /* Woo Watch App */ = {
88188819
isa = PBXGroup;
88198820
children = (
8821+
026D09D92E131EC3003BF161 /* Woo-Watch-App-Info.plist */,
88208822
26B984D22BEECC460052658C /* Dependencies */,
88218823
26CFDED82C02930C005ABC31 /* App */,
88228824
26B984D52BEECF260052658C /* ConnectView.swift */,
@@ -18001,6 +18003,7 @@
1800118003
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1800218004
GCC_C_LANGUAGE_STANDARD = gnu17;
1800318005
GENERATE_INFOPLIST_FILE = YES;
18006+
INFOPLIST_FILE = "Woo-Watch-App-Info.plist";
1800418007
INFOPLIST_KEY_CFBundleDisplayName = Woo;
1800518008
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
1800618009
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = com.automattic.woocommerce;
@@ -18042,6 +18045,7 @@
1804218045
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1804318046
GCC_C_LANGUAGE_STANDARD = gnu17;
1804418047
GENERATE_INFOPLIST_FILE = YES;
18048+
INFOPLIST_FILE = "Woo-Watch-App-Info.plist";
1804518049
INFOPLIST_KEY_CFBundleDisplayName = Woo;
1804618050
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
1804718051
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = com.automattic.woocommerce;
@@ -18081,6 +18085,7 @@
1808118085
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1808218086
GCC_C_LANGUAGE_STANDARD = gnu17;
1808318087
GENERATE_INFOPLIST_FILE = YES;
18088+
INFOPLIST_FILE = "Woo-Watch-App-Info.plist";
1808418089
INFOPLIST_KEY_CFBundleDisplayName = Woo;
1808518090
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
1808618091
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = com.automattic.alpha.woocommerce;

0 commit comments

Comments
 (0)