adjust / cordova_sdk

This is the Cordova SDK of
http://www.adjust.com
MIT License
36 stars 43 forks source link

iOS crashing on launch with: "-[UIDevice adjTrackingEnabled]: unrecognized selector sent to instance 0x600000e8d480" #136

Closed ribalnasr closed 3 years ago

ribalnasr commented 3 years ago

hello,

am using Ionic, with capacitor. calling Adjust.create(config) after device is ready, is build ok with "ionic cap build --prod ios" but when the app is open in the simulator of on the device, its crashing and xcode is switching to the debug navigator and highlighting the following error:

Thread 2: "-[UIDevice adjTrackingEnabled]: unrecognized selector sent to instance 0x600000e8d480"

uerceg commented 3 years ago

Hi @ribalnasr

Reason for that is absence of -ObjC flag in Other Linker Flags settings in your app's Xcode project. In theory this should be added to your app target settings, but from what we saw in case of Capacitor apps, this setting should be added to Pods target settings instead.

Let us know if it worked and if you have further questions.

ribalnasr commented 3 years ago

Perfect!

ribalnasr commented 3 years ago

Hello again,

With the above solution I was able to successfully build and launch the app on iOS with no error. However, we noticed that while the data was successfully received from Android devices, no data was tracked on iOS.

Any ideas?

uerceg commented 3 years ago

Hi @ribalnasr

Hm, weird. Which environment are you setting when running these tests? If sandbox, are you checking sandbox traffic in dashboard? If yes, can you run test install and maybe event tracking during that run with SDK set to sandbox and log level set to verbose and send the logs over? Feel free to omit any sensitive data from there if any.

ribalnasr commented 3 years ago

Hi @uerceg, sorry for wasting your time... after investigating this with the client's media company (the one that created the Adjust account), we found out that the issue was that they have given us the Android app token for the iOS too! I'm now updating the app with the correct token and hopefully everything will work out perfectly, otherwise I'll be back here... until then thank you for your time. :)

uerceg commented 3 years ago

No worries at all, glad you figured it out at the end. Cheers!