iPhone 7 has magnetic area next to flashlight
All Apple cameras that have motors in them are magnetic.

https://support.apple.com/en-us/HT208747

The permanent magnets are how battery power runs the image stabilization and focus mechanisms. Look for OIS and AF in the documentation to learn more.