Include a resource for one platform and not another
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 3.2k
- Forks
- 106
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
https://github.com/orgs/skiptools/discussions/370#discussioncomment-12467273
There are a bunch of images (and other resources) available on one platform but not another. For example, star.leadinghalf.fill is available on iOS as a system image, but the only Material Icon for half stars requires you to download the image and embed it as a drawable.
It is possible to add those resources to an xcassets file, which will make them available on both platforms. But I don't want to embed the Material Icon in my iOS app; I just want to use the system image on iOS. Embedding the Material Icon bloats my iOS bundle.
It would be better if I could add platform-exclusive resources and use them from Skip code.
(In this case, Material Icons are pretty small, so it's probably no big deal.)
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
Start with the linked discussion and compare how platform-specific resources are represented in xcassets and used from Skip code. Define how an iOS-only system image or Android-only resource can remain exclusive to its platform without embedding the other platform's asset; done means both platform builds can use their respective resources without unnecessary bundle contents.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios, swift
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100