tvOS file browser thrown together in SwiftUI. Supports tvOS 14.0+. I want it to support 13.0+ but ContextMenus are 14.0+. If you want to backport ContextMenus and make a pr, go ahead. I have an idea for eliminating ContextMenus but don’t have time to implement it. Aside from ContextMenus, everything supports 13.0+
What it currently lets you do:
- Browse file directory
- View and edit text files
- Watch videos
- Play audio (and view metadata)
- Create folders
- Create files
- Save folders or files to Favorites
- Get info about a file
- Rename a file
- Move a file or files to Trash (or if in Trash, delete them)
- Move a file or files to a given directory (if a single file, you can rename it)
- Copy a file to a new filepath (and optionally, rename it)
- View images
- View plist files (both xml and bplist)
- //BROKEN Execute binaries
- Compress and uncompress .zip archives
- Search a directory and its subdirectories for a file or directory
- Don’t assume a filepath is a directory in ContentView (you can specify a filepath to a non-folder and it will open the proper view) (this will probably never happen)
- Add info to ImageView and VideoPlayerView
- Plist editor
- Spawn binaries
- Root helper
By default it’s sandboxed, so you will need a tvOS jailbreak to use it unless you’re fine with just modifying what’s in the app’s data directory. Since it currently lacks a root helper, any actions that write to the filesystem must be within /var/mobile/. It will open /var/mobile/ by default, unless you are sandboxed, in which case it will open the app’s data directory.
How to use:
- Clone the repository and open it in Xcode (14.3+ required).
- Enter the Xcode.app folder and find the AppleTVOS SDK. Locate /usr/include/spawn.h, give it write permissions, and remove the listings that mark it as unavailable on tvOS.
- Build and run to your Apple TV.
Good luck have fun. Hopefully this isn’t the only tvOS file browser ever.