Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
406 views
in Technique[技术] by (71.8m points)

ios - Is there a way to solve the problem I am facing after upgrading firebase in flutter

Hi I am facing an error on flutter while running my application in iOS simulator only. It works perfectly fine in Android simulator. After I upgraded my firebase dependencies that I added since then I am facing the issue. The version I was using before are as follow

firebase_auth: ^0.18.3
cloud_firestore: ^0.14.3
firebase_core: ^0.5.2
firebase_crashlytics: ^0.2.4

The version I am using now are as follow

firebase_auth: ^0.20.0
cloud_firestore: ^0.16.0
firebase_core: ^0.7.0
firebase_crashlytics: ^0.4.0

The error I am getting is

Error output from CocoaPods:
?

    [!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please
    specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install
Error launching application on iPhone 12.

Note this issue is only in iOS and not on Android and I wanted to upgrade the firebase. I have tried many methods on Stackoverflow and other resources but it seems to be of no help.

question from:https://stackoverflow.com/questions/65896966/is-there-a-way-to-solve-the-problem-i-am-facing-after-upgrading-firebase-in-flut

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This problem occurs because you have not set a minimum ios version in your Podfile.
Set a platform version in your Podfile.
cd ios
nano Podfile
Uncomment this line at the start of the file
# platform :ios, '9.0'
You can set the version to 11.0 if you like as some plugins don't support 9.0 anymore.
After that is done, run the following commands:

rm Podfile.lock
rm -rf Pods
pod install

Additionally, you can update the minimum iOS version for your app in the Runner to the version you set in the Podfile
That should do it for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...