Flutter: Correctly adding GoogleServices-Info.plist to iOS

Updated: April 23, 2023 By: A Goodman 2 comments

If you’re building an iOS app with Flutter and Firebase then you’ll have to add a GoogleServices-Info.plist file to your project. If you just copy and paste this file into the Runner folder then there will be an error when running your application on an iOS simulator or a connected iPhone.

This article shows you how to add the GoogleServices-Info.plist file the right way.

The Steps

1. Open the ios folder of your project with XCode.

2. Right-click on Runner in the left-hand column then select Add Files to Runner from the menu.

3. Select the GoogleServices-Info.plist file from your computer and click on the Add button.

4. Now you’ll see GoogleServices-Info.plist listed under Runner. Actually, it isn’t a real file but a reference (shortcut) to the original file (therefore, you should keep the original GoogleServices-Info.plist safely). The GoogleServices-Info.plist file wasn’t copied to the Runner folder.

Done. Now run your project and check the result.

Final Words

We’ve explored how to integrate the GoogleServices-Info.plist for building an iOS app with Flutter. You can continue learning more interesting stuff or solving bugs you may run into when working with Flutter and Firebase by reading the following articles:

You can also check out our Flutter topic page or Dart topic page for the latest tutorials and examples.

Subscribe
Notify of
guest
2 Comments
Inline Feedbacks
View all comments
vipin
vipin
1 year ago

thanks….

vipin
vipin
2 years ago

Really helpful

Related Articles