6 Replies Latest reply on Jan 15, 2017 5:55 AM by martinb77004568

    iOS 10 crash on file input

    martinb77004568 Level 1

      Hi,

       

      I have created a simple test application for you to reproduce my problem.

      config.xml
      <?xml version="1.0" encoding="UTF-8" ?>
      <widget xmlns   = "http://www.w3.org/ns/widgets"
              xmlns:android = "http://schemas.android.com/apk/res/android"
              xmlns:gap   = "http://phonegap.com/ns/1.0"
              id          = "com.example.example"
              version        = "1.0.0"
              versionCode = "1">
          <name>Test-App</name>
          <description>An example</description>
          <access origin="*" />
          <preference name='phonegap-version' value='cli-6.4.0' />
          <platform name="ios" />
          <platform name="android" />
          <preference name="android-build-tool" value="gradle" />
          <icon src="ic_launcher.png" />
          <content src="index.html" />
      </widget>
      
      

       

      index.html

       

      <!DOCTYPE html>
      <html>
          <head>
              <meta name="viewport" content="width=device-width, initial-scale=1">
          </head>
          <body style="margin-top: 20px;">
              <h3>File input</h3>
              <input type="file" />
          </body>
          <script src="cordova.js"></script>
      </html>
      

       

       

      When clicking on the file input, it shows me a dialog asking me if I want to "Take Photo or Video" or go to the "Photo Library".

       

      Expected behavior

      After clicking on one of the two, a prompt should appear requesting permission for one of the two.

      Actual behavior

      When clicking on one of the two buttons in the dialog, the app crashes. It instantly closes and is not visible when double tapping the home button (to reveal the currently running apps). I think, this happens because no permissions are requested.

       

      Test device

      iPad Air 2 with iOS 10.0.1

       

      I am sure this worked a while ago. I cannot tell if something changed on PGB or if it is because of my update to iOS 10. I think that NSCameraUsageDescription and NSPhotoLibraryUsageDescription are missing.

       

      What can I do to fix the problem? Has something changed on PGB? Ofc, I could add the two entries into my plist file. But my app uses multiple languages - I have no idea how I could localize the strings. Furthermore, I think that file inputs should be working by default without having to modify anything

      It would be really nice if you could tell me what to do now!