Browse Source

[Core] Remove Options.deepLinkURLScheme (#15006)

Nick Cooke 9 tháng trước cách đây
mục cha
commit
6f603aa162

+ 5 - 0
FirebaseCore/CHANGELOG.md

@@ -1,3 +1,8 @@
+# Unreleased
+- [removed] **Breaking change**: Removed the `Options.deepLinkURLScheme`
+  property. This API was exclusively used by the Dynamic Links SDK, which
+  has been removed.
+
 # Firebase 11.15.0
 - [fixed] Remove c99 as the required C language standard. (#14950)
 - [deprecated] Deprecated the `Options.deepLinkURLScheme` property. This

+ 1 - 12
FirebaseCore/Sources/FIROptions.m

@@ -160,7 +160,6 @@ static dispatch_once_t sDefaultOptionsDictionaryOnceToken;
   FIROptions *newOptions = [(FIROptions *)[[self class] allocWithZone:zone]
       initInternalWithOptionsDictionary:self.optionsDictionary];
   if (newOptions) {
-    newOptions->_deepLinkURLScheme = self->_deepLinkURLScheme;
     newOptions.appGroupID = self.appGroupID;
     newOptions.editingLocked = self.isEditingLocked;
     newOptions.usingOptionsFromDefaultPlist = self.usingOptionsFromDefaultPlist;
@@ -315,11 +314,6 @@ static dispatch_once_t sDefaultOptionsDictionaryOnceToken;
   _optionsDictionary[kFIRStorageBucket] = [storageBucket copy];
 }
 
-- (void)setDeepLinkURLScheme:(NSString *)deepLinkURLScheme {
-  [self checkEditingLocked];
-  _deepLinkURLScheme = [deepLinkURLScheme copy];
-}
-
 - (NSString *)bundleID {
   return self.optionsDictionary[kFIRBundleID];
 }
@@ -357,11 +351,6 @@ static dispatch_once_t sDefaultOptionsDictionaryOnceToken;
 
   // Validate extra properties not contained in the dictionary. Only validate it if one of the
   // objects has the property set.
-  if ((options->_deepLinkURLScheme != nil || self->_deepLinkURLScheme != nil) &&
-      ![options->_deepLinkURLScheme isEqualToString:self->_deepLinkURLScheme]) {
-    return NO;
-  }
-
   if ((options.appGroupID != nil || self.appGroupID != nil) &&
       ![options.appGroupID isEqualToString:self.appGroupID]) {
     return NO;
@@ -384,7 +373,7 @@ static dispatch_once_t sDefaultOptionsDictionaryOnceToken;
   // Note: `self.analyticsOptionsDictionary` was left out here since it solely relies on the
   // contents of the main bundle's `Info.plist`. We should avoid reading that file and the contents
   // should be identical.
-  return self.optionsDictionary.hash ^ self->_deepLinkURLScheme.hash ^ self.appGroupID.hash;
+  return self.optionsDictionary.hash ^ self.appGroupID.hash;
 }
 
 #pragma mark - Internal instance methods

+ 0 - 5
FirebaseCore/Sources/Public/FirebaseCore/FIROptions.h

@@ -80,11 +80,6 @@ NS_SWIFT_NAME(FirebaseOptions)
  */
 @property(nonatomic, copy, nullable) NSString *databaseURL;
 
-/**
- * The URL scheme used to set up Durable Deep Link service.
- */
-@property(nonatomic, copy, nullable) NSString *deepLinkURLScheme DEPRECATED_ATTRIBUTE;
-
 /**
  * The Google Cloud Storage bucket name, e.g. @"abc-xyz-123.storage.firebase.com".
  */

+ 0 - 1
FirebaseInAppMessaging/Tests/Integration/FunctionalTestApp/App/InAppMessaging-Example-iOS/AppDelegate.m

@@ -34,7 +34,6 @@
   NSLog(@"application started");
 
   [FIRInAppMessaging disableAutoBootstrapWithFIRApp];
-  [FIROptions defaultOptions].deepLinkURLScheme = @"fiam-testing";
   [FIRApp configure];
 
   FIRIAMSDKSettings *sdkSetting = [[FIRIAMSDKSettings alloc] init];

+ 0 - 3
SharedTestUtilities/FIROptionsMock.h

@@ -27,9 +27,6 @@ extern NSString *const kGoogleAppID;
 extern NSString *const kDatabaseURL;
 extern NSString *const kStorageBucket;
 
-extern NSString *const kDeepLinkURLScheme;
-extern NSString *const kNewDeepLinkURLScheme;
-
 extern NSString *const kBundleID;
 extern NSString *const kProjectID;
 

+ 0 - 3
SharedTestUtilities/FIROptionsMock.m

@@ -25,9 +25,6 @@ NSString *const kGoogleAppID = @"1:123:ios:123abc";
 NSString *const kDatabaseURL = @"https://abc-xyz-123.firebaseio.com";
 NSString *const kStorageBucket = @"project-id-123.storage.firebase.com";
 
-NSString *const kDeepLinkURLScheme = @"comgoogledeeplinkurl";
-NSString *const kNewDeepLinkURLScheme = @"newdeeplinkurlfortest";
-
 NSString *const kBundleID = @"com.google.FirebaseSDKTests";
 NSString *const kProjectID = @"abc-xyz-123";
 

+ 1 - 5
docs/FirebaseOptionsPerProduct.md

@@ -11,7 +11,6 @@ Summarize which Firebase Options fields (and GoogleService-Info.plist attributes
 | **projectID**         |       |   ✅  |       |       |       |       |   ✅ |       |  ✅  |  ✅   |        |  ✅   |       |  ✅  |   ✅  |  ✅   |       |
 | **googleAppID**       |   ✅  |  ✅   |       |  ✅  |       |  ✅   |   ✅ |       |       |       |   ✅   |   ✅  | ✅   |       |  ✅   |   ✅ |   ✅ |
 | **databaseURL**       |       |       |       |       |       |       |   ✅  |       |       |       |       |       |       |       |       |       |       |
-| **deepLinkURLScheme** |       |       |       |       |       |       |       |    ✅ |       |       |       |       |       |       |       |       |       |
 | **storageBucket**     |       |       |       |       |       |       |       |       |       |       |       |       |       |       |       |       |   ✅   |
 
 
@@ -26,7 +25,6 @@ to GoogleService-Info.plist attributes.
 * *projectID*: The Project ID from the Firebase console
 * *googleAppID*: The Google App ID that is used to uniquely identify an instance of an app
 * *databaseURL*: The realtime database root URL
-* *deepLinkURLScheme*: The URL scheme used to set up Durable Deep Link service
 * *storageBucket*: The Google Cloud Storage bucket name
 
 ## Questions
@@ -36,10 +34,8 @@ to GoogleService-Info.plist attributes.
 * *gcmSenderID* is the second subfield of *googleAppID*. Can it be eliminated?
 * *bundleID* seems to have three purposes: Performance SDK uses it. Messaging back end uses it. Core
   will generate an error message if it doesn't match the actual bundleID. Anything else?
-* Why isn't *deepLinkURLScheme* set from the GoogleService-Info.plist field `REVERSED_CLIENT_ID` like
-  other Firebase Options? The client code is required to explicitly set it.
 * Is there a better way to manage the fields that are only used by one product? *clientID*, *databaseURL*,
-  *deepLinkURLScheme*, and *storageBucket*.
+  and *storageBucket*.
 
 ## Unused FirebaseOptions
 Proposal: Deprecate these in the SDK and stop generating them for GoogleService-Info.plist.