Plugin built for arm64 which is not the architecture being linked (i386)

Hello

I am currently working on a project where a separate party has created a Cordova plugin that performs a set of functionality. I have successfully manage to install the plugin within my Ionic app but when trying to build it, it throws the following error. (Do note this is a blank brand new app)

Here’s what I’ve done so far when setting up the app

  1. ionic start appName blank
  2. cordova plugin add path/to/plugin/folder
  3. ionic platform add ios
  4. ionic build ios

And I get the error below.

ld: warning: ignoring file HelloCordova/Plugins/patrec-plugin-automechanika/ScanUserJourneyLib.framework/ScanUserJourneyLib, file was built for arm64 which is not the architecture being linked (i386): HelloCordova/Plugins/patrec-plugin-automechanika/ScanUserJourneyLib.framework/ScanUserJourneyLib
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_PatRecExtraEntryPoint", referenced from:
      objc-class-ref in PatRecScanUserJourneyPlugin.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

My question would be, how do I actually solve this?

Any help would be greatly appreciated!