Since IAPs were first created you were not allowed to unlock code in an app using anything other than IAPs (aka 3.1.3 first bullet). That has now changed. New guideline 3.1.3(b) (see below) allows an app to accept a purchase from another platform and use that to "access content, subscriptions, or features". "(F)eatures" here means unlocking code.
This new 3.1.3(b) supercedes many of my past comments. Thank you anti-trust law.
3.1.3(b) Multiplatform Services: Apps that operate across multiple platforms may allow users to access content, subscriptions, or features they have acquired elsewhere, including consumable items in multi-platform games, provided those items are also available as in-app purchases within the app. You must not directly or indirectly target iOS users to use a purchasing method other than in-app purchase, and your general communications about other purchasing methods must not discourage use of in-app purchase.