Skip to content

Commit b270703

Browse files
Googlercynthiajiang
authored andcommitted
Initial import of the Firebase Unity SDK - 405788743 Update a TODO comment to point to the new, correct Bugani... by Googler <[email protected]>
- 405710730 Temporarily work around b/202952011 so that `TestDocument... by Googler <[email protected]> - 405671010 Improve the Firestore release notes entry for 8.5.0. by Googler <[email protected]> - 405639392 Add deferred installation of Crashlytics signal handler f... by Googler <[email protected]> - 405511406 Update the Unity version to 8.5.0 by amaurice <[email protected]> - 405503932 Update the Xcode version being used to 13.0 by amaurice <[email protected]> - 404017615 Update generated sources. by Googler <[email protected]> - 402626493 Fix IndexError in snake_to_camel_case() that occurs if th... by Googler <[email protected]> - 402612126 Change EDM4U google3 build rule to package versioned dlls... by chkuang <[email protected]> - 401802299 Update the guids with the new EDM4U release by amaurice <[email protected]> - 401597104 Add Android x86_64 to the Unity build by amaurice <[email protected]> - 401377257 Bump up EDM4U version in Firebase by chkuang <[email protected]> - 401322479 Update the Unity version for M105 release by amaurice <[email protected]> - 400256103 Fix bugs in the "dispose" logic of `FirebaseFirestore`. by Googler <[email protected]> - 400210085 Reduce log spam in TestInvalidArgumentAssertions by only ... by Googler <[email protected]> - 400201590 Fix crash when DocumentReference.SetAsync() is invoked wi... by Googler <[email protected]> - 399522704 Testapp assertions made in callbacks should cause tests t... by Googler <[email protected]> - 399431244 Make sure that exceptions are enabled in the firestore_cp... by Googler <[email protected]> - 398556165 Simplify the logic to complete the LoadBundleAsync task. by Googler <[email protected]> - 398010896 Update generated sources. by Googler <[email protected]> - 397834073 Update the Unity version for M103 release by amaurice <[email protected]> - 397796145 Disable the Transaction-related tests from InvalidArgumen... by Googler <[email protected]> - 397369755 *Actually* disable 2 tests from InvalidArgumentsTest that... by Googler <[email protected]> - 397348842 Simplify the API to set the settings of a `FirebaseFirest... by Googler <[email protected]> - 397346950 Disable 2 tests from InvalidArgumentsTest that crash on A... by Googler <[email protected]> - 397323459 Re-write InvalidArgumentsTest to improve debug-ability. by Googler <[email protected]> - 396575686 Add a convenient way to filter tests during development. by Googler <[email protected]> - 396518010 Add missing `using` declaration to Builder.cs: UnityEdito... by Googler <[email protected]> - 396438098 InvalidArgumentTests by Googler <[email protected]> - 396040422 Fix a compilation error. by Googler <[email protected]> - 395825926 Add helper scripts to do Android builds in Unity from the... by Googler <[email protected]> - 395738163 Port one transaction test to testapp by Googler <[email protected]> - 395492702 Change Query.WhereNotIn() to take IEnumerable instead of ... by Googler <[email protected]> - 395492252 Update generated sources. by Googler <[email protected]> - 394907404 `Equals` and `GetHashCode` for Query, QuerySnapshot, Docu... by Googler <[email protected]> - 394752711 Disable one of the "UnsupportedTestData" tests in `TestNo... by Googler <[email protected]> - 394539199 Port more bundles tests to testapp by Googler <[email protected]> - 394514941 Manual rollback of changelist 320609048. by Googler <[email protected]> - 394505855 Add missing 8.2.0 upm guids by amaurice <[email protected]> - 394221590 Add back some assertions for "__badpath__" being in the e... by Googler <[email protected]> - 394112704 Update the Unity version for M102 release by amaurice <[email protected]> - 393133488 Re-enable the test FirebaseFirestore_GetInstance_Disposed... by Googler <[email protected]> - 392982610 Add some boundary tests to the test suite for transaction... by Googler <[email protected]> - 392914261 Add Equals and GetHashCode for SnapshotMetadata by Googler <[email protected]> - 391634593 Add a license header to all Unity source files. by Googler <[email protected]> - 391633555 Update Unity documentation. by Googler <[email protected]> - 391282781 Fix a rare memory leak in document and query snapshot lis... by Googler <[email protected]> - 391281106 Solidify the behavior that callbacks are always made on t... by Googler <[email protected]> - 391089866 Add tests for loading bundles and reading saved documents by Googler <[email protected]> - 390681617 Improve the robustness of main thread check logic in `Eve... by Googler <[email protected]> - 390201004 Make sure C# exceptions don't propagate into the C++ laye... by Googler <[email protected]> - 390019789 Remove stale comment about SnapshotMetadata. by Googler <[email protected]> - 389995823 Fixed an issue where Messaging and Functions pulled in du... by drsanta <[email protected]> - 389782526 Fix missing Unity documentation. by Googler <[email protected]> - 389779693 Automated g4 rollback of changelist 385571406. by Googler <[email protected]> - 389726057 Do not use Task.Exception if the task is cancelled. by Googler <[email protected]> - 389724139 Remove TestGetKnownValue() since it is fragile and its lo... by Googler <[email protected]> - 389300491 Make `swig_commenter.py` support `enum class` from C++11. by Googler <[email protected]> - 389024972 Needed improvements for the Firestore quickstart app. by Googler <[email protected]> PiperOrigin-RevId: 405788743
1 parent 9157c10 commit b270703

