From b49a0c642d4d741551f700bd55f644d9883e015c Mon Sep 17 00:00:00 2001 From: vfsfitvnm Date: Mon, 2 May 2022 13:19:43 +0200 Subject: [PATCH] Bump version to 0.7.13 --- README.md | 36 ++++++++++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4c1f58c..d50ccdc 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,40 @@ However, only Android and Linux are tested: expect breakage if you are using ano ## Changelog -### 0.7.12 -- Add `Il2Cpp::sheduleOnInitializerThread2`. The old `sheduleOnInitializerThread` is now `Il2Cpp::sheduleOnInitializerThread2`, and the new `Il2Cpp::sheduleOnInitializerThread` is a brand new implementation. +### 0.7.13 +- Add `Il2Cpp.Thread::schedule` to schedule a delayed callback: + ```ts + Il2Cpp.perform(() => { + const Class: Il2Cpp.Class = ...; + + Class.method("MethodName").implementation = function () { + // we probably are on the "main" thread now + + // non blocking + Il2Cpp.currentThread?.schedule(() => { + // we are on the same thread! + }, 1000); + + return this..method("MethodName").invoke(); + }; + }); + ``` + Of course, it can be used to schedule a callback on a specific thread (see version `0.7.6` release notes). Sometimes, you could face an access violation/abort error when trying to invoke a Il2Cpp function within the wrong thread. + ```ts + Il2Cpp.perform(() => { + const Method: Il2Cpp.Method = ...; + + // access violation :( + Method.invoke(); + + Il2Cpp.attachedThreads[0].schedule(() => { + // works :) + Method.invoke(); + }); + }); + ``` + **Note**: `Il2Cpp.Thread::schedule` similar to `Il2Cpp::scheduleOnInitializerThread`. However, they use different approaches. Eventually, one of them will be removed. \ + **Note**: `Il2Cpp.Thread::schedule` may not work with old Unity versions. ### 0.7.11 - Fix #171. diff --git a/package.json b/package.json index 2fd904d..630e9bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "frida-il2cpp-bridge", - "version": "0.7.12", + "version": "0.7.13", "description": "A Frida module to dump, trace or hijack any Il2Cpp application at runtime, without needing the global-metadata.dat file.", "keywords": [ "frida",