Return to Visual Studio and in the Host Selection dialog, select Add Mac.:Įnter the IP address of you Mac into the Add Mac dialog and click Add:įinally, enter the username (not full name) of your Mac admin account and the corresponding password: Or, if you prefer to use the command line you can find out your IP address by entering ipconfig getifaddr en0 into Terminal (Note that depending on the type of connection the variable might be en1, en2 etc.): Locate your Mac’s IP address by either browsing to the System Preferences > Sharing > Remote Login on your Mac: In certain circumstances, you may wish to manually add a Mac if you cannot see its mDNS name listed in the Host Selection dialog. If you choose to Forget this Mac, you will need to re-enter your credentials to connect to it again. There can only be one connected Mac at any one time.Įach machine in the list, whether connected or otherwise, will display a context menu on right-click, allowing you to Connect, Disconnect, or Forget the Mac as needed: When a connection has been successfully made, it will display in the Host Selection dialog with a connected icon next to it, as illustrated below: For example, from the screenshot below, the account name will be amyb and not Amy Burns: You can find this out by using the whoami command in Terminal. Note: You must use the username and not the full name when entering your credentials. On subsequent connections the agent will use the username and key file to connect to the most recently connected known build host.
If it succeeds, an SSH key will be created, and will be registered in the authorized_keys file on that Mac.
The agent will use these credentials to create a new SSH connection to the Mac. The first time that you connect to a Mac, you will be prompted to enter your Mac user credentials (which must be an Administrator account) to allow the remote connection: Select a Mac by double-clicking on it to connect to it. This will display a list of all the machines that have either been previously connected and are stored as known machines, or machines that are available for Remote Login. Navigating either way will lead to the Mac Agent dialog, illustrated below: Or by browsing to Tools > Options in Visual Studio, selecting Xamarin > iOS Settings and clicking the Find Xamarin Mac Agent button: There are two ways to connect to the Mac build host:
Make sure to install Xamarin tools on your Windows machine. Take a look at this example in xamarin developer page :