Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tinted and dark AppIcon #385

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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.
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
Comment on lines 1 to +6
Copy link

@coderabbitai coderabbitai bot Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Icon differentiation for freemium and premium versions not maintained

Based on the verification, there is no evidence of distinct icons for freemium and premium versions in the current implementation. Please ensure that the new dark and tinted icons maintain this differentiation as required.

🔗 Analysis chain

Verify icon differentiation for freemium and premium versions

As per Tobihagemann's comment, there's a requirement to have different icons for the freemium and premium versions of the app. We should ensure that this differentiation is maintained for the new dark and tinted icons as well.

Let's check the current implementation of icon differentiation:

Based on the results of this verification, we may need to update the script to handle different icons for freemium and premium versions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for icon differentiation in the Fastfile and project structure

# Test 1: Search for APP_ICON_FILE_PATH in Fastfile
echo "Searching for APP_ICON_FILE_PATH in Fastfile:"
rg "APP_ICON_FILE_PATH" fastlane/Fastfile

# Test 2: Check for different icon files in the project structure
echo "\nSearching for icon files in the project:"
fd -e png -e jpg -e jpeg "icon" --exec file {}

Length of output: 610


Script:

#!/bin/bash
# Description: Verify distinct icon file paths for freemium and premium versions

echo "Searching for freemium icon paths in Fastfile and related scripts:"
rg "FreemiumIcon" fastlane/

echo "\nSearching for premium icon paths in Fastfile and related scripts:"
rg "PremiumIcon" fastlane/

echo "\nListing all icon files related to freemium and premium versions:"
fd -e png -e jpg -e jpeg "FreemiumIcon\|PremiumIcon" .

Length of output: 542

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 3d31b0b

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobihagemann, thank you for fixing the issue. The update looks great!

(^.^)/


If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!

Loading