"Excerpt" on the Windows platform using objective-c

Source: Internet
Author: User

While the best objective-c coding platform So far comes from Apple, they are not just for Apple's platform. Objective-c has a long history on other platforms such as Linux, BSD and even windows. Depending on your needs, you will find some open source communities that can support these alternative platforms well. This chapter will briefly describe some of the other platforms and tell you where to find more information about them.

The biggest challenge in using objective-c on other platforms is support for frameworks that make objective-c powerful. Porting Objective-c language is a trivial matter. Since the GNU Compiler Collection (GCC) began to support OBJECTIVE-C,OBJECTIVE-C, it is available in almost all GCC-supported platforms. However, porting the core framework is a more daunting task.

To be sure, the Foundation framework already has the broadest cross-platform support. Cocoa and some high-level frameworks are often unavailable on other platforms. There are exceptions, and if you want to run the app on a platform other than OS X, you should be careful when considering using the GUI framework.

The best support for using OBJECTIVE-C and cocoa frameworks is the main GNUstep and Cocotron. These two open source projects use a completely different approach to porting technology, but the result is the same, which supports writing and compiling objective-c code using Cocoa and foundation on Linux, Windows, BSD, and other platforms.

GNUstep

Because of its long history, the GNUstep project has some of the best support for foundation and cocoa. However, because their real goal is to replicate the NEXTSTEP environment instead of simulating the native component set of the Mac OS X or platform running the app, which actually contains the set of components for the entire NEXTSTEP environment. This means that if you choose to port the app to Windows through the project, your app will look like a NeXTSTEP app when it runs on Windows. This includes all aspects of the type of menu you are using. In addition, there are some issues related to the file system required to run the GNUstep application. Finally, to be sure, in order to run a gnuste program on Windows, you must install the full GNUstep file system along with a number of support libraries. All this can be confusing for an ordinary user. For completeness, it should be mentioned here that some efforts have been made to add skin support to GNUstep over the past few years. So you can at least create a Windows app and use Windows
Set of components. In other words, GNUstep is committed to the portability of graphics applications and continues to improve, but it's not perfect at the moment. In summary, for the foundation framework, GNUstep's projects have some of the best and most comprehensive support available everywhere. I want to say that if your application is a command-line application, such as a server, and you intend to port to Windows or Linux, then the GNUstep project will likely help you achieve this. It can be said that a better way to take advantage of out-of-the-box code that has already been written on Mac OS X and ported to Windows is to use Objective-c and GNUstep to migrate the backend and the underlying non-interface code. You can write a native graphical application that communicates through interprocess communication or links it as a library. This can be done with both worlds. On the one hand, it unifies the business logic code, but also can provide the user with familiar native user interface. For more information about the GNUstep project, you can access their site http://www.gnustep.org.

Cocotron

Another recent cross-platform objective-c attempt is the creation of a Cocotron project. The Cocotron project takes a different approach to porting the app to a platform other than MacOS X. Cocotron provides a cross-compiler environment for Xcode so you can cross-compile your app on the Mac OS X platform in Xcode. With this cross-compiler, you can compile Windows, Linux, or other Unix desktop versions. Applications that cross-compile in this way, look and feel and behavior are consistent with native applications. Cocotron works by leveraging Xcode's ability to support multiple toolchain and SDKs when compiling code. When compiling code for Iphoneos or Mac OS X, the technique of just clicking on a button allows Cocotron to perform its power. If you think Mac OS X and Xcode are the most enjoyable development environments, Cocotron is the perfect solution. It supports all development on Mac OS X and then simply changes the SDK and recompile the app for the target platform. That doesn't seem to be enough, Cocotron also has some of the best third-party support for the Cocoa and foundation framework. Its implementation is sufficient to develop Cocotron commercial-grade applications that are deployed simultaneously on Mac OS X and Windows platforms. Cocotron is relatively lagging behind in the largest areas of network, threading and some high-level framework support. But it's working hard, and if you have enough budget, you can even make a pact with Cocotron's maintainers to improve the specific library you need for your application.

  

"Excerpt" on the Windows platform using objective-c

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.