Why we switched from Hockeyapp to Firebase? How to do this on iOS platform? A quick tutorial.

Bye bye Hockey - Welcome Fire!

Finally, after long period with Hockeyapp, we decided to switch our client mobile applications to Firebase as it is more complex and allows us to log custom events.

About Firebase

Firebase is a complex web and mobile application platform, which includes services like:

  • Analytics - measurement, custom logging, usage statistics
  • Authorization with social login providers like Facebook or Google
  • Cloud databases, storage and hosting
  • Test lab for android apps
  • Crash reporting
  • Remote notifications
  • Sending personalised emails and SMS
  • Ads

Implementation in iOS

That’s incredibly easy! Firebase console lead us by the hand, step by step, so all setup can be completed in a few minutes. All what is needed is a Google account and working iOS project. Also it is recommended to use Cocoapods for easy import Firebase framework. Then login to Console and add new project. Then it is possible to add iOS, Android or Web app. For iOS just copy your app bundle identifier, setup name and optionally App Store identifier. Download generated .plist file and import it to the project. After that just run one method… and that’s all! Firebase will automatically setup itself.

let firebaseOptions = FIROptions(contentsOfFile: Bundle.main.path(forResource: firebasePlistFileName, ofType: "plist"))
FIRApp.configure(with: firebaseOptions!)

Crash reporting

To get the human-readable crash reports from iOS apps there must be uploaded .dSYM files from build archive.

At first developer must create a crash reporting upload .json file at: App -> Settings -> Account services -> Crash reporting Then for application with enabled bitcode use Firebase batch-upload script like:

…/FirebaseCrash/batch-upload -i "…/Info.plist" -p "…/GoogleService-Info.plist" "appname-firebase-crashreporting-xxx-xxxxxxxxx.json" "Name.app.dSYM"

If you already had generated .json file and did uploads with batch-upload there might be some problems with uploading. All what is needed to do is clearing cached upload symbols:

rm $HOME/Library/Preferences/com.google.SymbolUpload*

Also it might be a good practice to call it before every batch-upload phrase.



Crash reporting works in Firebase like a charm! Also it have possibility to log custom events, which wasn’t allowed at the Hockeyapp. We can’t wait to implement more solutions from this platform!

About the author:

Konrad Roj

iOS Developer in BT Skyrise. Fascinated by the Apple technology, holder of almost all of the company's devices. Loves to create and delve into difficult secrets of programming in Objective-C and Swift. Also recently in spare time collects Pokemon :)

Previous Post

blog comments powered by Disqus