yandexmobile / metrica-plugin-unity

Unity plugin for Yandex AppMetrica SDK
38 stars 18 forks source link

Unity without support building for IOS #7

Open dimmduh opened 7 years ago

dimmduh commented 7 years ago

If Unity does not support building for IOS (You can select it while installing), after import appmetrica there are some fatal errors in console (you can build or start).

I added:

if UNITY_IPHONE || UNITY_STANDALONE_OSX

to PostprocessBuildPlayerAppMetrica.cs and it helps See https://gist.github.com/dimmduh/f2d33246aedb1ca398a3901c63ee39c6 I guess this problem can be when Unity can build for IOS and does not support build for Android

bamx23 commented 7 years ago

You're right. Temporary solution is to cover all PostprocessBuildPlayerAppMetrica.cs with:

#if UNITY_IPHONE 

// Actual PostprocessBuildPlayerAppMetrica.cs content

#endif