This also happened to me when exporting to iOS and cost me several hours of frustrating debugging. For anyone struggling with "missing" files in a folder or directory when exporting to a PCK file on iOS, here's how I solved the problem.
TL;DR: look for the *.ext.import extension and then remove the extension to load the imported *.ext file.
const SOUND_DIR = 'res://sound'
var samples = {}
var dir = Directory.new()
var err = dir.open(SOUND_DIR)
if err == OK:
dir.list_dir_begin()
var filename = dir.get_next()
while filename != '':
if filename.ends_with('.wav.import'):
filename = filename.left(len(filename) - len('.import'))
var asp = AudioStreamPlayer.new()
asp.set_stream(load(SOUND_DIR + '/' + filename))
add_child(asp)
var arr = filename.split('/')
var name = arr[arr.size()-1].split('.')[0]
samples[name] = asp
filename = dir.get_next()
Note that the SOUND_DIR does *not* have a trailing slash. Godot is forgiving of that when running in the editor but the iOS builds are not.
So here's what's happening as background: When you add a file to the res folder it imports it into the .import directory, creates a filename.import file to point to it, and leaves the original file. So if you add mysound.wav to the sound folder and import it you'll get something like:
sound/mysound.wav
sound/mysound.wav.import
.import/mysound.wav-1234567890abcdef1234567890abcdef.md5
.import/mysound.wav-1234567890abcdef1234567890abcdef.sample
The imported sample and .import pointer file are exported to your PCK file. The original .wav file is not. However, calling load('res:://sound/mysound.wav') will find the .import file and load the imported sample just fine. Overall this makes sense but you can confuse yourself by looking only for .wav extensions in the directory when looking at the original unexported directory.
If you try to export the original .wav or .ogg files as well it might work but you will end up with duplicate files in the build, which is probably not what you want.
Anyway, I hope this saves someone some debugging time in the future.