Since some latest Unity IAP updates, projects built under this engine version started requesting read_phone_state permission, though it is not present in any of manifests inside Assets dir. And only after disabling IAP plugin we get requestless APK. Also this permission request disappears if we upgrade our project to engine version 5.4.0.
Is it possible to disable extra permission request in 5.3.4?
What version of IAP are you using? You can check the changelog file for the version, located in Assets/Plugins/UnityPurchasing
[1.18.0] - 2018-03-27
[1.19.0] - 2018-04-17
These versions I’ve been using in my projects.
Hi @psvgamestudio ,
Which store are you targeting to?
UnityChannel.aar has read_phone_state permission, but it should only be included when you change the IAP target to “Xiaomi Mi Game Pay”.
I’m targetting GooglePlay Only. Also Unity 5.3.4 has no option to add Xiaomi Game Center in BuildSettings, so it won’t affect this case.
UnityChannel is present in my project’s Plugins folder. Will it’s removal break the game?
That’s weird. That permission shouldn’t be included if targeting to Google Play.
Unity IAP has Xiaomi Game Center integrated.
Removing UnityChannel.arr should not break your game.
Please try to remove it to see if your game still has the permission.
I’ve found two aar libraries containing read_phone_state permission
Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar
Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar
Though removing them from project didn’r disable permission request.
Any ideas?
Hi @psvgamestudio ,
Have you tried to delete the “Library” folder?
I guess that there might be a cached AndroidManifest.xml file which still contains that permission.
In my previous post I’ve pasted two times one of found libraries. Here are they, both containing read_phone_state permission:
Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar
Assets/Plugins/UnityChannel/Android/UnityChannel.aar
So I’ve removed them completely from project. Deleted Library folder, reopened project, compiled it and got same result. App requested permission to manage phone calls. And I had to reject it twice to start the game (after first request was cancelled, another one showed up).
PS: it started since few latest IAP versions were released (5-8). Right after routine update of IAP plugin my new APK begun requesting phone access.
after disabling permission in this way game started without asking anything. Also it solved trouble when on Android Oreo game will not start (black screen and no Unity tagged messages in logCat). Now app launches fine.
Though its is a temporary solution and I hope you’ll find a way to disable this unwanted permission for Unity 5.3.4.
Hi @psvgamestudio ,
Could you please send me a sample project which could reproduce this issue?
I would like to test it on my side and try to find the cause.
I apologize for any inconvenience this issue has caused.