Apple reviews apps anyway, so that last bit could be enforced at the review stage.
Android? You're right. I'm not seeing how they enforce that? Of course, one obvious solution is to force all the app stores to have some sort of review process that verifies all of the apps are functioning in a manner consistent with, um, "US government policy". Just depends on how far the guys in the Trump administration want to go.