Skip to content

Commit 99b4dfb

Browse files
committed
Fix static assets app icon linking
1 parent 182979c commit 99b4dfb

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Configs/App.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#include "Secrets.xcconfig"
22
MARKETING_VERSION = 0.8.0
33
CURRENT_PROJECT_VERSION = 817
4-
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon-Stable
4+
RELEASE_CHANNEL = Stable

Fastlane/Fastfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,15 @@ platform :ios do
3939
desc "Uploads to TestFlight"
4040
lane :upload do |options|
4141
print_lane_options("Uploads to Testflight", {
42-
scheme: { desctiption: "Scheme: beta or stable", default: "beta" }
42+
release: { desctiption: "Release channel: beta or stable", default: "beta" }
4343
})
4444

45-
scheme = options[:scheme] || "beta"
46-
appIconName = "AppIcon-#{scheme.capitalize}"
45+
release_channel = (options[:release] || "beta").capitalize
4746

4847
update_xcconfig_value(
4948
path: 'Configs/App.xcconfig',
50-
name: 'ASSETCATALOG_COMPILER_APPICON_NAME',
51-
value: appIconName
49+
name: 'RELEASE_CHANNEL',
50+
value: release_channel
5251
)
5352

5453
prepare_certificates
@@ -68,15 +67,15 @@ platform :ios do
6867
lane :upload_oneoff do |options|
6968
print_lane_options("One-off upload to TF without tests/notify/bump", {
7069
build_number: { description: "Sets specific build number" },
71-
scheme: { desctiption: "Scheme: beta or stable.", default: "beta" }
70+
release: { desctiption: "Release channel: beta or stable", default: "beta" }
7271
})
7372

74-
scheme = options[:scheme] || "beta"
73+
release_channel = (options[:release] || "beta").capitalize
7574

7675
update_xcconfig_value(
7776
path: 'Configs/App.xcconfig',
78-
name: 'ASSETCATALOG_COMPILER_APPICON_NAME',
79-
value: 'AppIcon-#{scheme.capitalize}'
77+
name: 'RELEASE_CHANNEL',
78+
value: release_channel
8079
)
8180

8281
prepare_certificates

Project.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ extension ProjectDescription.Target {
649649
dependencies: dependencies,
650650
settings: .settings(
651651
base: .targetSettings,
652-
defaultSettings: .recommended(excluding: ["ASSETCATALOG_COMPILER_APPICON_NAME"])
652+
defaultSettings: .recommended
653653
)
654654
)
655655
}
@@ -727,7 +727,7 @@ extension Dictionary where Key == String, Value == SettingValue {
727727
}
728728

729729
func includeAppIcon() -> SettingsDictionary {
730-
return merging(["ASSETCATALOG_COMPILER_APPICON_NAME": .string("$(ASSETCATALOG_COMPILER_APPICON_NAME)")])
730+
return merging(["ASSETCATALOG_COMPILER_APPICON_NAME": .string("AppIcon-$(RELEASE_CHANNEL)")])
731731
}
732732

733733
func excludeAppIcon() -> SettingsDictionary {

0 commit comments

Comments
 (0)