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

Share invite links through AirDrop #561

Closed
n8fr8 opened this issue Mar 22, 2018 · 8 comments
Closed

Share invite links through AirDrop #561

n8fr8 opened this issue Mar 22, 2018 · 8 comments
Assignees

Comments

@n8fr8
Copy link
Contributor

n8fr8 commented Mar 22, 2018

We need to add "nearby" friend adding, and it seems like there is an easy API to do so, from iOS to iOS:
https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html

@cstiens cstiens added this to the March 16-30 (Sprint 2) milestone Mar 22, 2018
@tladesignz
Copy link
Collaborator

Example code from Apple:
https://developer.apple.com/library/content/samplecode/sc2273/Introduction/Intro.html

Doesn't look complicated. I expect 10 - 20 hours for this and #562.

@n8fr8
Copy link
Contributor Author

n8fr8 commented Apr 9, 2018

Any thoughts about a custom URL Scheme? zomnb:// (Zom "nearby") or something like that?

@tladesignz
Copy link
Collaborator

Sounds just fine.

@tladesignz
Copy link
Collaborator

tladesignz commented Apr 12, 2018

I suppose this should go here?
simulator screen shot - iphone x - 2018-04-12 at 15 56 58

@N-Pex, could I have a short introduction, so I don't need to scratch my head about how all of this works together?

As I understand, these files play a role?

https://github.com/zom/Zom-iOS/blob/master/Zom/Zom/Classes/View%20Controllers/ZomNewBuddyViewController.swift

https://github.com/zom/Zom-iOS/blob/master/Zom/OTRResources/Interface/Base.lproj/AddBuddy.storyboard

@N-Pex
Copy link
Collaborator

N-Pex commented Apr 18, 2018

@tladesignz Correct, there's also a similar ZomNewBuddyViewController used in Onboarding.storyboard. The UI contains a toolbar where you can add a fourth button, "AirDrop" or similar (just copy one ot the others). THEN the icon needs to be set (it's a character from the material icons font, have a look at ZomNewButtonViewController:44). Yes, it's overly complicated, but it's implemented this way because 1. we wanted to use icons from the font and 2. The strings must not be "attributed strings" with the icon included in the storyboards, because then the translation scripts would be confused...

@tladesignz
Copy link
Collaborator

tladesignz commented Apr 19, 2018

Ok. So there already is the "Share" button, which opens the system's "share" menu. (See screenshot above).
This can already be used to send the link via AirDrop. To add another button "AirDrop" would be quite strange, UI-wise.

What we should do instead is described here:
https://stackoverflow.com/questions/1108693/is-it-possible-to-register-a-httpdomain-based-url-scheme-for-iphone-apps-like

If we want to send a specific iOS-Zom URI with its own scheme, instead, that could get quite confusing.

On the other hand: We will have a server roundtrip and there need to be changes on the server.

@tladesignz
Copy link
Collaborator

Currently, the link to share is like this:
https://zom.im/i/#dGxhQGhvbWUuem9tLmltP290cj1kOWI3ZWE4MTdiZTk3YzNmNzE5YjRiMGE5Mjk5OGQ1ZGQzZThhMGYx

Which in turn links to this:
xmpp:[email protected]?subscribe&otr-fingerprint=

2 things here:

  1. It seems, the fingerprint is missing. Any issues on the server?
  2. Should Zom register for the xmpp scheme? Would that be a good idea?

Now, let's see how many spambots want to become my friend. :-)

@tladesignz
Copy link
Collaborator

Actually, we already support AirDrop.
Additionally, this is supersed by #590.

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

No branches or pull requests

4 participants