skiptools / skiptools/skip

Code in `#if !os(macOS)` conditional compilation blocks doesn't show up on Android

Open
#342 4 comments 0 reactions 0 assignees View on GitHub

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:

https://github.com/skiptools/skipapp-showcase/pull/21/files#diff-1d95ee84bfd664e75e03a2be16217e70cd10cf783117b7853c61c88170eea347R57-R59

#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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.