In the GameAnalytics SDK native extension (https://github.com/GameAnalytics/GA-SDK-DEFOLD) we a Remote Configs feature where the SDK gets the key/value pairs from our backend server after initializing the SDK. This means that the remote configs will first be populated after a second or two when getting the response back from our backend. Currently we just have a function called
gameanalytics.isRemoteConfigsReady() which the developer can use to manually call to check if the remote configs are ready (have been populated). This is of course not ideal and we have now recently got users asking if it not possible to get notified when the remote configs have been populated.
So my question is how do I go about making a subscribe pattern in lua code which can then be notified by the native extension (c++ code). We have been able to do this in our Unity SDK and AIR SDK because they had some messaging system to be call from C++ code to script code if you understand. Is this possible in Defold or what is the best way to go about this? The SDK support both Android, iOS, Windows/OSX and web.
I look forward to hearing this is doable.
Lead SDK Developer @ GameAnalytics