mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
feat(android,ios) drop support for Firebase Dynamic Links
It's being sunset in August, after being deprecated for 2 years. Ref: https://firebase.google.com/support/dynamic-links-faq?utm_source=deprecation_msa&utm_medium=email&utm_campaign=pone
This commit is contained in:
committed by
Calinteodor
parent
5342712019
commit
7fabb33733
@@ -83,10 +83,8 @@ dependencies {
|
|||||||
|
|
||||||
// Firebase
|
// Firebase
|
||||||
// - Crashlytics
|
// - Crashlytics
|
||||||
// - Dynamic Links
|
|
||||||
implementation 'com.google.firebase:firebase-analytics:21.3.0'
|
implementation 'com.google.firebase:firebase-analytics:21.3.0'
|
||||||
implementation 'com.google.firebase:firebase-crashlytics:18.4.3'
|
implementation 'com.google.firebase:firebase-crashlytics:18.4.3'
|
||||||
implementation 'com.google.firebase:firebase-dynamic-links:21.1.0'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation project(':sdk')
|
implementation project(':sdk')
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import android.net.Uri;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||||
import com.google.firebase.dynamiclinks.FirebaseDynamicLinks;
|
|
||||||
|
|
||||||
import org.jitsi.meet.sdk.JitsiMeet;
|
import org.jitsi.meet.sdk.JitsiMeet;
|
||||||
import org.jitsi.meet.sdk.JitsiMeetActivity;
|
import org.jitsi.meet.sdk.JitsiMeetActivity;
|
||||||
@@ -22,18 +21,6 @@ final class GoogleServicesHelper {
|
|||||||
Log.d(activity.getClass().getSimpleName(), "Initializing Google Services");
|
Log.d(activity.getClass().getSimpleName(), "Initializing Google Services");
|
||||||
|
|
||||||
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(!JitsiMeet.isCrashReportingDisabled(activity));
|
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(!JitsiMeet.isCrashReportingDisabled(activity));
|
||||||
FirebaseDynamicLinks.getInstance().getDynamicLink(activity.getIntent())
|
|
||||||
.addOnSuccessListener(activity, pendingDynamicLinkData -> {
|
|
||||||
Uri dynamicLink = null;
|
|
||||||
|
|
||||||
if (pendingDynamicLinkData != null) {
|
|
||||||
dynamicLink = pendingDynamicLinkData.getLink();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dynamicLink != null) {
|
|
||||||
activity.join(dynamicLink.toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
17
config.js
17
config.js
@@ -1269,9 +1269,6 @@ var config = {
|
|||||||
// disableDeepLinking: false,
|
// disableDeepLinking: false,
|
||||||
|
|
||||||
// The deeplinking config.
|
// The deeplinking config.
|
||||||
// For information about the properties of
|
|
||||||
// deeplinking.[ios/android].dynamicLink check:
|
|
||||||
// https://firebase.google.com/docs/dynamic-links/create-manually
|
|
||||||
// deeplinking: {
|
// deeplinking: {
|
||||||
//
|
//
|
||||||
// // The desktop deeplinking config, disabled by default.
|
// // The desktop deeplinking config, disabled by default.
|
||||||
@@ -1300,13 +1297,6 @@ var config = {
|
|||||||
// appScheme: 'org.jitsi.meet',
|
// appScheme: 'org.jitsi.meet',
|
||||||
// // Custom URL for downloading ios mobile app.
|
// // Custom URL for downloading ios mobile app.
|
||||||
// downloadLink: 'https://itunes.apple.com/us/app/jitsi-meet/id1165103905',
|
// downloadLink: 'https://itunes.apple.com/us/app/jitsi-meet/id1165103905',
|
||||||
// dynamicLink: {
|
|
||||||
// apn: 'org.jitsi.meet',
|
|
||||||
// appCode: 'w2atb',
|
|
||||||
// customDomain: undefined,
|
|
||||||
// ibi: 'com.atlassian.JitsiMeet.ios',
|
|
||||||
// isi: '1165103905'
|
|
||||||
// }
|
|
||||||
// },
|
// },
|
||||||
|
|
||||||
// // The android deeplinking config.
|
// // The android deeplinking config.
|
||||||
@@ -1319,13 +1309,6 @@ var config = {
|
|||||||
// // Android app package name.
|
// // Android app package name.
|
||||||
// appPackage: 'org.jitsi.meet',
|
// appPackage: 'org.jitsi.meet',
|
||||||
// fDroidUrl: 'https://f-droid.org/en/packages/org.jitsi.meet/',
|
// fDroidUrl: 'https://f-droid.org/en/packages/org.jitsi.meet/',
|
||||||
// dynamicLink: {
|
|
||||||
// apn: 'org.jitsi.meet',
|
|
||||||
// appCode: 'w2atb',
|
|
||||||
// customDomain: undefined,
|
|
||||||
// ibi: 'com.atlassian.JitsiMeet.ios',
|
|
||||||
// isi: '1165103905'
|
|
||||||
// }
|
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
|
|
||||||
|
|||||||
@@ -192,17 +192,6 @@ var interfaceConfig = {
|
|||||||
|
|
||||||
// NATIVE_APP_NAME: 'Jitsi Meet',
|
// NATIVE_APP_NAME: 'Jitsi Meet',
|
||||||
|
|
||||||
/**
|
|
||||||
* Specify Firebase dynamic link properties for the mobile apps.
|
|
||||||
*/
|
|
||||||
// MOBILE_DYNAMIC_LINK: {
|
|
||||||
// APN: 'org.jitsi.meet',
|
|
||||||
// APP_CODE: 'w2atb',
|
|
||||||
// CUSTOM_DOMAIN: undefined,
|
|
||||||
// IBI: 'com.atlassian.JitsiMeet.ios',
|
|
||||||
// ISI: '1165103905'
|
|
||||||
// },
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the logo on the deep linking pages.
|
* Hide the logo on the deep linking pages.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ target 'JitsiMeet' do
|
|||||||
|
|
||||||
pod 'Firebase/Analytics', '~> 8.0'
|
pod 'Firebase/Analytics', '~> 8.0'
|
||||||
pod 'Firebase/Crashlytics', '~> 8.0'
|
pod 'Firebase/Crashlytics', '~> 8.0'
|
||||||
pod 'Firebase/DynamicLinks', '~> 8.0'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
target 'JitsiMeetSDK' do
|
target 'JitsiMeetSDK' do
|
||||||
|
|||||||
@@ -27,9 +27,6 @@ PODS:
|
|||||||
- Firebase/Crashlytics (8.15.0):
|
- Firebase/Crashlytics (8.15.0):
|
||||||
- Firebase/CoreOnly
|
- Firebase/CoreOnly
|
||||||
- FirebaseCrashlytics (~> 8.15.0)
|
- FirebaseCrashlytics (~> 8.15.0)
|
||||||
- Firebase/DynamicLinks (8.15.0):
|
|
||||||
- Firebase/CoreOnly
|
|
||||||
- FirebaseDynamicLinks (~> 8.15.0)
|
|
||||||
- FirebaseAnalytics (8.15.0):
|
- FirebaseAnalytics (8.15.0):
|
||||||
- FirebaseAnalytics/AdIdSupport (= 8.15.0)
|
- FirebaseAnalytics/AdIdSupport (= 8.15.0)
|
||||||
- FirebaseCore (~> 8.0)
|
- FirebaseCore (~> 8.0)
|
||||||
@@ -64,8 +61,6 @@ PODS:
|
|||||||
- GoogleUtilities/Environment (~> 7.7)
|
- GoogleUtilities/Environment (~> 7.7)
|
||||||
- nanopb (~> 2.30908.0)
|
- nanopb (~> 2.30908.0)
|
||||||
- PromisesObjC (< 3.0, >= 1.2)
|
- PromisesObjC (< 3.0, >= 1.2)
|
||||||
- FirebaseDynamicLinks (8.15.0):
|
|
||||||
- FirebaseCore (~> 8.0)
|
|
||||||
- FirebaseInstallations (8.15.0):
|
- FirebaseInstallations (8.15.0):
|
||||||
- FirebaseCore (~> 8.0)
|
- FirebaseCore (~> 8.0)
|
||||||
- GoogleUtilities/Environment (~> 7.7)
|
- GoogleUtilities/Environment (~> 7.7)
|
||||||
@@ -1798,7 +1793,6 @@ DEPENDENCIES:
|
|||||||
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
|
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
|
||||||
- Firebase/Analytics (~> 8.0)
|
- Firebase/Analytics (~> 8.0)
|
||||||
- Firebase/Crashlytics (~> 8.0)
|
- Firebase/Crashlytics (~> 8.0)
|
||||||
- Firebase/DynamicLinks (~> 8.0)
|
|
||||||
- fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
|
- fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
|
||||||
- "giphy-react-native-sdk (from `../node_modules/@giphy/react-native-sdk`)"
|
- "giphy-react-native-sdk (from `../node_modules/@giphy/react-native-sdk`)"
|
||||||
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
||||||
@@ -1898,7 +1892,6 @@ SPEC REPOS:
|
|||||||
- FirebaseCore
|
- FirebaseCore
|
||||||
- FirebaseCoreDiagnostics
|
- FirebaseCoreDiagnostics
|
||||||
- FirebaseCrashlytics
|
- FirebaseCrashlytics
|
||||||
- FirebaseDynamicLinks
|
|
||||||
- FirebaseInstallations
|
- FirebaseInstallations
|
||||||
- Giphy
|
- Giphy
|
||||||
- GoogleAppMeasurement
|
- GoogleAppMeasurement
|
||||||
@@ -2108,7 +2101,6 @@ SPEC CHECKSUMS:
|
|||||||
FirebaseCore: 5743c5785c074a794d35f2fff7ecc254a91e08b1
|
FirebaseCore: 5743c5785c074a794d35f2fff7ecc254a91e08b1
|
||||||
FirebaseCoreDiagnostics: 92e07a649aeb66352b319d43bdd2ee3942af84cb
|
FirebaseCoreDiagnostics: 92e07a649aeb66352b319d43bdd2ee3942af84cb
|
||||||
FirebaseCrashlytics: feb07e4e9187be3c23c6a846cce4824e5ce2dd0b
|
FirebaseCrashlytics: feb07e4e9187be3c23c6a846cce4824e5ce2dd0b
|
||||||
FirebaseDynamicLinks: 1dc816ef789c5adac6fede0b46d11478175c70e4
|
|
||||||
FirebaseInstallations: 40bd9054049b2eae9a2c38ef1c3dd213df3605cd
|
FirebaseInstallations: 40bd9054049b2eae9a2c38ef1c3dd213df3605cd
|
||||||
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
|
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
|
||||||
Giphy: 83628960ed04e1c3428ff1b4fb2b027f65e82f50
|
Giphy: 83628960ed04e1c3428ff1b4fb2b027f65e82f50
|
||||||
@@ -2209,6 +2201,6 @@ SPEC CHECKSUMS:
|
|||||||
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
|
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
|
||||||
Yoga: 1dd9dabb9df8fe08f12cd522eae04a2da0e252eb
|
Yoga: 1dd9dabb9df8fe08f12cd522eae04a2da0e252eb
|
||||||
|
|
||||||
PODFILE CHECKSUM: 4f6abcf3cec0d9e8e1d5f5d81a35d99adde9ae45
|
PODFILE CHECKSUM: 8ff981f2324fa4b013b6690257898dcd2be9d3c3
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
COCOAPODS: 1.16.2
|
||||||
|
|||||||
@@ -54,19 +54,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
// MARK: Linking delegate methods
|
// MARK: Linking delegate methods
|
||||||
|
|
||||||
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
|
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
|
||||||
if self.appContainsRealServiceInfoPlist() {
|
|
||||||
let handled = DynamicLinks.dynamicLinks().handleUniversalLink(userActivity.webpageURL!) { dynamicLink, error in
|
|
||||||
if let firebaseUrl = self.extractURL(from: dynamicLink) {
|
|
||||||
userActivity.webpageURL = firebaseUrl
|
|
||||||
JitsiMeet.sharedInstance().application(application, continue: userActivity, restorationHandler: restorationHandler)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if handled {
|
|
||||||
return handled
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return JitsiMeet.sharedInstance().application(application, continue: userActivity, restorationHandler: restorationHandler)
|
return JitsiMeet.sharedInstance().application(application, continue: userActivity, restorationHandler: restorationHandler)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,16 +62,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
var openUrl = url
|
return JitsiMeet.sharedInstance().application(app, open: url, options: options)
|
||||||
|
|
||||||
if self.appContainsRealServiceInfoPlist() {
|
|
||||||
if let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url),
|
|
||||||
let firebaseUrl = self.extractURL(from: dynamicLink) {
|
|
||||||
openUrl = firebaseUrl
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return JitsiMeet.sharedInstance().application(app, open: openUrl, options: options)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
|
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
|
||||||
@@ -97,13 +75,4 @@ extension AppDelegate {
|
|||||||
func appContainsRealServiceInfoPlist() -> Bool {
|
func appContainsRealServiceInfoPlist() -> Bool {
|
||||||
return InfoPlistUtil.containsRealServiceInfoPlist(in: Bundle.main)
|
return InfoPlistUtil.containsRealServiceInfoPlist(in: Bundle.main)
|
||||||
}
|
}
|
||||||
|
|
||||||
func extractURL(from dynamicLink: DynamicLink?) -> URL? {
|
|
||||||
guard let dynamicLink = dynamicLink,
|
|
||||||
let dynamicLinkURL = dynamicLink.url,
|
|
||||||
dynamicLink.matchType == .unique || dynamicLink.matchType == .default else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return dynamicLinkURL
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,15 +86,6 @@ export type Sounds = 'ASKED_TO_UNMUTE_SOUND' |
|
|||||||
'RECORDING_ON_SOUND' |
|
'RECORDING_ON_SOUND' |
|
||||||
'TALK_WHILE_MUTED_SOUND';
|
'TALK_WHILE_MUTED_SOUND';
|
||||||
|
|
||||||
|
|
||||||
export interface IMobileDynamicLink {
|
|
||||||
apn: string;
|
|
||||||
appCode: string;
|
|
||||||
customDomain?: string;
|
|
||||||
ibi: string;
|
|
||||||
isi: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IDeeplinkingPlatformConfig {
|
export interface IDeeplinkingPlatformConfig {
|
||||||
appName: string;
|
appName: string;
|
||||||
appScheme: string;
|
appScheme: string;
|
||||||
@@ -103,7 +94,6 @@ export interface IDeeplinkingPlatformConfig {
|
|||||||
export interface IDeeplinkingMobileConfig extends IDeeplinkingPlatformConfig {
|
export interface IDeeplinkingMobileConfig extends IDeeplinkingPlatformConfig {
|
||||||
appPackage?: string;
|
appPackage?: string;
|
||||||
downloadLink: string;
|
downloadLink: string;
|
||||||
dynamicLink?: IMobileDynamicLink;
|
|
||||||
fDroidUrl?: string;
|
fDroidUrl?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,12 +77,6 @@ export function _setDeeplinkingDefaults(deeplinking: IDeeplinkingConfig) {
|
|||||||
ios.appScheme = ios.appScheme || 'org.jitsi.meet';
|
ios.appScheme = ios.appScheme || 'org.jitsi.meet';
|
||||||
ios.downloadLink = ios.downloadLink
|
ios.downloadLink = ios.downloadLink
|
||||||
|| 'https://itunes.apple.com/us/app/jitsi-meet/id1165103905';
|
|| 'https://itunes.apple.com/us/app/jitsi-meet/id1165103905';
|
||||||
if (ios.dynamicLink) {
|
|
||||||
ios.dynamicLink.apn = ios.dynamicLink.apn || 'org.jitsi.meet';
|
|
||||||
ios.dynamicLink.appCode = ios.dynamicLink.appCode || 'w2atb';
|
|
||||||
ios.dynamicLink.ibi = ios.dynamicLink.ibi || 'com.atlassian.JitsiMeet.ios';
|
|
||||||
ios.dynamicLink.isi = ios.dynamicLink.isi || '1165103905';
|
|
||||||
}
|
|
||||||
|
|
||||||
android.appName = android.appName || 'Jitsi Meet';
|
android.appName = android.appName || 'Jitsi Meet';
|
||||||
android.appScheme = android.appScheme || 'org.jitsi.meet';
|
android.appScheme = android.appScheme || 'org.jitsi.meet';
|
||||||
@@ -90,10 +84,4 @@ export function _setDeeplinkingDefaults(deeplinking: IDeeplinkingConfig) {
|
|||||||
|| 'https://play.google.com/store/apps/details?id=org.jitsi.meet';
|
|| 'https://play.google.com/store/apps/details?id=org.jitsi.meet';
|
||||||
android.appPackage = android.appPackage || 'org.jitsi.meet';
|
android.appPackage = android.appPackage || 'org.jitsi.meet';
|
||||||
android.fDroidUrl = android.fDroidUrl || 'https://f-droid.org/packages/org.jitsi.meet/';
|
android.fDroidUrl = android.fDroidUrl || 'https://f-droid.org/packages/org.jitsi.meet/';
|
||||||
if (android.dynamicLink) {
|
|
||||||
android.dynamicLink.apn = android.dynamicLink.apn || 'org.jitsi.meet';
|
|
||||||
android.dynamicLink.appCode = android.dynamicLink.appCode || 'w2atb';
|
|
||||||
android.dynamicLink.ibi = android.dynamicLink.ibi || 'com.atlassian.JitsiMeet.ios';
|
|
||||||
android.dynamicLink.isi = android.dynamicLink.isi || '1165103905';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ import {
|
|||||||
IConfig,
|
IConfig,
|
||||||
IDeeplinkingConfig,
|
IDeeplinkingConfig,
|
||||||
IDeeplinkingDesktopConfig,
|
IDeeplinkingDesktopConfig,
|
||||||
IDeeplinkingMobileConfig,
|
IDeeplinkingMobileConfig
|
||||||
IMobileDynamicLink
|
|
||||||
} from './configType';
|
} from './configType';
|
||||||
import { _cleanupConfig, _setDeeplinkingDefaults } from './functions';
|
import { _cleanupConfig, _setDeeplinkingDefaults } from './functions';
|
||||||
|
|
||||||
@@ -321,15 +320,6 @@ function _translateInterfaceConfig(oldValue: IConfig) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (typeof interfaceConfig === 'object') {
|
if (typeof interfaceConfig === 'object') {
|
||||||
const mobileDynamicLink = interfaceConfig.MOBILE_DYNAMIC_LINK;
|
|
||||||
const dynamicLink: IMobileDynamicLink | undefined = mobileDynamicLink ? {
|
|
||||||
apn: mobileDynamicLink.APN,
|
|
||||||
appCode: mobileDynamicLink.APP_CODE,
|
|
||||||
ibi: mobileDynamicLink.IBI,
|
|
||||||
isi: mobileDynamicLink.ISI,
|
|
||||||
customDomain: mobileDynamicLink.CUSTOM_DOMAIN
|
|
||||||
} : undefined;
|
|
||||||
|
|
||||||
if (deeplinking.desktop) {
|
if (deeplinking.desktop) {
|
||||||
deeplinking.desktop.appName = interfaceConfig.NATIVE_APP_NAME;
|
deeplinking.desktop.appName = interfaceConfig.NATIVE_APP_NAME;
|
||||||
}
|
}
|
||||||
@@ -340,14 +330,12 @@ function _translateInterfaceConfig(oldValue: IConfig) {
|
|||||||
appScheme: interfaceConfig.APP_SCHEME,
|
appScheme: interfaceConfig.APP_SCHEME,
|
||||||
downloadLink: interfaceConfig.MOBILE_DOWNLOAD_LINK_ANDROID,
|
downloadLink: interfaceConfig.MOBILE_DOWNLOAD_LINK_ANDROID,
|
||||||
appPackage: interfaceConfig.ANDROID_APP_PACKAGE,
|
appPackage: interfaceConfig.ANDROID_APP_PACKAGE,
|
||||||
fDroidUrl: interfaceConfig.MOBILE_DOWNLOAD_LINK_F_DROID,
|
fDroidUrl: interfaceConfig.MOBILE_DOWNLOAD_LINK_F_DROID
|
||||||
dynamicLink
|
|
||||||
};
|
};
|
||||||
deeplinking.ios = {
|
deeplinking.ios = {
|
||||||
appName: interfaceConfig.NATIVE_APP_NAME,
|
appName: interfaceConfig.NATIVE_APP_NAME,
|
||||||
appScheme: interfaceConfig.APP_SCHEME,
|
appScheme: interfaceConfig.APP_SCHEME,
|
||||||
downloadLink: interfaceConfig.MOBILE_DOWNLOAD_LINK_IOS,
|
downloadLink: interfaceConfig.MOBILE_DOWNLOAD_LINK_IOS
|
||||||
dynamicLink
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
newValue.deeplinking = deeplinking;
|
newValue.deeplinking = deeplinking;
|
||||||
|
|||||||
@@ -106,29 +106,10 @@ const DeepLinkingMobilePage: React.FC<WithTranslation> = ({ t }) => {
|
|||||||
const { classes: styles } = useStyles();
|
const { classes: styles } = useStyles();
|
||||||
|
|
||||||
const generateDownloadURL = useCallback(() => {
|
const generateDownloadURL = useCallback(() => {
|
||||||
const { downloadLink, dynamicLink, appScheme }
|
const { downloadLink }
|
||||||
= (deeplinkingCfg?.[Platform.OS as keyof typeof deeplinkingCfg] || {}) as IDeeplinkingMobileConfig;
|
= (deeplinkingCfg?.[Platform.OS as keyof typeof deeplinkingCfg] || {}) as IDeeplinkingMobileConfig;
|
||||||
|
|
||||||
if (downloadLink && typeof dynamicLink === 'undefined') {
|
return downloadLink;
|
||||||
return downloadLink;
|
|
||||||
}
|
|
||||||
|
|
||||||
const {
|
|
||||||
apn,
|
|
||||||
appCode,
|
|
||||||
customDomain,
|
|
||||||
ibi,
|
|
||||||
isi
|
|
||||||
} = dynamicLink || {};
|
|
||||||
|
|
||||||
const domain = customDomain ?? `https://${appCode}.app.goo.gl`;
|
|
||||||
|
|
||||||
return `${domain}/?link=${
|
|
||||||
encodeURIComponent(window.location.href)}&apn=${
|
|
||||||
apn}&ibi=${
|
|
||||||
ibi}&isi=${
|
|
||||||
isi}&ius=${
|
|
||||||
appScheme}&efr=1`;
|
|
||||||
}, [ deeplinkingCfg ]);
|
}, [ deeplinkingCfg ]);
|
||||||
|
|
||||||
const onDownloadApp = useCallback(() => {
|
const onDownloadApp = useCallback(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user