Browse Source

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
j25
Saúl Ibarra Corretgé 4 months ago
parent
commit
7fabb33733

+ 0
- 2
android/app/build.gradle View File

@@ -83,10 +83,8 @@ dependencies {
83 83
 
84 84
         // Firebase
85 85
         //  - Crashlytics
86
-        //  - Dynamic Links
87 86
         implementation 'com.google.firebase:firebase-analytics:21.3.0'
88 87
         implementation 'com.google.firebase:firebase-crashlytics:18.4.3'
89
-        implementation 'com.google.firebase:firebase-dynamic-links:21.1.0'
90 88
     }
91 89
 
92 90
     implementation project(':sdk')

+ 0
- 13
android/app/src/main/java/org/jitsi/meet/GoogleServicesHelper.java View File

@@ -4,7 +4,6 @@ import android.net.Uri;
4 4
 import android.util.Log;
5 5
 
6 6
 import com.google.firebase.crashlytics.FirebaseCrashlytics;
7
-import com.google.firebase.dynamiclinks.FirebaseDynamicLinks;
8 7
 
9 8
 import org.jitsi.meet.sdk.JitsiMeet;
10 9
 import org.jitsi.meet.sdk.JitsiMeetActivity;
@@ -22,18 +21,6 @@ final class GoogleServicesHelper {
22 21
             Log.d(activity.getClass().getSimpleName(), "Initializing Google Services");
23 22
 
24 23
             FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(!JitsiMeet.isCrashReportingDisabled(activity));
25
-            FirebaseDynamicLinks.getInstance().getDynamicLink(activity.getIntent())
26
-                .addOnSuccessListener(activity, pendingDynamicLinkData -> {
27
-                    Uri dynamicLink = null;
28
-
29
-                    if (pendingDynamicLinkData != null) {
30
-                        dynamicLink = pendingDynamicLinkData.getLink();
31
-                    }
32
-
33
-                    if (dynamicLink != null) {
34
-                        activity.join(dynamicLink.toString());
35
-                    }
36
-                });
37 24
         }
38 25
     }
39 26
 }

+ 0
- 17
config.js View File

