Runs on test device but cannot archive

I have never had this problem until I tried IL2CPP. I don’t know if it’s related at all but the game runs fine on the test device, but when archive it fails and I get errors like this:

JSONKit.m:680:5: Assignment to Objective-C’s isa is deprecated in favor of object_setClass()

To fix this just replace the error line with object_setClass(array,_JKArrayClass);
It’s from a 3rd party plugin that uses JSONKit. The comments in the file did explain the explicit use of object->isa is supposed to be a lot more efficient. However, xcode won’t archive with that when we changed our project from mono to il2cpp, so… for now we are modifying that code just to get past xcode.