Does In-App Purchase works on an iOS pirated application?
Being a developer, I was thinking about the potential following use-case:
This application is not free. You have not purchased it. Please buy it now.
Cancel - Purchase
If he accepts, I display an In-App Purchase dialog.
If he does not, I disable the key feature of the application.
It seems (slightly) more effective than simply asking someone who just pirated an app to go buy it on the App Store.
It's possible that the dialog you're thinking of wouldn't be accepted by the app review team. It's hard to say. But what you can do is what a lot of apps do, which is provide your app for free, with limited functionality (be careful here, there are restrictions on what you can do in this regard), and IAP to upgrade to the full version. The simplest example would be games that let you play a few levels for free, and then buy the rest of the levels with a single IAP transaction.