The following advice is if you are seeing an error with something that mentions '/private/var/' and 'AppTranslocation' in the error, like:
"/private/var/folders/0q/431m749x0gs0_tgtq15rjxl80000gn/T/AppTranslocation/484F4DA0-B613-4EB5-8014-FEBEB492D12F/d/Arduino with TD1.30.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware"
1.) Make sure your Sparkiduino is in the Applications folder - it must be there for security reasons, or macOS will reject it
2.) If your code still won't compile, try re-downloading and re-placing the app into Applications - bad downloads can still sometimes work, but