diff --git a/ios/brave-ios/App/Client.xcodeproj/project.pbxproj b/ios/brave-ios/App/Client.xcodeproj/project.pbxproj index 52aaf22064f4..3b92588d0161 100644 --- a/ios/brave-ios/App/Client.xcodeproj/project.pbxproj +++ b/ios/brave-ios/App/Client.xcodeproj/project.pbxproj @@ -1884,6 +1884,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "windows 3d 80s aqua bat holo neon netscape pride supernova terminal"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon_Local; CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/iOS/Entitlements/Debug (AppStore).entitlements"; DEBUG_INFORMATION_FORMAT = dwarf; @@ -2099,6 +2100,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "windows 3d 80s aqua bat holo neon netscape pride supernova terminal"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/iOS/Entitlements/Release.entitlements"; CODE_SIGN_STYLE = Automatic; @@ -3199,6 +3201,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "windows 3d 80s aqua bat holo neon netscape pride supernova terminal"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/iOS/Entitlements/Release (AppStore).entitlements"; DEVELOPMENT_ASSET_PATHS = "\"$(PROJECT_DIR)/../Sources/Brave/Frontend/Preview Content\""; @@ -3285,6 +3288,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "windows 3d 80s aqua bat holo neon netscape pride supernova terminal"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon_Nightly; CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/iOS/Entitlements/Nightly.entitlements"; DEVELOPMENT_ASSET_PATHS = "\"$(PROJECT_DIR)/../Sources/Brave/Frontend/Preview Content\""; @@ -3368,6 +3372,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "windows 3d 80s aqua bat holo neon netscape pride supernova terminal"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon_Beta; CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/iOS/Entitlements/Beta.entitlements"; DEVELOPMENT_ASSET_PATHS = "\"$(PROJECT_DIR)/../Sources/Brave/Frontend/Preview Content\""; @@ -3448,6 +3453,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "windows 3d 80s aqua bat holo neon netscape pride supernova terminal"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon_Local; CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/iOS/Entitlements/Debug.entitlements"; CODE_SIGN_STYLE = Automatic; diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/3d.appiconset/3d.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/3d.appiconset/3d.png new file mode 100644 index 000000000000..02604cdf2d25 Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/3d.appiconset/3d.png differ diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/3d.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/3d.appiconset/Contents.json new file mode 100644 index 000000000000..e4ed3303074e --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/3d.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "3d.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/80s.appiconset/80s.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/80s.appiconset/80s.png new file mode 100644 index 000000000000..277185a94f5d Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/80s.appiconset/80s.png differ diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/80s.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/80s.appiconset/Contents.json new file mode 100644 index 000000000000..9388a035e853 --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/80s.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "80s.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/Contents.json new file mode 100644 index 000000000000..73c00596a7fc --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/aqua.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/aqua.appiconset/Contents.json new file mode 100644 index 000000000000..03be9506a684 --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/aqua.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "aqua.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/aqua.appiconset/aqua.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/aqua.appiconset/aqua.png new file mode 100644 index 000000000000..bb6eb2890180 Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/aqua.appiconset/aqua.png differ diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/bat.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/bat.appiconset/Contents.json new file mode 100644 index 000000000000..ce46fa123319 --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/bat.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "bat.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/bat.appiconset/bat.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/bat.appiconset/bat.png new file mode 100644 index 000000000000..aefaed26b557 Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/bat.appiconset/bat.png differ diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/holo.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/holo.appiconset/Contents.json new file mode 100644 index 000000000000..cc215c9a6e21 --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/holo.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "holo.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/holo.appiconset/holo.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/holo.appiconset/holo.png new file mode 100644 index 000000000000..06182c9ae25b Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/holo.appiconset/holo.png differ diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/neon.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/neon.appiconset/Contents.json new file mode 100644 index 000000000000..514e81d90160 --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/neon.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "neon.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/neon.appiconset/neon.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/neon.appiconset/neon.png new file mode 100644 index 000000000000..c0245c53ead2 Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/neon.appiconset/neon.png differ diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/netscape.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/netscape.appiconset/Contents.json new file mode 100644 index 000000000000..44a28a08d6d1 --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/netscape.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "netscape.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/netscape.appiconset/netscape.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/netscape.appiconset/netscape.png new file mode 100644 index 000000000000..138c4cbfebc5 Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/netscape.appiconset/netscape.png differ diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/pride.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/pride.appiconset/Contents.json new file mode 100644 index 000000000000..0fcd46f08bf0 --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/pride.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "pride.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/pride.appiconset/pride.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/pride.appiconset/pride.png new file mode 100644 index 000000000000..b73109d08547 Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/pride.appiconset/pride.png differ diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/supernova.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/supernova.appiconset/Contents.json new file mode 100644 index 000000000000..009bdb0c328c --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/supernova.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "supernova.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/supernova.appiconset/supernova.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/supernova.appiconset/supernova.png new file mode 100644 index 000000000000..32e226631bff Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/supernova.appiconset/supernova.png differ diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/terminal.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/terminal.appiconset/Contents.json new file mode 100644 index 000000000000..ed56031e32fb --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/terminal.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "terminal.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/terminal.appiconset/terminal.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/terminal.appiconset/terminal.png new file mode 100644 index 000000000000..dd1887298caa Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/terminal.appiconset/terminal.png differ diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/windows.appiconset/Contents.json b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/windows.appiconset/Contents.json new file mode 100644 index 000000000000..39d70b153f1e --- /dev/null +++ b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/windows.appiconset/Contents.json @@ -0,0 +1,36 @@ +{ + "images" : [ + { + "filename" : "windows.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/windows.appiconset/windows.png b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/windows.appiconset/windows.png new file mode 100644 index 000000000000..b5dee25ebc43 Binary files /dev/null and b/ios/brave-ios/App/iOS/Icons.xcassets/Alt Icons/windows.appiconset/windows.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/3d.imageset/3d.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/3d.imageset/3d.png new file mode 100644 index 000000000000..0b796246057a Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/3d.imageset/3d.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/3d.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/3d.imageset/Contents.json new file mode 100644 index 000000000000..ed8ac7194dc0 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/3d.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "3d.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/80s.imageset/80s.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/80s.imageset/80s.png new file mode 100644 index 000000000000..6f04c71aa79d Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/80s.imageset/80s.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/80s.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/80s.imageset/Contents.json new file mode 100644 index 000000000000..60e974b384a3 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/80s.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "80s.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/Contents.json new file mode 100644 index 000000000000..73c00596a7fc --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/aqua.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/aqua.imageset/Contents.json new file mode 100644 index 000000000000..9a2fc055a435 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/aqua.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "aqua.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/aqua.imageset/aqua.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/aqua.imageset/aqua.png new file mode 100644 index 000000000000..ef3732e06b68 Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/aqua.imageset/aqua.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/bat.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/bat.imageset/Contents.json new file mode 100644 index 000000000000..3b1a8c81fc01 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/bat.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "bat.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/bat.imageset/bat.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/bat.imageset/bat.png new file mode 100644 index 000000000000..8334a8164c85 Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/bat.imageset/bat.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/holo.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/holo.imageset/Contents.json new file mode 100644 index 000000000000..91a9927542a2 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/holo.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "holo.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/holo.imageset/holo.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/holo.imageset/holo.png new file mode 100644 index 000000000000..6b33839085f7 Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/holo.imageset/holo.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/neon.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/neon.imageset/Contents.json new file mode 100644 index 000000000000..8a966c51c848 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/neon.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "neon.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/neon.imageset/neon.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/neon.imageset/neon.png new file mode 100644 index 000000000000..35d9b50b4be5 Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/neon.imageset/neon.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/netscape.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/netscape.imageset/Contents.json new file mode 100644 index 000000000000..5053a46c4091 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/netscape.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "netscape.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/netscape.imageset/netscape.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/netscape.imageset/netscape.png new file mode 100644 index 000000000000..c75a3f255be8 Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/netscape.imageset/netscape.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/pride.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/pride.imageset/Contents.json new file mode 100644 index 000000000000..ffbfc0b142d8 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/pride.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "pride.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/pride.imageset/pride.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/pride.imageset/pride.png new file mode 100644 index 000000000000..c6001c0affb0 Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/pride.imageset/pride.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/supernova.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/supernova.imageset/Contents.json new file mode 100644 index 000000000000..7db8f54a6822 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/supernova.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "supernova.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/supernova.imageset/supernova.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/supernova.imageset/supernova.png new file mode 100644 index 000000000000..b0c5ccab9e58 Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/supernova.imageset/supernova.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/terminal.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/terminal.imageset/Contents.json new file mode 100644 index 000000000000..7156329f4255 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/terminal.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "terminal.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/terminal.imageset/terminal.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/terminal.imageset/terminal.png new file mode 100644 index 000000000000..4bbc8ca9c2d9 Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/terminal.imageset/terminal.png differ diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/windows.imageset/Contents.json b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/windows.imageset/Contents.json new file mode 100644 index 000000000000..f3de4abf530a --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/windows.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "windows.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/windows.imageset/windows.png b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/windows.imageset/windows.png new file mode 100644 index 000000000000..6a67a757afe2 Binary files /dev/null and b/ios/brave-ios/Sources/Brave/Assets/Images.xcassets/Alt Icons/windows.imageset/windows.png differ diff --git a/ios/brave-ios/Sources/Brave/Frontend/Settings/Display/AltIconsModel.swift b/ios/brave-ios/Sources/Brave/Frontend/Settings/Display/AltIconsModel.swift new file mode 100644 index 000000000000..16d7e1b2207e --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Frontend/Settings/Display/AltIconsModel.swift @@ -0,0 +1,64 @@ +// Copyright (c) 2024 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + +import Foundation +import UIKit + +struct AltIcon: Identifiable { + var assetName: String + var displayName: String + + var id: String { + assetName + } + + static let threeDee = AltIcon(assetName: "3d", displayName: "3D") + static let retro = AltIcon(assetName: "80s", displayName: "80s") + static let aqua = AltIcon(assetName: "aqua", displayName: "Aqua") + static let bat = AltIcon(assetName: "bat", displayName: "BAT") + static let holo = AltIcon(assetName: "holo", displayName: "Holo") + static let neon = AltIcon(assetName: "neon", displayName: "Neon") + static let netscape = AltIcon(assetName: "netscape", displayName: "Netscape") + static let pride = AltIcon(assetName: "pride", displayName: "Pride") + static let supernova = AltIcon(assetName: "supernova", displayName: "Supernova") + static let terminal = AltIcon(assetName: "terminal", displayName: "Terminal") + static let windows = AltIcon(assetName: "windows", displayName: "Windows") + + static let allBraveIcons: [AltIcon] = [ + .threeDee, + .retro, + .aqua, + .bat, + .holo, + .neon, + .netscape, + .pride, + .supernova, + .terminal, + .windows, + ] +} + +class AltIconsModel: ObservableObject { + @Published private(set) var selectedAltAppIcon: String? + + init() { + self.selectedAltAppIcon = UIApplication.shared.alternateIconName + } + + func setAlternateAppIcon(_ icon: AltIcon?, completion: ((Error?) -> Void)?) { + if icon?.assetName == selectedAltAppIcon { + // Nothing to do + completion?(nil) + return + } + UIApplication.shared.setAlternateIconName(icon?.assetName) { error in + if error == nil { + self.selectedAltAppIcon = icon?.assetName + } + completion?(error) + } + } +} diff --git a/ios/brave-ios/Sources/Brave/Frontend/Settings/Display/AltIconsView.swift b/ios/brave-ios/Sources/Brave/Frontend/Settings/Display/AltIconsView.swift new file mode 100644 index 000000000000..519b9adc6cd6 --- /dev/null +++ b/ios/brave-ios/Sources/Brave/Frontend/Settings/Display/AltIconsView.swift @@ -0,0 +1,103 @@ +// Copyright (c) 2024 The Brave Authors. All rights reserved. +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this file, +// You can obtain one at https://mozilla.org/MPL/2.0/. + +import BraveStrings +import DesignSystem +import Foundation +import Strings +import SwiftUI +import OSLog + +extension Bundle { + var primaryIconName: String? { + guard let icons = object(forInfoDictionaryKey: "CFBundleIcons") as? [String: Any], + let primaryIcon = icons["CFBundlePrimaryIcon"] as? [String: Any], + let iconFiles = primaryIcon["CFBundleIconFiles"] as? [String] + else { + return nil + } + return iconFiles.last + } +} + +private struct AppIconView: View { + var altIcon: AltIcon? + var isSelected: Bool + + private var icon: Image { + if let altIcon { + return Image(altIcon.assetName, bundle: .module) + } else { + let iconName = Bundle.main.primaryIconName ?? "AppIcon" + return Image(uiImage: UIImage(named: iconName) ?? .init()) + } + } + + var body: some View { + HStack(spacing: 10) { + icon + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: 56, height: 56) + .clipShape(.rect(cornerRadius: 14, style: .continuous)) + .overlay { + RoundedRectangle(cornerRadius: 14, style: .continuous) + .strokeBorder(Color.black.opacity(0.1)) + } + HStack { + Text(altIcon.map(\.displayName) ?? Strings.AltAppIcon.defaultAppIcon) + .foregroundStyle(Color(braveSystemName: .textPrimary)) + Spacer() + if isSelected { + Image(braveSystemName: "leo.check.circle-filled") + } + } + } + } +} + +struct AltIconsView: View { + @ObservedObject var model: AltIconsModel + + @State private var isErrorPresented: Bool = false + + private func selectIcon(_ icon: AltIcon?) { + model.setAlternateAppIcon(icon) { error in + if let error { + Logger.module.error("Failed to set alternate app icon: \(error.localizedDescription)") + self.isErrorPresented = true + } + } + } + + var body: some View { + List { + Section { + Button { + selectIcon(nil) + } label: { + AppIconView(altIcon: nil, isSelected: model.selectedAltAppIcon == nil) + } + .listRowBackground(Color(uiColor: UIColor.secondaryBraveGroupedBackground)) + ForEach(AltIcon.allBraveIcons) { icon in + Button { + selectIcon(icon) + } label: { + AppIconView(altIcon: icon, isSelected: model.selectedAltAppIcon == icon.assetName) + } + .listRowBackground(Color(uiColor: UIColor.secondaryBraveGroupedBackground)) + } + } header: { + Text(Strings.AltAppIcon.braveIconsHeader) + } + } + .scrollContentBackground(.hidden) + .background(Color(uiColor: UIColor.braveGroupedBackground)) + .navigationTitle(Strings.AltAppIcon.changeAppIcon) + .alert(Strings.AltAppIcon.errorTitle, isPresented: $isErrorPresented) { + Button(Strings.OKString) { } + } + } +} diff --git a/ios/brave-ios/Sources/Brave/Frontend/Settings/SettingsViewController.swift b/ios/brave-ios/Sources/Brave/Frontend/Settings/SettingsViewController.swift index f1606f3be834..92d8fc173199 100644 --- a/ios/brave-ios/Sources/Brave/Frontend/Settings/SettingsViewController.swift +++ b/ios/brave-ios/Sources/Brave/Frontend/Settings/SettingsViewController.swift @@ -10,6 +10,7 @@ import BraveStore import BraveUI import BraveVPN import BraveWallet +import Combine import Data import Growth import LocalAuthentication @@ -67,9 +68,15 @@ class SettingsViewController: TableViewController { private let cryptoStore: CryptoStore? private let windowProtection: WindowProtection? private let ipfsAPI: IpfsAPI + private let altIconsModel = AltIconsModel() private let featureSectionUUID: UUID = .init() + private let displaySectionUUID: UUID = .init() + private let walletRowUUID: UUID = .init() + private let appIconRowUUID: UUID = .init() + + private var cancellables: Set = [] init( profile: Profile, @@ -136,6 +143,23 @@ class SettingsViewController: TableViewController { name: .NEVPNStatusDidChange, object: nil ) + + self.altIconsModel.$selectedAltAppIcon + .dropFirst() + .receive(on: RunLoop.main) + .sink { [weak self] _ in + guard let self, + let indexPath = self.dataSource.indexPath( + rowUUID: appIconRowUUID.uuidString, + sectionUUID: displaySectionUUID.uuidString + ) + else { + return + } + dataSource.sections[indexPath.section].rows[indexPath.row].image = selectedAppIcon + self.tableView.reloadData() + } + .store(in: &cancellables) } override func viewWillAppear(_ animated: Bool) { @@ -611,10 +635,18 @@ class SettingsViewController: TableViewController { return tabs }() + private var selectedAppIcon: UIImage? { + if let altIcon = altIconsModel.selectedAltAppIcon { + return UIImage(named: altIcon, in: .module, with: nil) + } + return Bundle.main.primaryIconName.flatMap { UIImage(named: $0) } + } + private lazy var displaySection: Static.Section = { var display = Static.Section( header: .title(Strings.displaySettingsSection), - rows: [] + rows: [], + uuid: displaySectionUUID.uuidString ) display.rows.append( @@ -672,6 +704,20 @@ class SettingsViewController: TableViewController { self.navigationController?.pushViewController(optionsViewController, animated: true) } display.rows.append(row) + display.rows.append( + Row( + text: Strings.AltAppIcon.changeAppIcon, + selection: { [unowned self] in + let controller = UIHostingController(rootView: AltIconsView(model: altIconsModel)) + controller.title = Strings.AltAppIcon.changeAppIcon + navigationController?.pushViewController(controller, animated: true) + }, + image: selectedAppIcon, + accessory: .disclosureIndicator, + cellClass: AppIconCell.self, + uuid: appIconRowUUID.uuidString + ) + ) display.rows.append( Row( text: Strings.NTP.settingsTitle, @@ -1375,3 +1421,27 @@ class SettingsViewController: TableViewController { Preferences.VPN.vpnSettingHeaderWasDismissed.value = true } } + +private class AppIconCell: UITableViewCell, Cell { + func configure(row: Row) { + var content = defaultContentConfiguration() + content.image = row.image + content.text = row.text + content.imageProperties.cornerRadius = 6 + let scaledValue = UIFontMetrics.default.scaledValue(for: 24) + content.imageProperties.maximumSize = .init(width: scaledValue, height: scaledValue) + if #available(iOS 18, *) { + content.imageProperties.strokeColor = UIColor(white: 0, alpha: 0.1) + content.imageProperties.strokeWidth = 1 + } + contentConfiguration = content + if #unavailable(iOS 18) { + // Have to grab the image view from the UIListContentView as the standard `imageView` is nil + // when using the content configuration API + let imageView = contentView.subviews.compactMap({ $0 as? UIImageView }).first + imageView?.layer.borderColor = UIColor(white: 0, alpha: 0.1).cgColor + imageView?.layer.borderWidth = 1 + } + accessoryType = .disclosureIndicator + } +} diff --git a/ios/brave-ios/Sources/BraveStrings/BraveStrings.swift b/ios/brave-ios/Sources/BraveStrings/BraveStrings.swift index db63a79aec39..e9642a312837 100644 --- a/ios/brave-ios/Sources/BraveStrings/BraveStrings.swift +++ b/ios/brave-ios/Sources/BraveStrings/BraveStrings.swift @@ -9530,3 +9530,32 @@ extension Strings { ) } } + +extension Strings { + public struct AltAppIcon { + public static let changeAppIcon = NSLocalizedString( + "altAppIcon.changeAppIcon", + bundle: .module, + value: "Change App Icon", + comment: "The title for the screen that lets the user select a custom app icon" + ) + public static let defaultAppIcon = NSLocalizedString( + "altAppIcon.defaultAppIcon", + bundle: .module, + value: "Default", + comment: "A label shown next to the default Brave app icon" + ) + public static let braveIconsHeader = NSLocalizedString( + "altAppIcon.braveIconsHeader", + bundle: .module, + value: "Brave Icons", + comment: "A label shown above a list of icons designed by Brave" + ) + public static let errorTitle = NSLocalizedString( + "altAppIcon.errorTitle", + bundle: .module, + value: "Failed to Change App Icon", + comment: "A title shown if some sort of error occurs while changing the app icon" + ) + } +}