Most iOS-based spy apps are not installed directly on the target iPhone. This makes them very difficult to detect. If you suspect someone is spying on your iPhone, you should change your iCloud password. This will make it impossible for an app to download your phone backups.