@@ -1269,9 +1269,6 @@ var config = {
1269 1269
     // disableDeepLinking: false,
1270 1270
 
1271 1271
     // The deeplinking config.
1272
-    // For information about the properties of
1273
-    // deeplinking.[ios/android].dynamicLink check:
1274
-    // https://firebase.google.com/docs/dynamic-links/create-manually
1275 1272
     // deeplinking: {
1276 1273
     //
1277 1274
     //     // The desktop deeplinking config, disabled by default.
@@ -1300,13 +1297,6 @@ var config = {
1300 1297
     //         appScheme: 'org.jitsi.meet',
1301 1298
     //         // Custom URL for downloading ios mobile app.
1302 1299
     //         downloadLink: 'https://itunes.apple.com/us/app/jitsi-meet/id1165103905',
1303
-    //         dynamicLink: {
1304
-    //             apn: 'org.jitsi.meet',
1305
-    //             appCode: 'w2atb',
1306
-    //             customDomain: undefined,
1307
-    //             ibi: 'com.atlassian.JitsiMeet.ios',
1308
-    //             isi: '1165103905'
1309
-    //         }
1310 1300
     //     },
1311 1301
 
1312 1302
     //     // The android deeplinking config.
@@ -1319,13 +1309,6 @@ var config = {
1319 1309
     //         // Android app package name.
1320 1310
     //         appPackage: 'org.jitsi.meet',
1321 1311
     //         fDroidUrl: 'https://f-droid.org/en/packages/org.jitsi.meet/',
1322
-    //         dynamicLink: {
1323
-    //             apn: 'org.jitsi.meet',
1324
-    //             appCode: 'w2atb',
1325
-    //             customDomain: undefined,
1326
-    //             ibi: 'com.atlassian.JitsiMeet.ios',
1327
-    //             isi: '1165103905'
1328
-    //         }
1329 1312
     //     }
1330 1313
     // },
1331 1314
 

+ 0
- 11
interface_config.js View File

@@ -192,17 +192,6 @@ var interfaceConfig = {
192 192
 
193 193
     // NATIVE_APP_NAME: 'Jitsi Meet',
194 194
 
195
-    /**
196
-     * Specify Firebase dynamic link properties for the mobile apps.
197
-     */
198
-    // MOBILE_DYNAMIC_LINK: {
199
-    //    APN: 'org.jitsi.meet',
200
-    //    APP_CODE: 'w2atb',
201
-    //    CUSTOM_DOMAIN: undefined,
202
-    //    IBI: 'com.atlassian.JitsiMeet.ios',
203
-    //    ISI: '1165103905'
204
-    // },
205
-
206 195
     /**
207 196
      * Hide the logo on the deep linking pages.
208 197
      */

+ 0
- 1
ios/Podfile View File

@@ -19,7 +19,6 @@ target 'JitsiMeet' do
19 19
 
20 20
   pod 'Firebase/Analytics', '~> 8.0'
21 21
   pod 'Firebase/Crashlytics', '~> 8.0'
22
-  pod 'Firebase/DynamicLinks', '~> 8.0'
23 22
 end
24 23
 
25 24
 target 'JitsiMeetSDK' do

+ 1
- 9
ios/Podfile.lock View File

@@ -27,9 +27,6 @@ PODS:
27 27
   - Firebase/Crashlytics (8.15.0):
28 28
     - Firebase/CoreOnly
29 29
     - FirebaseCrashlytics (~> 8.15.0)
30
-  - Firebase/DynamicLinks (8.15.0):
31
-    - Firebase/CoreOnly
32
-    - FirebaseDynamicLinks (~> 8.15.0)
33 30
   - FirebaseAnalytics (8.15.0):
34 31
     - FirebaseAnalytics/AdIdSupport (= 8.15.0)
35 32
     - FirebaseCore (~> 8.0)
@@ -64,8 +61,6 @@ PODS:
64 61
     - GoogleUtilities/Environment (~> 7.7)
65 62
     - nanopb (~> 2.30908.0)
66 63
     - PromisesObjC (< 3.0, >= 1.2)
67
-  - FirebaseDynamicLinks (8.15.0):
68
-    - FirebaseCore (~> 8.0)
69 64
   - FirebaseInstallations (8.15.0):
70 65
     - FirebaseCore (~> 8.0)
71 66
     - GoogleUtilities/Environment (~> 7.7)
@@ -1798,7 +1793,6 @@ DEPENDENCIES:
1798 1793
   - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
1799 1794
   - Firebase/Analytics (~> 8.0)
1800 1795
   - Firebase/Crashlytics (~> 8.0)
1801
-  - Firebase/DynamicLinks (~> 8.0)
1802 1796
   - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
1803 1797
   - "giphy-react-native-sdk (from `../node_modules/@giphy/react-native-sdk`)"
1804 1798
   - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
@@ -1898,7 +1892,6 @@ SPEC REPOS:
1898 1892
     - FirebaseCore
1899 1893
     - FirebaseCoreDiagnostics
1900 1894
     - FirebaseCrashlytics
1901
-    - FirebaseDynamicLinks
1902 1895
     - FirebaseInstallations
1903 1896
     - Giphy
1904 1897
     - GoogleAppMeasurement
@@ -2108,7 +2101,6 @@ SPEC CHECKSUMS:
2108 2101
   FirebaseCore: 5743c5785c074a794d35f2fff7ecc254a91e08b1
2109 2102
   FirebaseCoreDiagnostics: 92e07a649aeb66352b319d43bdd2ee3942af84cb
2110 2103
   FirebaseCrashlytics: feb07e4e9187be3c23c6a846cce4824e5ce2dd0b
2111
-  FirebaseDynamicLinks: 1dc816ef789c5adac6fede0b46d11478175c70e4
2112 2104
   FirebaseInstallations: 40bd9054049b2eae9a2c38ef1c3dd213df3605cd
2113 2105
   fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
2114 2106
   Giphy: 83628960ed04e1c3428ff1b4fb2b027f65e82f50
@@ -2209,6 +2201,6 @@ SPEC CHECKSUMS:
2209 2201
   SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
2210 2202
   Yoga: 1dd9dabb9df8fe08f12cd522eae04a2da0e252eb
2211 2203
 
2212
-PODFILE CHECKSUM: 4f6abcf3cec0d9e8e1d5f5d81a35d99adde9ae45
2204
+PODFILE CHECKSUM: 8ff981f2324fa4b013b6690257898dcd2be9d3c3
2213 2205
 
2214 2206
 COCOAPODS: 1.16.2

+ 1
- 32
ios/app/src/AppDelegate.swift View File

@@ -54,19 +54,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
54 54
     // MARK: Linking delegate methods
55 55
 
56 56
     func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
57
-        if self.appContainsRealServiceInfoPlist() {
58
-            let handled = DynamicLinks.dynamicLinks().handleUniversalLink(userActivity.webpageURL!) { dynamicLink, error in
59
-                if let firebaseUrl = self.extractURL(from: dynamicLink) {
60
-                    userActivity.webpageURL = firebaseUrl
61
-                    JitsiMeet.sharedInstance().application(application, continue: userActivity, restorationHandler: restorationHandler)
62
-                }
63
-            }
64
-
65
-            if handled {
66
-                return handled
67
-            }
68
-        }
69
-
70 57
         return JitsiMeet.sharedInstance().application(application, continue: userActivity, restorationHandler: restorationHandler)
71 58
     }
72 59
 
@@ -75,16 +62,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
75 62
             return false
76 63
         }
77 64
 
78
-        var openUrl = url
79
-
80
-        if self.appContainsRealServiceInfoPlist() {
81
-            if let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url),
82
-               let firebaseUrl = self.extractURL(from: dynamicLink) {
83
-                openUrl = firebaseUrl
84
-            }
85
-        }
86
-
87
-        return JitsiMeet.sharedInstance().application(app, open: openUrl, options: options)
65
+        return JitsiMeet.sharedInstance().application(app, open: url, options: options)
88 66
     }
89 67
 
90 68
     func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
@@ -97,13 +75,4 @@ extension AppDelegate {
97 75
     func appContainsRealServiceInfoPlist() -> Bool {
98 76
         return InfoPlistUtil.containsRealServiceInfoPlist(in: Bundle.main)
99 77
     }
100
-
101
-    func extractURL(from dynamicLink: DynamicLink?) -> URL? {
102
-        guard let dynamicLink = dynamicLink,
103
-              let dynamicLinkURL = dynamicLink.url,
104
-              dynamicLink.matchType == .unique || dynamicLink.matchType == .default else {
105
-            return nil
106
-        }
107
-        return dynamicLinkURL
108
-    }
109 78
 }

+ 0
- 10
react/features/base/config/configType.ts View File

@@ -86,15 +86,6 @@ export type Sounds = 'ASKED_TO_UNMUTE_SOUND' |
86 86
     'RECORDING_ON_SOUND' |
87 87
     'TALK_WHILE_MUTED_SOUND';
88 88
 
89
-
90
-export interface IMobileDynamicLink {
91
-    apn: string;
92
-    appCode: string;
93
-    customDomain?: string;
94
-    ibi: string;
95
-    isi: string;
96
-}
97
-
98 89
 export interface IDeeplinkingPlatformConfig {
99 90
     appName: string;
100 91
     appScheme: string;
@@ -103,7 +94,6 @@ export interface IDeeplinkingPlatformConfig {
103 94
 export interface IDeeplinkingMobileConfig extends IDeeplinkingPlatformConfig {
104 95
     appPackage?: string;
105 96
     downloadLink: string;
106
-    dynamicLink?: IMobileDynamicLink;
107 97
     fDroidUrl?: string;
108 98
 }
109 99
 

+ 0
- 12
react/features/base/config/functions.web.ts View File

@@ -77,12 +77,6 @@ export function _setDeeplinkingDefaults(deeplinking: IDeeplinkingConfig) {
77 77
     ios.appScheme = ios.appScheme || 'org.jitsi.meet';
78 78
     ios.downloadLink = ios.downloadLink
79 79
         || 'https://itunes.apple.com/us/app/jitsi-meet/id1165103905';
80
-    if (ios.dynamicLink) {
81
-        ios.dynamicLink.apn = ios.dynamicLink.apn || 'org.jitsi.meet';
82
-        ios.dynamicLink.appCode = ios.dynamicLink.appCode || 'w2atb';
83
-        ios.dynamicLink.ibi = ios.dynamicLink.ibi || 'com.atlassian.JitsiMeet.ios';
84
-        ios.dynamicLink.isi = ios.dynamicLink.isi || '1165103905';
85
-    }
86 80
 
87 81
     android.appName = android.appName || 'Jitsi Meet';
88 82
     android.appScheme = android.appScheme || 'org.jitsi.meet';
@@ -90,10 +84,4 @@ export function _setDeeplinkingDefaults(deeplinking: IDeeplinkingConfig) {
90 84
         || 'https://play.google.com/store/apps/details?id=org.jitsi.meet';
91 85
     android.appPackage = android.appPackage || 'org.jitsi.meet';
92 86
     android.fDroidUrl = android.fDroidUrl || 'https://f-droid.org/packages/org.jitsi.meet/';
93
-    if (android.dynamicLink) {
94
-        android.dynamicLink.apn = android.dynamicLink.apn || 'org.jitsi.meet';
95
-        android.dynamicLink.appCode = android.dynamicLink.appCode || 'w2atb';
96
-        android.dynamicLink.ibi = android.dynamicLink.ibi || 'com.atlassian.JitsiMeet.ios';
97
-        android.dynamicLink.isi = android.dynamicLink.isi || '1165103905';
98
-    }
99 87
 }

+ 3
- 15
react/features/base/config/reducer.ts View File

@@ -18,8 +18,7 @@ import {
18 18
     IConfig,
19 19
     IDeeplinkingConfig,
20 20
     IDeeplinkingDesktopConfig,
21
-    IDeeplinkingMobileConfig,
22
-    IMobileDynamicLink
21
+    IDeeplinkingMobileConfig
23 22
 } from './configType';
24 23
 import { _cleanupConfig, _setDeeplinkingDefaults } from './functions';
25 24
 
@@ -321,15 +320,6 @@ function _translateInterfaceConfig(oldValue: IConfig) {
321 320
         };
322 321
 
323 322
         if (typeof interfaceConfig === 'object') {
324
-            const mobileDynamicLink = interfaceConfig.MOBILE_DYNAMIC_LINK;
325
-            const dynamicLink: IMobileDynamicLink | undefined = mobileDynamicLink ? {
326
-                apn: mobileDynamicLink.APN,
327
-                appCode: mobileDynamicLink.APP_CODE,
328
-                ibi: mobileDynamicLink.IBI,
329
-                isi: mobileDynamicLink.ISI,
330
-                customDomain: mobileDynamicLink.CUSTOM_DOMAIN
331
-            } : undefined;
332
-
333 323
             if (deeplinking.desktop) {
334 324
                 deeplinking.desktop.appName = interfaceConfig.NATIVE_APP_NAME;
335 325
             }
@@ -340,14 +330,12 @@ function _translateInterfaceConfig(oldValue: IConfig) {
340 330
                 appScheme: interfaceConfig.APP_SCHEME,
341 331
                 downloadLink: interfaceConfig.MOBILE_DOWNLOAD_LINK_ANDROID,
342 332
                 appPackage: interfaceConfig.ANDROID_APP_PACKAGE,
343
-                fDroidUrl: interfaceConfig.MOBILE_DOWNLOAD_LINK_F_DROID,
344
-                dynamicLink
333
+                fDroidUrl: interfaceConfig.MOBILE_DOWNLOAD_LINK_F_DROID
345 334
             };
346 335
             deeplinking.ios = {
347 336
                 appName: interfaceConfig.NATIVE_APP_NAME,
348 337
                 appScheme: interfaceConfig.APP_SCHEME,
349
-                downloadLink: interfaceConfig.MOBILE_DOWNLOAD_LINK_IOS,
350
-                dynamicLink
338
+                downloadLink: interfaceConfig.MOBILE_DOWNLOAD_LINK_IOS
351 339
             };
352 340
         }
353 341
         newValue.deeplinking = deeplinking;

+ 2
- 21
react/features/deep-linking/components/DeepLinkingMobilePage.web.tsx View File

@@ -106,29 +106,10 @@ const DeepLinkingMobilePage: React.FC<WithTranslation> = ({ t }) => {
106 106
     const { classes: styles } = useStyles();
107 107
 
108 108
     const generateDownloadURL = useCallback(() => {
109
-        const { downloadLink, dynamicLink, appScheme }
109
+        const { downloadLink }
110 110
             = (deeplinkingCfg?.[Platform.OS as keyof typeof deeplinkingCfg] || {}) as IDeeplinkingMobileConfig;
111 111
 
112
-        if (downloadLink && typeof dynamicLink === 'undefined') {
113
-            return downloadLink;
114
-        }
115
-
116
-        const {
117
-            apn,
118
-            appCode,
119
-            customDomain,
120
-            ibi,
121
-            isi
122
-        } = dynamicLink || {};
123
-
124
-        const domain = customDomain ?? `https://${appCode}.app.goo.gl`;
125
-
126
-        return `${domain}/?link=${
127
-            encodeURIComponent(window.location.href)}&apn=${
128
-            apn}&ibi=${
129
-            ibi}&isi=${
130
-            isi}&ius=${
131
-            appScheme}&efr=1`;
112
+        return downloadLink;
132 113
     }, [ deeplinkingCfg ]);
133 114
 
134 115
     const onDownloadApp = useCallback(() => {

Loading…
Cancel
Save