We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4a5c45 commit 3ff4889Copy full SHA for 3ff4889
packages/firebase-dynamic-links/index.ios.ts
@@ -474,9 +474,21 @@ export class DynamicLinks implements IDynamicLinks {
474
}
475
476
buildLink(link: DynamicLinkParameters): Promise<string> {
477
- return new Promise((resolve, reject) => {
478
- resolve(link.native.url.absoluteString);
479
- });
+ if (link.native.options) {
+ // short link
+ return new Promise((resolve, reject) => {
480
+ link.native.shortenWithCompletion((url, warnings, error) => {
481
+ if (error) {
482
+ reject(FirebaseError.fromNative(error));
483
+ } else {
484
+ resolve(url.absoluteString);
485
+ }
486
+ });
487
488
489
+ // long link
490
+ return Promise.resolve(link.native.url.absoluteString);
491
492
493
494
onLink(listener: (link: DynamicLink) => void) {
0 commit comments