aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Core/FIROptions.m
diff options
context:
space:
mode:
authorGravatar Paul Beusterien <paulbeusterien@google.com>2017-07-27 11:02:39 -0700
committerGravatar GitHub <noreply@github.com>2017-07-27 11:02:39 -0700
commit0abd3444344ea134b0593fcaaf428e82cd190e12 (patch)
tree2a3edd3751d3de661fe1a12c6e5b2aa4e10bb110 /Firebase/Core/FIROptions.m
parent94dd3c50ad22533f97f59988a1dc01277f29ed6d (diff)
Add clang-format options and script; apply to FirebaseCore (#151)
Diffstat (limited to 'Firebase/Core/FIROptions.m')
-rw-r--r--Firebase/Core/FIROptions.m28
1 files changed, 14 insertions, 14 deletions
diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m
index 3395767..b2bdce8 100644
--- a/Firebase/Core/FIROptions.m
+++ b/Firebase/Core/FIROptions.m
@@ -39,11 +39,10 @@ NSString *const kFIRIsAnalyticsEnabled = @"IS_ANALYTICS_ENABLED";
NSString *const kFIRIsSignInEnabled = @"IS_SIGNIN_ENABLED";
// Library version ID.
-NSString *const kFIRLibraryVersionID =
- @"4" // Major version (one or more digits)
- @"00" // Minor version (exactly 2 digits)
- @"04" // Build number (exactly 2 digits)
- @"000"; // Fixed "000"
+NSString *const kFIRLibraryVersionID = @"4" // Major version (one or more digits)
+ @"00" // Minor version (exactly 2 digits)
+ @"04" // Build number (exactly 2 digits)
+ @"000"; // Fixed "000"
// Plist file name.
NSString *const kServiceInfoFileName = @"GoogleService-Info";
// Plist file type.
@@ -90,8 +89,7 @@ static NSDictionary *sDefaultOptionsDictionary = nil;
return nil;
}
- sDefaultOptions =
- [[FIROptions alloc] initInternalWithOptionsDictionary:defaultOptionsDictionary];
+ sDefaultOptions = [[FIROptions alloc] initInternalWithOptionsDictionary:defaultOptionsDictionary];
return sDefaultOptions;
}
@@ -108,7 +106,8 @@ static NSDictionary *sDefaultOptionsDictionary = nil;
sDefaultOptionsDictionary = [NSDictionary dictionaryWithContentsOfFile:plistFilePath];
if (sDefaultOptionsDictionary == nil) {
FIRLogError(kFIRLoggerCore, @"I-COR000011", @"The configuration file is not a dictionary: "
- @"'%@.%@'.", kServiceInfoFileName, kServiceInfoFileType);
+ @"'%@.%@'.",
+ kServiceInfoFileName, kServiceInfoFileType);
}
return sDefaultOptionsDictionary;
}
@@ -205,7 +204,8 @@ static NSDictionary *sDefaultOptionsDictionary = nil;
_optionsDictionary = [[NSDictionary dictionaryWithContentsOfFile:plistPath] mutableCopy];
if (_optionsDictionary == nil) {
FIRLogError(kFIRLoggerCore, @"I-COR000014", @"The configuration file at %@ does not exist or "
- @"is not a well-formed plist file.", plistPath);
+ @"is not a well-formed plist file.",
+ plistPath);
return nil;
}
// TODO: Do we want to validate the dictionary here? It says we do that already in
@@ -214,8 +214,7 @@ static NSDictionary *sDefaultOptionsDictionary = nil;
return self;
}
-- (instancetype)initWithGoogleAppID:(NSString *)googleAppID
- GCMSenderID:(NSString *)GCMSenderID {
+- (instancetype)initWithGoogleAppID:(NSString *)googleAppID GCMSenderID:(NSString *)GCMSenderID {
self = [super init];
if (self) {
NSMutableDictionary *mutableOptionsDict = [NSMutableDictionary dictionary];
@@ -369,9 +368,10 @@ static NSDictionary *sDefaultOptionsDictionary = nil;
dispatch_once(&_createAnalyticsOptionsDictionaryOnce, ^{
NSMutableDictionary *tempAnalyticsOptions = [[NSMutableDictionary alloc] init];
NSDictionary *mainInfoDictionary = [NSBundle mainBundle].infoDictionary;
- NSArray *measurementKeys = @[ kFIRIsMeasurementEnabled,
- kFIRIsAnalyticsCollectionEnabled,
- kFIRIsAnalyticsCollectionDeactivated ];
+ NSArray *measurementKeys = @[
+ kFIRIsMeasurementEnabled, kFIRIsAnalyticsCollectionEnabled,
+ kFIRIsAnalyticsCollectionDeactivated
+ ];
for (NSString *key in measurementKeys) {
id value = mainInfoDictionary[key] ?: self.optionsDictionary[key] ?: nil;
if (!value) {