vaporBoy
vaporBoy copied to clipboard
Opening ROMs via the iOS Files app / file picker doesn't work
Trying to open a ROM via the file picker always leaves them greyed out, whether it's .zip or .gbc and regardless if it's stored locally or on iCloud or Dropbox.
I'm on iOS 14.3
Hmmm that's odd! Thanks for the bug report! I'll look into this once I get the chance! :smile:
The same thing happens on iOS 15 :(
Does not work for me either.
The fix is simple.
In ROMSourceSelector.js
Last lines currently is:
return (
<div class="ROMSourceSelector">
{/*Our Hidden Input for uploading files*/}
<input
type="file"
id="ROMFileInput"
class="hidden"
accept=".gb, .gbc, .zip"
value={undefined}
onChange={event => {
this.loadLocalFile(event);
}}
/>
{sourceOptions}
</div>
);
As iOS and PWA's never really work as expected you can't specify the types: https://caniuse.com/input-file-accept
The code should be:
return (
<div class="ROMSourceSelector">
{/*Our Hidden Input for uploading files*/}
<input
type="file"
id="ROMFileInput"
class="hidden"
accept="*"
value={undefined}
onChange={event => {
this.loadLocalFile(event);
}}
/>
{sourceOptions}
</div>
);
I've tested this on my iPhone 13 and it works. Would be nice to have updated @torch2424 I know this allows all files to be uploaded. One could add a filter afterwards to check if the selected file actually is the right file types?
@torch2424 Any chance of you quickly committing this fix? It would mean VaporBoy actually works with iOS, allowing us to play our old games without a jailbreak! โค๏ธ
My bad about the late review on this y'all! ๐ I shifted my main focus to my music career, rather than development, so I haven't been checking Github at all. But! I went ahead and tested the deploy preview, and this all works on my end. So merging! ๐ ๐
Thank you VERY much @nuller1joe for the PR! I super super appreciate it! ๐๐พ ๐
cc @ahydronous & @lxgr