Search code examples
iosaudiodata-transfer

Can information be stolen that gets transferred through the headphone jack by a backgrounded app?


Can information that gets transferred through the headphone jack be stolen by a backgrounded app?

Square makes a card reader that plugs into the headphone jack of the iPhone and transfers your credit card info to your phone.

There are many devices that transfer data through the headphone jack.

Since you can run background processes now on iOS, can that information that is being transferred be intercepted or monitored by an app running in the background?

Could a random app potentially be listening and looking for credit card numbers and steal the information?

If yes, then is there a way to cancel all other app's listening connection to the headphone jack while I transfer my own data from a device?

I have looked at the AurioTouch example of how to transfer data but all I need to know right now is if my data is in jeopardy of being stolen and how I can prevent that.


Solution

  • See the last paragraph of "Playing and Recording Background Audio" here.

    To sum it up, you can stop your app from playing or recording audio if another app wants to play/record audio. Look into AVAudioSession.