Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changes/fix-deep-link-ios-url-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"deep-link": patch
---

Fixed an iOS regression where deep link URL types were generated from app links instead of custom URL schemes, which could prevent custom schemes from being registered correctly.

Also updated the generated iOS `CFBundleURLName` to use `$(PRODUCT_BUNDLE_IDENTIFIER).{scheme}`.

And added handling for `webcredentials:` in iOS entitlements

13 changes: 10 additions & 3 deletions plugins/deep-link/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,13 @@ fn main() {
.iter()
.filter(|d| d.is_app_link())
.filter_map(|d| d.host.as_ref())
.map(|host| format!("applinks:{}", host).into())
.flat_map(|host| {
[
format!("applinks:{}", host),
format!("webcredentials:{}", host),
]
})
.map(Into::into)
.collect::<Vec<_>>()
.into(),
);
Expand All @@ -139,7 +145,7 @@ fn main() {
let deep_link_domains = config
.mobile
.iter()
.filter(|domain| !domain.is_app_link())
.filter(|domain| !domain.is_web_link())
.collect::<Vec<_>>();

if deep_link_domains.is_empty() {
Expand Down Expand Up @@ -173,7 +179,8 @@ fn main() {
);
dict.insert(
"CFBundleURLName".into(),
domain.scheme[0].clone().into(),
format!("$(PRODUCT_BUNDLE_IDENTIFIER).{}", domain.scheme[0])
.into(),
);
plist::Value::Dictionary(dict)
})
Expand Down