Closed InShad7 closed 4 months ago
Hello, which version of XCode are you using?
Xcode 14.2 MacOS 12
Hello @InShad7,
Can you upgrade your Xcode to version 15 as per Flutter documentation?
hello. did you solve this issue?
not by updating the version because i cant be able to update because my macOS version is 12.
but i go through the errors and fix like this
Solution 1: StorageListTask file
if (self.pageSize != nil) {
queryParams["maxResults"] = "\(self.pageSize)"
}
if (self.previousPageToken != nil) {
queryParams["pageToken"] = self.previousPageToken
}
StorageDownloadTask file
if (self.fileURL != nil) {
// Handle file downloads
fetcher.destinationFileURL = self.fileURL
fetcher.downloadProgressBlock = { [weak self] (bytesWritten: Int64,
totalBytesWritten: Int64,
totalBytesExpectedToWrite: Int64) in
guard let self = self else { return }
self.state = .progress
self.progress.completedUnitCount = totalBytesWritten
self.progress.totalUnitCount = totalBytesExpectedToWrite
self.fire(for: .progress, snapshot: self.snapshot)
self.state = .running
}
}
Solution 2:
StorageListTask file
if let pageSize = self.pageSize {
queryParams["maxResults"] = "\(pageSize)"
}
if let previousPageToken = self.previousPageToken {
queryParams["pageToken"] = previousPageToken
}
StorageDownloadTask file
if let fileURL = self.fileURL {
// Handle file downloads
fetcher.destinationFileURL = fileURL
fetcher.downloadProgressBlock = { [weak self] (bytesWritten: Int64,
totalBytesWritten: Int64,
totalBytesExpectedToWrite: Int64) in
guard let self = self else { return }
self.state = .progress
self.progress.completedUnitCount = totalBytesWritten
self.progress.totalUnitCount = totalBytesExpectedToWrite
self.fire(for: .progress, snapshot: self.snapshot)
self.state = .running
}
}
after do like this i can build.
How about lowering your Firebase storage version? 11.x.x ?
Hello @InShad7, Can you delete your Pods/Podlock file and try again?
cd ios
rm -rf Pods && rm Podfile.lock
pod repo update
cd ..
flutter clean && flutter pub get
How about lowering your Firebase storage version? 11.x.x ?
when i lowered the version to 11.6.0 then the code comes like this without changing anything in the file and can compile successfully.
StorageListTask
if let pageSize = self.pageSize {
queryParams["maxResults"] = "\(pageSize)"
}
if let previousPageToken = self.previousPageToken {
queryParams["pageToken"] = previousPageToken
}
StorageDownloadTask
if let fileURL = self.fileURL {
// Handle file downloads
fetcher.destinationFileURL = fileURL
fetcher.downloadProgressBlock = { [weak self] (bytesWritten: Int64,
totalBytesWritten: Int64,
totalBytesExpectedToWrite: Int64) in
guard let self = self else { return }
self.state = .progress
self.progress.completedUnitCount = totalBytesWritten
self.progress.totalUnitCount = totalBytesExpectedToWrite
self.fire(for: .progress, snapshot: self.snapshot)
self.state = .running
}
}
Hello @InShad7, Can you delete your Pods/Podlock file and try again?
cd ios rm -rf Pods && rm Podfile.lock pod repo update cd .. flutter clean && flutter pub get
i tried this but wont change anything. After deleted the file and clean when i run pub get then also the same error within the file.
You mention that you are on macOS version 12 and thus unable to update to the latest version. Unfortunately, we will not be able to fix this from our side. You can still use an older version of the firebase_storage to test locally and use a CI tool to compile the app.
Is there an existing issue for this?
Which plugins are affected?
No response
Which platforms are affected?
iOS
Description
when I run my flutter project on Xcode I get this error
Could not build the application for the simulator. Error launching application on iPhone 14 Pro.
but in android it works perfectly
Reproducing the issue
these are the file I got errors
Firebase Core version
3.1.0
Flutter Version
3.22.2
Relevant Log Output
Flutter dependencies
firebase_storage: 12.0.1 firebase_core: 3.1.0 firebase_messaging: 15.0.1
Additional context and comments
No response