element-hq / element-ios

A glossy Matrix collaboration client for iOS
https://element.io
GNU Affero General Public License v3.0
1.73k stars 492 forks source link

Deep links doesn't seem to work #7632

Closed alexander-potemkin closed 1 year ago

alexander-potemkin commented 1 year ago

Steps to reproduce

As a follow up for https://github.com/vector-im/element-meta/issues/1946, I'm raising this issue here.

Your use case

What would you like to do?

Provide an option to open a client (desktop, mobile) with prefilled server and, ideally, only a login option (without registration). I can make all that kind of customizations on web client easily, but for desktop & mobile I need clone, reproduce build, change things, which is all quite resource intense task.

Why would you like to do it?

To provide an option to easily log in to the server for non-tech savvy users. Something of the kind seems to be at Matrix.org server, but it doesn't work for a customer server.

How would you like to achieve it?

I tried:

None of them works.

Desktop doesn't pick it up on a fresh start (only if it was already started), but when I click login/register, it's back to matrix.org server. iOS app just ignores that altogether.

So, having one working way to call the client with predefined server and, ideally, option to login (not register), via something like element://vector/webapp/#/room/%23discuss%3Amyserver.com?register=0 would be ideal.

Have you considered any alternatives?

Yes. I've tried to make a custom build (offered to provide it back to Element, but with no luck).

Additional context

That feels an important thing for self-hosted servers.

Outcome

What did you expect?

I would expect iOS client to open with specified server; ideally - with sign-in option, but I understand, it's a feature.

What happened instead?

The client keeps opening on Matrix.org server.

Your phone model

Any

Operating system version

Any

Application version

Any

Homeserver

Any

Will you send logs?

Yes

pixlwave commented 1 year ago

@alexander-potemkin Server provisioning is supported via a universal link in the following formats (is_url is optional on both):

https://mobile.element.io/?hs_url=matrix.example.com&is_url=identity.example.com https://app.element.io/register/?hs_url=example.com

iOS adds a blue open button at the top of the page for these links.

I'm going to close this issue for now as I think this covers what you're looking for.

alexander-potemkin commented 1 year ago

@pixlwave , apologies for the delay and thank you!

For mobile - yes, it's what I needed, indeed. The only one more question remains is: can I also specify some other flag to skip 'register' and only leave 'login' option?

For desktop - unfortunately it doesn't work - is there some problem with URL probably?

pixlwave commented 1 year ago

can I also specify some other flag to skip 'register' and only leave 'login' option?

We don't have anything implemented like this currently. The register button is always shown if the homeserver supports registration.

For desktop

This is probably a question for https://github.com/vector-im/element-web I thought the app.element.io links used to line up across platforms.

alexander-potemkin commented 1 year ago

Thank you, I created the ticket at web/desktop.

Just one more thing, if you don't mind: @pixlwave: could Element team be interested in picking up GitHub automated builds for mobile and web/desktop, as I referenced here: https://github.com/vector-im/element-meta/discussions/1806 ?

Or it's out of interest for the team and you would rather stick to your workflow (which is mostly about manual build and upload, from what I understood)?

pixlwave commented 1 year ago

Element X is using Xcode Cloud to automate TestFlight and App Store builds. We (the iOS team) very much wanted to move away from manual releases 😅

alexander-potemkin commented 1 year ago

I can imagine :) And for how long do you expect to support an 'old' - non-X version?

pixlwave commented 1 year ago

It will remain a supported product until we're happy we're close enough to feature parity for the majority of users. It is only receiving critical fixes and work requested by customers, so the burden of making manual releases is already significantly reduced 😃