amplitude / unity-plugin

Official Amplitude Unity Plugin
https://developers.amplitude.com/docs/unity
MIT License
44 stars 34 forks source link

Build Error with CustomIdfa.m #71

Closed v17alya closed 3 years ago

v17alya commented 3 years ago

I get an error on Unity Cloud Build since I have used these instructions to have access to IDFA: https://developers.amplitude.com/docs/unity-ios-idfa-and-gps-setup

Error: ../Libraries/Plugins/iOS/Amplitude/CustomIdfa.m:18:34: implicit conversion of 'int' to 'NSString * _Nullable' is disallowed with ARC

I hope you can help me. Thanks.

dantetam commented 3 years ago

Hello @Gamenator ,

Thanks for reporting. Could you provide the instanceName you are calling the function void setIdfaBlock(const char* instanceName) {...} with?

Dante

dantetam commented 3 years ago

And where is the error reported? On generated xcode unity game?

v17alya commented 3 years ago

I tried two variants: setIdfaBlock(null)and setIdfaBlock(string.Empty). Because we do not set another instance name in our project. Yes, on generated xcode. Thanks for reply!

v17alya commented 3 years ago

Thanks! I will try and give you a feedback.

dantetam commented 3 years ago

@Gamenator It's currently on the branch idfa2, so the unity package manager link would be

https://github.com/amplitude/unity-plugin.git?path=/Assets#idfa2

So try the code there, thanks. Fix has not been pushed to main or release yet.

v17alya commented 3 years ago

It's worked! Thanks! https://github.com/amplitude/unity-plugin/pull/72/commits/b0e20e5e1650b89b49c732471bb8fb894f702769

dantetam commented 3 years ago

Oh wow, cool, thanks for testing as well @Gamenator . Good reporting and also @MartinGonzalez sorry for leaving this in the backlog for a while