问题
Our iPad app relies on silent push notifications to trigger certain events, and is used by many of our users in Guided Access mode. This has worked well until iOS 11 which now seems to block delivery of push notifications while Guided Access is enabled.
I've tried a variety of different payloads according to the Apple documentation here (such as content-available, alert, sound, badge etc.), but I can't get anything to be delivered while Guided Access is enabled. This isn't necessarily a bug, but may in fact be the new intended behaviour.
Is there a way I can configure a notification so that it is delivered during guided access?
For what it's worth I raised a Technical Support Incident for this issue with Apple, who promptly refunded my ticket and asked me to report a bug instead. There has been no feedback from the bug report yet.
回答1:
This appears to be fixed in the newest iOS 11.2.5 beta 4. Confirmed with Guided Access and Single App Mode using CloudKit push notifications.
回答2:
If your app is in the foreground, you can create your own push system using c/s mode BSD socket to reach your goal. There are good sample like xmppframework on the iOS side and openfire on the server side.
来源:https://stackoverflow.com/questions/47256264/is-there-a-way-to-deliver-push-notifications-in-ios-11-during-guided-access