Skip to content

Commit f1fdace

Browse files
committed
format: ios files
1 parent 2ba147d commit f1fdace

File tree

8 files changed

+42
-30
lines changed

8 files changed

+42
-30
lines changed

packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTDocumentSnapshotStreamHandler.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ - (FlutterError *_Nullable)onListenWithArguments:(id _Nullable)arguments
4747
events([FLTFirebasePluginHelper createFlutterErrorWithCode:code
4848
message:message
4949
optionalDetails:details
50-
andOptionalError:error]);
50+
andOptionalError:error]);
5151
});
5252
} else {
5353
dispatch_async(dispatch_get_main_queue(), ^{

packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestorePlugin.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@import firebase_core;
77
@import FirebaseCore;
88

9+
#import "include/cloud_firestore/Public/FLTFirebaseFirestorePlugin.h"
910
#import <TargetConditionals.h>
1011
#import "FirebaseFirestoreInternal/FIRPersistentCacheIndexManager.h"
1112
#import "include/cloud_firestore/Private/FLTDocumentSnapshotStreamHandler.h"
@@ -16,7 +17,6 @@
1617
#import "include/cloud_firestore/Private/FLTSnapshotsInSyncStreamHandler.h"
1718
#import "include/cloud_firestore/Private/FLTTransactionStreamHandler.h"
1819
#import "include/cloud_firestore/Private/FirestorePigeonParser.h"
19-
#import "include/cloud_firestore/Public/FLTFirebaseFirestorePlugin.h"
2020

2121
NSString *const kFLTFirebaseFirestoreChannelName = @"plugins.flutter.io/firebase_firestore";
2222
NSString *const kFLTFirebaseFirestoreQuerySnapshotEventChannelName =

packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTLoadBundleStreamHandler.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
@import FirebaseFirestore;
1313
@import firebase_core;
1414

15-
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
1615
#import "include/cloud_firestore/Private/FLTLoadBundleStreamHandler.h"
16+
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
1717

1818
@interface FLTLoadBundleStreamHandler ()
1919
@property(readwrite, strong) FIRLoadBundleTask *task;
@@ -51,7 +51,7 @@ - (FlutterError *_Nullable)onListenWithArguments:(id _Nullable)arguments
5151
events([FLTFirebasePluginHelper createFlutterErrorWithCode:code
5252
message:message
5353
optionalDetails:details
54-
andOptionalError:error]);
54+
andOptionalError:error]);
5555
});
5656
}
5757
}];

packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTQuerySnapshotStreamHandler.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
@import FirebaseFirestore;
66
@import firebase_core;
77

8-
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
98
#import "include/cloud_firestore/Private/FLTQuerySnapshotStreamHandler.h"
9+
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
1010
#import "include/cloud_firestore/Private/FirestorePigeonParser.h"
1111
#import "include/cloud_firestore/Public/CustomPigeonHeaderFirestore.h"
1212

@@ -57,7 +57,7 @@ - (FlutterError *_Nullable)onListenWithArguments:(id _Nullable)arguments
5757
events([FLTFirebasePluginHelper createFlutterErrorWithCode:code
5858
message:message
5959
optionalDetails:details
60-
andOptionalError:error]);
60+
andOptionalError:error]);
6161
});
6262
} else {
6363
dispatch_async(dispatch_get_main_queue(), ^{

packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTTransactionStreamHandler.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
@import firebase_core;
77
@import FirebaseCore;
88

9-
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
109
#import "include/cloud_firestore/Private/FLTTransactionStreamHandler.h"
10+
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
1111
#import "include/cloud_firestore/Private/FirestorePigeonParser.h"
1212

1313
@interface FLTTransactionStreamHandler ()

packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/FLTFirebaseCorePlugin.swift

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ import Foundation
122122
// Otherwise, we need to delete and recreate it with the new options
123123
if let existingApp = FLTFirebasePluginHelper.firebaseApp(named: appName) {
124124
let existingOptions = existingApp.options
125-
125+
126126
// Check if the existing app has the required databaseURL if one is being provided
127127
if let newDatabaseURL = initializeAppRequest.databaseURL,
128128
existingOptions.databaseURL == nil || existingOptions.databaseURL != newDatabaseURL {
@@ -131,34 +131,35 @@ import Foundation
131131
if success {
132132
// Now configure with new options
133133
self.configureNewApp(appName: appName, appNameIos: appNameIos,
134-
initializeAppRequest: initializeAppRequest,
135-
completion: completion)
134+
initializeAppRequest: initializeAppRequest,
135+
completion: completion)
136136
} else {
137137
completion(.failure(NSError(domain: "FLTFirebaseCore",
138-
code: -1,
139-
userInfo: [
140-
NSLocalizedDescriptionKey: "Failed to delete existing Firebase app for reconfiguration",
141-
])))
138+
code: -1,
139+
userInfo: [
140+
NSLocalizedDescriptionKey: "Failed to delete existing Firebase app for reconfiguration",
141+
])))
142142
}
143143
}
144144
return
145145
}
146-
146+
147147
// App exists with same config, return it
148148
completion(.success(initializeResponse(from: existingApp)))
149149
return
150150
}
151151

