Unable to load CoreML model using MLModel.compileModel
问题 The CoreML couldn't be loaded. The first line is successful, but the second line gives an error called: The file couldn’t be saved. The model does exist and modelUrl is correct. The same issue is also found here Unable to load CoreML model using MLModel.compileModel(at:) Does someone know what the cause is? var modelUrl = NSBundle.MainBundle.GetUrlForResource("SentimentPolarity", "mlmodel"); var compiledModelUrl = MLModel.CompileModel(modelUrl, out var error); 回答1: I found the answer just now