How to install an application from app store using instruments or appium


I need to use appium in order to install third party apps from App Store.
The question if it can be done by using xcun instruments? The only way I found was requiring downloading the ipa first and then with xcrun smctl to do the installation… and this is not good enough.

I saw that in other post they were talking about taking the build version of app store and resign it with my certificate… but is it possible at all to get this build version?! Apple allow it?

What do you suggest?