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

Associated Domains #164

Closed
wtimme opened this issue Oct 18, 2018 · 8 comments
Closed

Associated Domains #164

wtimme opened this issue Oct 18, 2018 · 8 comments

Comments

@wtimme
Copy link
Contributor

wtimme commented Oct 18, 2018

Is the "Associated Domains" feature working properly?

In the documentation, Apple states:

To associate a website with an app, you will need to have a file on your website [...].
Place this file either in your site’s .well-known directory, or directly in its root directory. If you use the .well-known directory, the file’s URL should match the following format:
https://<fully qualified domain>/.well-known/apple-app-site-association

The domain that is entered as an associated domain is openstreetmap.org. But neither in the .well-known directory nor in the root directory the apple-app-site-association file is available.

This leads me to believe that the feature does not work at the moment. Or am I missing something here?

@bryceco
Copy link
Owner

bryceco commented Oct 18, 2018

This relates to #98. I started looking into it but I felt I really need to have a test domain under my control to verify it works before asking Tom Hughs about putting the required file on the OSM website. If you own a domain and want to experiment with it that would be great.

@wtimme
Copy link
Contributor Author

wtimme commented Oct 19, 2018

Can you provide the team ID that you use for the app?

With this information, we can then create the apple-app-association-file and submit a pull request for #98. After the pull request is merged, iOS users who have Go Map!! installed will be asked if they wanted to open it when choosing "Edit with Remote Control".

Furthermore, we need to write a parser that can handle URLs like this and e. g. focuses on the entity:

https://www.openstreetmap.org/edit?editor=remote&way=5013364#map=18/48.85826/2.29450

@bryceco
Copy link
Owner

bryceco commented Oct 19, 2018

I'd like to test the app with the apple-app-association-file before submitting the pull request.

@bryceco
Copy link
Owner

bryceco commented Oct 19, 2018

The team ID is MKTTC6734C

@wtimme
Copy link
Contributor Author

wtimme commented Oct 22, 2018

Thanks for the update!

Here's the apple-app-site-association:

{
    "applinks": {
        "apps": [],
        "details": [{
            "appID": "MKTTC6734C.com.bryceco.GoMap",
            "paths": ["/edit"]
        }]
    }
}

Testing

In order to test this, upload the JSON to the .well-known directory or in the root of your webspace:

  • https://example.com/.well-known/apple-app-site-association or
  • https://example.com/apple-app-site-association

You now need to add your domain to the list of Associated Domains in the Capabilities of the "Go Map!!" target.

For debugging, add the URL to the "John Appleseed" contact in the address book. Here's an example of the URL: https://example.com/edit?editor=remote&node=663346172#map=19/52.52111/13.40837

Save, and then tap on the homepage. Instead of opening Safari, "Go Map!!" should be launched.

Things to keep in mind while testing

  • Make sure the file is available via HTTPS
  • The response should have the header application/json

Next steps

After successful testing, we'll need to

  • request the file to be included in the OSM server (and therefore available on openstreetmap.org)
  • write a parser that handles the URL when the app is opened

wtimme added a commit to wtimme/OSM-Completionist that referenced this issue Oct 18, 2019
Since the Universal Link is not set up for this domain
(cp. bryceco/GoMap#164), this entitlement is not needed.

Removing it also gets rid of the error in Xcode when selecting
"Automatic Signing", where it complains that this entitlement
is not set up.
@bryceco
Copy link
Owner

bryceco commented Jul 25, 2020

This is fixed in eb539ac

To test you can click on this link:
https://gomaposm.com/edit?center=47.679056,-122.212559&zoom=21&view=aerial%2Beditor

@bryceco bryceco closed this as completed Jul 25, 2020
@wtimme
Copy link
Contributor Author

wtimme commented Jul 25, 2020

Neat! Has this also been added to openstreetmap.org, so that mappers can open GoMap from the original OSM page?

@bryceco
Copy link
Owner

bryceco commented Jul 25, 2020

Not yet, not until it's in the App Store version.

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

No branches or pull requests

2 participants