Skip to content

funseek/godot-ios-firebase-analytics

Repository files navigation

About

Firebase Analytics iOS Plugin for Godot

Instructions

Building library and copy them to Godot Project

Clone this repository and it's submodules:

git clone --recurse-submodules git@github.com:funseek/godot-ios-firebase-analytics.git

To generate Godot headers you need to run compilation command inside godot submodule directory.
Example:

./scripts/generate_headers.sh

run pod install. CocoaPods

pod install

Building a .a library

./scripts/release_static_library.sh 3.5

Copy a.library and gdip file to Godot plugin directory

cp bin/release/firebase-analytics/firebase-analytics.*.a $GODOT_HOME/ios/plugins/firebase-analytics/bin/
cp firebase-analytics.gdip $GODOT_HOME/ios/plugins/

Export iOS project and edit Xcode project

Export iOS project by Godot. then you need to use CocoaPods in Xcode. Add the following to your Podfile if it does not exist, create a new one.

pod 'Firebase/Analytics'

run pod install.

pod install

Finaly, Your GoogleService-Info.plist to Xcode. Screen Shot 2022-05-03 at 8 46 16

How to use it with GDScript

Method to initialize Firebase.

  • configure()

Calling plugin in Godot

if Engine.has_singleton("FirebaseAnalytics"):
		var firebase = Engine.get_singleton("FirebaseAnalytics")
		firebase.configure()

License

MIT