Recompiled for Mac but can't package: Failed to cook...It imports class...which is in a module that is not available on the platform

Hi all,

I compiled a version of a plugin that is originally for Windows on my Mac using Mac (Rosetta) on Mac M1 with Xcode 13.4.1 with macOS 12.2.1.

Original plugin:

It works fine in the editor but when I try to package a project, it says:
“UATHelper: Cooking (IOS): LogCook: Error: Failed to cook for platform IOS. It imports class /Script/NiagaraUIRenderer.NiagaraSystemWidget, which is in a module that is not available on the platform.”

Would anyone know what might be causing this? I checked the .cpp files but nothing stood out for me. I’ve posted them below.

NiagaraSystemWidget.h:

NiagaraSystemWidget.cpp

Download Mac build: