Camera access problem in Discourse App for iOS


#1

I found camera issues when I upload captured image with camera directly.
On the contrary, mobile app for Android is very well work.
I tested it using Discourse Version 1.1.0 n iOS 10.3.3.


(Joffrey Jaffeux) #2

Indeed good catch, looks like our app needs camera access even if it happens inside safari.

I will track it here: [iOS] Request camera access · Issue #32 · discourse/DiscourseMobile · GitHub


(Joffrey Jaffeux) #3

Until we release the new version, workaround:

  • take your picture by launching camera.app
  • in discourse.app, upload picture from library instead of camera

(Joffrey Jaffeux) #4

Ok, pretty sure it’s an iOS bug. I have pushed some changes to be sure we are requesting correct permissions, but it doesn‘t change anything. I will try on iOS11 when I can, I think it will work.


(Willemb2) #5

We just started a pilot with Discourse an ran in to this bug, tested with Discourse app version 1.2.1 and iOS 11.2.6 on several iPhone models. I reinstalled the app making sure I allowed it access to the camera.
This will not help with acceptance of Discourse in our community. People are used to this method of inserting photo’s from apps like Facebook and WhatsApp.

It works fine on Android 6.x and 7.x phones.


(Sam Saffron) #6

We got to get this sorted, do you have it fixed in your local state?


(Joffrey Jaffeux) #7

Yes I have been tracking this and…

Safari
Resolved Issues
• WebApps saved to the home screen and webpages in SafariViewController can
now use the camera to capture images. (35542231)

This is in the release note of iOS 11.3 beta, so it should work once 11.3 is out.

iOS_11.3_beta_4_Release_Notes.pdf (151.2 KB)


(Willemb2) #8

Guess what? If I ignore your app and use Firefox on iOS, open my Discourse forum I, it all looks exactly the same. I press Upload, chose “Take Photo or Video” and it works!

Why is your app leaning on Safari? I don’t work on Apple devices very often, but when I have to, the first thing I always do is install a normal browser.


(Sam Saffron) #9

Hmmm on Apple iOS you are always using Safari like it or not. Google Chrome in iOS uses Safari rendering engine and Javascript engine as does Firefox and all the rest.


(Willemb2) #10

To avoid any chance of misunderstanding, this is where we start:
iOS%20foto

That works in Firefox, not in your app which apparently launches Safari.

That adds to my layman’s amazement about this function working in Firefox. But don’t worry, we’ll just wait for iOS 11.3 to become live.


(Sam Saffron) #11

Did you read Camera access problem in Discourse App for iOS it is not working cause of an Apple bug that will be fixed


(Jeff Atwood) #12

Refer to this article:

It is not possible to ship another browser on iOS. Apple won’t allow it. What you call “Firefox” or “Chrome” on iOS, is a thin wrapper around the internal WKWebView which is Safari.

On iOS, Apple has never allowed third-party browsing engines. Developers can build browsers, but they’re always just wrappers for the platform’s Webkit-based first-party engine. The oldest API for this in iOS is called UIWebView.

See above.


(Willemb2) #13

Thanks Jeff, I’m learning about browsers and web-apps and I already new about Apple’s arrogance.

But look at it through the end-user’s eyes: he/she is told to install an app called “Discourse app”. In that app is a button “Take photo or Video” that is familiar to them because they use it every day in other apps. But it doesn’t work in this app. That is killing to their appreciation of it. Even if there are workarounds. Even if I tell them a dozen times that Apple is the bad guy here. They will compare it with their apps from Twitter, Facebook , WhatsApp etc. That’s not fair, but they will do it anyway.

From the first answer in this topic I understand that this bug was already known in July 2017. I would have left that button out of the app. But I realize that on the coding level it could be horror what I’m saying now :scream: Anyway, again: iOS 11.3 is nearly there and we still have time until our evaluation.


(Jeff Atwood) #14

I guess

  • This issue only applies to live camera shots, not uploading existing pictures one has already taken

  • Limitation only applies to the app, but Discourse does not need an app, works fine in any mobile browser

So the impact area is quite narrow. Glad to hear 11.3 has a fix though.


(Willemb2) #15

@joffreyjaffeux I just tested with iOS 11.3 public beta 5 and it works!


(Joffrey Jaffeux) #16

Thanks for testing it and letting us know! Appreciated. Glad to hear it too.


(Joffrey Jaffeux) #17

iOS bug, fixed by iOS 11.3