Compiling objective-c into C + + in Visual Studio

Source: Internet
Author: User
Tags microsoft windows 10

quickly use romanysoft LAB Technology to implement HTML development Mac OS apps and sell them to the Apple App Store.   "HTML development mac OS App video tutorial"
    • Tudou Sync Update: http://www.tudou.com/plcover/VHNh6ZopQ4E/
    • Baidu Network disk synchronization: Http://pan.baidu.com/s/1jG1Q58M
    • Share [Chinese documentary] The Internet age Http://pan.baidu.com/s/1qWkJfcS
  Official QQ Group: ( apply to join, say I recommend it )
    • App Practice 434558944
    • App Learning Exchange 452180823
 

English Original: Compiling objective-c into C + + with Visual Studio

It has been rumored that the Microsoft Windows 10 platform will support running Android programs, and no one expects IOS apps to get the same support. Microsoft is now combining C2 and Clang to make it possible.

Compiler support

Both Google and Apple use Clang as their C + + front-end, and Microsoft combines Clang with the Visual C + + compiler's back-end C2 to support running Android and IOS programs on Windows.

Apple's objective-c also uses Clang as the front end, so once Clang and C2 are integrated, they will also get the ability to parse and compile objective-c.

IDE Support

Objective-c in Visual Studio supports syntax highlighting, code completion, and code debugging capabilities. C + + and C # files can be introduced into the same project, allowing programs to be called directly across boundaries. The compiler will handle all marshaling work, so developers will only see normal function calls.

Most objective-c projects start with the build Xcode project, so Visual Studio will support importing Xcode projects, and the VS and XCode project files can coexist in mixed-mode projects, so you can develop the project in both Ides.

Mixed-mode projects

Windows provides new APIs for objective-c apps, such as: Live tiles. To ensure that you can continue to share code between platforms, Microsoft allows you to check whether they are available through the runtime before calling the Windows API. Alternatively, you can use preprocessor directives to explicitly isolate platform-specific code from shared code.

Run-time behavior

The OBJECTIVE-C runtime for Windows determines specific behavior by detecting the application's original platform by default. For example, if you are porting an IPhone app, it will run in a small window by default, and apps migrated from IPad will run by default in a regular-sized window.

All of these behaviors can be overridden when needed.

IOS API Compatibility

Windows 10 supports a "reasonable subset" of the iOS API, which does not correspond to a version of iOS, but rather looks for the most commonly used APIs by looking at metrics. In the first version, Microsoft will focus on the following APIs:

    • Games: Providing good support for OpenGL, OpenAL and sensors

    • Ui:uikit, core animation, core graphics, core text, touch control

    • OBJECTIVE-C: Auto Reference count, code block, Foundation framework

For features like sharing, message hinting, and storage components, developers need to choose whether to continue using the IOS API or switch to a Windows alternative solution. If you choose to continue using IOS api,windows will provide a compatibility layer to support the API to run properly; Of course, Microsoft would prefer you to use the solution they provide so you can access advanced Windows features.

Swift

For Swift, Microsoft's official position is "no comment". In private communication, they revealed their willingness to support Swift, but were busy preparing for the objective-c before the fall, so that there was no resources available to Swift.

RELATED LINKS
    • Detailed description of Visual Studio: please click here
    • Visual Studio: Please click here

Compiling objective-c into C + + in Visual Studio

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.