@@ -135,9 +135,7 @@ import FirebaseStorageInternal
135
135
putMetadata. path = path
136
136
putMetadata. name = ( path as NSString ) . lastPathComponent as String
137
137
}
138
- guard let fetcherService = storage. fetcherServiceForApp else {
139
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
140
- }
138
+ let fetcherService = storage. fetcherServiceForApp
141
139
let task = StorageUploadTask ( reference: impl,
142
140
service: fetcherService,
143
141
queue: storage. dispatchQueue,
@@ -216,9 +214,7 @@ import FirebaseStorageInternal
216
214
} else {
217
215
putMetadata = metadata!
218
216
}
219
- guard let fetcherService = storage. fetcherServiceForApp else {
220
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
221
- }
217
+ let fetcherService = storage. fetcherServiceForApp
222
218
let task = StorageUploadTask ( reference: impl,
223
219
service: fetcherService,
224
220
queue: storage. dispatchQueue,
@@ -266,9 +262,7 @@ import FirebaseStorageInternal
266
262
@objc ( dataWithMaxSize: completion: ) @discardableResult
267
263
open func getData( maxSize: Int64 ,
268
264
completion: @escaping ( ( _: Data ? , _: Error ? ) -> Void ) ) -> StorageDownloadTask {
269
- guard let fetcherService = storage. fetcherServiceForApp else {
270
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
271
- }
265
+ let fetcherService = storage. fetcherServiceForApp
272
266
let task = StorageDownloadTask ( reference: impl,
273
267
service: fetcherService,
274
268
queue: storage. dispatchQueue,
@@ -317,9 +311,7 @@ import FirebaseStorageInternal
317
311
*/
318
312
@objc ( downloadURLWithCompletion: )
319
313
open func downloadURL( completion: @escaping ( ( _: URL ? , _: Error ? ) -> Void ) ) {
320
- guard let fetcherService = storage. fetcherServiceForApp else {
321
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
322
- }
314
+ let fetcherService = storage. fetcherServiceForApp
323
315
let task = StorageGetDownloadURLTask ( reference: impl,
324
316
fetcherService: fetcherService,
325
317
queue: storage. dispatchQueue,
@@ -367,9 +359,7 @@ import FirebaseStorageInternal
367
359
@objc ( writeToFile: completion: ) @discardableResult
368
360
open func write( toFile fileURL: URL ,
369
361
completion: ( ( _: URL ? , _: Error ? ) -> Void ) ? ) -> StorageDownloadTask {
370
- guard let fetcherService = storage. fetcherServiceForApp else {
371
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
372
- }
362
+ let fetcherService = storage. fetcherServiceForApp
373
363
let task = StorageDownloadTask ( reference: impl,
374
364
service: fetcherService,
375
365
queue: storage. dispatchQueue,
@@ -416,9 +406,7 @@ import FirebaseStorageInternal
416
406
*/
417
407
@objc ( listAllWithCompletion: )
418
408
open func listAll( completion: @escaping ( ( _: StorageListResult ? , _: NSError ? ) -> Void ) ) {
419
- guard let fetcherService = storage. fetcherServiceForApp else {
420
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
421
- }
409
+ let fetcherService = storage. fetcherServiceForApp
422
410
var prefixes = [ FIRIMPLStorageReference] ( )
423
411
var items = [ FIRIMPLStorageReference] ( )
424
412
@@ -461,7 +449,6 @@ import FirebaseStorageInternal
461
449
queue: storage. dispatchQueue,
462
450
pageSize: nil ,
463
451
previousPageToken: nil ,
464
- // TODO: fix next line
465
452
completion: paginatedCompletion)
466
453
task. enqueue ( )
467
454
}
@@ -514,9 +501,7 @@ import FirebaseStorageInternal
514
501
userInfo: [ NSLocalizedDescriptionKey:
515
502
" Argument 'maxResults' must be between 1 and 1000 inclusive. " ] ) )
516
503
} else {
517
- guard let fetcherService = storage. fetcherServiceForApp else {
518
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
519
- }
504
+ let fetcherService = storage. fetcherServiceForApp
520
505
let task = StorageListTask ( reference: impl,
521
506
fetcherService: fetcherService,
522
507
queue: storage. dispatchQueue,
@@ -556,9 +541,7 @@ import FirebaseStorageInternal
556
541
userInfo: [ NSLocalizedDescriptionKey:
557
542
" Argument 'maxResults' must be between 1 and 1000 inclusive. " ] ) )
558
543
} else {
559
- guard let fetcherService = storage. fetcherServiceForApp else {
560
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
561
- }
544
+ let fetcherService = storage. fetcherServiceForApp
562
545
let task = StorageListTask ( reference: impl,
563
546
fetcherService: fetcherService,
564
547
queue: storage. dispatchQueue,
@@ -578,9 +561,7 @@ import FirebaseStorageInternal
578
561
*/
579
562
@objc ( metadataWithCompletion: )
580
563
open func getMetadata( completion: @escaping ( ( _: StorageMetadata ? , _: Error ? ) -> Void ) ) {
581
- guard let fetcherService = storage. fetcherServiceForApp else {
582
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
583
- }
564
+ let fetcherService = storage. fetcherServiceForApp
584
565
let task = StorageGetMetadataTask ( reference: impl,
585
566
fetcherService: fetcherService,
586
567
queue: storage. dispatchQueue,
@@ -614,9 +595,7 @@ import FirebaseStorageInternal
614
595
@objc ( updateMetadata: completion: )
615
596
open func updateMetadata( _ metadata: StorageMetadata ,
616
597
completion: ( ( _: StorageMetadata ? , _: Error ? ) -> Void ) ? ) {
617
- guard let fetcherService = storage. fetcherServiceForApp else {
618
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
619
- }
598
+ let fetcherService = storage. fetcherServiceForApp
620
599
let task = StorageUpdateMetadataTask ( reference: impl,
621
600
fetcherService: fetcherService,
622
601
queue: storage. dispatchQueue,
@@ -662,9 +641,7 @@ import FirebaseStorageInternal
662
641
*/
663
642
@objc ( deleteWithCompletion: )
664
643
open func delete( completion: ( ( _: Error ? ) -> Void ) ? ) {
665
- guard let fetcherService = storage. fetcherServiceForApp else {
666
- fatalError ( " TODO: Internal Error: fetcherService not configured " )
667
- }
644
+ let fetcherService = storage. fetcherServiceForApp
668
645
let task = StorageDeleteTask ( reference: impl,
669
646
fetcherService: fetcherService,
670
647
queue: storage. dispatchQueue,
0 commit comments