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

Support universal deep link for community link #17431

Closed
yqrashawn opened this issue Sep 27, 2023 · 22 comments · Fixed by #17480
Closed

Support universal deep link for community link #17431

yqrashawn opened this issue Sep 27, 2023 · 22 comments · Fixed by #17480
Assignees
Labels
E:Mobile Deep links MVP https://www.notion.so/Chainmakers-b78f651f5aa04539ad4ac2a93218d1a7 feature feature requests

Comments

@yqrashawn
Copy link
Member

yqrashawn commented Sep 27, 2023

Feature Issue

User Story

As a user I want to click on a community link and go to the community so that I can interact with the community as soon as possible, with as little friction as possible.

Figma design: https://www.figma.com/file/q3kZPl7OpbB7btFK7HG0Mr/Sharing-for-Mobile?type=design&node-id=690-280345&mode=design&t=tuTTqA3k1dD8yqMw-0

Crew link: https://www.notion.so/Chainmakers-b78f651f5aa04539ad4ac2a93218d1a7

parent issue: #15325

@yqrashawn yqrashawn added the feature feature requests label Sep 27, 2023
@qoqobolo qoqobolo added E:Mobile Deep links MVP https://www.notion.so/Chainmakers-b78f651f5aa04539ad4ac2a93218d1a7 E:Mobile Release 1.26 labels Sep 27, 2023
@qoqobolo qoqobolo added this to the 1.26.0 - Alpha milestone Sep 27, 2023
@yqrashawn
Copy link
Member Author

start working on this one
example universal url
https://status.app/c/iyKACkQKB0Rvb2RsZXMSJ0NvbG9yaW5nIHRoZSB3b3JsZCB3aXRoIGpveSDigKIg4bSXIOKAohiYohsiByMxMzFEMkYqAwEhMwM=#zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11

step one, click in safari -> open app
apple doc at https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content

need to config com.apple.developer.associated-domains.applinks in plist file

currently it's

	<key>com.apple.developer.associated-domains</key>
	<array>
		<string>applinks:join.status.im</string>
	</array>

add status.app, build and try

@yqrashawn
Copy link
Member Author

there's duplicate part

{
            "appID": "DTX7Z4U3YA.im.status.ethereum",
            "paths": [
                  "*"
            ]
}

between

https://status.app/.well-known/apple-app-site-association
https://join.status.im/.well-known/apple-app-site-association

guess link should work

@yqrashawn
Copy link
Member Author

Nothing happens for status.app or join.status.im

maybe the appid is incorrect

@yqrashawn
Copy link
Member Author

figma ios app bundle id: com.figma.FigmaMirror

https://www.figma.com/.well-known/apple-app-site-association

{
  "applinks": {
      "details": [
           {
             "appIDs": [ "T8RA8NE3B7.com.figma.FigJam", "T8RA8NE3B7.com.figma.FigJam.Local", "T8RA8NE3B7.com.figma.FigJam.Dev", "T8RA8NE3B7.com.figma.FigJam.AdHoc", "T8RA8NE3B7.com.figma.FigJam.Internal" ],
             "components": [
               {
                  "#": "no_universal_links",
                  "exclude": true,
                  "comment": "Matches any URL whose fragment equals no_universal_links and instructs the system not to open it as a universal link"
               },
               {
                  "/": "/jam",
                  "comment": "Matches URL whose path is /jam"
               },
               {
                  "/": "/file/*",
                  "?": { "type": "whiteboard" },
                  "comment": "Matches any URL whose path starts with /file/ and has param `type=whiteboard`"
               },
               {
                  "/": "/board/*",
                  "comment": "Matches any URL whose path starts with /board/"
               }
             ]
           },
           {
             "appIDs": [ "T8RA8NE3B7.com.figma.FigmaMirror", "T8RA8NE3B7.com.figma.Figma", "T8RA8NE3B7.com.figma.Figma.Local", "T8RA8NE3B7.com.figma.Figma.Dev", "T8RA8NE3B7.com.figma.Figma.AdHoc", "T8RA8NE3B7.com.figma.Figma.Internal" ],
             "components": [
               {
                  "#": "no_universal_links",
                  "exclude": true,
                  "comment": "Matches any URL whose fragment equals no_universal_links and instructs the system not to open it as a universal link"
               },
               {
                  "/": "/file/*",
                  "comment": "Matches any URL whose path starts with /file/"
               },
               {
                  "/": "/files/recent",
                  "comment": "Matches URL whose path is /files/recent"
               },
               {
                  "/": "/proto/*",
                  "comment": "Matches any URL whose path starts with /proto/"
               },
               {
                  "/": "/mirror*",
                  "comment": "Matches any URL whose path starts with /mirror"
               },
               {
                  "/": "/mobile-app*",
                  "comment": "Matches any URL whose path starts with /mobile-app"
               },
               {
                  "/": "/board/*",
                  "comment": "Matches any URL whose path starts with /board/"
               }
             ]
           }
       ]
   }
}

