App with EASession is suspended in the background even though connected with the accessory

Originator:hkoide
Number:rdar://FB9557303 Date Originated:Aug 24 2021
Status:Open Resolved:
Product:External Accessory Framework Product Version:iOS 15 beta
Classification: Reproducible:
 
Pre Conditions:
* iOS 15 beta 5 or 6
* App supports connection with the registered MFi accessory

Steps:
1. Launch the app and connect with the accessory
2. Move the app to the background
3. About 30 sec after from step.2, communication between the accessory is lost.

At step.3, the app can not communicate via EASession because the app is suspended in the background state. But the app defines `external-accessory` in the Background Modes, so we believe background behavior should be guaranteed by iOS. So we think this is the issue of iOS 15 beta. Of course the app works as expected on iOS 14.x.

Comments

What kind of device are you using? We are seeing similar issues with MFi bluetooth GPS receivers. We are unable to get data from the receiver in the background -- and up until iOS 15 the location-providing accessories kept the app alive in the background.

By dev.eric.ito at Sept. 15, 2021, 11:07 p.m. (reply...)

We noticed that calling UIApplication's beginBackgroundTask(expirationHandler:) repeatedly (after expirationaHandler) from the background causes the app is killed by iOS. Is this the specification change from iOS 15? Please provide the document explaining these behavior changes. Thanks.

At iOS 14.x, we have used UIApplication's beginBackgroundTask(expirationHandler:) as workaround and it has worked until iOS 15 beta 2, but now it does not work at the latest iOS 15 beta 6. Workarounds like this shouldn't be necessary in the first place, because if the app sets background mode for the external accessory.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!