Gems purchased on the Nintendo Switch version can only be used on the Nintendo Switch version.
Likewise, gems purchased on the Smartphone version can only be used on the Smartphone version.
However, items or licenses purchased with gems on either platform can be used on both platforms.