PresentlyWhy is due to platform provide rules. Transfering certain content, what you are requesting is not allowed by Apple in app purchase guidelines:
3.1 Payments
3.1.1 In-App Purchase: If you want to unlock features or functionality within your app, (by way of example: subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use in-app purchase. ...
There are likely similar restriction on the Android side, but I wasn't able to find anything definitive.
This is strictly limited to moving IAPs from one OS to another. To the best of my knowledge you are not restricted from transferring non IAP content (achievements for Android, etc) between platforms & you might be permitted to transfer IAP content between accounts on the same platformbut I suspect they have similar restrictions. In general though, any time you have a system that effectiveeffectively allows real world currency to be moved from one party to another, there tends to be more rules & regulationregulations due to the potential for misuse, such as money laundering. In addition, the platforms don't want to make it easy to do an end run around the % the collect from IAPs.
How to actually transfer the content is a broad question & the specifics will vary somewhat depending on the situation. Generally speaking, you need to:
- generate a code, ideally it should be:
- unique (for instance a GUID) to avoid collisions
- no longer than necessary to avoid frustrating users
- unpredictable to avoid scamming exploits
- associate the code with the source account
- when the code is used by a destination account
- transfer the relevant content between accounts on the server side
- update the clients to reflect the server side changes