Input type=“file” not working on ios 10 os
Any resolution for this? I am also seeing this issue.
I am seeing the same problem. I’ve been using ng-file-upload for over a year now and it has worked great until running it on ios 10. Even on iOS 10, if I just put a straight <input type="file">
in my app, it works fine, but if I use <button ngf-select="myFunc($files)">
, then that no longer works.
However, the problem is with Ionic
, not ng-file-upload
, because I built a quick test app using cordova
(without Ionic
) and ng-file-upload
works fine. I then created one of the Ionic
starter apps and ng-file-upload
doesn’t work. I did notice that if I disable the tap system with data-tap-disabled="true"
, then ng-file-upload
works again.
So the problem is with Ionic’s tap system.
IOS 10 introduced stricter rules for both Content Security Protection rules (I faced DOM 18 errors for Websockets when older versions did not) as well as for local resource permissions (Camera and File). In my case, I am saving images to disk and I had to specify a static permission for this (starting IOS 10). I bet you also need to do the for input file. Note that since platform files get deleted if I remove/add, its better to add in config.xml instead and use cordova-plugin-settings-hook
I already have NSPhotoLibraryUsageDescription
, NSCameraUsageDescription
, and NSMicrophoneUsageDescription
permissions set for my app. I don’t know of any other permissions I need to set.
Also, I forgot to mention that the the file input only fails if I launch the app from the command line using ionic run ios --device
. If I open up the ios platform and run it from Xcode
, then the file input works.
Does anybody know what Xcode
does that’s different than ios-deploy
(which is the tool used to run an ios app from the command line)?
Ah, given that additional detail, its probably something else. Sorry, I don’t use ionic run at all, only use Xcode. Hopefully others can chime in.
I have same issue, I used input type=file and use ng-file-upload, as soon as I touch the input button app crashes. Has anyone found the solution to this?
hi, this work for me
add to info.plist :
privacy - Photo Library Usage Description
privacy - Camera Library Usage Description
The problem was in the security of the xcode that does not allow the access to the camera and gallery if you do not specify so that you use them
where should i add thes code in my cordova project…?
same problem with me any suggestion