Skip to content

Commit

Permalink
To make AppIcon works for Dark & Tinted on iOS 18
Browse files Browse the repository at this point in the history
What changes:
- Added Dark & Tinted icons
- Adding UIOnboardingHelper in AppDelegate.swift, for Welcome Screen fix
- Change runs to MacOS 15 & Xcode 16, to fix AppIcon works for iOS 18
  • Loading branch information
brynts committed Oct 4, 2024
1 parent a3a866f commit 7978b93
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build:
runs-on: macos-13
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -19,9 +19,9 @@ jobs:
sudo install -m755 ldid_macosx_x86_64 /usr/local/bin/ldid
brew install 7zip gnu-sed
- name: Select Xcode 15.1
- name: Select Xcode 16
run: |
sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer
sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer
mkdir upload
sed -i '' '/func application(/a\
Preferences.beta = true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
runs-on: macos-13
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -19,7 +19,7 @@ jobs:
- name: Select Xcode 15.1
run: |
sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer
sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer
mkdir upload
- name: Compile f
Expand Down Expand Up @@ -49,4 +49,4 @@ jobs:
fail_on_unmatched_files: true
draft: true
env:
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
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.
26 changes: 25 additions & 1 deletion iOS/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
{
"images" : [
{
"filename" : "feather.png",
"filename" : "AppIcon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "AppIcon-dark.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "tinted"
}
],
"filename" : "AppIcon-tinted.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down
9 changes: 8 additions & 1 deletion iOS/Delegates/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UIOnboardingViewControlle
}
}

struct UIOnboardingHelper {
// App Icon
static func setUpIcon() -> UIImage {
return Bundle.main.appIcon ?? .init(named: "onboarding-icon")!
}
}

extension UIOnboardingViewConfiguration {
static func setUp() -> Self {
let welcomeToLine = NSMutableAttributedString(string: String.localized("ONBOARDING_WELCOMETITLE_1"))
Expand Down Expand Up @@ -278,7 +285,7 @@ extension UIOnboardingViewConfiguration {
)

return .init(
appIcon: .init(named: "AppIcon")!,
appIcon: UIOnboardingHelper.setUpIcon(),
firstTitleLine: welcomeToLine,
secondTitleLine: featherLine,
features: onboardingFeatures,
Expand Down

0 comments on commit 7978b93

Please sign in to comment.