[SOLVED] Native features succeed only when I press home button and go back to App on iPhone 6

My app is now available on the App Store so I had the oportunity to test the app on the other devices because my virtual machine with macOs just recognized devices with iOS less than 10.

On my app I have a personal page where it is possible to change the profile photo and other things like download pdfs, docx, etc. I did that with cordova native plugins. I tested on iPad (9.3.5) and works fine. But when I press the screen to execute a feature like that on my iPhone 6 nothing happens, which doesn’t represent what I tested on simulator. I discover that if I press home button and then open the app again or scroll down the notifitication bar the feature works perfectly fine. I just had this problem in iPhone 6 so far.

Have you faced something similiar or know the reason behind it?
Thanks

I remember two people reporting the same problem, hanging app and only Home button or interacting with the system bar or “settings” swipe up from bottom thingie getting their app back to execute. But I don’t remember anything else, so I can’t find these posts right now.

Thanks for the reply Sujan12. Do you remember if there was an answer to this problem?

I found a similar post (App not working correct on IOS 10.0.2) but is not the same thing because on my app everything works as expected, except native features. It’s interesting to see that those same features work when I do some interaction with the system.

Yes, I think it was resolved somehow. I feel pretty dumb that I have now idea how… Something was blocking code execution, and “leaving” the app (by focusing a OS feature) resolved that problem.

(There was also another person posting about this problem, I replied with a similar “I know this was here before, don’T remember where and how solved” but wasn’t mentioned again then)

1 Like

Thanks again. If you think it was resolved I will try to find the solution. If by any chance you find or the solution comes up to you reply me.

1 Like

Solved with inserting the tag bellow in index.html

<meta http-equiv="Content-Security-Policy" content="frame-src * gap://ready; default-src 'self' gap://ready file://* *; connect-src * blob: data:; style-src * 'unsafe-inline'; script-src * 'unsafe-eval' 'unsafe-inline'; img-src data: *">

Content Secure Policy was blocking code execution and this code prevents that

1 Like