volga-volga / react-native-yamap

React Native Yandex Maps | Яндекс Карты | Yandex.MapKit implementation for react native | YandexMaps
144 stars 80 forks source link

Гипотетическая проблема с LocationManager из MapKit #213

Closed RealGoodProgrammer closed 1 year ago

RealGoodProgrammer commented 1 year ago

Приветствую! На днях приложение, в котором есть react-native-yamap, удалили из Play Market. В пояснении модератор ссылался как раз на SDK ЯндексКарт, что те в фоне проверяют местоположение, и это противоречит политике Google. Написал в поддержку Яндекса, и они мне ответили следующее:

"Без примера можем предположить, что вы используете LocationManager из MapKit. В этом случае стоит вызывать у него метод suspend() в обработчике onPause() у активити. И при вызове onResume() у активити звать метод resume(). Если данный компонент не используется, то запросов за местоположением в фоне быть не должно."

Я так понимаю, это потенциально большая проблема у всех, кто пользуется библиотекой, и число подобных случаев будет только расти.

==== Полный текст письма от Google, если это важно: ===

Issue: Google Play Policy Violation I’ve reviewed your appeal request and found that your app is currently in violation of Google Play policy. During review, we found that your app is not compliant with the Location Permissions policy: We don’t allow apps that request location in the background for either unapproved and/or undisclosed purposes. Apps that request location in the background must successfully complete a console-based declaration process and adequately disclose use to users. You may not use permissions or APIs that access sensitive information that give access to user or device data for undisclosed, unimplemented, or disallowed features or purposes. You can read through the Location Permissions policy page for more details and examples of common violations. For example, your app currently contains Yandex SDK, or an SDK that one of your libraries depends on, which requests location in the background for either unapproved and/or undisclosed purposes. You may consider moving to another SDK; removing this SDK; or if available from your SDK provider, upgrading to a policy-compliant version of this SDK that does not include the violating behavior. According to the information provided by your SDK provider, you may consider upgrading the SDK version used in your app to 5.0.0. Please consult the SDK provider for further information. Action required: Submit an updated app Read through the Location Permissions policy for more details. Make appropriate changes to your app, and be sure to address the issue described above. You may also want to check your app’s store listing for compliance, if applicable. In addition to your Production release, if you have other release types that you use for testing and/or quality assurance checks (for example, Internal test, Closed, Open), please make sure to update those tracks as well. Double check that your app is compliant with all other Developer Program Policies. Sign in to Play Console and submit the update to your app or upload the modified, policy-compliant APK across all tracks, and deactivate the non-compliant APK(s). To deactivate a non-compliant APK, please create a new release and upload a compliant APK to the same track. Be sure to increment the APK version number and set the release to 100% rollout, in order to successfully override and deactivate the non-compliant APK. Please let me know if you have any other questions. Thanks for working with us to fix the policy issue and for your continued support of Google Play.

ownikss commented 1 year ago

Проверили код библиотеки - LocationManager не используется. Возможно проблема в других зависимостях?

Есть аналогичное issue для flutter - https://github.com/Unact/yandex_mapkit/issues/263 Возможно в вашем случае поможет обновление sdk (сейчас мы используем последнюю версию)

Еще возникла гипотеза, что проблема не с картами, а с метрикой - у метрики действительно последняя версия 5.0, а у яндекса такой версии еще нет. Попробуйте использовать этот форк - https://github.com/DenSakhon/react-native-appmetrica, в нем обновили версию метрики