Skip to content

Add iOS (iPad + iPhone) support, plus an Android tablet layout and cross-platform fixes - #3

Closed
tcpreplay-dev wants to merge 1 commit into
worldwidedx:mainfrom
tcpreplay-dev:ios-ipad-ui
Closed

tcpreplay-dev wants to merge 1 commit into
worldwidedx:mainfrom
tcpreplay-dev:ios-ipad-ui

Conversation

@tcpreplay-dev

@tcpreplay-dev tcpreplay-dev commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Add iOS (iPad + iPhone) support, plus an Android tablet layout and cross‑platform fixes

Hi @worldwidedx — first off, thank you for QK4‑Android. It's a great base and made this work possible.

This is a larger‑than‑usual first contribution, so I wanted to open it as a PR for discussion rather than drop it on you unannounced. No pressure to merge as‑is — I'm very happy to split it up, reshape it, or maintain it on a branch, whatever works best for you.

What this adds

Three things, layered on top of the current Android client:

1. iOS port (iPad + iPhone). A native Qt build for iOS that reuses the existing app almost entirely — same UI, same CAT/TLS‑PSK networking, same DSP/panadapter. Verified running on physical hardware: iPad Pro 13" (M5) and iPhone 17 Pro, iOS 26.x, connected to a live K4 over TLS‑PSK with RX audio and the Metal panadapter working.

  • iOS build wiring (CMake), TLS‑PSK via a small OpenSSL PSK socket, Core Audio session, app icon, full‑screen plist.
  • iPad control UI matched to the macOS/radio layout: tap‑to‑swap tiles with adjust popups, reshaped dual‑text buttons, an A‑/A+/B‑/B+ fine‑tune pad, direct frequency entry, filter/meter refinements, MON/NORM/BAL controls.
  • Optional HaliKey MIDI CW keyer over CoreMIDI (RtMidi), enabled on iOS.

2. Android tablet layout. Large Android screens (≥7") now get the "regular" (iPad‑style) layout instead of the phone layout, sized to fit, with the filter/indicator restructure, waterfall brightness handling, and per‑pan VFO tuning. Includes a build-android.sh helper for building the Android APK from macOS.

3. Cross‑platform fixes and tweaks made while getting all three platforms working — these benefit macOS/desktop too:

  • Panadapter/mini‑pan: stop mid‑pass RHI resource updates (fixes a Debug‑build Metal assert).
  • Dual panadapters: Pan A always tunes VFO A, Pan B always tunes VFO B on touch (matches the radio / macOS).
  • FSK filter shape: peak spacing scales with bandwidth; NORM marker gets a small tolerance.
  • Typematic A/B fine‑tune buttons (press‑and‑hold repeats).
  • B SET button lights green while active and resets on disconnect.
  • Keep the screen awake while connected (Android).

Scope of the diff

The source change is small and reviewable: ~50 files, ~3.1k insertions. Almost everything else in the file count is vendored iOS dependencies — prebuilt OpenSSL and Opus static libraries + headers under third_party/ios/ (~21 MB of .a files). I checked those in so an iOS build works out of the box, mirroring how the Android third‑party libs are handled, but I know binaries in a repo are a judgment call. Happy to move them behind a fetch/build script and .gitignore instead if you'd prefer a clean tree — just say the word.

No Android‑only behavior leaks into other platforms: platform‑specific pieces (waterfall gain, keep‑awake, tablet size fits) are #ifdef‑gated, so desktop/iOS builds compile them out.

Screenshots

Same app, three platforms (all v1.0.4.1, live K4, dual RX):

  • Android tablet (Samsung, regular layout) image

  • iPad Pro 13" (M5)image

  • iPhone 17 Pro (compact layout)image

On iOS / the App Store

Since iOS may be less familiar territory, I'm glad to carry the load: I can handle the signing, build, and TestFlight/App Store submission legwork, and stage a build for your sign‑off (and the QK4 author's) before anything is published. If you're both comfortable, I can then publish it to the App Store. Nothing ships without your OK.

Testing

