VisualEffect Component "Unregistered" when building for iOS, crashes build

I am adding a VisualEffect component to a game object via script:

    public void GenerateMatter()
    {

        VisualEffect matter = gameObject.AddComponent<VisualEffect>();

        matter.visualEffectAsset = Resources.Load("fx", typeof(VisualEffectAsset)) as VisualEffectAsset;

        matter.SetMesh("Spacetime", renderMesh);
      
    }

This code works and runs perfectly in the editor.

However when I build the project for iOS and run it, the build crashes and I see the following message in Xcode:

Can't add component because '[UNREGISTERED]' is not derived from Component.
UnityEngine.GameObject:AddComponent()
Manifold:GenerateMatter()

I am certain that the AddComponent call in GenerateMatter() is what is causing the crash, and the VisualEffect is the only AddComponent call in that function (I commented this line out and built it, and the build ran successfully).

Is there something I should be aware of with the VisualEffect Component type? I confirmed from Unity’s documentation that Visual Effect inherits from Behavior → Component.

Thank You

Apologies, this was posted in the wrong sub-forum, my mistake, I have reposted it in the appropriate place here:

VisualEffect Component “Unregistered” when building for iOS, crashes build