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.
Many thanks to everyone that could help me.
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.
Is it something that you already tried in your projects?
I’ve followed your suggestion but no popup is showing.
You can see what I’ve done here
Add a button to the app like this
Keep it hidden
Camera and Gallery components to the button.
Now Thunkable should ask for permission when installed in the device.
Hi @muneer , Do you think there are alternative solutions?
I did exactly like you suggested, but still no permission popup is showing. You can look inside my demo project here
Maybe I’m making some mistake somewhere.
I also asked to the Thunkable chatbot but I’m still waiting for an answer since Monday.
After you add the blocks, did you include permission strings in your project settings?
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 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 would first try to invoke the Camera Permission from the HTML script itself.
Check this link
Unfortunately, it does not work on any iPhone, at least on my iOS 14.6
The table here shows that Safari is compatible with it as long as your phone has the version indicated or above.
Also remember that the URL should be https. It might not work with http as noted in the table.
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
Web Viewer and from the app you invoke the Camera block to get the permission dialogue.