iPhone headset plays music but calls revert to speakerphone

If you have ever experienced this strange headache, I finally found a solution that worked for my wife’s phone. I posted to the Apple community discussions where I first looked for a solution in hopes that someone else might benefit from my act of technology-repair love. I’m leaving a copy here on Valentine’s Day for posterity.

This just happened with my wife's phone (an iPhone 15 Pro running iOS 17.3.1). Searching Apple discussions here and elsewhere unearths lots of questions about this issue and few solutions. I tried everything suggested: restarting the phone, updating iOS, swapping adapters and headsets (she is using the USB-C to headphone adapter with a beloved wired headset) – and more – but nothing worked. She had to switch to another phone to be able to use her headset. The odd thing was that, as described above, music played in the headset just fine.

This told me it had to be an obscure iOS system setting, so I started methodically trying anything that might work. I eventually found this:

  Settings -> Sounds & Haptics -> Headphone Safety -> Lightning Adapters

The setting screen here contains a toggle labeled "Connected To Headphones," but only when the headphone adapter is plugged in and there is a headset plugged into that. On my wife's phone with this brand new adapter, this toggle was off. Switching it on fixed the problem.

I ❤️ PEP8


Two weeks ago, I attended DjangoCon 2016 in Philadelphia. It was a great conference, and I’ll have more to say about that in a future post, but this post isn’t about DjangoCon.

Ben Lopatin gave a talk called “Working with legacy Django projects.” This post isn’t about that talk, either, though it was an excellent talk.

When he gave the talk, Ben was wearing a t-shirt that had “I ❤️ PEP8” on it. ‘That is a great shirt,’ I thought. ‘I have to have one,’ I continued. As you can see in the photo above, I now have one. It wasn’t really until after it arrived that I gave much thought as to why I liked it so much.

PEP8 is a style guide for writing Python code. We follow PEP8 in the GreeneLab for all of our Python code. I suppose my first impulse to buy the shirt came from being a programming nerd who wanted to proudly fly his freak flag, and nothing could be more obscure and wonky than declaring one’s love for a programming style guide on a t-shirt. That is reason enough to get the shirt, but that wasn’t really it.

If a t-shirt declares your membership on a team, then what is Team PEP8 all about? Programmers repeatedly tackle the challenge of getting the computer to understand what it should do in response to our commands. That is the nature of programming. But we have syntax for that. A style guide puts additional constraints on what you write in your programs. Why make it harder than it already is to get the computer to do the right thing? Because getting computers to follow along is the easy part. The real challenge of programming is writing code that not only gets the computer to jump through the right hoops in the right order, but does so in a clear and uncomplicated way that another programmer can also understand. That is what a style guide is for. Write readable code, make better software. That is why I ❤️ PEP8. Go, team!

Oh, yeah. If you want, you can join the team too. It takes more than a t-shirt, though that might help. It takes more than a style guide, too. You have to work on the craft of writing readable code. Are you up for that challenge?