defold (official)
defold/extension-adinfo/adinfo
Provides functionality to get the advertising id and tracking status. Supported on iOS and Android.
- GitHub: defold/extension-adinfo — pinned to
3.0.3(released while Defold 1.13.1 was current)- Pick a release from defold/extension-adinfo releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as adinfo from "adinfo"
- Pick a release from defold/extension-adinfo releases and add its Source code (zip) URL (or a packaged
Functions
adinfo.get(callback: function)
Get a table with advertising information. function returns nil if values do not ready
function init(self)
adinfo.get(function(self, info)
print(info.ad_ident, info.ad_tracking_enabled)
end)
endParameters
callback:function— The function to call when advertising information is available. On iOS 14 and above this will trigger a tracking request popup.