I was struggling more than 7 days finding a solution for this. I am posting my findings as an answer because it will help someone who is facing this issue.
Actually my purpose was uploading file with other data to a Rest API
. Those functionality failed only on iOS
devices with version 13.2. I could not find a solution for that and I decided to change whole implementation. Then I used Camera plugin and File plugin to select videos from the Photo Library. That implementation is also has the same issue only on iOS
devices with version 13.2.
When using readAsDataURL(path, file)
,readAsArrayBuffer(path, file)
or readAsBinaryString(path, file)
methods in File plugin on selected video file using Camera plugin it was giving FileError 1
(not found error).
The issue was in Camera plugin. The reason for this error is photo library asset urls being invalidated on iOS 13. There is a Git Hub Issue for this.
I found a temporary fix for this problem on This Link.
I manually edited src/ios/CDVCamera.h
and src/ios/CDVCamera.m
in platforms/ios
as follows.
CDVCamera.h
@property (strong) CDVCameraPicker* pickerController;
@property (strong) NSMutableDictionary *metadata;
@property (strong) NSDictionary *latestMediaInfo;// Newly added line
@property (strong, nonatomic) CLLocationManager *locationManager;
@property (strong) NSData* data;
CDVCamera.m
__weak CDVCameraPicker* cameraPicker = (CDVCameraPicker*)picker;
__weak CDVCamera* weakSelf = self;
self.latestMediaInfo = info;// Newly added line
dispatch_block_t invoke = ^(void) {
__block CDVPluginResult* result = nil;
Hope this helps someone facing this issue.