deltachat / deltachat-ios

Email-based instant messaging for iOS.
GNU General Public License v3.0
310 stars 49 forks source link

show webxdc messages #1439

Closed cyBerta closed 2 years ago

cyBerta commented 2 years ago

counterpart of https://github.com/deltachat/deltachat-android/pull/2174

optional (might get into a separate PR)

Simon-Laux commented 2 years ago
r10s commented 2 years ago

deny web requests

i think, this is included in "intercept requests from webview", however, yes, it's good to have that mentioned explicitly.

Simon-Laux commented 2 years ago

i think, this is included in "intercept requests from webview", however, yes, it's good to have that mentioned explicitly.

It is not, the "interception" is actually creating a handler for a custom scheme, there is no way anymore to intercept web requests on iOS (according to my research of the documentation)

Simon-Laux commented 2 years ago

another optional point:

though IDK if that is possible at all for not debug builds of the app, also the docs I found are outdated:

If you have a development provisioning profile installed on your device, you can even inspect the web content of any UIWebView object in your app. The name of your app will appear as a submenu under the name of your device. When debugging web content in a web view, Web Inspector behaves in the same manner as debugging web content in Safari.

https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/GettingStarted/GettingStarted.html#//apple_ref/doc/uid/TP40007874-CH2-SW8

Simon-Laux commented 2 years ago

I made webxdc.js work, first I tried escaping the string to pass it to js, but my method only worked sometimes, so after wasting my time trying to figure it out without a js debugger, I just used base64 encoding 😈.

  • [ ] deny web requests

Looking at the code it looks like @cyBerta already implemented it, but it might make sense to run the acid test once we have it, anyways I don't see it as blocker as we did not test it on the other platforms either. So I'll mark this as done for now

cyBerta commented 2 years ago

@Simon-Laux you don't need any extra remote debugging tool, it's already working out of the box. I used the approach described here so far: https://stackoverflow.com/questions/6508313/javascript-console-log-in-an-ios-uiwebview

Is that what you were looking for?