Skip to content

Commit

Permalink
Added tinted and dark AppIcon (#385)
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Hagemann <[email protected]>
  • Loading branch information
iammajid and tobihagemann authored Oct 16, 2024
1 parent 1105070 commit 4cec926
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 9 deletions.
26 changes: 25 additions & 1 deletion SharedResources/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
{
"images" : [
{
"filename" : "Icon.png",
"filename" : "LightIcon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "DarkIcon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "tinted"
}
],
"filename" : "TintedIcon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion fastlane/.env.freemium
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
APP_GROUP=group.org.cryptomator.ios
APP_ICON_FILE_PATH=config/freemium/Icon.png
APP_ICON_DARK_FILE_PATH=config/freemium/DarkIcon.png
APP_ICON_LIGHT_FILE_PATH=config/freemium/LightIcon.png
APP_ICON_TINTED_FILE_PATH=config/freemium/TintedIcon.png
BUNDLE_IDENTIFIER=org.cryptomator.ios
CONFIG_NAME=freemium
DISPLAY_NAME=Cryptomator
Expand Down
4 changes: 3 additions & 1 deletion fastlane/.env.premium
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
APP_GROUP=group.org.cryptomator.ios.premium
APP_ICON_FILE_PATH=config/premium/Icon.png
APP_ICON_DARK_FILE_PATH=config/premium/DarkIcon.png
APP_ICON_LIGHT_FILE_PATH=config/premium/LightIcon.png
APP_ICON_TINTED_FILE_PATH=config/premium/TintedIcon.png
BUNDLE_IDENTIFIER=org.cryptomator.ios.premium
CONFIG_NAME=premium
DISPLAY_NAME=Cryptomator
Expand Down
12 changes: 7 additions & 5 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ platform :ios do
desc "Requires --env to be set to 'freemium' or 'premium'"
lane :beta do
ensure_env_vars(
env_vars: ['APP_GROUP', 'APP_ICON_FILE_PATH', 'BUNDLE_IDENTIFIER', 'DISPLAY_NAME', 'ENCRYPTION_EXPORT_COMPLIANCE_CODE', 'KEYCHAIN_GROUP', 'METADATA_PATH']
env_vars: ['APP_GROUP', 'APP_ICON_DARK_FILE_PATH', 'APP_ICON_LIGHT_FILE_PATH', 'APP_ICON_TINTED_FILE_PATH', 'BUNDLE_IDENTIFIER', 'DISPLAY_NAME', 'ENCRYPTION_EXPORT_COMPLIANCE_CODE', 'KEYCHAIN_GROUP', 'METADATA_PATH']
)
apply_config
scan
Expand Down Expand Up @@ -77,7 +77,7 @@ platform :ios do
private_lane :_app_store do |options|
Dotenv.overload(options[:env_file])
ensure_env_vars(
env_vars: ['APP_GROUP', 'APP_ICON_FILE_PATH', 'BUNDLE_IDENTIFIER', 'DISPLAY_NAME', 'ENCRYPTION_EXPORT_COMPLIANCE_CODE', 'KEYCHAIN_GROUP', 'METADATA_PATH']
env_vars: ['APP_GROUP', 'APP_ICON_DARK_FILE_PATH', 'APP_ICON_LIGHT_FILE_PATH', 'APP_ICON_TINTED_FILE_PATH', 'BUNDLE_IDENTIFIER', 'DISPLAY_NAME', 'ENCRYPTION_EXPORT_COMPLIANCE_CODE', 'KEYCHAIN_GROUP', 'METADATA_PATH']
)
apply_config
scan
Expand All @@ -89,14 +89,16 @@ platform :ios do
desc "Requires --env to be set to 'freemium' or 'premium'"
lane :apply_config do
ensure_env_vars(
env_vars: ['APP_GROUP', 'APP_ICON_FILE_PATH', 'BUNDLE_IDENTIFIER', 'CONFIG_NAME', 'DISPLAY_NAME', 'KEYCHAIN_GROUP']
env_vars: ['APP_GROUP', 'APP_ICON_DARK_FILE_PATH', 'APP_ICON_LIGHT_FILE_PATH', 'APP_ICON_TINTED_FILE_PATH', 'BUNDLE_IDENTIFIER', 'CONFIG_NAME', 'DISPLAY_NAME', 'KEYCHAIN_GROUP']
)
config_name = ENV['CONFIG_NAME']
bundle_identifier = ENV['BUNDLE_IDENTIFIER']
display_name = ENV['DISPLAY_NAME']
app_group = ENV['APP_GROUP']
keychain_group = ENV['KEYCHAIN_GROUP']
app_icon_file_path = ENV['APP_ICON_FILE_PATH']
app_icon_light_file_path = ENV['APP_ICON_LIGHT_FILE_PATH']
app_icon_dark_file_path = ENV['APP_ICON_DARK_FILE_PATH']
app_icon_tinted_file_path = ENV['APP_ICON_TINTED_FILE_PATH']
encryption_export_compliance_code = ENV['ENCRYPTION_EXPORT_COMPLIANCE_CODE']

# Update the app identifier
Expand Down Expand Up @@ -265,7 +267,7 @@ platform :ios do
sh("./scripts/create-app-constants.sh #{bundle_identifier}")

# Update the app icon
sh("./scripts/create-app-icon.sh #{app_icon_file_path}")
sh("./scripts/create-app-icon.sh #{app_icon_light_file_path} #{app_icon_dark_file_path} #{app_icon_tinted_file_path}")

# Update the cloud access secrets file
sh("./scripts/create-cloud-access-secrets.sh #{config_name}")
Expand Down
Binary file added fastlane/config/freemium/DarkIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added fastlane/config/freemium/TintedIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fastlane/config/premium/DarkIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed fastlane/config/premium/Icon.png
Binary file not shown.
Binary file added fastlane/config/premium/LightIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fastlane/config/premium/TintedIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion fastlane/scripts/create-app-icon.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh

# Path is relative to the fastlane folder
cp "${1}" ../SharedResources/Assets.xcassets/AppIcon.appiconset/Icon.png
cp "${1}" ../SharedResources/Assets.xcassets/AppIcon.appiconset/LightIcon.png
cp "${2}" ../SharedResources/Assets.xcassets/AppIcon.appiconset/DarkIcon.png
cp "${3}" ../SharedResources/Assets.xcassets/AppIcon.appiconset/TintedIcon.png

0 comments on commit 4cec926

Please sign in to comment.