Skip to content

expose v3 ios native tab functions to wails ios api - #6169

Open
nimaeskandary wants to merge 1 commit into
wailsapp:masterfrom
nimaeskandary:native-ios-tabs-api
Open

nimaeskandary wants to merge 1 commit into
wailsapp:masterfrom
nimaeskandary:native-ios-tabs-api

Conversation

@nimaeskandary

@nimaeskandary nimaeskandary commented Sep 24, 2026 •

Copy link
Copy Markdown

Description

Hi wails maintainers. This PR is to expose the native tab controls on ios via the wails3 ios api, namely:

  • enabling native tabs
  • disabling native tabs
  • selecting a specific tab programmatically

Today, you can only configure native tabs to be enabled globally via the ios config, you can't disable them for certain views. The usecase I have is, some app views, I do not want the native tabs to show. Additionally, you can set the active tab by clicking on a tab icon, this PR allows you to also do this programmatically via tab index

I updated the ios example app to include these controls:

native-tabs-example.mov

llm notice

codex was used to assist with this PR

Fixes # (issue)

No issue made, let me know if you'd rather I start there.

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • WEP (proposal only; no implementation)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

Test Configuration

Please paste the output of wails doctor. If you are unable to run this command, please describe your environment in as much detail as possible.

wails3 doctor
Wails v3.0.0-beta.9 › Wails Doctor
                                                                                                                                                        
# System
        
┌──────────────────────────────┐
| Name          | MacOS        |
| Version       | 26.3.1       |
| ID            | 25D2128      |
| Branding      | MacOS 26.3.1 |
| Platform      | darwin       |
| Architecture  | arm64        |
| Apple Silicon | true         |
| CPU           | Apple M4     |
| CPU           | Apple M4     |
| GPU           | 10 cores     |
| Memory        | 24 GB        |
└──────────────────────────────┘
                   
# Build Environment
                   
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| Wails CLI      | v3.0.0-beta.9                                                                                       |
| Go Version     | go1.27rc2                                                                                           |
| -buildmode     | exe                                                                                                 |
| -compiler      | gc                                                                                                  |
| CGO_CFLAGS     |                                                                                                     |
| CGO_CPPFLAGS   |                                                                                                     |
| CGO_CXXFLAGS   |                                                                                                     |
| CGO_ENABLED    | 1                                                                                                   |
| CGO_LDFLAGS    |                                                                                                     |
| DefaultGODEBUG | cryptocustomrand=1,tlssecpmlkem=0,tracebacklabels=0,urlstrictcolons=0,x509sslcertoverrideplatform=0 |
| GOARCH         | arm64                                                                                               |
| GOARM64        | v8.0                                                                                                |
| GOOS           | darwin                                                                                              |
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
              
# Dependencies
              
┌───────────────────────────────────────────────────────────────────────────────────────────┐
| *Android NDK            | /Users/nimaeskandary/Library/Android/sdk/ndk/30.0.15729638      |
| *Android SDK            | /Users/nimaeskandary/Library/Android/sdk                        |
| *Android platform-tools | Installed                                                       |
| *Java (Android)         | openjdk version "25.0.3" 2026-04-21 LTS                         |
| *NSIS                   | Not Installed. Install with `brew install makensis`.            |
| *Xcode (iOS)            | Xcode 26.3, Build version 17C529                                |
| *iOS Device SDK         | 26.2                                                            |
| *iOS Simulator SDK      | 26.2                                                            |
| Xcode cli tools         | 2416                                                            |
| npm                     | 11.17.0                                                         |
| docker                  | *Docker version 29.6.2, build dfc4efb (cross-compilation ready) |
|                                                                                           |
└───────────────────────────────── * - Optional Dependency ─────────────────────────────────┘
         
# Signing
         
┌────────────────────────────────────────┐
| macOS Signing   | Not configured       |
| Windows Signing | Not configured       |
| Linux Signing   | Not configured (GPG) |
└────────────────────────────────────────┘
                     
# Checking for issues
                     
 SUCCESS  No issues found

Checklist:

  • (v2 only) I have updated website/src/pages/changelog.mdx with details of this PR (v3 changelog entries are added automatically)
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • New Features
    • Native iOS tabs can now be enabled or disabled, checked for their current state, and selected by zero-based index from Go or TypeScript.
    • The iOS example includes controls for selecting a tab and toggling the tab bar.

@github-actions github-actions Bot added Bug Something isn't working v3 Documentation Improvements or additions to documentation runtime labels Sep 24, 2026
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Repository: wailsapp/wails/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: bee395f5-9f45-4350-891b-4874c66c3a61

📥 Commits

Reviewing files that changed from the base of the PR and between 3a180f0 and 863ad65.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: wailsapp/wails/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: ff5f3455-c849-46ea-b269-3b9c8487fa0c

📥 Commits

Reviewing files that changed from the base of the PR and between 7e95d89 and 3a180f0.

📒 Files selected for processing (10)
  • v3/IOS.md
  • v3/examples/ios/frontend/index.html
  • v3/examples/ios/frontend/main.js
  • v3/internal/assetserver/bundledassets/runtime.debug.js
  • v3/internal/assetserver/bundledassets/runtime.js
  • v3/internal/runtime/desktop/@wailsio/runtime/src/ios.test.ts
  • v3/internal/runtime/desktop/@wailsio/runtime/src/ios.ts
  • v3/pkg/application/ios_runtime_api.go
  • v3/pkg/application/ios_runtime_stub.go
  • v3/pkg/application/messageprocessor_ios.go

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The iOS runtime adds methods to enable, query, and select native tabs. The TypeScript runtime exposes these methods, and the iOS example and guide show how to use them.

Changes

iOS Native Tabs

Layer / File(s) Summary
Native-tab runtime dispatch
v3/pkg/application/messageprocessor_ios.go, v3/pkg/application/ios_runtime_api.go, v3/pkg/application/ios_runtime_stub.go
The message processor maps method IDs 9–11 to enable, query, and select operations. The iOS API delegates to platform implementations. Non-iOS stubs do nothing for enable and select calls, and report false for the enabled state.
TypeScript native-tab methods
v3/internal/runtime/desktop/@wailsio/runtime/src/ios.ts, v3/internal/runtime/desktop/@wailsio/runtime/src/ios.test.ts
The IOS.NativeTabs methods pass the enabled value or tab index to the runtime. The test checks method IDs, arguments, and the query result.
iOS examples
v3/examples/ios/frontend/index.html, v3/examples/ios/frontend/main.js, v3/IOS.md
The example adds controls for selecting a tab and enabling or disabling native tabs. The guide adds Go and TypeScript examples for these operations.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ExampleFrontend
  participant IOS.NativeTabs
  participant processIOSMethod
  participant iosManager
  ExampleFrontend->>IOS.NativeTabs: Select(1)
  IOS.NativeTabs->>processIOSMethod: Invoke method ID 11 with index 1
  processIOSMethod->>iosManager: SelectNativeTab(1)
Loading

Merge Risk: ⚪ Minimal · up to 3a180

The iOS example uses the updated native-tab controls through its local runtime build. No issue identified here needs to be fixed before merge.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the feature, motivation, testing environment, implementation type, and checklist status. However, this new feature does not link an accepted WEP PR as required by the reposito… Provide the accepted WEP PR link for this new capability and link the related issue, or document the repository-approved exception before merging.
Docstring Coverage ⚠️ Warning Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 6 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: exposing iOS native tab functions through the Wails iOS API.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the feature, motivation, testing environment, implementation type, and checklist status. However, this new feature does not link an accepted WEP PR as required by the repository template, and the issue reference remains unresolved.

Full details: Docstring Coverage

Explanation

Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 6 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit taps the tab with care
One hop left, the next is there
Enable the row or let it sleep
Check its state before a leap
The guide now shows the paths to roam
Then back to burrow, safe at home

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Documentation Improvements or additions to documentation runtime v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant