Code in `#if !os(macOS)` conditional compilation blocks doesn't show up on Android
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 3.2k
- Forks
- 106
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
In https://github.com/skiptools/skipapp-showcase/pull/21 I fixed the Showcase app to build on native macOS (without Catalyst).
In the course of doing that, I wrapped some modifiers in #if !os(macOS) blocks, like this:
#if !os(macOS)
.keyboardType(UIKeyboardType.phonePad)
#endif
Expected: When I do that, the soft keyboard should use the phone keyboard on this field for both iOS and Android
Actual: The soft keyboard on iOS uses the phone keyboard, but on Android, it uses the default keyboard.
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
Begin by reproducing the Showcase app case from pull request #21, focusing on the SwiftUI modifier inside the #if !os(macOS) block. Trace how that conditional code and .keyboardType(UIKeyboardType.phonePad) are handled for Android, then verify that the phone keyboard appears on both iOS and Android without regressing native macOS builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100