You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extension uses the [Firebase C++ SDK](https://firebase.google.com/docs/cpp/setup) version 7.3.0. The libs and includes have been copied from the SDK to the extension.
* Direct download link: https://dl.google.com/firebase/sdk/cpp/firebase_cpp_sdk_7.3.0.zip
6
-
7
-
8
-
## Copy dependencies
9
-
### Android dependencies
10
-
11
-
#### Java JAR dependencies
12
-
The dependencies used by this extension need to match the ones specified in `firebase_cpp_sdk/Android/firebase_dependencies.gradle` -> `firebaseDependenciesMap -> 'analytics'`. Also specified in `readme.md` in the root of the unzipped `firebase_cpp_sdk_7.3.0.zip`.
13
-
14
-
#### C++ library dependencies
15
-
Copy libs from `firebase_cpp_sdk/libs/android/armeabi-v7a/c++/*` and `firebase_cpp_sdk/libs/android/arm64-v8a/c++/*`
16
-
17
-
18
-
### iOS dependencies
19
-
Setup for iOS is made without CocoaPods using a direct download of the [Firebase iOS SDK from GitHub](https://github.com/firebase/firebase-ios-sdk/releases). It is important to use a version of the iOS SDK matching the iOS dependencies in `readme.md` in the root of the unzipped `firebase_cpp_sdk_7.3.0.zip` file.
20
-
21
-
* Copy frameworks from iOS SDK. Note that Defold doesn't support `*.xcframework` files. You need to unpack all the `*.framework` files from `*.xcframework` and put to folders according to architecture.
22
-
* Copy libs from CPP SDK. From `firebase_cpp_sdk/libs/ios/device-arm64/`, `firebase_cpp_sdk/libs/ios/device-armv7/` and `firebase_cpp_sdk/libs/ios/simulator-x86_64/`.
23
-
24
-
25
-
## Copy header files
26
-
Copy header files from `firebase_cpp_sdk/include`.
1
+
Follow guide in https://github.com/defold/extension-firebase
We recommend using a link to a zip file of a [specific release](https://github.com/defold/extension-firebase-analytics/releases).
17
+
We recommend using a link to a zip file of a [specific release](https://github.com/defold/extension-firebase-remoteconfig/releases).
17
18
18
-
## Setup
19
-
### 1. Firebase setup
20
-
The steps below taken from the [official Google Firebase Guides](https://firebase.google.com/docs/cpp/setup).
21
-
22
-
#### 1.1 Create a Firebase project
23
-
* Create a Firebase project in the [Firebase console](https://console.firebase.google.com/), if you don't already have one. Click Add project. If you already have an existing Google project associated with your mobile app, select it from the Project name drop down menu. Otherwise, enter a project name to create a new project.
24
-
* Optional: Edit your Project ID. Your project is given a unique ID automatically, and it's used in publicly visible Firebase features such as database URLs and your Firebase Hosting subdomain. You can change it now if you want to use a specific subdomain.
25
-
* Follow the remaining setup steps and click Create project (or Add Firebase if you're using an existing project) to begin provisioning resources for your project. This typically takes a few minutes. When the process completes, you'll be taken to the project overview.
26
-
27
-
#### 1.2 Setup for Android
28
-
* Click Add Firebase to your Android app and follow the setup steps. If you're importing an existing Google project, this may happen automatically and you can just download the config file.
29
-
* When prompted, enter your app's package name. It's important to enter the package name your app is using; this can only be set when you add an app to your Firebase project.
30
-
* During the process, you'll download a `google-services.json` file. You can download this file again at any time.
31
-
32
-
#### 1.3 Setup for iOS
33
-
* Click Add Firebase to your iOS app and follow the setup steps. If you're importing an existing Google project, this may happen automatically and you can just download the config file.
34
-
* When prompted, enter your app's bundle ID. It's important to enter the bundle ID your app is using; this can only be set when you add an app to your Firebase project.
35
-
* During the process, you'll download a `GoogleService-Info.plist` file. You can download this file again at any time.
36
-
37
-
### 2. Defold setup
38
-
#### 2.1 Add project dependencies
39
-
You can use the extension in your own project by adding this project as a [Defold library dependency](http://www.defold.com/manuals/libraries/). Open your game.project file and in the dependencies field under project add:
Or point to the ZIP file of a [specific release](https://github.com/defold/extension-firebase/releases) (recommended!).
44
-
45
-
#### 2.2 Setup for Android
46
-
47
-
* Run `generate_xml_from_google_services_json.py` or `generate_xml_from_google_services_json.exe` (both from Firebase C++ SDK) to convert the previously downloaded `google-services.json` to an Android resource XML:
* Copy the generated `google-services.xml` file to a folder structure like this:
54
-
55
-
```
56
-
<project_root>
57
-
|
58
-
+-bundle
59
-
|
60
-
+-android
61
-
|
62
-
+-res
63
-
|
64
-
+-values
65
-
|
66
-
+-google-services.xml
67
-
```
68
-
69
-
* Open `game.project` and set the `Bundle Resources` entry under the `Project` section to `/bundle` to match the folder created in the step above. Read more about the `Bundle Resources` setting in the [Defold manual](https://www.defold.com/manuals/project-settings/#_project).
70
-
71
-
72
-
#### 2.3 Setup for iOS
73
-
* Copy the generated `GoogleService-Info.plist` file to a folder structure like this:
74
-
75
-
```
76
-
<project_root>
77
-
|
78
-
+-bundle
79
-
|
80
-
+-ios
81
-
|
82
-
+-GoogleService-Info.plist
83
-
```
20
+
## Setup
21
+
Follow the [main setup guide for integration of Firebase in Defold](https://www.defold.com/extension-firebase).
84
22
85
-
* Open `game.project` and set the `Bundle Resources` entry under the `Project` section to `/bundle` to match the folder created in the step above. Read more about the `Bundle Resources` setting in the [Defold manual](https://www.defold.com/manuals/project-settings/#_project).
86
23
87
24
88
25
## Usage
@@ -111,5 +48,4 @@ end
111
48
The source code is available on [GitHub](https://github.com/defold/extension-firebase-analytics)
0 commit comments