I will add an important note to the above. As far as I know, and please guys correct me if I am wrong, at the time of the oath the applicant must be in compliance with the residency obligation, otherwise they will put their residency on risk.
So better you take in consideration your residency...