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

Hi,

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 https://discuss.appium.io/t/how-to-launch-the-app-store-ipa-file-from-appium/3191 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?
Thanks.