iloader

repository·main·Indexed 23 days ago

https://github.com/nab138/iloader

A tool designed to simplify the installation of SideStore and other IPAs on iOS devices. It handles pairing files, certificates, and Apple ID authentication. The application provides a suite of Tauri commands for account management, device pairing via usbmuxd, and sideloading operations, including the ability to manage development certificates and App IDs.

Tokens
7.2K
Snippets
11
Records
47
Agent score
79%

What's inside iloader

  1. Install and use iloader

    main

    iloader is used to install SideStore (or LiveContainer + SideStore), import IPAs, and manage pairing files and development certificates on iOS devices.

    Prerequisites

    1. Install usbmuxd for your platform:
      • Windows: Install iTunes.
      • macOS: Included by default.
      • Linux: Install via your package manager if not already present.
    2. Download iloader: Get the latest version from the official releases. (Note: NixOS users can use the flake github:nab138/iloader).

    Usage Steps

    1. Plug your iDevice into your computer.
    2. Open the iloader app.
    3. Sign into your Apple ID.
    4. Select your desired action (e.g., 'install SideStore').
  2. Build iloader from source

    main

    To build the project locally, ensure you have bun (or Node.js) and Rust installed.

    Development Setup

    1. Clone the repository and cd into it.
    2. Install dependencies:
    bun i
    # or
    npm i
    1. Run in development mode with hot reload:
    bun tauri dev
    # or
    npm run tauri dev

    Production Build

    To create a production build, run:

    bun tauri build
    # or
    npm run tauri build
    bun i
    # or
    npm i
    
    bun tauri dev
    # or
    npm run tauri dev
    
    bun tauri build
    # or
    npm run tauri build
  3. Add or edit translations in iloader

    main

    To contribute to iloader's localization:

    To edit an existing language

    Modify the corresponding JSON file in src/locales/<lang>.json and submit a PR.

    To add a new language

    1. Add the language entry to the languages array in src/i18next.ts:
    const languages = [
        ["en", "English"],
        ["es", "Español"],
        // Your language here...
    ] as const;
    1. Copy src/locales/en.json to a new file named <langcode>.json in the src/locales directory.
    2. Update the strings in your new <langcode>.json file.
  4. Listen to operation status updates via Tauri events

    main

    The Operation struct manages long-running tasks by emitting Tauri events to the frontend. To track the progress of a specific operation, the frontend must listen for events on the channel named operation_{id}, where {id} is the unique identifier provided when the Operation was created.

    Each event emits an OperationUpdate object (serialized in camelCase) containing:

    • updateType: A string indicating the status ("started", "finished", or "failed").
    • stepId: The identifier of the current step being processed.
    • extraDetails: An optional AppError object, which is only present when updateType is "failed".
  5. Provide platform information with PlatformProvider

    main
    To make platform detection (mac, windows, or linux) available throughout your application, wrap your component tree with the PlatformProvider. The provider detects the user's operating system by inspecting the navigator.userAgent string during the initial mount.
  6. Setup DialogProvider to enable dialog functionality

    main
    The DialogProvider component must wrap your application (or the part of the tree that needs dialogs) to provide the DialogContext. It manages the internal state of the modal, including the title, message, and callback functions, and renders a Modal component when a dialog is triggered.
  7. Manage Apple accounts in iLoader

    main

    iLoader provides several Tauri commands to manage Apple account authentication and session state. You can perform new logins, restore stored credentials, delete accounts, and check the current login status.

    Login Methods

    • login_new: Performs a fresh login. If save_credentials is set to true, the password is saved to the system keyring and the email is added to the local data.json store.
    • login_stored: Retrieves credentials from the system keyring using the provided email and performs a login.

    Session Management

    • logged_in_as: Returns the email address of the currently logged-in user, or None if no session exists.
    • invalidate_account: Clears the current active session.
    • delete_account: Removes an account's credentials from the system keyring and removes its email from the local data.json store.

    Anisette State

    • reset_anisette_state: Deletes the stored Anisette state from the system keyring. This is useful for troubleshooting authentication issues related to the Anisette provider.
    // Example of how these commands are structured as Tauri commands
    #[tauri::command]
    pub async fn login_new(
        handle: AppHandle,
        window: Window,
        sideloader_state: State<'_, SideloaderMutex>,
        email: String,
        password: String,
        anisette_server: String,
        save_credentials: bool,
    ) -> Result<(), AppError> { ... }
  8. Troubleshoot iloader issues

    main

    If you encounter errors while using iloader, follow these steps:

    1. Check App Logs: Use the "View Logs" button within the app. If logs are insufficient, change the log level to Debug.
    2. Locate Local Log Files: If the app UI doesn't show enough information, check the following directories:
      • Windows: %APPDATA%\me.nabdev.iloader\logs
      • macOS: ~/Library/Application Support/me.nabdev.iloader/logs
      • Linux: ~/.local/share/me.nabdev.iloader/logs/
    3. Seek Help: If the issue persists, copy the full error message and post it on the idevice Discord server or open an issue.
  9. List installed pairing-compatible apps

    main
    The installed_pairing_apps Tauri command queries the device via the InstallationProxyClient to find apps that are known to support pairing files. It returns a list of PairingAppInfo objects containing the app's name, bundle ID, and the specific file path where the pairing file should be placed.
  10. Sideload an application via `sideload_operation`

    main

    Use the sideload_operation Tauri command to install an IPA file onto a connected device. This command manages the operation lifecycle (start, fail, complete) and reports progress to the provided window. It requires a selected device in the device_state and an active sideloader_state.

    # Note: This is a Tauri command called from the frontend
    #[tauri::command]
    pub async fn sideload_operation(
        window: Window,
        device_state: State<'_, DeviceInfoMutex>,
        sideloader_state: State<'_, SideloaderMutex>,
        app_path: String,
    ) -> Result<(), AppError>
  11. Check for stored RPPairing data

    main
    The has_stored_rppairing Tauri command checks if an RPPairing file (required for iOS 17.4+) is already cached in the application's secure storage for a specific device. For iOS versions below 17.4, it always returns true as RPPairing is not required.