If your device is involved in an attack, Apple will send you a warning notification directly with instructions on how to avoid the attack.
If you receive a notification on your Apple device that you have been the target of a spyware attack, take it seriously.
The warning, which appears to have been issued from Wednesday, lets users know that a "spyware-for-hire attack" targets "a very small number of specific individuals and their devices," according to Apple's information page on the notification. Specifically, Apple suggests that targets may be "journalists, activists, politicians, or diplomats," and warns that "threat notifications are high-confidence alerts indicating that a user has been individually targeted by a mercenary spyware attack and should be treated with extreme caution. Take it seriously." Apple did say, however, that most users would never be targeted by such an attack.
If you happen to be one of the targeted users, the notification you receive will appear at the top of the page when you log in to appleid.apple.com, or you will receive email and iMessage notifications associated with your Apple ID.
If you receive such a message, you can protect your device by enabling lockdown mode or contacting the Digital Security Helpline. But be aware that any notification that contains a link or asks you to open a file or install an application may be a fake email. Apple says it will never ask you to click a link, open a file or download an app. The only notifications you can rely on are the ones you see when you sign in with your Apple ID.