Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding webxdc to home screen stopped working #1880

Closed
r10s opened this issue May 18, 2023 · 3 comments · Fixed by #1940
Closed

adding webxdc to home screen stopped working #1880

r10s opened this issue May 18, 2023 · 3 comments · Fixed by #1940

Comments

@r10s
Copy link
Member

r10s commented May 18, 2023

as there are no recent changes in the code, i suspect the iOS 16.4 update i did recently on my iphone14.

EDIT: yip, it seems to be a change in iOS, the same Delta Chat version can add shortcuts on iphoneSE1 with iOS 15.7.3

when using "Add to homescreen" from the webxdc's menu, the following error is shown in the browser (the browser is needed as we are creating a "mini pwa" as only they are allowed to exist on the homescreen - this needs an http-server during adding, see #1665 - and that seems not to work)

@r10s
Copy link
Member Author

r10s commented May 21, 2023

the issue in upstream: httpswift/swifter#537

it is a pity, that there seems to be no way to pass a data: url directly; in theory, the whole server part should not be needed at all :/

EDIT: found some hints that only long data:-urls do not work, tried with a smaller one (148 bytes base64), no chance, still the error Failed to open URL data:text/html;base64,PGh0bWw+CiAgICA8aGVhZD4KICAgICAgICA8dGl0bGU+Zm9vIGJhcjwvdGl0bGU+CiAgICA8L2hlYWQ+CiAgICA8Ym9keT4KIC ... bWw+Cg==: Error Domain=NSOSStatusErrorDomain Code=-10814 "(null)" UserInfo={_LSLine=244, _LSFunction=-[_LSDOpenClient openURL:fileHandle:options:completionHandler:]}

EDIT2: here is an alternative server dedicated to exactly the issue of opening data:-urls: https://github.com/HerrmDE/OpenBase64EncodedDataWithSafari - however, at a first glance this is not much different from the existing implementation, also, the project seems unmaintained.

@r10s
Copy link
Member Author

r10s commented Sep 5, 2023

from ios-dev chat:

SO question: https://stackoverflow.com/questions/77028005/create-a-shortcut-on-ios-homescreen-from-my-app-post-ios-16

idea is that we can tell users in a short tutorial how to use the shortcut app for this.
like this app does it: https://apps.apple.com/app/apple-store/id1532875441
Basically tell user to copy a code (contains account & messageid) and then create a shortcut, open safari url and paste the link there, then add the shortcut to the homescreen. The coding (logic) work would be very minimal because we might be able to just use safari / standard open url action. The harder part is the design of the tutorial, since it only effects newer versions we could use swiftui or just a website in a webview if we think that would be easier.

hard to tell, if this is a doable approach, would need some research and a little proof-of-concept (the "tutorial" is a think, we can think over afterwards, also the existing approach is not that easy). the liked example does not really look good to me here, it is far too complicated

for the existing approach: would be interesting, if we the approach would work by using a "real" web server, sth. we do for invite.delta.chat if the server would just server a file, no data are processes (iirc, the approach as such is still okay, but the local server is blocked). privacy wise, that may not be worse than using apple shortcuts

@Simon-Laux
Copy link
Member

privacy wise, that may not be worse than using apple shortcuts

if you don't share shortcuts I don't know what's bad for privacy in using them. But for convenience I agree, the Webserver could be a solution, but it means

  • you need to be online to create the link
  • we need to maintain a new server and mention it in our privacy policy
  • links may only work when user is online, because offline PWA's sometimes were sometimes suddenly not cached anymore in my experience with them.

So in essence the webserver approach would serve a custom PWA for the user that has a custom icon, so it is probably not possible or very hard to do this in a static website, I bet we need a dynamic site for that.

Benefits and downsides:

Webserver Shortcut tutorial
+ easy for users - more clicks for users
- need to be online to create the link + works offline
+ can use the app icon - user needs to create their own icon based on svg icons apple provides
- tech is complex (create dynamic pws, host/maintain a server) + easy implementation
- might stop working offline + will still work offline
- privacy policy entry needed + privacy policy entry not needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants