简体   繁体   中英

Flutter: Declare xcode audio background mode to keep socket channel (flutter) running when screen off but ios rejected

I was declare xcode audio,airplay in background mode to keep socket channel ( flutter ) running when screen off but apple reject my application with reason "Your app declares support for audio in the UIBackgroundModes key in your Info.plist but did not include features that require persistent audio.

Next Steps

The audio key is intended for use by apps that provide audible content to the user while in the background, such as music player or streaming audio apps. Please revise your app to provide audible content to the user while the app is in the background or remove the "audio" setting from the UIBackgroundModes key.

Request a phone call from App Review

At your request, we can arrange for an Apple Representative to call you within the next three to five business days to discuss your App Review issue. "

How to fix it? Thank so much.

You can't do that. Your use case is Background Execution. If you want to guarantee you stay alive in the background, you're allowed to keep a socket open for VoIP or play music in the background. Under any other circumstances you're eligible to be suspended – either after your background tasks finish executing or when the system arbitrarily decides to suspend you.

You're not allowed to take advantage of background audio under false pretenses. You'd have to actually be playing audio.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM