adjust / cordova_sdk

This is the Cordova SDK of
http://www.adjust.com
Other
37 stars 43 forks source link

Cannot get access to Adid() function - (CDVPlugin class AdjustCordova (pluginName: adjust) does not exist.) #164

Closed MateuszGrzymowicz closed 2 years ago

MateuszGrzymowicz commented 2 years ago

Hey guys I have Ionic-Angular application and I'm trying to get access to Adid but it does return me nothing. I installed plugin with:

then created config with:

const config = new AdjustConfig('API_KEY', AdjustEnvironment.Sandbox); config.setLogLevel(AdjustLogLevel.Verbose);

And initialized SDK with: this.adjust.create(config);

problem is I can't get access to getAdid() function, each time when I try to call it in async way, app just stops on splash screen.

Tried to console log attributes with Callback listener and put them between config.setLogLevel and this.adjust.create, but it returns me something like this:

To Native Cordova -> Adjust setAttributionCallback Adjust396117162 ["options": []]

SDK seems to be rather properly initialized as XCode console gives me output like this:

2022-06-15 09:42:19.477327+0200 App[2815:504703] CDVPlugin class AdjustCordova (pluginName: adjust) does not exist. To Native Cordova -> Adjust setAttributionCallback Adjust396117162 ["options": []] 2022-06-15 09:42:20.739108+0200 App[2815:504703] CDVPlugin class AdjustCordova (pluginName: adjust) does not exist. To Native Cordova -> Adjust create Adjust394561233 ["options": [[{"delayStart":0,"logLevel":"VERBOSE","defaultTracker":null,"urlStrategy":null,"externalDeviceId":null,"sendInBackground":null,"shouldLaunchDeeplink":null,"eventBufferingEnabled":null,"userAgent":null,"isDeviceKnown":null,"needsCost":null,"secretId":null,"info1":null,"info2":null,"info3":null,"info4":null,"processName":null,"preinstallTrackingEnabled":null,"preinstallFilePath":null,"oaidReadingEnabled":null,"allowiAdInfoReading":null,"allowIdfaReading":null,"allowAdServicesInfoReading":null,"eventTrackingSucceededCallback":null,"eventTrackingFailedCallback":null,"sessionTrackingSucceededCallback":null,"sessionTrackingFailedCallback":null,"deferredDeeplinkCallback":null,"conversionValueUpdatedCallback":null,"appToken":"API_KEY","environment":"sandbox","sdkPrefix":"cordova4.30.0"}]]] 2022-06-15 09:42:20.741032+0200 App[2815:504703] CDVPlugin class AdjustCordova (pluginName: adjust) does not exist. To Native Cordova -> Adjust getAdid Adjust394554361 ["options": []]

If I'm not mistaken Adjust is initialized so why can't I get access to Adid?

Aditi3 commented 2 years ago

Hi @MateuszGrzymowicz

We verified this on our end and, it seems to be working. Could you provide a sample app that reproduces the issue so we can investigate further?

MateuszGrzymowicz commented 2 years ago

Hello, I guess issue can be closed as it happens only on my laptop. We cloned whole project to different computer and somehow it worked at once so probably it is just problem with my configuration.