Compiler Support
Both Google and Apple use clang as their C + + front-section. To make their code run on Windows, Microsoft had to combine the back-end C2 and clang of Visual C + +.
(Clang is a lightweight compiler for C, C + +, Objective-c, objective-c++ languages, and the source code is published under the BSD protocol.) Translator Note)
IDE Support
Objective-c has features such as syntax highlighting, code completion, and debugging support in Visual Studio. C + + and C # files can be included in the same project, allowing programs to be called directly across regions. The compiler will handle all the details so the developer just sees the encapsulation of the normal function call.
Most objective-c projects start as a Xcode project, so Visual Studio provides the ability to import the project type. The VS and Xcode project files can exist in the same project, so you can develop the same project in both Ides.
mixed-mode projects
Windows provides new APIs to objective-c, such as live tiles. To ensure that the code can continue to be shared between these two platforms, Microsoft provides runtime checks to see if the Windows API can make a good call. Alternatively, you can use preprocessor directives to isolate specific platform code from shared code.
run-time behavior
By default, the OBJECTIVE-C runtime in Windows detects the original platform of the application to determine its behavior. For example, if you provide an iphone app then it will run in a narrow window by default, while the ipad app runs in a normal window.
All of these behaviors can be overridden by the application when it is needed.
IOS API Compatibility
Windows 10 supports a subset of iOS APIs. It does not track specific versions of iOS, but instead looks at which APIs are often used in the standard. For the first version, the main APIs that Microsoft focuses on include the following:
Games: Opengl,openal and sensors
Ui:uikit,cooreanimation,coregraphics,coretext,touch
Objective-c:arc,blocks,foundation
Some classes, such as sharing, notification, and Storekit features, developers need to choose between preserving iOS APIs and using Windows alternatives. If you choose to keep iOS apis,windows will provide a compatibility layer, such APIs will be able to start working. The advantage of choosing windows as an alternative is that you can use the advanced features of Windows.
Swift
Microsoft's official stance on Swift is "no comment at this time." Presumably that means they want to support Swift but are too busy at the moment to continue preparing for objective-c, and the fall may announce a message about Swift.
Thank you for your visit and hope to help you. We welcome your attention, collection and comment.
To make this article get treatise and ask questions, reprint please indicate the source:
Http://blog.csdn.net/nomasp
Compiling objective-c into C + + with Visual Studio