kmm plugin ios simulator config error

After creating a kmm application using the wizard from the kotlin-multiplatform-mobile plugin, I tried running the ios simulator and got the error below.

kotlin multiplatform mobile java.lang.IllegalStateException: Unsupported Xcode version 12.4, minimal supported version is 12.5.

To solve the error I tried updating Xcode, giving me the new error below.

CoreSimulator.framework was changed while the process was running.  This is not a supported configuration and can occur if was updated while the process was running.  Service version (776.4) does not match expected service version (732.18.6).