libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.24k stars 1.83k forks source link

Add iOS external storage support (usb, sd, mircrosd) #14915

Open rbreaves opened 1 year ago

rbreaves commented 1 year ago

Description

Import Scan Directory should have this directory as a default directory on iOS 14+. Looks like this only works on jailbroken devices.. testing this path on iOS 16 non-jailbroken does not result in success.

/private/var/mobile/Library/LiveFiles/com.apple.filesystems.userfsd

Expected behavior

When I plug in a usb camera kit type of adapter or microsd reader via lightning or usbc (iPad's) then RetroArch should allow for scanning of those drive.

Ultimately I think this part of the app needs rewriting to behave more like how iOS nPlayer is able to read and load files dynamically off of usb without needing to copy it locally first (or if it does then that is hidden from the user).

Actual behavior

Import Content does not list any path to the sd card or usb drives.

Steps to reproduce the bug

  1. Install RetroArch
  2. Import Content -> Manual Scan -> Content Directory -> Missing path to sdcard

Note: Applies to Scan Directory as well.

Version/Commit

You can find this information under Information/System Information

Environment information


Also I have confirmed that this does indeed work - RetroArch can fully access sd cards just fine.

{
      "path": "/private/var/mobile/Library/LiveFiles/com.apple.filesystems.userfsd/NO NAME/Emulation/Classics/GBC/Censored.zip#Censored (USA).gbc
      "label": "Censored (USA)",
      "core_path": "DETECT",
      "core_name": "DETECT",
      "crc32": "A91EC059|crc",
      "db_name": "Nintendo - Game Boy Color.lpl"
    },
rbreaves commented 1 year ago

Just as additional notes, I presume this file along with another will need to be updated to include additional default paths for iOS builds specifically so that the path '/private/var/mobile/Library/LiveFiles/com.apple.filesystems.userfsd' can become a new default for all iOS builds after a certain iOS version.

I don't know if this new path began with iOS 8, 11 or 14, but I do know it'd be safe to mark it as 14+.

https://github.com/libretro/RetroArch/blob/master/manual_content_scan.c

gouchi commented 4 months ago

@rbreaves Is it still an issue with latest version on the Apple store ?

Thank you.