Add iOS external storage support (usb, sd, mircrosd)
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
- Install RetroArch
- 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
- RetroArch: 1.10.3 (I think)
Environment information
- OS: iOS 14.8
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"
},
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
Just adding some extra info. On iOS 18 (iPad) w/ RetroArch 1.19.1, the apps file browsing still can NOT access any external storage directly using a Manual Scan as described above.
However, if using Main Menu -> Load Content -> Open, the iOS file picker opens, which of course can see the external storage. Anything selected gets imported into RetroArch's downloads folder though, defeating the purpose of the external storage access.