2

I'm developing a Xamarin Forms app, which I'm testing in 2 android devices and 2 iOS devices, all connected to my mac.
I'm doing some rapid iterations in the code (GPS, ActivityTracking, etc) and then I'm deploying to all devices, one by one:

  1. Android -> Debug -> Google Pixel 2
  2. Android -> Debug -> LG Nexus 5
  3. iOS -> Debug -> Oscar's iPhone
  4. iOS -> Debug -> Oscar's iPad Pro

Selecting each device one by one and push the code takes some time.

Is there a way to push to all?

I don't need a debugger attached, just the new code on all devices.

I'm using the latest version of VS for Mac.

Even a command-line solution will work for me.

Oscar Fraxedas
  • 4,467
  • 3
  • 27
  • 32

2 Answers2

1

Personally, I'd use either AppCenter, with different Groups and auto update (force) or, use different build configs.

  • Thanks, Matthew. I'm sure my DevOps person will help me with this. AppCenter looks like an option worth pursuing if I cannot push directly from the mac to the connected devices. – Oscar Fraxedas Jul 07 '20 at 13:41
0

If you have only 2 devices, one per project (Android and iOS) it can be done by creating a Run configuration to Launch Multiple Projects.

To set multiple startup projects

  1. Right-click the solution node and then select Options
  2. Navigate to Run->Configurations and create a new one enter image description here
  3. Under Devices select both projects and press OK. enter image description here
  4. Select the new Solution Run Configuration as the active run configuration. Make sure both projects appear in bold. enter image description here
  5. Press run and both project will execute on the target devices

Here a video of the steps to follow: https://www.youtube.com/watch?v=m-0qOgyRVrY

This is the official documentation: https://learn.microsoft.com/en-us/visualstudio/mac/set-startup-projects?view=vsmac-2019

Oscar Fraxedas
  • 4,467
  • 3
  • 27
  • 32