Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Flutter iOS & Android permissions: what each plugin needs in Info.plist and AndroidManifest

Описание и применение

В Flutter‑приложениях часто пропускают необходимые записи в Info.plist и AndroidManifest, что приводит к сбоям. Руководство объединяет требования 10 популярных плагинов, показывает, как добавить строки с описанием и проверяет конфигурацию командой plumb.

Задача

Flutter plugins require native permission entries that developers often miss, causing runtime failures or app crashes.

Результат

After applying the checklist and using plumb, the app’s native permission configuration matches plugin requirements, eliminating crashes and ensuring proper permission prompts.

Рабочий процесс

  • Add plugin to pubspec.yaml and run flutter pub get.
  • Insert required iOS usage strings (e.g., NSCameraUsageDescription) with real sentences.
  • Add iOS entitlements (e.g., aps-environment) and background modes if needed.
  • Add AndroidManifest permissions, <queries>, <meta-data> and receivers as specified.
  • Extend MainActivity to FlutterFragmentActivity for plugins like local_auth.
  • Run dart pub global activate plumb && plumb doctor to audit the app’s native config.
  • Fix any reported missing or empty entries.
  • Rebuild and test the app to ensure permissions work correctly.

Доказательства

Every iOS permission your app actually asks for needs a *UsageDescription* in Info.plist, with a real sentence, not TODO.

Источник

I ran a checker over the 25 most-starred open-source Flutter apps and verified every finding by hand.

Источник

plumb doctor checks all of this for you, read-only.

Источник

  • Дата записи: 2026-11-02T20:28:48.055Z