diff --git a/SharedResources/Assets.xcassets/AppIcon.appiconset/Contents.json b/SharedResources/Assets.xcassets/AppIcon.appiconset/Contents.json index b3f44eb29..b2630b9a9 100644 --- a/SharedResources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/SharedResources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -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" diff --git a/SharedResources/Assets.xcassets/AppIcon.appiconset/DarkIcon.png b/SharedResources/Assets.xcassets/AppIcon.appiconset/DarkIcon.png new file mode 100644 index 000000000..2dc3b69ba Binary files /dev/null and b/SharedResources/Assets.xcassets/AppIcon.appiconset/DarkIcon.png differ diff --git a/SharedResources/Assets.xcassets/AppIcon.appiconset/Icon.png b/SharedResources/Assets.xcassets/AppIcon.appiconset/LightIcon.png similarity index 100% rename from SharedResources/Assets.xcassets/AppIcon.appiconset/Icon.png rename to SharedResources/Assets.xcassets/AppIcon.appiconset/LightIcon.png diff --git a/SharedResources/Assets.xcassets/AppIcon.appiconset/TintedIcon.png b/SharedResources/Assets.xcassets/AppIcon.appiconset/TintedIcon.png new file mode 100644 index 000000000..8ab243204 Binary files /dev/null and b/SharedResources/Assets.xcassets/AppIcon.appiconset/TintedIcon.png differ diff --git a/fastlane/.env.freemium b/fastlane/.env.freemium index 0cabe60da..a93f4e649 100644 --- a/fastlane/.env.freemium +++ b/fastlane/.env.freemium @@ -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 diff --git a/fastlane/.env.premium b/fastlane/.env.premium index 1159f8eff..170e4de01 100644 --- a/fastlane/.env.premium +++ b/fastlane/.env.premium @@ -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 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0fc8c2dd9..df015d3f5 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -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 @@ -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 @@ -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 @@ -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}") diff --git a/fastlane/config/freemium/DarkIcon.png b/fastlane/config/freemium/DarkIcon.png new file mode 100644 index 000000000..2dc3b69ba Binary files /dev/null and b/fastlane/config/freemium/DarkIcon.png differ diff --git a/fastlane/config/freemium/Icon.png b/fastlane/config/freemium/LightIcon.png similarity index 100% rename from fastlane/config/freemium/Icon.png rename to fastlane/config/freemium/LightIcon.png diff --git a/fastlane/config/freemium/TintedIcon.png b/fastlane/config/freemium/TintedIcon.png new file mode 100644 index 000000000..8ab243204 Binary files /dev/null and b/fastlane/config/freemium/TintedIcon.png differ diff --git a/fastlane/config/premium/DarkIcon.png b/fastlane/config/premium/DarkIcon.png new file mode 100644 index 000000000..1354d3bd9 Binary files /dev/null and b/fastlane/config/premium/DarkIcon.png differ diff --git a/fastlane/config/premium/Icon.png b/fastlane/config/premium/Icon.png deleted file mode 100644 index 520b18c34..000000000 Binary files a/fastlane/config/premium/Icon.png and /dev/null differ diff --git a/fastlane/config/premium/LightIcon.png b/fastlane/config/premium/LightIcon.png new file mode 100644 index 000000000..b04de8e9c Binary files /dev/null and b/fastlane/config/premium/LightIcon.png differ diff --git a/fastlane/config/premium/TintedIcon.png b/fastlane/config/premium/TintedIcon.png new file mode 100644 index 000000000..22c52ba09 Binary files /dev/null and b/fastlane/config/premium/TintedIcon.png differ diff --git a/fastlane/scripts/create-app-icon.sh b/fastlane/scripts/create-app-icon.sh index 048c543ab..9f16a78de 100755 --- a/fastlane/scripts/create-app-icon.sh +++ b/fastlane/scripts/create-app-icon.sh @@ -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