I'll have a small group of testers put the builds through their paces on real hardware across all three platforms, and I'll fold back whatever they find. Your input is very welcome — on the approach, the structure of this PR, the dependency question above, or anything else. If you'd rather take this in smaller pieces, I'll break it up however you like.

Thanks again for the foundation to build on.


Changes in this PR

Squashed into a single commit; grouped here by area for review.

iOS port — foundation & build
  • iOS/iPad port foundation: CMake build, TLS‑PSK networking, Core Audio, desktop layout
  • OpenSSL PSK TLS socket (src/network/psktlssocket*), replacing the QSslSocket path on iOS
  • Core Audio session (src/ios/iosaudiosession.mm)
  • App icon (K4 radio) so iOS builds aren't the default icon
  • UIRequiresFullScreen set in Info.plist only (not also via CMake)
iOS / iPad control UI
  • iPad control UI: tap‑to‑swap tiles, adjust popups, reshaped dual‑text buttons, A‑/A+/B‑/B+ fine‑tune pad, direct frequency entry, filter/meter refinements
  • MON/NORM/BAL controls and refined filter NORM marker
  • HaliKey MIDI CW keyer over CoreMIDI (RtMidi); CW Keyer options page as MIDI‑only device type
Android tablet layout
  • Regular (iPad‑style) layout on large Android screens (≥7")
  • Tablet layout parity: filter/indicator restructure, waterfall brightness, per‑pan tuning fixes, VFO column/center sizing
  • B SET button green while active, reset on disconnect
  • Keep the screen awake while connected
  • build-android.sh — build the Android APK from macOS
Cross‑platform fixes (benefit desktop/macOS too)
  • Stop mid‑pass RHI resource updates in the panadapter and mini‑pan (fixes a Debug‑build Metal assert)
  • Dual panadapters tune their own VFO on touch (Pan A → VFO A, Pan B → VFO B)
  • FSK filter peak spacing scales with bandwidth; NORM marker tolerance
  • Typematic A/B fine‑tune buttons (press‑and‑hold repeats)

Diff scope: ~43 source files (src/), +2.8k/−0.6k lines. The remaining file count is vendored iOS OpenSSL/Opus under third_party/ios/ (see note above).

…tform fixes

iOS port (iPad + iPhone), verified on physical iPad Pro 13" (M5) and
iPhone 17 Pro, iOS 26.x, against a live K4 over TLS-PSK with RX audio and
the Metal panadapter:
- iOS build wiring (CMake), OpenSSL PSK TLS socket, Core Audio session,
  app icon, full-screen plist.
- iPad control UI matched to the macOS/radio layout: tap-to-swap tiles
  with adjust popups, reshaped dual-text buttons, A-/A+/B-/B+ fine-tune
  pad, direct frequency entry, filter/meter refinements, MON/NORM/BAL.
- Optional HaliKey MIDI CW keyer over CoreMIDI (RtMidi).

Android tablet layout: large Android screens (>=7") use the regular
(iPad-style) layout, sized to fit, with the filter/indicator restructure,
waterfall brightness handling, and per-pan VFO tuning. Adds build-android.sh
to build the Android APK from macOS.

Cross-platform fixes (also benefit desktop/macOS):
- Stop mid-pass RHI resource updates in the panadapter and mini-pan
  (fixes a Debug-build Metal assert).
- Dual panadapters tune their own VFO on touch (Pan A -> VFO A,
  Pan B -> VFO B), matching the radio.
- FSK filter peak spacing scales with bandwidth; NORM marker tolerance.
- Typematic A/B fine-tune buttons (press-and-hold repeats).
- B SET lights green while active, resets on disconnect.
- Keep the screen awake while connected (Android).

Platform-specific behavior (waterfall gain, keep-awake, tablet size fits)
is #ifdef-gated so other platforms compile it out. Vendored prebuilt iOS
OpenSSL/Opus static libs live under third_party/ios/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@worldwidedx

worldwidedx commented Sep 11, 2026 via email

Copy link
Copy Markdown
Owner

@worldwidedx

Copy link
Copy Markdown
Owner

Fred, thank you again for this substantial contribution. I would like you to continue leading the Android tablet and iOS versions. We have preserved the work on v1.0.5-based development branches and are separating it into tablet and iOS tracks so each can be tested and reviewed independently.

Please continue physical-device testing and submit separate follow-up PRs for the Android tablet and iOS work based on v1.0.5. Once you are satisfied with the iPhone and iPad testing results, I encourage you to proceed with submitting the iOS apps to the Apple App Store.

The cross-platform rendering and per-pan tuning fixes are being carried into v1.0.5, and your authorship is preserved in the adapted commits. I appreciate the work and look forward to continuing the collaboration.

@worldwidedx

Copy link
Copy Markdown
Owner

Thank you again, Fred. QK4 Mobile v1.0.5 is now released, and your work has been carried forward on that baseline in separate draft PRs: Android tablet #5 and iPhone/iPad #6. The shared rendering and per-pan tuning corrections are included in v1.0.5, and your authorship is retained in the adapted commits. Please continue tablet and iOS testing through those PRs. Once you are satisfied with the iPhone and iPad physical-device results, we encourage you to proceed with submitting the iOS apps to the Apple App Store. Closing this combined PR as superseded by #5 and #6.

worldwidedx pushed a commit that referenced this pull request Sep 12, 2026
Adapt the large-screen control layout from QK4-Android PR #3 onto the v1.0.5 phone baseline. Preserve the current compact phone UX, digital modes, macro state refresh, and user-controlled waterfall behavior.
worldwidedx pushed a commit that referenced this pull request Sep 12, 2026
Adapt the iPhone and iPad build, OpenSSL TLS-PSK transport, AVAudioSession setup, touch UI, HaliKey MIDI path, resources, and vendored iOS dependencies from QK4-Android PR #3 onto the v1.0.5 shared baseline.

Preserve guarded FT8/SSTV transmission and macro state refresh, add iOS Keychain storage for QRZ credentials, and implement the current per-screen orientation policy.
worldwidedx pushed a commit that referenced this pull request Sep 12, 2026
Adapt the iPhone and iPad build, OpenSSL TLS-PSK transport, AVAudioSession setup, touch UI, HaliKey MIDI path, resources, and vendored iOS dependencies from QK4-Android PR #3 onto the v1.0.5 shared baseline.

Preserve guarded FT8/SSTV transmission and macro state refresh, add iOS Keychain storage for QRZ credentials, and implement the current per-screen orientation policy.
worldwidedx pushed a commit that referenced this pull request Sep 12, 2026
Adapt the large-screen control layout from QK4-Android PR #3 onto the v1.0.5 phone baseline. Preserve the current compact phone UX, digital modes, macro state refresh, and user-controlled waterfall behavior.
@tcpreplay-dev

tcpreplay-dev commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator Author

Hi Fred! This is great news! You did the work on the Android tablet that I wanted to do but since I don't have one (and the emulator won't run on my processor), I wasn't able to. I also see that you addressed a couple of issues that I or others hadn't found yet thanks. I will review those. I'm curious which build you started with? I addressed that B-SET issue a while back. I'm just about to release a new version that includes FT8/FT4 functionality with basic logging for it, SSTV, and the app in general. At this point, I'm just tweaking minor CTR2-MIDI wheel actions and adjustments for that new feature. I'd like to publish this and then have you do a regression PR based on this latest release to ensure we don't run into conflicts - plus you'll probably need to see how well the FT8 stuff works in iOS. Sound good? Tim

-- Owner, worldwidedx.com AE6LX, Amateur Radio

Thanks, Tim — glad the port was useful, and thanks for the README credit.

I've got more fixes and enhancements on the way, and I'd like to set up a clean way to land them so we can collaborate and test before things ship. I've sent you my email — let's coordinate there.

Talk soon, Fred - VE7VT

tcpreplay-dev added a commit to tcpreplay-dev/QK4-Android that referenced this pull request Sep 12, 2026
Adapt the RHI render-pass correction and per-pan touch tuning from QK4-Android PR worldwidedx#3 while preserving the current Android waterfall controls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants