Add iOS native intelligence bridges - #8
Closed
YurkoHoshko wants to merge 6 commits into
Closed
Conversation
YurkoHoshko
commented
May 15, 2026
YurkoHoshko
commented
May 16, 2026
YurkoHoshko
marked this pull request as ready for review
May 17, 2026 07:53
Author
|
closing to be re-built as plugin |
pshoukry
pushed a commit
to pshoukry/mob
that referenced
this pull request
Sep 9, 2026
Closes mob/issues.md GenericJam#7 + GenericJam#8 — both were AX-conformance bugs in the SwiftUI components that backed `<Slider>` and `<Toggle>` in the renderer. GenericJam#7: `MobSlider` had no `.accessibilityAdjustableAction`. SwiftUI ignores VoiceOver / `accessibilityIncrement` calls without it; the NIF returned :ok but the value never moved. Added the modifier with default step `(max - min) / 10` (matches VoiceOver's default for native UISlider) and a wired callback so on-change events fire too. GenericJam#8: `MobToggle` used SwiftUI's `Toggle("Label", isOn:)` form, which does NOT propagate the label string into the underlying control's `accessibilityLabel`. The AX tree exposed the toggle as a button with empty label, so `Mob.Test.toggle(node, "Notifications")` returned :label_not_found. Added `.accessibilityLabel(label)` after the toggle so the visible text reaches the AX tree. Both fixes are in `ios/MobRootView.swift`. Android counterparts (`MobSlider` / `MobToggle` in MobBridgeKt) need analogous `Modifier.semantics { setProgress(...) / contentDescription = ... }` calls — tracked separately under issues.md GenericJam#11 (Compose semantics).
pshoukry
pushed a commit
to pshoukry/mob
that referenced
this pull request
Sep 9, 2026
…d-around GenericJam#7 + GenericJam#8 — `MobSlider` and `MobToggle` in MobRootView.swift gained the SwiftUI AX modifiers SwiftUI doesn't apply by default (.accessibilityAdjustableAction with default step (max-min)/10 for the slider; .accessibilityLabel(label) for the toggle). Mob.Test end-to-end driving works after these. GenericJam#14 — defensive fallback in MobDev.Connector. When the primary node name times out the connector now also tries the alternate `<app>_ios@127.0.0.1` form (without the udid suffix). The connected Device.node is updated to whichever responded so downstream RPC calls use the correct address. The root cause (mob_beam.m sometimes not seeing SIMULATOR_UDID) is captured in the resolution note for a future investigation. Remaining: GenericJam#3 (WebSocket→longpoll, investigation), GenericJam#6 (16 KB page alignment, OTP rebuild), GenericJam#9 (Alert OK button, UIKit deep dive), GenericJam#10 (Android 17 SELinux, OTP source patch), GenericJam#11 (Android Compose semantics walker, ~200 lines Kotlin).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mob.IOS.FoundationModels,Mob.IOS.Vision, andMob.IOS.Speech:unsupportedMob.Photos.pick/2for OCR input andMob.Audio.start_recording/2/Mob.Audio.stop_recording/1for Speech inputAI-assisted disclosure
This PR was implemented with AI assistance from Codex. The changes were reviewed, simplified, and validated locally before pushing.
Where to test
Mob.IOS.FoundationModels.generate_text/3Mob.IOS.Vision.recognize_text/3Mob.Photos.pick/2to choose a simulator photo, then pass the selected path toMob.IOS.Vision.recognize_text/3. I also verified OCR against a PNG copied into the simulator app container.Mob.IOS.Speech.transcribe_audio/3Mob.Audio.start_recording/2andMob.Audio.stop_recording/1. The simulator may still return recognizer initialization errors depending on Speech authorization, locale, and runtime service availability.Validation
mix formatmix testmix compile --warnings-as-errorsmix docsxcrun --sdk iphonesimulator swiftc -parse -target arm64-apple-ios26.0-simulator ios/MobFoundationModels.swift ios/MobVision.swift ios/MobSpeech.swiftios_ai_labagainst branch commit37fd807ScreenRecording_05-17-2026.00-51-38_1.MP4