Under Apple's old policy, the company said apps "should not directly or indirectly enable gifting of in-app purchase content, features or consumable items to others." That section of the guidelines has changed and now says apps "may enable gifting of items that are eligible for in-app purchase to others." It notes that the gifts can only be refunded to the original purchaser and cannot be exchanged.
Apple doesn't lay out how exactly the process will work, as Apple hasn't introduced specific interfaces for gifting in-app purchases. Developers will likely receive more information about the policy in the near future so they can implement the new gifting feature. Apple reported that people have already spent more than $100 billion on in-app purchases and the ability to buy subscriptions and other features for others is only like to spark more spending.
Apple has allowed its users to buy apps for one another for some time, and it's possible that it will expand that current function to include in-app purchases. To give someone an app, users have to open up the App Store, find the app, tap the three dots icon next to the app's price and select the "Gift App" option from the menu. A credit for the app is sent to the recipient via email.