Skip to content

feat: add get_icon_state method to SpringBoardServicesClient #62

@fulln

Description

@fulln

Summary

I would like to add a get_icon_state() method to SpringBoardServicesClient for reading the iOS home screen icon layout.

Motivation

Currently, the library has get_icon_pngdata() for retrieving app icons, but there's no way to read the home screen layout structure. This would be useful for:

  • Backing up home screen layouts
  • Analyzing app organization
  • Development tools that need to inspect device state
  • Inventory management (listing installed apps and their positions)

Proposed API

pub async fn get_icon_state(
    &mut self,
    format_version: Option<String>,
) -> Result<plist::Value, IdeviceError>

This method:

  • Sends getIconState command to SpringBoard service
  • Returns complete home screen layout as plist::Value
  • Supports optional formatVersion parameter for compatibility

Testing

Tested successfully on:

  • Device: iPhone 16,2 (iPhone 15 Pro)
  • iOS: 18.7.3 (Build 22H217)

The method correctly retrieves the icon state with all pages, sections, and app metadata.

Implementation

I have a working implementation ready and will submit a PR. The implementation follows the existing code style and is based on libimobiledevice's approach.

Note on set_icon_state

I also investigated adding set_icon_state() but found it doesn't work on iOS 18+ (device accepts command but silently ignores changes). Therefore, the PR will only include the read-only get_icon_state() method.


PR incoming: Will add get_icon_state() only, as it's the functional and useful part.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions