Skip to content

Conversation

@72lions
Copy link

@72lions 72lions commented Aug 20, 2025

Arrow key support

  • Add ArrowUpCommand, ArrowDownCommand, ArrowLeftCommand, ArrowRightCommand
  • Integrate arrow key commands into CLI main interface
  • Add arrow key helper functions in common.hid module
  • Add arrow key methods to gRPC client

Fixing compilation errors

  • Remove outdated parameter documentation in FBArchiveOperatioations
  • Make simulator headers public in Xcode project
  • Fix double semicolon syntax error in FBiOSTargetProvider

Motivation

The tvOS simulator crashes when trying to navigate via tapping or swiping. It needs to be controlled with the arrow keys.

Test Plan

#!/usr/bin/env python3
"""
Test script for arrow navigation functionality in idb.
This script demonstrates the new arrow navigation capabilities for tvOS/iOS automation.
"""

import asyncio
import sys
from idb.grpc.client import Client
from idb.common.companion import Companion


async def test_arrow_navigation():
    """Test arrow navigation commands on connected simulator/device."""
    
    # Connect to the companion
    companion = Companion(
        "localhost", 
        10882,  # Default companion port
        is_local=True,
        logger=None,
    )
    
    async with Client.build(
        companion_info=companion,
        logger=None,
    ) as client:
        print("🎮 Testing Arrow Navigation Commands")
        print("====================================")
        
        # Test each arrow direction
        print("⬆️  Testing arrow up...")
        await client.arrow_up()
        await asyncio.sleep(1)
        
        print("⬇️  Testing arrow down...")
        await client.arrow_down()
        await asyncio.sleep(1)
        
        print("⬅️  Testing arrow left...")
        await client.arrow_left()
        await asyncio.sleep(1)
        
        print("➡️  Testing arrow right...")
        await client.arrow_right()
        await asyncio.sleep(1)
        
        # Test with custom duration
        print("⬇️  Testing arrow down with 0.5s duration...")
        await client.arrow_down(duration=0.5)
        await asyncio.sleep(1)
        
        print("✅ Arrow navigation test completed successfully!")


if __name__ == "__main__":
    try:
        asyncio.run(test_arrow_navigation())
    except Exception as e:
        print(f"❌ Error during testing: {e}")
        sys.exit(1)

- Add ArrowUpCommand, ArrowDownCommand, ArrowLeftCommand, ArrowRightCommand
- Integrate arrow key commands into CLI main interface
- Add arrow key helper functions in common.hid module
- Add arrow key methods to gRPC client
- Fix double semicolon syntax error in FBiOSTargetProvider
- Remove outdated parameter documentation in FBArchiveOperations
- Make simulator headers public in Xcode project
@meta-cla
Copy link

meta-cla bot commented Aug 20, 2025

Hi @72lions!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla bot added the CLA Signed label Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant