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

Setup deep links for iOS / Android #2052

Merged
merged 8 commits into from
Mar 25, 2021
Merged

Setup deep links for iOS / Android #2052

merged 8 commits into from
Mar 25, 2021

Conversation

marcaaron
Copy link
Contributor

@marcaaron marcaaron commented Mar 24, 2021

cc @AndrewGable @Jag96

Not sure if we need to do anything else here I think the last step is to just add the capability here? ✅ Thanks Andrew!

Screen Shot 2021-03-24 at 10 04 24 AM

Details

Sets up deep links / universal links for the iOS app. Will do Android next.

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/146908

Tests

Local Test

iOS

  1. Build and run the iOS app
  2. Log in
  3. In terminal run xcrun simctl openurl booted expensify-cash://settings
  4. Verify the iOS app opens and you are brought to the settings page

Android

  1. Build and run the Android app
  2. Log in
  3. In terminal run npx uri-scheme open expensify-cash://settings --android
  4. Verify you are asked if you want to open the link in Expensify.cash and say yes
  5. Verify the Settings page opens.

Production Test

  1. Verify https://expensify.cash/apple-app-site-association leads to a JSON file
  2. Tap a link to https://expensify.cash/settings and verify it opens in the mobile app

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@marcaaron marcaaron self-assigned this Mar 24, 2021
@marcaaron marcaaron marked this pull request as ready for review March 24, 2021 21:09
@marcaaron marcaaron requested a review from a team as a code owner March 24, 2021 21:09
@botify botify requested review from Jag96 and removed request for a team March 24, 2021 21:09
@botify
Copy link

botify commented Mar 24, 2021

Hey, I noticed you changed some webpack configuration files. This can break production builds. Did you remember to run a production build locally to verify they still work?

@marcaaron marcaaron changed the title Setup deep links for iOS Setup deep links for iOS / Android Mar 24, 2021
@botify
Copy link

botify commented Mar 24, 2021

Hey, I noticed you changed some webpack configuration files. This can break production builds. Did you remember to run a production build locally to verify they still work?

3 similar comments
@botify
Copy link

botify commented Mar 24, 2021

Hey, I noticed you changed some webpack configuration files. This can break production builds. Did you remember to run a production build locally to verify they still work?

@botify
Copy link

botify commented Mar 24, 2021

Hey, I noticed you changed some webpack configuration files. This can break production builds. Did you remember to run a production build locally to verify they still work?

@botify
Copy link

botify commented Mar 24, 2021

Hey, I noticed you changed some webpack configuration files. This can break production builds. Did you remember to run a production build locally to verify they still work?

Copy link
Contributor

@Jag96 Jag96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS worked fine for me! On Android, however, I got no response on the emulator when running npx uri-scheme open expensify-cash://settings --android

I saw the following output in the terminal

npx: installed 1 in 1.055s
› Android: Attempting to open URI "expensify-cash://settings" in emulator

But no response in the Android app. I tried running the command while the app was backgrounded as well as open.

@marcaaron
Copy link
Contributor Author

Thanks for catching that @Jag96/ Updated this with some more intent filter guys. Having one per combination of scheme + host seems to have fixed this issue.

Copy link
Contributor

@Jag96 Jag96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That worked! LGTM

@Jag96 Jag96 merged commit eed1b68 into master Mar 25, 2021
@Jag96 Jag96 deleted the marcaaron-setupDeepLinks branch March 25, 2021 00:59
@roryabraham
Copy link
Contributor

@isagoico
Copy link

@marcaaron Hello! This PR looks like internal QA. If so, can you let me know when it's QA'd in staging so I can check it off the deploy list? Thanks in advance!

@marcaaron
Copy link
Contributor Author

This PR can be tested actually!

  1. Install iOS and Android app betas
  2. Log into the app
  3. Email a link to https://staging.expensify.cash/settings
  4. Accept that you want to open the link in the app
  5. Get navigated to the settings screen

I just tested this on Android. iOS may need to wait for changes here -> https://github.com/Expensify/Expensify/issues/154510#issuecomment-807705014

@marcaaron
Copy link
Contributor Author

Alright so quick heads up here..

This did not pass on the latest iOS TestFlight build. I also can't think of any reason why it wouldn't be working. But it doesn't seem to be causing any issues for the TestFlight build so probably not a blocker.

@isagoico
Copy link

I got the same behaviour as you in the iOS app, a mWeb page was opened instead of the App. Android app was a pass tho 🎉 Let me know if I should open a separate issue about the iOS behaviour.

@AndrewGable
Copy link
Contributor

FYI - I don't think iOS has been deployed yet

@isagoico
Copy link

Should we check this off the list if Android was a pass? We could check iOS once it's out.

@AndrewGable
Copy link
Contributor

Yes, let's check it off ✅

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

Successfully merging this pull request may close these issues.

6 participants