Sell app outside appstore is legal ?

I am developing an app that buit with multiple platform framework. What I want to do that when my user buy my app in one platform they will have it in another platform such as if they buy in website and they can get ios version for free. Another thing that in my country , a small amount of population have credit card to buy app with appstore. So can access the iOS app only by entering their user ID and password from the web or another way to purchase (so essentially the iOS app is free to download from appstore but not free to use). What I want to know what I do is legal. If I do that, my app will be ban on appstore? If Apple don't agree with that, what can I do in my situation. Thanks you very much. Sorry for my bad english.

It's technically not possible, so legal has nothing to do with it.


I have no ideas on alternatives for your situation, sorry.

Sell app outside appstore is legal ?
 
 
Q