File tree 1 file changed +8
-0
lines changed
Firebase/Auth/Source/RPCs
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 59
59
#import " ../AuthProviders/Phone/FIRPhoneAuthProvider.h"
60
60
#endif
61
61
62
+ /* * @var kClientVersionHeader
63
+ @brief HTTP header name for the client version.
64
+ */
65
+ static NSString *const kClientVersionHeader = @" X-Client-Version" ;
66
+
62
67
/* * @var kIosBundleIdentifierHeader
63
68
@brief HTTP header name for iOS bundle ID.
64
69
*/
@@ -428,6 +433,9 @@ - (void)asyncPostToURL:(NSURL *)URL
428
433
completionHandler : (void (^)(NSData *_Nullable, NSError *_Nullable))handler {
429
434
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL: URL];
430
435
[request setValue: contentType forHTTPHeaderField: @" Content-Type" ];
436
+ NSString *clientVersion =
437
+ [NSString stringWithFormat: @" iOS/FirebaseSDK/%s " , FirebaseAuthVersionString];
438
+ [request setValue: clientVersion forHTTPHeaderField: kClientVersionHeader ];
431
439
NSString *bundleID = [[NSBundle mainBundle ] bundleIdentifier ];
432
440
[request setValue: bundleID forHTTPHeaderField: kIosBundleIdentifierHeader ];
433
441
You can’t perform that action at this time.
0 commit comments