MCPcopy Create free account
hub / github.com/NativeScript/firebase / buildLink

Method buildLink

packages/firebase-dynamic-links/index.ios.ts:489–505  ·  view source on GitHub ↗
(link: DynamicLinkParameters)

Source from the content-addressed store, hash-verified

487 }
488
489 buildLink(link: DynamicLinkParameters): Promise<string> {
490 if (link.native.options) {
491 // short link
492 return new Promise((resolve, reject) => {
493 link.native.shortenWithCompletion((url, warnings, error) => {
494 if (error) {
495 reject(FirebaseError.fromNative(error));
496 } else {
497 resolve(url.absoluteString);
498 }
499 });
500 });
501 } else {
502 // long link
503 return Promise.resolve(link.native.url.absoluteString);
504 }
505 }
506
507 onLink(listener: OnLinkListener) {
508 DynamicLinks._onLink = listener;

Callers

nothing calls this directly

Calls 1

fromNativeMethod · 0.45

Tested by

no test coverage detected