I have just setup Firebase and it runs on Android. On ios I have this issue .
Is it my setup or is this a known issue in Swift ?
Also the file mentioned below ‘StorageListTask.swift’ is a read-only file.
Launching lib/main.dart on iPhone 14 Pro Max in debug mode…
Xcode build done. 83.5s
Failed to build iOS app
Swift Compiler Error (Xcode): Reference to property ‘pageSize’ in closure requires explicit use of ‘self’ to make capture semantics explicit
/Users/anishhemachandran/StudioProjects/pet_rescues/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Internal/StorageListTask.swift:94:13
StorageListTask.swift:94
Swift Compiler Error (Xcode): Reference to property ‘previousPageToken’ in closure requires explicit use of ‘self’ to make capture semantics explicit
/Users/anishhemachandran/StudioProjects/pet_rescues/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Internal/StorageListTask.swift:98:13
StorageListTask.swift:98
Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code
Apple made rules about explicit use of self
less strict in Xcode 14.3 (swift 5.8). See proposal 0365 and changelog for Swift 5.8
Hence, this code should be compilable in Xcode 14.3 and up. I believe that it’s best to update your tools, maybe even to Xcode 15.+ since Firebase project runs CI checks on Xcode 15.2 and 15.3, proof
If updating is impossible for some reason, try to downgrade your Firebase dependencies. I think, if you use firebase_core package, you will need version not greater than 2.31.0
Sameri11 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2