ERROR fileUrl incorrect in IOS #94
Labels
bug
This is an identified bug that should be fixed.
help wanted
The great thing about open-source is that everyone can contribute!
Hi
I started using this plugin with great satisfaction on Android; when I tried to use it on IOS, I had problems starting from the example for a simple audio recording.
var captureCfg = { fileUrl : cordova.file.cacheDirectory + "temp.wav" } // Start the capture. audioinput.start(captureCfg); // ...and when we're ready to stop recording. audioinput.stop();
When I try this example in IOS (version 10) , the log is:
[INFO] startRecording: 0
[INFO] stop: 0
[INFO] stopped: 0
In debug with xcode I saw that there is a line (105-106) in AudioReceiver.m
_fileUrl = [NSURL URLWithString:[url stringByAddingPercentEncodingWithAllowedCharacters:set]];
that transform my path from :
file:///var/mobile/Containers/Data/Application/0C07A5DE-32CD-4498-833A-BBAEC19025D0/Library/Caches/temp.wav
to
"file%3A%2F%2F%2Fvar%2Fmobile%2FContainers%2FData%2FApplication%2F0C07A5DE-32CD-4498-833A-BBAEC19025D0%2FLibrary%2FCaches%2Ftemp.wav"
so the file url is invalid.
I try to comment the line that convert with percent symbols, and using this line
now it Works!
Someone has the same problem?
Am I doing something wrong using the plugin?
The text was updated successfully, but these errors were encountered: