I said to my wife: If you check my mobile phone you are divorced. I am worried that she will check my mobile phone. What is the solution?.
If a man says to his wife: If you check my mobile phone you are divorced, the basic principle is that a revocable divorce (talaaq) takes place if she checks it, and it is not possible to cancel that. He has to warn his wife against checking the mobile phone lest divorce occur. If she does check it, one revocable divorce occurs and he may take her back during the ‘iddah.
See the answer to question no. 105438.
Some scholars are of the view – with regard to this basic issue – that if the husband’s intention is to prevent his wife doing something, and he does not intend to divorce, then it comes under the ruling on oaths (yameen), so he has to offer expiation for breaking an oath (kafaarat yameen) if she does that, and it does not count as a divorce. This is the view favoured by Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) and a number of scholars, and it is the more correct view. See the answer to question no. 82400.
Each person knows his own intention best, and Allah is watching over him, so it will not avail him anything to deceive himself and claim that he did not intend to divorce at the time he said it, if that was indeed his intention.
And Allah knows best.