Undefined symbols for architecture arm64: _WebGLUpload

I am getting the following errors when compiling a iOS unity project in Xcode :

Undefined symbols for architecture arm64:
“_UploadTextureJsLib”, referenced from:
_WebGLUpload_UploadTextureJsLib_m8900C4ACC5985A628D286988DD6802F56B951077 in Assembly-CSharp8.o
(maybe you meant: _WebGLUpload_UploadTextureJsLib_m8900C4ACC5985A628D286988DD6802F56B951077)
“_UploadFileJsLib”, referenced from:
_WebGLUpload_UploadFileJsLib_m0F4F454BE57F73B0170EBC57D1AEAEB145A09036 in Assembly-CSharp8.o
(maybe you meant: _WebGLUpload_UploadFileJsLib_m0F4F454BE57F73B0170EBC57D1AEAEB145A09036)
“_DownloadFileJsLib”, referenced from:
_WebGLDownload_DownloadFileJsLib_m2BB5EBC524B8CD8282084E86C1CF2E28FED9801C in Assembly-CSharp8.o
(maybe you meant: _WebGLDownload_DownloadFileJsLib_m2BB5EBC524B8CD8282084E86C1CF2E28FED9801C)
ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

I see that it is referencing the webGL plugin that I have, but it’s only used when I make a WebGL build, so not even needed for the iOS build.

I have conditionally removed references to the plugin in the code. My only guess is that I am somehow missing some references to it in the Unity project. Or am I missing something else?

Any help someone can give would be greatly appreciated.

There were a few scripts that had references still. I did some more conditional compile blocks and it solved this issue.