Skip to content

Commit 7477e80

Browse files
authored
Send pod SDK version instead of hardcoded value in RC fetch request (#5737)
* Use FIRRemoteConfigPodVersion instead of FIRRemoteConfigSDKVersion * Clean up FIRRemoteConfigSDKVersion
1 parent 9a0aed8 commit 7477e80

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

FirebaseRemoteConfig/Sources/RCNConfigConstants.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@
1919
#define RCN_SEC_PER_MIN 60
2020
#define RCN_MSEC_PER_SEC 1000
2121

22-
/// Remote Config SDK internal version that is different than
23-
/// FIRRemoteConfigPodVersion. This is for config server to track down iOS
24-
/// client app version. Each version can only go up to 99.
25-
static const int kRCNMajorVersion = 1;
26-
static const int kRCNMinorVersion = 2;
27-
static const int kRCNPatchVersion = 10;
28-
2922
/// Key prefix applied to all the packages (bundle IDs) in internal metadata.
3023
static NSString *const RCNInternalMetadataAllPackagesPrefix = @"all_packages";
3124

FirebaseRemoteConfig/Sources/RCNConfigSettings.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ - (NSString *)nextRequestWithUserProperties:(NSDictionary *)userProperties {
354354
FIRRemoteConfigAppVersion()]];
355355
ret = [ret stringByAppendingString:[NSString stringWithFormat:@", app_build:'%@'",
356356
FIRRemoteConfigAppBuildVersion()]];
357-
ret = [ret stringByAppendingString:[NSString stringWithFormat:@", sdk_version:'%d'",
358-
FIRRemoteConfigSDKVersion()]];
357+
ret = [ret stringByAppendingString:[NSString stringWithFormat:@", sdk_version:'%@'",
358+
FIRRemoteConfigPodVersion()]];
359359

360360
if (userProperties && userProperties.count > 0) {
361361
NSError *error;

FirebaseRemoteConfig/Sources/RCNDevice.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ RCNDeviceModel FIRRemoteConfigDeviceSubtype(void);
4747
/// Device timezone.
4848
NSString *FIRRemoteConfigTimezone(void);
4949

50-
/// SDK version. This is different than CocoaPods SDK version.
51-
/// It is used for config server to keep track iOS client version.
52-
/// major * 10000 + minor + 100 + patch.
53-
int FIRRemoteConfigSDKVersion(void);
54-
5550
/// Update device context to the given dictionary.
5651
NSMutableDictionary *FIRRemoteConfigDeviceContextWithProjectIdentifier(
5752
NSString *GMPProjectIdentifier);

FirebaseRemoteConfig/Sources/RCNDevice.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,6 @@ RCNDeviceModel FIRRemoteConfigDeviceSubtype() {
202202
return timezone.name;
203203
}
204204

205-
int FIRRemoteConfigSDKVersion() {
206-
return kRCNMajorVersion * 10000 + kRCNMinorVersion * 100 + kRCNPatchVersion;
207-
}
208-
209205
NSMutableDictionary *FIRRemoteConfigDeviceContextWithProjectIdentifier(
210206
NSString *GMPProjectIdentifier) {
211207
NSMutableDictionary *deviceContext = [[NSMutableDictionary alloc] init];

0 commit comments

Comments
 (0)