Last active
September 18, 2020 22:04
-
-
Save SkymanOne/71a84078e7db5ebe3900e731504a4223 to your computer and use it in GitHub Desktop.
VS Code Task config to launch iOS app in Xamarin.Forms project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
//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