25.02.2020

Inessential: Why I Develop For Mac

Important: This document is no longer being updated. For the latest information about Apple SDKs, visit the. The OS X operating system combines a stable core with advanced technologies to help you deliver world-class products on the Mac platform. Knowing what these technologies are, and how to use them, can help streamline your development process, while giving you access to key OS X features. At a Glance This guide introduces you to the range of possibilities for developing Mac software, describes the many technologies you can use for software development, and points you to sources of information about those technologies.

It does not describe user-level system features or features that have no impact on software development. OS X Has a Layered Architecture with Key Technologies in Each Layer It’s helpful to view the implementation of OS X as a set of layers. The lower layers of the system provide the fundamental services on which all software relies. Subsequent layers contain more sophisticated services and technologies that build on (or complement) the layers below. Figure I-1 Layers of OS X The lower the layer a technology is in, the more specialized are the services it provides.

Generally, technologies in higher layers incorporate lower-level technologies to provide common app behaviors. A good rule of thumb is to use the highest-level programming interface that meets the goals of your app. Here is a brief summary of the layers of OS X. The Cocoa (Application) layer includes technologies for building an app’s user interface, for responding to user events, and for managing app behavior.

The Media layer encompasses specialized technologies for playing, recording, and editing audiovisual media and for rendering and animating 2D and 3D graphics. The Core Services layer contains many fundamental services and technologies that range from Automatic Reference Counting and low-level network communication to string manipulation and data formatting. The Core OS layer defines programming interfaces that are related to hardware and networking, including interfaces for running high-performance computation tasks on a computer’s CPU and GPU.

The Kernel and Device Drivers layer consists of the Mach kernel environment, device drivers, BSD library functions ( libSystem), and other low-level components. The layer includes support for file systems, networking, security, interprocess communication, programming languages, device drivers, and extensions to the kernel. Relevant Chapters:, You Can Create Many Different Kinds of Software for Mac Using the developer tools and system frameworks, you can develop a wide variety of software for Mac, including the following:. Apps.

Apps help users accomplish tasks that range from creating content and managing data to connecting with others and having fun. OS X provides a wealth of system technologies such as app extensions and handoff, that you use to extend the capabilities of your apps and enhance the experience of your users.

Frameworks and libraries. Frameworks and libraries enable code sharing among apps. Command-line tools and daemons.

Command-line tools allow sophisticated users to manipulate data in the command-line environment of the Terminal app. Daemons typically run continuously and act as servers for processing client requests. App plug-ins and loadable bundles. Plug-ins extend the capabilities of other apps; bundles contain code and resources that apps can dynamically load at runtime.

Inessential: Why I Develop For Mac Free

System plug-ins. System plug-ins, such as audio units, kernel extensions, I/O Kit device drivers, preference panes, Spotlight importers, and screen savers, extend the capabilities of the system.

Relevant Chapter: When Porting a Cocoa Touch App, Be Aware of API Similarities and Differences The technology stacks on which Cocoa and Cocoa Touch apps are based have many similarities. Some system frameworks are identical (or nearly identical) in each platform, including Foundation, Core Data, and AV Foundation. This commonality of API makes some migration tasks—for example, porting the data model of your Cocoa Touch app—easy. Other migration tasks are more challenging because they depend on frameworks that reflect the differences between the platforms. For example, porting controller objects and revising the user interface are more demanding tasks because they depend on AppKit and UIKit, which are the primary app frameworks in the Cocoa and CocoaTouch layers, respectively.

See Also Apple provides developer tools and additional information that support your development efforts. Xcode, Apple’s integrated development environment, helps you design, create, debug, and optimize your software. You can download Xcode from the Mac App Store.

For an overview of the developer tools for OS X, see the. For an overview Xcode functionality, read. The OS X Developer Library contains the documentation, sample code, tutorials, and other information you need to write OS X apps. You can access the OS X Developer Library from the or from Xcode. In Xcode, choose Help Documentation and API Reference to view documents and other resources in the Organizer window.

Inessential: Why I Develop For Mac

In addition to the OS X Developer Library, there are other sources of information on developing different types of software for Mac:. Apple Open Source. Apple makes major components of OS X—including the UNIX core—available to the developer community. To learn about Apple’s commitment to Open Source development, visit. To learn more about some specific Open Source projects, such as Bonjour and WebKit, visit. Berkeley Software Distribution (BSD) is an essential UNIX-based part of the OS X kernel environment.

Several excellent books on BSD and UNIX are available in bookstores. But you can also find additional information on any of the websites that cover BSD variants—for example,. Third-party books.

Several excellent books on Mac app development can be found online and in the technical sections of bookstores.

It may be aimed at developers but most Mac users should spend a little time getting to know Safari’s Develop Menu. This is because it provides tools most Mac users will need from time to time. What is the Safari Develop Menu? Because most of the tools offered within the menu are aimed at Web developers, you don’t see Safari Develop Menu by default. To use it you must enable it in Safari Preferences.

Click on the Advanced tab and check the box beside the phrase “Show Develop menu in menu bar” at the bottom of the pane. You will now see a new Menu item appear between your Bookmarks and Windows menus. Related: Most Mac users won’t need to make use of all the tools it provides, but what follows are some tasks most Mac users may find useful from time-to-time. You can find out more about the other tools it provides. You can empty Safari caches If your Safari browser becomes slow or some websites fail to load it is possible that cache files have become corrupted. These files contain website data such as images and templates and are collected by Safari in an attempt to speed up page load times. Use the 'Empty Caches' command to get rid of this data, which may sometimes improve browser performance.

You can swiftly launch websites in different browsers If you visit a website that doesn’t seem to want to work with Safari because some web designer failed to read the memo that explains how the Internet is built using shared standards, then you can quickly launch that site using another browser you may have installed on your Mac. Just choose ‘Open Page With’ and select the alternate browser you would like to use. You can pretend to be using a different browser It’s quite useful to be able to open a stubborn page in an alternate browser, but you can also try to convince websites that you are already using a different browser using Safari Develop Menu. Select ‘User Agent’ and you will see a drop down menu listing a range of alternate desktop and mobile browsers including Safari, Internet Explorer, FireFox and Chrome. Select one of these and Safari will try to convince the website you are trying to visit that it is one of these alternate browses by sending a different user agent.

(The user agent is a string of text your browser sends that lets the site know which browser you are using). This doesn’t always work but you’ll often find sites that claim not to support Safari actually do, once you use this trick.

You can figure out why some sites suck system resources If you’ve ever visited a website that is poorly engineered with lots of orphaned code or what not then you may have seen that site impact your whole web browser. Eventually you need to restart it. That’s not such a big deal but it is annoying. If you think you have come across such a site you can get the evidence you need:. Just visit the site and choose Start Timeline Recording.

Inessential: Why I Develop For Mac Download

Hit refresh and you’ll see a visual real time representation of what happens when you try to load that website. Or use Web Inspector to see all those elements in one place or to identify image/video files on a site.

You can see what a site looks like on an iPhone Just choose ‘Enter Responsive Design Mode’ and you can take a look at how the site you are on looks on different Apple devices. One more thing Safari also boasts a hidden debug menu. You access this using a Terminal script. It provides a range of useful commands, including the capacity to ‘Reset your Top Sites’, ‘Synch your iCloud History’ and to see all the resources used by any website you happen to be one. Is what you need to know about the debug menu.

If you use social media and happen to be a Google+ user, why not join and join the conversation as we pursue the spirit of the New Model Apple? Or in comments below and let me know. I'd like it if you chose to follow me on Twitter so I can let you know when fresh items are published here first on Computerworld.