File tree

120 files changed

+6011
-1055
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+6011
-1055
lines changed

crashlytics/src/cpp/android/crashlytics_android.cc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <jni.h>
1818

1919
#include "app/src/include/firebase/app.h"
20+
#include "app/src/log.h"
2021
#include "app/src/util_android.h"
2122

2223
namespace firebase {
@@ -110,6 +111,22 @@ METHOD_LOOKUP_DEFINITION(java_stack_trace_element,
110111
"java/lang/StackTraceElement",
111112
JAVA_STACK_TRACE_ELEMENT);
112113

114+
// clang-format off
115+
#define CRASHLYTICS_NDK_METHODS(X) \
116+
X(GetInstance, "getInstance", \
117+
"()Lcom/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk;", \
118+
util::kMethodTypeStatic), \
119+
X(InstallSignalHandler, "installSignalHandler", \
120+
"()V", \
121+
util::kMethodTypeInstance)
122+
// clang-format on
123+
METHOD_LOOKUP_DECLARATION(firebase_crashlytics_ndk, CRASHLYTICS_NDK_METHODS);
124+
METHOD_LOOKUP_DEFINITION(
125+
firebase_crashlytics_ndk,
126+
PROGUARD_KEEP_CLASS
127+
"com/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk",
128+
CRASHLYTICS_NDK_METHODS);
129+
113130
static const int ANDROID_LOG_DEBUG = 3;
114131
static const char* EXCEPTION_MESSAGE_SEPARATOR = " : ";
115132

@@ -176,6 +193,9 @@ CrashlyticsInternal::CrashlyticsInternal(App* app) {
176193
// We cache this value in case it was set to false on a previous run
177194
cached_data_collection_enabled_ =
178195
GetCrashlyticsCollectionEnabled(java_vm_, data_collection_obj_);
196+
197+
// For Unity apps, the signal handler must be explicitly installed
198+
InstallNdkSignalHandler();
179199
}
180200

181201
CrashlyticsInternal::~CrashlyticsInternal() {
@@ -205,6 +225,7 @@ bool CrashlyticsInternal::Initialize(JNIEnv* env, jobject activity) {
205225
}
206226
if (!(firebase_crashlytics::CacheMethodIds(env, activity) &&
207227
firebase_crashlytics::CacheFieldIds(env, activity) &&
228+
firebase_crashlytics_ndk::CacheMethodIds(env, activity) &&
208229
crashlytics_core::CacheFieldIds(env, activity) &&
209230
crashlytics_data_collection::CacheMethodIds(env, activity) &&
210231
java_exception::CacheMethodIds(env, activity) &&
@@ -233,6 +254,19 @@ void CrashlyticsInternal::Terminate() {
233254
}
234255
}
235256

257+
void CrashlyticsInternal::InstallNdkSignalHandler() {
258+
firebase::LogDebug("Installing Crashlytics NDK signal handlers...");
259+
JNIEnv* env = util::GetThreadsafeJNIEnv(java_vm_);
260+
jobject ndk_obj =
261+
env->CallStaticObjectMethod(firebase_crashlytics_ndk::GetClass(),
262+
firebase_crashlytics_ndk::GetMethodId(
263+
firebase_crashlytics_ndk::kGetInstance));
264+
env->CallVoidMethod(ndk_obj,
265+
firebase_crashlytics_ndk::GetMethodId(
266+
firebase_crashlytics_ndk::kInstallSignalHandler));
267+
env->DeleteLocalRef(ndk_obj);
268+
}
269+
236270
void CrashlyticsInternal::Log(const char* message) {
237271
if (!cached_data_collection_enabled_) {
238272
return;

crashlytics/src/cpp/android/crashlytics_android.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class CrashlyticsInternal {
5959
std::vector<firebase::crashlytics::Frame>& frames);
6060
jobject BuildJavaStackTrace(std::vector<Frame>& frames);
6161

62+
void InstallNdkSignalHandler();
63+
6264
static Mutex init_mutex_;
6365
static Mutex data_collection_mutex_;
6466
static int initialize_count_;

docs/readme.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,54 @@ Support
163163

164164
Release Notes
165165
-------------
166-
### Unreleased:
166+
### 8.5.0:
167167
- Changes
168-
- Crashlytics: Upload UnityFramework symbols in addition to the main app
169-
dSYM file to improve symbolication
170-
([#673](https://github.com/firebase/quickstart-unity/issues/673)).
168+
- General (iOS): iOS SDKs are now built using Xcode 13.0.0.
169+
- Crashlytics: Improved crash reporting for Unity Android apps using the
170+
IL2CPP scripting backend. To display symbolicated IL2CPP stack traces in
171+
the Crashlytics console, Android customers will need to upload symbol
172+
files for their builds. See the [Getting Started with Crashlytics Unity]
173+
(https://firebase.google.com/docs/crashlytics/get-started?platform=unity)
174+
Guild for more details.
175+
- Firestore: Fixed an issue where the `Equals()` and `GetHashCode()` methods
176+
of `DocumentSnapshot` would sometimes be inconsistent
177+
([#8647](https://github.com/firebase/firebase-ios-sdk/pull/8647)).
178+
179+
### 8.4.0:
180+
- Changes
181+
- General: Added support for Android x86 64.
182+
- Firestore: Improved the efficiency of progress callbacks in
183+
`LoadBundleAsync()`.
184+
- Firestore: Fixed crashes in Unity Editor on Linux caused by C++ exceptions
185+
failing to be converted to C# exceptions.
186+
- Firestore: Fixed intermittent hangs on Android when exceptions are thrown
187+
by callbacks.
188+
- Firestore: Fixed a crash on Android when `DocumentReference.Set()` was
189+
invoked with an invalid `documentData` value (e.g. an int).
190+
- Firestore: Fixed race conditions in the instance caching, terminate, and
191+
disposal logic of `FirebaseFirestore`.
192+
193+
### 8.3.0:
194+
- Changes
195+
- Firestore: Simplified the API for modifying the settings of a
196+
`FirebaseFirestore` instance. This is a backwards-incompatible change and
197+
requires updates to code that sets `FirebaseFirestore.Settings`.
198+
- Firestore: Changed an argument to `Query.WhereNotIn()` from `List` to
199+
`IEnumerable`, to be consistent with `Query.WhereIn()`.
200+
- Messaging (Android): Fixes an issue with receiving tokens when
201+
initializing the app.
171202

172203
### 8.2.0:
173204
- Changes
174205
- Firestore: Removed `Equals` and `GetHashCode` methods from `Query`,
175206
`QuerySnapshot`, and `DocumentSnapshot` classes. These methods were
176207
unimplemented, and we plan to add proper support for them in a future
177208
release.
209+
- Crashlytics: Upload UnityFramework symbols in addition to the main app
210+
dSYM file to improve symbolication
211+
([#673](https://github.com/firebase/quickstart-unity/issues/673)).
212+
- Messaging: Fixed a duplicate class error when building an application
213+
which also uses Firebase Functions.
178214

179215
### 8.1.0:
180216
- Changes

firestore/empty.cc

Whitespace-only changes.

0 commit comments

Comments
 (0)