diff options
author | Benoit St-Pierre <bstpierre@google.com> | 2018-02-26 14:26:35 -0500 |
---|---|---|
committer | Benoit St-Pierre <bstpierre@google.com> | 2018-02-26 14:26:35 -0500 |
commit | bc9dacf264ba14af87df93a42dec25c83dfeb48f (patch) | |
tree | abfb4521ce5928aadf917c5148d1cb931fbac7ea /Firebase/Core/FIROptions.m | |
parent | 6f5eebb77fcc2c130e80e8fe74101385dc993949 (diff) |
Add FirebaseCore version reporting
I've also added clearing of the library names for tests to avoid the
auto found versions on load.
Diffstat (limited to 'Firebase/Core/FIROptions.m')
-rw-r--r-- | Firebase/Core/FIROptions.m | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m index 75f2ed2..8a11ae8 100644 --- a/Firebase/Core/FIROptions.m +++ b/Firebase/Core/FIROptions.m @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#import "Private/FIRAppInternal.h" #import "Private/FIRBundleUtil.h" #import "Private/FIRErrors.h" #import "Private/FIRLogger.h" @@ -108,6 +109,18 @@ static NSDictionary *sDefaultOptionsDictionary = nil; #pragma mark - Private class methods ++ (void)load { + // Report FirebaseCore version for useragent string + NSRange major = NSMakeRange(0, 1); + NSRange minor = NSMakeRange(1, 2); + NSRange patch = NSMakeRange(3, 2); + [FIRApp registerLibrary:@"FirebaseCore" + withVersion:[NSString stringWithFormat:@"%@.%d.%d", + [kFIRLibraryVersionID substringWithRange:major], + [[kFIRLibraryVersionID substringWithRange:minor] intValue], + [[kFIRLibraryVersionID substringWithRange:patch] intValue]]]; +} + + (NSDictionary *)defaultOptionsDictionary { if (sDefaultOptionsDictionary != nil) { return sDefaultOptionsDictionary; |