@preeternal/react-native-godot 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/ios/GodotModule.mm +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ JavaScript. React Native handles the app UI; Godot renders inside a native view.
|
|
|
26
26
|
| Library release | Godot version | Source branch |
|
|
27
27
|
| ------------------------------ | ------------- | ------------------------------------------------------------------------------ |
|
|
28
28
|
| `0.1.0` — previous release | 4.5.1 | [`godot-4.5`](https://github.com/Preeternal/react-native-godot/tree/godot-4.5) |
|
|
29
|
-
| `0.2.
|
|
29
|
+
| `0.2.1` — this README | 4.7.2 | [`godot-4.7`](https://github.com/Preeternal/react-native-godot/tree/godot-4.7) |
|
|
30
30
|
|
|
31
31
|
The 4.7 line is the current development focus. The `godot-4.5` branch is kept
|
|
32
32
|
for possible fixes to the previous line; backports are considered as needed.
|
package/ios/GodotModule.mm
CHANGED
|
@@ -210,6 +210,15 @@ static void observeApplicationLifecycle(GodotModule *module) {
|
|
|
210
210
|
queue:[NSOperationQueue mainQueue]
|
|
211
211
|
usingBlock:^(NSNotification *notification) {
|
|
212
212
|
module->appResume();
|
|
213
|
+
}],
|
|
214
|
+
[center addObserverForName:UIApplicationWillTerminateNotification
|
|
215
|
+
object:nil
|
|
216
|
+
queue:nil
|
|
217
|
+
usingBlock:^(NSNotification *notification) {
|
|
218
|
+
if ([NSProcessInfo processInfo].iOSAppOnMac) {
|
|
219
|
+
// Finish engine cleanup before exit runs LibGodot's static destructors.
|
|
220
|
+
module->destroy_instance();
|
|
221
|
+
}
|
|
213
222
|
}]
|
|
214
223
|
];
|
|
215
224
|
if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
|