Dear Developer,
We identified one or more issues with a recent delivery for your app, "App名字" 1.0.0 . Please correct the following issues, then upload again.
**ITMS-90683: Missing Purpose String in Info.plist** - Your app‘s code references one or more APIs that access sensitive user data. The app‘s Info.plist file should contain a NSContactsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources
**ITMS-90683: Missing Purpose String in Info.plist** - Your app‘s code references one or more APIs that access sensitive user data. The app‘s Info.plist file should contain a NSCalendarsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources
**ITMS-90683: Missing Purpose String in Info.plist** - Your app‘s code references one or more APIs that access sensitive user data. The app‘s Info.plist file should contain a NSAppleMusicUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources
**ITMS-90683: Missing Purpose String in Info.plist** - Your app‘s code references one or more APIs that access sensitive user data. The app‘s Info.plist file should contain a NSMotionUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources
Best regards,
The App Store Team
类似上述问题,概因permission_handler
插件对权限的申请,作者已有说明,只是当时没仔细阅读文档,特此记录。
第一步:
修改Podfile文件将作者说明复制粘贴,替换
3
的代码,注意:
作者说明,当时这里有三个...需要去掉,不然接下来的步骤会报错(如果没有请忽略)
... # Here are some configurations automatically generated by flutter
post_install do |installer|
installer.pods_project.targets.each do |target|
# Here are some configurations automatically generated by flutter
# Start of the permission_handler configuration
target.build_configurations.each do |config|
# You can enable the permissions needed here. For example to enable camera
# permission, just remove the `#` character in front so it looks like this:
#
# ## dart: PermissionGroup.camera
# 'PERMISSION_CAMERA=1'
#
# Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler_apple/ios/Classes/PermissionHandlerEnums.h
flutter_additional_ios_build_settings(target)
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
## dart: PermissionGroup.calendar
# 'PERMISSION_EVENTS=1',
## dart: PermissionGroup.reminders
# 'PERMISSION_REMINDERS=1',
## dart: PermissionGroup.contacts
# 'PERMISSION_CONTACTS=1',
## dart: PermissionGroup.camera
'PERMISSION_CAMERA=1',
## dart: PermissionGroup.microphone
# 'PERMISSION_MICROPHONE=1',
## dart: PermissionGroup.speech
# 'PERMISSION_SPEECH_RECOGNIZER=1',
## dart: PermissionGroup.photos
# 'PERMISSION_PHOTOS=1',
## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
# 'PERMISSION_LOCATION=1',
## dart: PermissionGroup.notification
# 'PERMISSION_NOTIFICATIONS=1',
## dart: PermissionGroup.mediaLibrary
# 'PERMISSION_MEDIA_LIBRARY=1',
## dart: PermissionGroup.sensors
# 'PERMISSION_SENSORS=1',
## dart: PermissionGroup.bluetooth
# 'PERMISSION_BLUETOOTH=1',
## dart: PermissionGroup.appTrackingTransparency
# 'PERMISSION_APP_TRACKING_TRANSPARENCY=1',
## dart: PermissionGroup.criticalAlerts
# 'PERMISSION_CRITICAL_ALERTS=1'
]
end
# End of the permission_handler configuration
flutter_additional_ios_build_settings(target)
end
end
第二步
根据自己所需要的权限进行设置。
比如我需要相机权限
,就将相机所对应权限前面的#
注释去掉。
第三步
重新执行一下pod install
,
重新执行一下pod install
,
重新执行一下pod install
重要的事情说三遍!!!
如果运行项目,报错Flutter/Flutter.h' file not found
,Flutter系统的头文件找不到,
我的方法是:
网友评论