Dear Community,
I would like to ask you if someone can help with the issue described in the subject.
I developed a way for taking and cropping photos with a simple html5 script (you can see it here) but I noticed that camera and photo library permissions are never asked and I would like to find a way to solve it.
I’m pretty sure that App Store and Google Play will never approve an app like that and also it would be very unfair concerning users’ privacy and trust.
I already took a look at old posts in the forum (for example this one), I implemented the suggested workaround in my project but no permission popup was showing.
Cloudinary is not an option for me anymore because of privacy matters (their servers are not located in the EU) and also because image upload is extremely slow.
Using HTML is not the best option for me but still acceptable, so finding a solution to my question is crucial for my app to be still developed in Thunkable.
Create a hidden button somewhere in your app and add the camera and photo gallery to the click event of the button. This will force Thunkable to ask for permissions.
Hi @jared , yes I did, I included the strings for iOS permissions if it’s that what you mean.
For me it’s very difficult to understand how a hidden button can raise the camera permission popup. Normally it raises only if a call to the camera block really happens
I have an update, if you have feedback, please, feel free to comment and reply.
The only way I found is to ask the user to explicitly use the camera and the photo library at least once with native blocks. This forces him/her to provide the permissions to the systems, after that I guess it is ok to offer the same features via HTML / javascript.
The bad part of the workaround is that the first time the user takes a “fake” picture with the only purpose to get the necessary permissions.
So, to limit the UX impact I’m developing a tutorial that starts immediately after the download to tell the user which permissions are necessary and ask to make a simple test opening the camera and the photo library.
I can’t say right now if this will hurt the user and if app stores will approve but this is the best solution I found at the moment and worth the risk.
I guess it is ok if you open it in a Safari browser Tab but it does not work if you open it in a WKWebView instance, which is the webview component for iOS
In this case you will need a way to implement try - catch in JavaScript and see if the error reported is related to permission then you can report it back to your app through the Web Viewer and from the app you invoke the Camera block to get the permission dialogue.