We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ac0173 commit 3a20472Copy full SHA for 3a20472
1 file changed
src/application.ts
@@ -23,7 +23,8 @@ namespace Il2Cpp {
23
* Gets the identifier name of the current application, e.g.
24
* `com.example.application` on Android.
25
*
26
- * **This information is not guaranteed to exist.**
+ * In case the identifier cannot be retrieved, the main module name is
27
+ * returned instead, which typically is the process name.
28
29
* ```ts
30
* Il2Cpp.perform(() => {
@@ -32,8 +33,8 @@ namespace Il2Cpp {
32
33
* });
34
* ```
35
*/
- get identifier(): string | null {
36
- return unityEngineCall("get_identifier") ?? unityEngineCall("get_bundleIdentifier");
+ get identifier(): string {
37
+ return unityEngineCall("get_identifier") ?? unityEngineCall("get_bundleIdentifier") ?? Process.mainModule.name;
38
},
39
40
/**
0 commit comments