Well, this problem is not iphone limited. You should apply one of the many security algorithm.
(I don't know how the purchase is done but i'll make a suggestion)
You can for example after purchase make the app send the IMEI to the purchase server that will generate a code that the app will save. Then all the app will check for it to enable/disable the ads. (try to make the code with some hashing algorithm or such)
Please remember that all systems can be cracked so don't try something too complex that will give your real user headache.