How can I determine if an application is using an external device

For security reasons, my application needs to prohibit external devices. If it is determined that the current phone is connected to any external devices, including non MFI authenticated devices, the app will exit. Please tell me how to do it? Thanks for your help.

Answered by DTS Engineer in 838773022

What sort of “external device”?

In some specific situations you might be able to make some progress here. For example, if you’re using Core Location, you can determine the source of a location using CLLocationSourceInformation. However, there’s no way to check for the presence of any accessory.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

What sort of “external device”?

In some specific situations you might be able to make some progress here. For example, if you’re using Core Location, you can determine the source of a location using CLLocationSourceInformation. However, there’s no way to check for the presence of any accessory.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How can I determine if an application is using an external device
 
 
Q