@yqrashawn
Copy link
Member Author

local bundle id is im.status.ethereum.debug

add it to https://status.app/.well-known/apple-app-site-association and try again

@yqrashawn
Copy link
Member Author

not working

Starting with macOS 11 and iOS 14, apps no longer send requests for apple-app-site-association files directly to your web server. Instead, they send these requests to an Apple-managed content delivery network (CDN) dedicated to associated domains.

If you use a private web server, which is unreachable from the public internet, while developing your app, enable the alternate mode feature to bypass the CDN and connect directly to your server. To do this, add a query string to your associated domains entitlement, as shown in the following example:

<string>applinks:status.app?mode=developer</string> and rebuild

@yqrashawn
Copy link
Member Author

nothing, try on real device

@yqrashawn
Copy link
Member Author

yqrashawn commented Sep 29, 2023

failed

No profiles for 'im.status.ethereum' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'im.status.ethereum'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'StatusIm' from project 'StatusIm')

No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID

@yqrashawn
Copy link
Member Author

try same thing with join.status.im

@yqrashawn
Copy link
Member Author

skip deep link, test with

status-im://u/zQ3shqLp7SbA9UAqSUPWSBUKykt1HWg7AcMspZNy3dMoSCgfK
status-im://c/zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11

@yqrashawn
Copy link
Member Author

store url before login open the url after login

"Return an event description for processing a url if in the database"

1 similar comment
@yqrashawn
Copy link
Member Author

store url before login open the url after login

"Return an event description for processing a url if in the database"

@yqrashawn
Copy link
Member Author

yqrashawn commented Sep 29, 2023

if we want to remove the status-im one

in ios/StatusIm/Info.plist

			<key>CFBundleURLSchemes</key>
			<array>
				<string>status-im</string>
				<string>status-app</string>
			</array>

@yqrashawn
Copy link
Member Author

yqrashawn commented Sep 29, 2023

CleanShot 2023-09-29 at 17 01 24@2x

@yqrashawn
Copy link
Member Author

commit that get.status.im -> join.status.im

1ea49a80fc

@yqrashawn
Copy link
Member Author

working on supporting status-app://c/ status-app://u/ jump

blocked by bidi/match-route on "https://status.app/c/iyKACkQKB0Rvb2RsZXMSJ0NvbG9yaW5nIHRoZSB3b3JsZCB3aXRoIGpveSDigKIg4bSXIOKAohiYohsiByMxMzFEMkYqAwEhMwM=#zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"
match-route returns nil cause there's a = in it

tried reitit, it has issue parsing eip-67 ethereum: uri

@yqrashawn
Copy link
Member Author

bidi/match-route solved with custom code

@yqrashawn
Copy link
Member Author

RPReplay_Final1696321757.MP4

link to contact works now

@yqrashawn
Copy link
Member Author

RPReplay_Final1696321884.MP4

link to community won't work

(rf/dispatch [:chat.ui/resolve-community-info (str deserialized-key)]) do nothing
on-success nor on-error got any response
network issue?

@yqrashawn
Copy link
Member Author

yqrashawn commented Oct 3, 2023

ok, below screen is caused by :chat/close added at

CleanShot 2023-10-03 at 17 09 15

the actual current waiting community to be loaded screen is

CleanShot 2023-10-03 at 17 10 50

so,

  • fix navigation issue when chat view -> community overreiw, screenshot 1
  • fix community loading issue

@yqrashawn
Copy link
Member Author

Remember link and jump after login

CleanShot.2023-10-03.at.21.35.28.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:Mobile Deep links MVP https://www.notion.so/Chainmakers-b78f651f5aa04539ad4ac2a93218d1a7 feature feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants