Yes, iPhone spy apps do work with two-factor authentication enabled. You will be required to intercept the authentication code that is sent to the target iPhone once the user’s iCloud credentials have been entered.