An iPhone's inherent security measures has no risk of hacking, particularly when it remains within its intended operational framework. Without undergoing the process of 'jailbreaking,' which involves bypassing built-in security features, an iPhone generally maintains a robust defense against unauthorized access or manipulation.
Regarding the restoration of an iPhone to its factory settings, the method chosen—whether initiated directly from the iPhone or through a Mac—ultimately achieves the same outcome. Both avenues facilitate the complete erasure of personal data and settings, reverting the device to its original state. This restoration process ensures a clean slate, effectively removing any user-specific information or modifications made during the device's use.