Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📲 What
Fixes a bug in
SurveyResponseViewModel
which was causing survey response submission to fail on iOS 14.🤔 Why
In the time of iOS 12 and iOS 13, a bug existed in
WKWebView
which would produce anil
httpBody
property onURLRequest
. This was problematic for us because we would intercept these requests in order to inject our authentication headers before submitting the form data in the web view. A workaround was introduced in #975 to do this which thus expected thehttpBody
to benil
however it no longer is on iOS 14 as it seems Apple or the WebKit team have fixed this bug (although I can't find a source to confirm this).🛠 How
Added another path to handle the request which does not require the
httpBody
to benil
and in this case does not evaluate the JavaScript as a workaround.👀 See
Some discussion of the original
WKWebView
bug:https://bugs.webkit.org/show_bug.cgi?id=145410
https://bugs.webkit.org/show_bug.cgi?id=167131
✅ Acceptance criteria