Saving Data to the Cloud with Firebase

I am following this tutorial.

Here’s another tutorial on uploading images, video and audio. Not exactly what I need but might be useful later.

Had a bit of trouble finding the bundle identifier for iOS. Found it in ios/Runner.xcodeproj/project.pbxproj . The generated file goes in the ios/Runner folder. The pod file, on the other hand, is just in the iOS folder.

Had a lot of errors with Pod Install;

CDN: trunk URL couldn't be downloaded:https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/3/5/Firebase/6.9.0/Firebase.podspec.json, error: Failed to open TCP connection to raw.githubusercontent.com:443 (Connection refused - connect(2) for "raw.githubusercontent.com" port 443)

Trying again a few times the next day fixed it. Patience!

Next issue was causing the iOS app to crash when I tried to run it, after following the steps.

*** First throw call stack:
(
	0   CoreFoundation                      0x0000000106a3c1e6 __exceptionPreprocess + 294
	1   libobjc.A.dylib                     0x00000001060d1031 objc_exception_throw + 48
	2   CoreFoundation                      0x0000000106ab1975 +[NSException raise:format:] + 197
	3   Runner                              0x0000000101e3336a +[FIRApp configure] + 352
	4   Runner                              0x0000000101eeef49 -[FLTFirebaseAnalyticsPlugin init] + 185
	5   Runner                              0x0000000101eeee28 +[FLTFirebaseAnalyticsPlugin registerWithRegistrar:] + 168
	6   Runner                              0x0000000101d9723c +[GeneratedPluginRegistrant registerWithRegistry:] + 124
	7   Runner                  <…>

This was because I added the googleservice-info.plist to the runner folder on my own. To get it to work I deleted the file and then opened the Runner.xcodeproj in Xcode, and then used Add File in Xcode to add the googleservice-info.plist file.