I was trying to track an order and repeatedly tapped what looked like the tracking button, but it turned out to be a green advertisement button. Shortly afterward, unfamiliar icons resembling Google Maps and Amazon Prime appeared on my Home Screen, and more seemed to be downloading. I deleted what I could, shut down the iPhone, and removed the SIM card. I'm worried that the phone was hacked and want to know the safest next steps. I also have many photos and other files I don't want to lose.
3 Answers
An advertisement normally cannot silently install regular iPhone apps or malware without additional permission. Those icons may have been web shortcuts, prompts from a suspicious site, or apps installed through a profile or App Store action. Don’t enter passwords or payment details into anything that appears after the ad. With the phone still offline, turn it on and check Settings > General > VPN & Device Management for any unfamiliar profile, and remove unknown apps or web clips. Update iOS, review your Apple Account’s devices, and change your Apple Account password from a trusted device if you entered it anywhere suspicious. If you still don’t trust the phone, back up photos and important files carefully, then erase all content and settings and set it up again from a trusted backup.
If the phone only displayed unfamiliar icons and you didn’t approve an App Store download, install a configuration profile, or provide account credentials, this was probably a deceptive website rather than a full device compromise. Check your App Store purchase and download history, browser settings, calendar subscriptions, and installed profiles. Delete anything unfamiliar, clear the browser data, enable two-factor authentication, and monitor bank and Apple Account activity. Never pay for a scanner or provide card details just to unlock a supposed free scan.
Removing the SIM card is not necessary for this kind of incident, and Wi-Fi is not the only concern. Keep the phone offline while checking it, but don’t restore a suspicious configuration or install anything recommended by the pop-up. If you have important photos, copy them to a computer or use a trusted cloud backup after confirming the phone is behaving normally. Then consider a full factory reset if any unknown apps, profiles, or settings remain. Also contact your carrier if you notice unexpected text messages or account changes.

Security apps from the App Store generally can’t scan all of iOS, so a clean result doesn’t prove much. The most useful checks are iOS updates, unknown management profiles, unfamiliar apps, Apple Account activity, and whether you granted a website any unusual permissions.