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

[NT-783] Send prelaunch project links to safari instead of opening in the app #1054

Merged
merged 2 commits into from
Feb 3, 2020

Conversation

ifbarrera
Copy link
Contributor

πŸ“² What

Fixes a bug where we were incorrectly displaying prelaunch projects in the app when they were accessed through a link in a project update.

πŸ€” Why

A few months ago we added the "prelaunch" feature to project pages on web. Since native apps don't support prelaunch project pages, we updated our universal link handling for project links to check whether the project was a prelaunch project, and if it was, we send the user to mobile web instead of opening the project page in the app.

However, we missed adding this check in the UpdateViewController, which supports opening project links natively in the app. This meant that it was possible for a user to tap on a prelaunch project link from a project update and be presented with an incomplete project page natively.

πŸ›  How

We now check whether the project is a prelaunchActivated project before presenting the project page natively. If the project is a prelaunch project, we load the project url in a safari webview. If the project is not a prelaunchActivated project, then we present the native project page as before.

One thing I noticed which wasn't great is that project links make a network request but give no indication to the user that something is happening (ie. we don't show a loader). This can make it seem like opening the link is "hanging" when in fact a request is being made.

πŸ‘€ See

IMG_1C216DA6672D-1

βœ… Acceptance criteria

This can only be reliably tested by building a Release configuration of the app on a device, then doing the following:

  • Search for the project "Ark Worlds: MOBA Card Game", then tap "Updates" and click on the first one called "Prelaunch page is up". Then, click on the link on the update. The link should open in a safari webview that's presented modally

Copy link
Contributor

@Scollaco Scollaco left a comment

Choose a reason for hiding this comment

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

Looks good ⭐️

@ifbarrera ifbarrera merged commit 24db869 into master Feb 3, 2020
@ifbarrera ifbarrera deleted the NT-783-project-preview-links branch February 3, 2020 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants