Before updating my PC’s Visual Studio 2019 (v16.8) I was able to build Xamarin apps and connect to my Mac without issue. After updating to Visual Studio 2019 (v16.9), VS went through the normal process of wanting to update the remote Visual Studio for Mac everything appeared to update without issue, but when trying to connect after the remote update I got an error
"The Xcode license status couldn’t be verified because Xcode has not
been found on the default location of the connected Mac. Having Xcode
installed and functional is necessary in order to build and run iOS
apps, so please check that Xcode is correctly installed and that the
path specified under iOS Settings is correct."
On the Mac I made sure Xcode and VS for were update to date. (VS had updates which I did), and I still was greeted with the same issue (on windows).
Checking VS for Mac’s Preferences Projects->SDK Locations->Apple it shows that it can’t find Xcode (it is using a location in /Library/Developer/CommandlineTools/SDKs).
"No SDK found at specified location"
I change that to /Application/Xcode.app which then shows that it can now find it, but requires VS for Mac to be restarted. After doing that, and rechecking the newly set value, I see it has been reverted to the wrong location! No mater what I try, every time I go back to view the setting it always reverts.
I assume I need that pref changed but I can’t seem to get the value to stay
6
Answers
Long story short, this solved my issue
In Mac terminal I ran
Unfortunately I can't find the Xamarin form that lead me to the answer, however I remember it said I needed to install xcode-select
sudo xcode-select --install
. Doing this errored out because It was already installedI tried running Sudo xcode-select --update but that wasn't a valid command. However it did give me a list of valid options where I saw the reset option.
While trying to re-find the original post (I never did find it again) I stumbled upon this stackoverflow post (xcode-select active developer directory error) which I think describes what might have happened. An answer lower on the page (https://stackoverflow.com/a/48154263/13130043) is the same as what I figured out.
You should go to (Tools > Options > Xamarin > iOS Settings) if you’re using Visual Studio on Windows.
In the Apple SDK section, check the Xcode path there.
Mine also changed to
/Library/Developer/CommandlineTools
somehow after updating VS to 16.9.0It works again after changing it to
/Applications/Xcode.app
Just put a "/" at the end of the url. It works for me.
Ex: "/Applications/Xcode.app/"
The error might tell you that the license of xcode could not be verified due to not being able to find xcode…
However, that might as well be not the real reason for the connection issue at all.
Here is another possible solution:
Delete the XMA temporary folder from both your Windows PC as well as your MAC and you’re good to go.
Windows: %localappdata%TempXamarinXMA
MacOS: $HOME/Library/Caches/Xamarin/XMA
When pairing your Mac again after this, you can watch the process being busy reinstalling a lot of SDK and Broker stuff. 🙂
But after all, it should work again.
In my case, I were install xcode on desktop after downloading it from https://developer.apple.com/downloads
So I get same error.
It solved after moving the xcode to Application directory and run this command on terminal:
Running the xcode select reset terminal command did not work for me. What I ended up doing was