Download app bundles from App Store to run on iOS Emulator on Mac I want to run an iOS app (eWeLink) using the Appetize service, which I believe is an emulator. My goal is to be able to control my light switches from my Mac using the eWeLink app. In order to do that, I have to get the app as a a .zip or .tar.gz file containing the compressed .app bundle. How do I get that .app bundle?

When I go to App Store, it just wants to download directly to my iPhone. The app is available, but I want the bundle.
There's multiple points to address here:

1) The Appetize service is not an emulator. It allows you to run native mobile apps in the browser in order to provide apps demos, training, testing, etc. However it does so not by emulating the ARM CPU of an iOS device, but instead works by running the Intel version of said apps natively on an Intel CPU - while providing a "simulated" operating system that maps onto the browser.

2) The app bundle you need for the Appetize service is usually obtained by building the app for the Xcode Simulator. This requires you to have the source code for the app. If the app you want to run on the Appetize service is not open source, and you have not developed it yourself (or otherwise obtained the rights for the source code) - you cannot use this method.

3) The apps you download from the App Store are meant for execution on ARM CPUs. They cannot be directly used with the Appetize service, as that requires Intel executables. However, if you do want to obtain the files, it is possible (contrary to the other answers to your question). The easiest way of doing this is to use iTunes to access the App Store and download the apps, which are then accesssible on your local disk drive. This requires you to use either iTunes 12.6.3 (or older) or one of the other solutions described here:

How do I download an iOS App (IPA) file to my Mac after iTunes 12.7 update?

4) Very recent development has shown that it is indeed in some cases possible to translate an app built for the ARM CPU for the App Store into an app built for the Intel CPU meant for the Xcode Simulator (or the Appetize service). This is done by exploiting the fact that Apple these days requires app submissions to include bitcode. You can read more about that here:

https://www.highcaffeinecontent.com/blog/20190518-Translating-an-ARM-iOS-App-to-Intel-macOS-Using-Bitcode

5) The most practical way of achieving your goal of running the eWeLink app on your Mac in order to control light switches is to run the Android version of the app through an Android environment for the Mac, such as for example BlueStacks.