最佳答案
正如 @Quentin Hayot 所描述的 here
This banner is displayed by iOS itself in the following situations:
- A background app is tracking your position (after a startUpdatingLocation)
- A background app is using your microphone
- A background app is performing a VOIP call
The banner color changes with the reason. There is no way to force iOS to display those banners but by using one of the relevant background modes.
如果您的应用没有tracking position, using microphone或执行VOIP call ,您将无法显示该栏。
关于IOS - 将消息添加到状态栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41998312/