我不使用麦克风,但 App Store 因以下错误拒绝了我的应用程序:
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 NSMicrophoneUsageDescription 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,
我将 NSMicrophoneUsageDescription 添加到 Info.plist 但当我上传时它再次出现此错误。
即使您没有使用麦克风,您使用的某些软件包也可能已经访问了此功能。在 info.plist 中你可以像这样添加相同的内容
<key>NSMicrophoneUsageDescription</key>
<string>The application does not use this feature</string>
Kashik 的答案有一个缺点。如果某些图书馆请求麦克风,用户将看到权限对话框。
如果您想了解哪些库可以触发麦克风请求,您可以在
Microphone
目录中的每个库上搜索 .pub-cache
短语。然后你可以替换这样的lib。有关更多详细信息,请参阅我的答案:https://stackoverflow.com/a/75309325/5985886