While governmental bodies and regulatory boards are all looking closely at loot boxes, the consensus has been far from universal. States and bodies disagree as to whether it constitutes as gambling while the Entertainment Software Regulatory Board (ESRB) have brushed off the issue.
Of course, leave it to Apple to get ahead of any controversy or legal hot water by making a stand early. In what is perhaps a self-protective measure, the company has updated its App Store Guidelines, binding developers to full disclosure regarding the odds of what's inside any given loot box.
In section 3.1, under the In-App-Purchase section of Payments:
Apps offering “loot boxes” or other mechanisms that provide randomized virtual items for purchase must disclose the odds of receiving each type of item to customers prior to purchase.
Take note that this doesn't get rid of loot boxes, though there is the fact that these things have been awfully normalized in the mobile gaming space long before they were a naughty gleam in EA's eye. What it does is provide some kind of labeling to ensure users know what they're spending on, for better or worse.
It is worth noting that Apple's mandate isn't one it invented; it's one that China made law earlier this year and went into effect around May. If anything, it's Apple's way of guaranteeing that developers make apps that conform with Chinese law and ensure they can sell their games in that country without running afoul of the law.
Right now, it's uncertain as to whether the wording extends to highly profitable collectible card games like Hearthstone whose card packs count as "mechanisms that provide randomized virtual items." We'll let you know if we learn more.