Can you describe in concrete terms what you intend to do with this information? The reason I ask is that oftentimes people use things like “web or native” as a proxy for much more granular concerns like “can I store data quasi-permanently so that it’s available even when offline?” or “do I present a touchscreen-optimized interface?”.
I would advise you to check for the most precise, narrowly tailored feature (or lack thereof) you can, even if that means doing what seem at first blush to be multiple redundant checks. Even if it’s true today that “web or native” is a meaningful and reliable indicator of whether you can or can’t X, it may very well not be true tomorrow, and it would be annoying if you had to rearchitect your app every time that changes.
It’s for multiple reasons… To display proper tutorial pages, regarding it’s the native app or the web browser. To ask cookie consent only on browsers, and I guess other features in future.