`assetAccentColor` doesn't search for `AccentColor` in my module's bundle
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 330
- Forks
- 76
- Avg merge
- 3h 6m
- Merged PRs (30d)
- 1
Description
Accent Color
In addition to programmatically using SwiftUI's
.tintmodifier, iOS allows you to set your application's accent color via theAccentColorresource in your app'sAssetsasset catalog. In a Skip app, you can findAssetsin theDarwinfolder.Skip also supports these mechanisms, but your generated Android app can't access the
Darwinfolder contents. To define an accent color resource for your Android app, create a color set calledAccentColorin theSources/<YourAppModule>/Resources/Moduleasset catalog. See the section on Named Colors below for additional details.
Sounds great, but there's just one problem:
We're not searching my module's bundle. We're searching Bundle.main, the bundle that isn't transpiled.
This code can find an accent color if you manually install one in your main bundle, but if you follow the documented instructions to put an AccentColor in your module bundle, this code will never find it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the Accent Color guidance in README.md around lines 2575-2579, then inspect Sources/SkipUI/SkipUI/Color/Color.swift around lines 193-200. Trace how the accent color bundle is selected and verify the lookup uses the module bundle described by the documentation. Done means an AccentColor resource in Sources//Resources/Module can be found by assetAccentColor without manually installing it in the main bundle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100