152152
// No existing app, create new one
153153
configureNewApp(appName: appName, appNameIos: appNameIos,
154-
initializeAppRequest: initializeAppRequest,
155-
completion: completion)
154+
initializeAppRequest: initializeAppRequest,
155+
completion: completion)
156156
}
157-
157+
158158
private func configureNewApp(appName: String,
159-
appNameIos: String,
160-
initializeAppRequest: CoreFirebaseOptions,
161-
completion: @escaping (Result<CoreInitializeResponse, Error>) -> Void) {
159+
appNameIos: String,
160+
initializeAppRequest: CoreFirebaseOptions,
161+
completion: @escaping (Result<CoreInitializeResponse, Error>)
162+
-> Void) {
162163
let appId = initializeAppRequest.appId
163164
let messagingSenderId = initializeAppRequest.messagingSenderId
164165

packages/firebase_database/firebase_database/ios/firebase_database/Sources/firebase_database/FLTFirebaseDatabaseUtils.m

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ + (FIRDatabase *)databaseFromArguments:(id)arguments {
3434
// Convert Dart app name to iOS app name using the helper
3535
NSString *appNameIos = [FLTFirebasePluginHelper firebaseAppNameFromDartName:appName];
3636
FIRApp *app = [FIRApp appNamed:appNameIos];
37-
37+
3838
if (app == nil) {
39-
@throw [NSException exceptionWithName:@"InvalidFIRApp"
40-
reason:[NSString stringWithFormat:@"No Firebase app found with name '%@'. Make sure Firebase.initializeApp() is called first.", appName]
41-
userInfo:nil];
39+
@throw [NSException
40+
exceptionWithName:@"InvalidFIRApp"
41+
reason:[NSString
42+
stringWithFormat:@"No Firebase app found with name '%@'. Make sure "
43+
@"Firebase.initializeApp() is called first.",
44+
appName]
45+
userInfo:nil];
4246
}
4347
FIRDatabase *database;
4448

@@ -55,9 +59,15 @@ + (FIRDatabase *)databaseFromArguments:(id)arguments {
5559
database = [FIRDatabase databaseForApp:app URL:urlToUse];
5660
} else {
5761
// No databaseURL found - throw a helpful error
58-
@throw [NSException exceptionWithName:@"FIRDatabaseMissingURL"
59-
reason:[NSString stringWithFormat:@"No databaseURL found for Firebase app '%@'. Please ensure the app is initialized with a databaseURL in FirebaseOptions, or pass a databaseURL when accessing the database.", appName]
60-
userInfo:nil];
62+
@throw [NSException
63+
exceptionWithName:@"FIRDatabaseMissingURL"
64+
reason:[NSString
65+
stringWithFormat:
66+
@"No databaseURL found for Firebase app '%@'. Please ensure the "
67+
@"app is initialized with a databaseURL in FirebaseOptions, or "
68+
@"pass a databaseURL when accessing the database.",
69+
appName]
70+
userInfo:nil];
6171
}
6272

6373
// [database setCallbackQueue:[self dispatchQueue]];

packages/firebase_database/firebase_database_platform_interface/lib/src/method_channel/method_channel_database.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ class MethodChannelDatabase extends DatabasePlatform {
8181
@override
8282
Map<String, Object?> getChannelArguments([Map<String, Object?>? other]) {
8383
// Fall back to app's databaseURL if not explicitly provided
84-
final String? effectiveDatabaseURL = databaseURL ?? app?.options.databaseURL;
85-
84+
final String? effectiveDatabaseURL =
85+
databaseURL ?? app?.options.databaseURL;
86+
8687
return {
8788
'appName': app!.name,
8889
if (effectiveDatabaseURL != null) 'databaseURL': effectiveDatabaseURL,

0 commit comments

Comments
 (0)