Using vsimporter
Using vsimporter
The vsimporter tool enables you to import your Xcode project into a new Visual Studio Universal Windows Platform (UWP) app project with Objective-C support.
Import your Xcode project
-
Make sure Chocolately is installed. See how to install the latest version here
-
Get the latest version of WinObjC.Tools, the command line tools for WinObjC. Run the below command from powershell to get the latest version:
choco upgrade winobjc-toolsor if you want to use the latest pre-release version
choco upgrade winobjc-tools --pre(more information about this command and its options can be found here)
-
From powershell, navigate to the directory containing your Xcode project (.xcodeproj); As an example:
c:\winobjc\samples\WOCCatalog -
Run vsimporter.exe
c:\winobjc\samples\WOCCatalog> vsimporter.exe -
A Visual Studio solution file is created in your current directory. Double click this file to open your project in Visual Studio.
-
Press Ctrl-F5 to build your app and run it on your PC.
Command line options for vsimporter
-alltargets
Process all targets at the path. Specifying schemes is unavailable with this option.
Default: True (Enabled), unless individual targets are set with -target
-allschemes
Process all schemes at the path. Specifying targets is unavailable with this option.
Default: True (Enabled), unless individual schemes are set with -scheme
-configuration [ALL CONFIGURATIONS | Debug | Release]
Specify configuration(s) to add to the generated Visual Studio project.
Default: ALL CONFIGURATIONS
-genpackaging=[0|1]
Disable/Enable the addition of a NuGetizer packaging project (.nuproj) to the solution. The generated packaging project is automatically set up to build a NuGet package from projects in your solution. This option is disabled by default. By setting -genpackaging or -genpackaging=1 to enable, a packaging project will be added whenever any non-app project is imported.
Default: False (Disabled)
-genprojections
Generate a WinRT projections project that will create a WinMD library from the solution's ObjC code.
Default: False (Disabled)
-help
Print full usage message
-interactive
Enable interactive mode. User will be prompted for options about the import.
Default: False (Disabled)
-list
List the targets and configurations in the project.
-loglevel [debug | info | warning | error]
Set the level of detail to log.
Default: warning
-project PATH
Specify path to the .xcodeproj to process
-scheme NAME
Specify scheme to process. This option is useful when the xcodeproj targets multiple platforms.
-target NAME
Specify target to process. For example, each project in the xcodeproj will register as individual targets. Run -list beforehand to see the available targets to choose from.
-templates PATH
Specify path to the vsimporter-templates directory (by default calculated from binary's location). Use this option if you are testing vsimporter from source.
-usage
Print brief usage message.
-version
Print the tool's version.
-workspace PATH
Specify path to the .xcworkspace to process.
-xcconfig FILE
Apply build settings defined in FILE as overrides.
How vsimporter imports your Xcode project
vsimporter maps Xcode projects and targets to the closest Visual Studio equivalent. The approximation of that mapping is listed below:
| Xcode | Visual Studio Equivalent |
|---|---|
| Aggregate | Utility Project |
| Bundle | Utility Project |
| Framework | Static Library (Universal Windows) |
| iOS Application | App (Universal Windows) |
| Shared Headers | Shared Items Project |
| Static Library | Static Library (Universal Windows) |
| Workspace | Visual Studio Solution |
Additionally, vsimporter can generate two other projects for your solution:
- Windows Runtime Project - Creates a WinMD library from your ObjC code. See -genprojections above.
- Packaging Project - Creates a NuGet package with the outputs of your projects. See -genpackaging above.
Known issues with vsimporter
-
–f-no-arc-objcis not supported (–f-nois unsupported for any option, as this is normally interpreted by a clang driver). To work around the issue:
-
Right click on the relevant file in the Visual Studio solution explorer
-
Select Properties
-
Select clang

-
Set Enable Objective-C ARC to No

- Certain build stages are ignored (although they will be logged in the console window output):
- Shell scripts
- Header copy stage
- Copy file stage
- Absolute paths in projects may be problematic, relative paths are preferable
- Windows Linker flags differ from OS X
- Framework search paths are ignored
- Custom build rules are ignored
- Data models and asset catalogs are not currently supported
- Xcode 8.0 changes the underlying markup of storyboard and XIB files, causing Xib2Nib to fail. The solution is to upgrade to the latest version of Xcode which does not trigger this issue
- Xib2Nib does not support all controls and nodes in storyboard and XIB files: If you're running into issues with storyboard or XIB files when importing your project, please let us known by opening an issue on GitHub and attaching your XIB file or storyboard so we can tell you what's blocking the import process

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
