Skip to content

Commit

Permalink
fix: email-link.artsy.net deeplinks (#10418)
Browse files Browse the repository at this point in the history
* chore: Add "applinks:email-links.artsy.net" to entitlements

Add the "applinks:email-links.artsy.net" string to the entitlements file in the iOS app resources. This allows the app to handle email links properly.

Co-authored-by: Brian Beckerle <[email protected]>

* chore: Update entitlements to fix email typo

Co-authored-by: Brian Beckerle <[email protected]>

* feat: handle redirects for email-link

Co-authored-by: Brian Beckerle <[email protected]>

---------

Co-authored-by: Brian Beckerle <[email protected]>
  • Loading branch information
gkartalis and brainbicycle committed Jun 21, 2024
1 parent 6aa2dc8 commit 9e76222
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions ios/Artsy/App_Resources/Artsy.Store.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<string>webcredentials:m.artsy.net</string>
<string>applinks:wvxa.adj.st</string>
<string>applinks:click.artsy.net</string>
<string>applinks:email-link.artsy.net</string>
</array>
<key>com.apple.developer.usernotifications.time-sensitive</key>
<true/>
Expand Down
1 change: 1 addition & 0 deletions ios/Artsy/App_Resources/Artsy.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<string>webcredentials:m.artsy.net</string>
<string>applinks:wvxa.adj.st</string>
<string>applinks:click.artsy.net</string>
<string>applinks:email-link.artsy.net</string>
</array>
<key>com.apple.developer.usernotifications.time-sensitive</key>
<true/>
Expand Down
4 changes: 2 additions & 2 deletions src/app/utils/useDeepLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export function useDeepLinks() {
const handleDeepLink = async (url: string) => {
let targetURL

// If the url is a marketing url, we need to fetch the redirect
if (url.includes("click.artsy.net")) {
// If the url is a marketing or email-link url, we need to fetch the redirect
if (url.includes("click.artsy.net") || url.includes("email-link.artsy.net")) {
try {
targetURL = await fetch(url)
} catch (error) {
Expand Down

0 comments on commit 9e76222

Please sign in to comment.