If you’re targeting iOS and writing a lot of C++ code, you should consider importing your XCode projects inside Visual Studio. Visual Studio not only provides an easy way to import these projects, but also allows opening these projects back in XCode if you need to make non-C++ related edits (e.g. storyboarding, UI design).
Just as you use Xcode to build iOS apps, you use Visual Studio to build Windows Store apps. This video gives a quick comparison of the two. For more resources to help iOS developers get started.
This article covers the high-level steps needed to import your existing iOS XCode projects into Visual Studio. You can read about other C++ project types in the guide for Bringing your C++ code to Visual Studio.
Step 1. Install iOS support: Make sure that during VS installation, you select the “Mobile development with C++” workload. In the customization pane, make sure you select the “C++ iOS development tools” option as well.
Step 2. Install the remote Mac tools and connect from VS: Install vcremote on the Mac machine following the instructions in “Install and Configure Tools to Build iOS projects”. Then, in VS, from Tools > Options > Cross Platform > C++ > iOS, pair VS with your Mac machine
Step 3. Launch the XCode import wizard. Go to File > New > Import > Import from XCode and follow the steps of the wizard. To learn more about the wizard, read “Import a XCode project” in MSDN
Each XCode target will create a new Visual Studio project and your iOS source code will be available for further editing, building and debugging.
Xcode 9 Vs Visual Studio For Mac
Step 4 (optional). Open Visual Studio project in XCode: When you need to make non-C++ changes to your iOS projects (e.g. storyboard editing), Visual Studio can automatically open your projects inside XCode running on your Mac. Once you’re done making changes, you can ask VS to copy these changes back to the Windows machine. Follow this link to learn more about syncing changes between XCode and Visual Studio.
What’s next
To learn more about the iOS support in Visual Studio read “Developing cross-platform iOS applications using Visual Studio”.
If you’re new to Visual Studio, learn more by reading the Getting Started with Visual Studio for C and C++ Developers topic and the rest of the posts in this Getting Started series aimed at C++ users that are new to Visual Studio. Download Visual Studio 2017 today, try it out and share your feedback.
Mogren,
You should be able to run the same code from within Xcode that your classmates are running within VS C++. There may be a few caveats to that approach, as I believe that Visual C++ implements some keywords that are not available in ISO standard C++. But you should be able to just remove the offending key words when you're running in Xcode. Find some classmates that are running Linux and see how they've worked around the issues.
Either way, when you create your new project in Xcode, choose
Command Line Utility > C++ Tool
as your project type. You will then be able to edit and run your programs right from Xcode, with the command line output showing up in the project's run log.
You should be able to run the same code from within Xcode that your classmates are running within VS C++. There may be a few caveats to that approach, as I believe that Visual C++ implements some keywords that are not available in ISO standard C++. But you should be able to just remove the offending key words when you're running in Xcode. Find some classmates that are running Linux and see how they've worked around the issues.
Either way, when you create your new project in Xcode, choose
Command Line Utility > C++ Tool
as your project type. You will then be able to edit and run your programs right from Xcode, with the command line output showing up in the project's run log.
Microsoft Visual Studio For Mac
Feb 6, 2007 8:52 AM