Categories
SwiftUI

Can’t download GoogleService-Info.plist from Firebase console? How to Slove it?

Today I find I can’t download my new project’s GoogleService-Info.plist from Firebase console. When I click button to download GoogleService-Info.plist, Firebase console keep show error information “There was an error. The config file cannot be downloaded at this time.”, like this:

I try and try, and follow the instruction from this StackOverflow post. But it does not work.

After several times retried, I looked at the contents of GoogleService-Info.plist, this is a text format plist file. The contents are very simple, is design to tell the code some information about your Firebase project and app.

So I find a GoogleService-Info.plist from my old project as a template, input the information from the Firebase console into the template file. Share it with you guys, in case you can’t download GoogleService-Info.plist either.

Template File (GoogleService-Info.plist ):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CLIENT_ID</key>
	<string>Your client ID (You can copy from your old file)</string>
	<key>REVERSED_CLIENT_ID</key>
	<string>(You can copy from your old file)</string>
	<key>API_KEY</key>
	<string>AIzaSyAabGMlS2ccHYK2oH16u5uqs47NlYJ1S7I</string>
	<key>GCM_SENDER_ID</key>
	<string>Project number</string>
	<key>PLIST_VERSION</key>
	<string>1</string>
	<key>BUNDLE_ID</key>
	<string>Bundle ID</string>
	<key>PROJECT_ID</key>
	<string>Project ID</string>
	<key>STORAGE_BUCKET</key>
	<string>Project ID.appspot.com</string>
	<key>IS_ADS_ENABLED</key>
	<false/>
	<key>IS_ANALYTICS_ENABLED</key>
	<false/>
	<key>IS_APPINVITE_ENABLED</key>
	<true/>
	<key>IS_GCM_ENABLED</key>
	<true/>
	<key>IS_SIGNIN_ENABLED</key>
	<true/>
	<key>GOOGLE_APP_ID</key>
	<string>App ID</string>
	<key>DATABASE_URL</key>
	<string>https://Project ID.firebaseio.com</string>
</dict>
</plist>

Get the detailed information from the Firebase console Project setting page:

Leave a Reply

Your email address will not be published.