On iOS you can already do it. Apple has added a way to sell in-app purchases that cost 0. Your application can use such a purchase to unlock features, and then re-lock them when your trial period expires. The purchase manifest guarantees the timestamps and that it was made only once. The user would then have to buy a "real" in-app purchase to unlock the features.