-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setAttributionChangedDelegate and getAttribution doesn't work on iOS #306
Comments
Hi @kekchpek, This should work fine in case you have added adjustConfig.setAttributionChangedDelegate(OnConversationReceived, "MyGameObjectName"); Looking forward to hearing back from you if this helped. |
Firstly, I don't use GameObject at all. This code is put in regular C# class. Your suggestion doesn't seem platform dependent. Why don't I have issues on Android in this case if problem connected with Unity-level GameObject? Secondly this doesn't explain why Anyway I'll try to make a GameObject and follow your advice, thank you. |
Issue in Android doesn't exist due to the nature of implementation of communication between C# and native Android (Java) layer. In iOS, it's working in a bit different way where when the message from native is supposed to be sent to Unity layer, it works practically via (for sake of easier explanation) some form of reflection. In particular, this line: https://github.com/adjust/unity_sdk/blob/v4.38.1/Assets/Adjust/iOS/AdjustUnityDelegate.mm#L113. This is where attribution obtained natively is attempted to be sent to C# layer. When it comes to If the SDK has obtained attribution, attribution getter shouldn't be returning null even if attribution callback has not been triggered due to some potential integration issue we're discussing about. So that part is weird. In order to understand what's happening, it would be helpful to see what is SDK natively logging when you run the app from the Xcode. If you don't make it work and would like us to check what's up, it would be good to get logs after run like this:
Also, if you are up for, you can upgrade Adjust SDK to SDK v5.0.1 where we have replaced |
I use the code above to initialize adjust sdk and handle attribution data. It works well on Android devices. But I have problems on iOS. The callback I set with
setAttributionChangedDelegate
isn't called andAdjust.getAttribution()
returns null. What can be a reason? Maybe I have to add something inplist
or configureAdjustConfig
in some other way?The text was updated successfully, but these errors were encountered: