You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which API doesn't behave as documented, and how does it misbehave?
Apple TestFlight rejected the app stating that there's a missing NSMicrophoneUsageDescription purpose string in the Info.plist file.
Minimal reproduction project
Could use the example app with SwiftPM enabled
To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:
Build the app with the env variable AUDIO_SESSION_MICROPHONE=0 set
Upload to testflight
Build will be rejected and an email sent stating that there's a missing NSMicrophoneUsageDescription purpose string in the Info.plist file.
Error messages
Email received from Apple:
ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “Runner.app” bundle 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, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources.
Expected behavior
The code requiring microphone access should be excluded from the compiled app and should not be rejected by the App Store with the above reason.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
N/A being rejected by App store before it can be installed on a device
Flutter SDK version
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.2, on macOS 15.1.1 24B91 darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google
Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2024.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.3.2)
[✓] VS Code (version 1.94.2)
[✓] Connected device (3 available)
[✓] Network resources
! Doctor found issues in 1 category.
I have added a comment on the PR that is now merged here where I believe you have missed to add this line in the Package.swift file: .define("AUDIO_SESSION_MICROPHONE", to: ProcessInfo.processInfo.environment["AUDIO_SESSION_MICROPHONE"] ?? "0")
The text was updated successfully, but these errors were encountered:
In a future release of audio_session, I also plan to make "0" the default since I think this is more common, and it should eliminate some of the hassle.
If you've already run flutter clean and it's still not working, then it can't be because of the cSettings thing, that part should work with flutter clean. But there was another change to the latest audio_session which could influence things. So if you still have the issue after running flutter clean, let me know and I'll look into the other thing.
Which API doesn't behave as documented, and how does it misbehave?
Apple TestFlight rejected the app stating that there's a missing NSMicrophoneUsageDescription purpose string in the Info.plist file.
Minimal reproduction project
Could use the example app with SwiftPM enabled
To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:
Error messages
Email received from Apple:
Expected behavior
The code requiring microphone access should be excluded from the compiled app and should not be rejected by the App Store with the above reason.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
N/A being rejected by App store before it can be installed on a device
Flutter SDK version
Additional context
I believe the issue is related to this comment you made here: flutter/flutter#161182 (comment).
I have added a comment on the PR that is now merged here where I believe you have missed to add this line in the Package.swift file:
.define("AUDIO_SESSION_MICROPHONE", to: ProcessInfo.processInfo.environment["AUDIO_SESSION_MICROPHONE"] ?? "0")
The text was updated successfully, but these errors were encountered: