wymsee / cordova-imagePicker

Cordova Plugin For Multiple Image Selection
MIT License
407 stars 858 forks source link

iOS 10 issue : need to press home button to see the permission alert #201

Open hiteshds opened 7 years ago

hiteshds commented 7 years ago

I installed this plugin and it is working fine on all major platform. But it is having an issue when I used it on iOS 10. When I click on button to select a image, the permission box appear in the background. I need to press home button and again need to open the app then it displays photo library.

best1678 commented 7 years ago

I have the same problem. I did the project in Win8 32bit and I copy whole code and try to build project in Mac. The Error show me that Base64x.... something. I create new project and copy all Files in WWW. everything work fine but only imagepicker is not work. Then I install plugin again and now I got this problem.

danieltigse commented 7 years ago

It happened to me too. Do you have any solution?

best1678 commented 7 years ago

I fixed it. For me it's because i added "Content-Security-Policy" in the index.html. I just comment this line and it's worked. see my code below. I copied it from of index.html

//Do not use this line for IOS

meta http-equiv="Content-Security-Policy" content="default-src ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ; style-src 'self' 'unsafe-inline' *"

januslo commented 7 years ago

@best1678 "Content-Security-Policy" would not be the problem, just make sure all the access file types is included and allowed. providing my app setting for reference <meta http-equiv="Content-Security-Policy" content="default-src 'self' gap: data: *; connect-src http://www.myapp.com:* ws: blob: http://www.myapp.com:* file: http://localhost:*; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">

best1678 commented 7 years ago

@januslo I gonna remove my comment in this lane and try it one again. By the way can U please check this line? is it correct?

meta http-equiv="Content-Security-Policy" content="default-src ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ; style-src 'self' 'unsafe-inline' *"

best1678 commented 7 years ago

@januslo I'm really sorry. I can't test it now because This problem occurred only in IOS. I gonna check it and reply to you later.

januslo commented 7 years ago

I am current running this line on my app.

发自我的 iPhone

在 2017年2月22日,下午1:00,best1678 notifications@github.com 写道:

@januslo I'm really sorry. I can't test it now because This problem occurred only in IOS. I gonna check it and reply to you later.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

danieltigse commented 7 years ago

It's rare but both solutions works. Removing the line and adding more parameters to the meta tag.