"Xcode is not installed on this system. Install from the Apple Appstore." message when installing Metasploit
I solved the problem! All I had to do was open the msf_install.sh file with Xcode. Then change the "com.apple.pkg.XcodeMAS" to "com.apple.pkg.Xcode". Thats it. The reason this problem occurs is because newer versions of Xcode don't use the "MAS" in the file name. The person who made the msf_install.sh file made it a while ago before the file name was changed.