Skip to content

Instantly share code, notes, and snippets.

@SkymanOne
Last active September 18, 2020 22:04
Show Gist options
  • Save SkymanOne/71a84078e7db5ebe3900e731504a4223 to your computer and use it in GitHub Desktop.
Save SkymanOne/71a84078e7db5ebe3900e731504a4223 to your computer and use it in GitHub Desktop.
VS Code Task config to launch iOS app in Xamarin.Forms project
{
//just copy paste in .vscode/tasks.json
//run by pressing cmd+shift+p
"version": "2.0.0",
"tasks": [
{
"label": "build",
"group": "build",
"command": "msbuild",
"type": "process",
"args": [
"/t:Build"
],
"problemMatcher": "$msCompile"
},
{
"label": "Install Xamarin.iOS app",
"group": "build",
"command": "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch",
"args": [
//suppose your solution is outside the primary working directory
//like:
// - yourproject
// - yourproject
// - yourproject.iOS
// - yourproject.Android
// - yourproject.sln
"--launchsim=${input:Project name}/${input:Project name}.iOS/bin/iPhoneSimulator/Debug/${input:Project name}.iOS.app",
"--device::v2:runtime=com.apple.CoreSimulator.SimRuntime.iOS-14-0,devicetype=com.apple.CoreSimulator.SimDeviceType.iPhone-11"
],
"dependsOn": [
"build",
],
"problemMatcher": [
"$msCompile"
]
}
],
"inputs": [
{
//ask for core directory name
"id": "Project name",
"description": "Enter the project name",
"type": "promptString",
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment