2

I have an external accessory. It seems like it disconnects when the application goes to the background. Is there any way to fix that?

user1120008
  • 1,005
  • 4
  • 13
  • 27

2 Answers2

9

In your application plist file add following flag "Required background modes" = "App communicates with an accessory"

This solution works only for iOS 5 and grater version.

HDG
  • 91
  • 1
  • 2
1

If the External Accessory background mode string has not been added in the Info.plist, the app will not get any background running time. (See the iOS App Programming Guide)

If the background mode item is added, you can respond to incoming bytes of a connected accessory.

No timer is available in background mode. They would just not fire when timing out. So you need to figure out what is needed and send requests from MFi device to the iOS if you need polling.

ZhangChn
  • 3,154
  • 21
  • 41