Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter ios app submission: Missing Purpose String in Info.plist

Tags:

xcode

ios

flutter

I'm trying to submit my Flutter app for IOS. When I submit the app I get a mail with the info I need to add this to my info.plist

NSCalendarsUsageDescription
NSAppleMusicUsageDescription
NSSpeechRecognitionUsageDescription

I think it's really weird I need to add this because I don't need any of this (and I'm not using it in my app)...

How is this possible?

This is my pubspec yaml

  cupertino_icons: ^0.1.2
  firebase_core: ^0.4.3+1
  firebase_auth: ^0.15.3
  cloud_firestore: ^0.12.11
  firebase_database: ^3.1.1
  cloud_functions: ^0.4.1+6
  firebase_messaging: ^6.0.9
  firebase_storage: ^3.1.0
  google_sign_in: ^4.1.0
  flutter_facebook_login: ^2.0.1
  geolocator: ^5.1.5
  shared_preferences: ^0.5.6
  url_launcher: ^5.4.1
  rflutter_alert: ^1.0.3
  font_awesome_flutter: ^8.5.0
  flutter_picker: ^1.1.0
  uuid: ^2.0.4
  image_picker: ^0.6.2+3
  path_provider: ^1.5.1
  image: ^2.1.4
  flutter_datetime_picker: ^1.2.8
  intl: ^0.16.0
  native_contact_picker: ^0.0.6
  flutter_spinkit: ^4.1.1+1
  transparent_image: ^1.0.0
  connectivity: ^0.4.6+1
  flare_splash_screen: ^2.1.4
  algolia: ^0.1.7
  http: ^0.12.0+2
  avatar_glow: ^1.1.0
  rxdart: ^0.22.2
  auto_size_text: ^2.1.0
  camera: ^0.5.7+2
  video_player: ^0.10.5
  story_view: ^0.11.0
  image_crop: ^0.3.1
  file_picker: ^1.4.3+1
  pdf_viewer_plugin: ^1.0.0+2
  flutter_background_geolocation: ^1.4.5
  location_permissions: ^2.0.3
  image_downloader: ^0.19.1
  permission_handler: ^4.0.0
  google_maps_flutter: ^0.5.21+15
  cached_network_image: ^2.0.0-rc
  geoflutterfire: ^2.0.3+5
  apple_sign_in: ^0.1.0
  device_info: ^0.4.1+4
  image_cropper: ^1.1.2
  screenshot: ^0.1.1

Thanks in advance!

like image 734
Karel Debedts Avatar asked Jan 05 '20 20:01

Karel Debedts


2 Answers

I came across the same issue...

I'm using the permission_handler dependency.

Please carefully read the setup for iOS (Podfile and Info.plist)

https://pub.dev/packages/permission_handler

And pay special attention to this:

Remove the # character in front of the permission you do not want to use. For example if you don't need access to the calendar make sure the code looks like this:

## dart: PermissionGroup.calendar
'PERMISSION_EVENTS=0',

**** Update 29-Sep-2021 -- (Warning for version > 8.0.0)

permission_handler version 8 introduce some breaking changes for iOS (configuration is flipped)

The authors said:

we have changed the default behaviour of how permissions are treated in version 8.0.0

Note that specifically enabling permissions is only supported from version 8.0.0. In versions before 8.0.0 the logic was switch around and permissions where enabled by default and you had to explicitly disable permission in your podfile.

Author reference

See Changelog version 8.0.0

Please read very carefull all iOS setup instruction.

like image 149
encubos Avatar answered Nov 16 '22 05:11

encubos


That's quite a big list of dependencies, so it's very likely that some of these require it, even though the code to request these permissions it will never be run. Apple just notices the code in the app, but can't figure out that it will not be executed.

If you're certain that these permissions will never be requested, you can add any text for the usage descriptions in the Info.plist, for example "Required usage description for a Flutter dependency". It shouldn't show up to the user, but at least the developers will know why this is filled in.

like image 25
dumazy Avatar answered Nov 16 '22 04:11

dumazy