wails/v3/IOS_FEATURES_TODO.md
Lea Anthony 873848a077 Merge iOS support from v3-alpha-feature/ios-support
This commit integrates iOS platform support for Wails v3, adapting the
iOS-specific code to work with the new transport layer architecture.

Key changes:
- Add iOS-specific application, webview, and runtime files
- Add iOS event types and processing
- Add iOS examples and templates
- Update messageprocessor to handle iOS requests
- Move badge_ios.go to dock package

Note: The iOS branch was based on an older v3-alpha and required
significant conflict resolution due to the transport layer refactor
(PR #4702). Some iOS-specific code may need further adaptation:
- processIOSMethod needs to be implemented with new RuntimeRequest signature
- iOS event generation in tasks/events/generate.go needs updating

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 18:34:21 +11:00

3.4 KiB

iOS Features TODO (Prioritized)

This document lists potential iOS features and platform options to enhance the Wails v3 iOS runtime. Items are ordered by importance for typical app development workflows.

Top Priority (Implement first)

  1. Input accessory bar control
  • Status: Implemented as IOSOptions.DisableInputAccessoryView (default false = shown). Native toggle + WKWebView subclass.
  1. Scrolling and bounce behavior
  • Options:
    • DisableScroll (default true in current runtime to preserve no-scroll template behavior)
    • DisableBounce (default true in current runtime)
    • HideScrollIndicators (default true in current runtime)
  • Purpose: control elastic bounce, page scrolling, and indicators.
  1. Web Inspector / Debug
  • Options:
    • DisableInspectable (default false; inspector enabled by default in dev)
  • Purpose: enable/disable WKWebView inspector.
  1. Back/forward navigation gestures
  • Options:
    • AllowsBackForwardNavigationGestures (default false)
  • Purpose: enable iOS edge-swipe navigation.
  1. Link previews
  • Options:
    • DisableLinkPreview (default false)
  • Purpose: allow long-press link previews.
  1. Media autoplay and inline playback
  • Options:
    • DisableInlineMediaPlayback (default false)
    • RequireUserActionForMediaPlayback (default false)
  • Purpose: control media playback UX.
  1. User agent customization
  • Options:
    • UserAgent (string)
    • ApplicationNameForUserAgent (string; default "wails.io")
  • Purpose: customize UA / identify app.
  1. Keyboard behavior
  • Options:
    • Already: DisableInputAccessoryView
    • Future: KeyboardDismissMode (none | onDrag | interactive)
  • Purpose: refine keyboard UX.
  1. Safe-area and content inset behavior
  • Options (future):
    • ContentInsetAdjustment (automatic | never | always)
    • UseSafeArea (bool)
  • Purpose: fine-tune layout under notch/home indicator.
  1. Data detectors (future feasibility)
  • Options: DataDetectorTypes []string (phoneNumber, link, address)
  • Note: Not all are directly available on WKWebView; feasibility TBD.

Medium Priority

  1. Pull-to-refresh (custom)
  2. File picker / photo access bridges
  3. Haptics feedback helpers
  4. Clipboard read/write helpers (partially present)
  5. Share sheet / activity view bridges
  6. Background audio / PiP controls
  7. App lifecycle event hooks (background/foreground)
  8. Permissions prompts helpers (camera, mic, photos)
  9. Open in external browser vs in-app policy
  10. Cookie / storage policy helpers

Low Priority

  1. Theme/dynamic color helpers bridging to CSS vars
  2. Orientation lock helpers per window
  3. Status bar style control from Go
  4. Network reachability events bridge
  5. Push notifications

Implementation Plan (Top 10)

Implement the following immediately:

  • DisableScroll, DisableBounce, HideScrollIndicators
  • AllowsBackForwardNavigationGestures
  • DisableLinkPreview
  • DisableInlineMediaPlayback
  • RequireUserActionForMediaPlayback
  • DisableInspectable
  • UserAgent
  • ApplicationNameForUserAgent

Approach:

  • Extend IOSOptions in pkg/application/application_options.go with these fields.
  • Add native globals + C setters in pkg/application/application_ios.h/.m.
  • Apply options in pkg/application/webview_window_ios.m during WKWebView configuration and on the scrollView.
  • Wire from Go in pkg/application/application_ios.go.
  • Maintain current template behavior as defaults (no scroll/bounce/indicators) to avoid regressions in existing tests.