Skip to content

Commit

Permalink
Mac OS X -> OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Sep 8, 2014
1 parent 85f430e commit aa4840f
Show file tree
Hide file tree
Showing 39 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion 2012-10-15-addressbookui.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ United States

Nowhere else in all of the other frameworks is this functionality provided. It's not part of [`NSLocale`](http://nshipster.com/nslocale/), or even Map Kit or Core Location. For all of the care and attention to detail that Apple puts into localization, it's surprising that such an important task is relegated to the corners of an obscure, somewhat-unrelated framework.

> Unfortunately, Address Book UI is not available in Mac OS X, and it would appear that there's no equivalent function provided on this platform.
> Unfortunately, Address Book UI is not available in OS X, and it would appear that there's no equivalent function provided on this platform.
For you see, address formats vary greatly across different regions. For example, addresses in the United States take the form:

Expand Down
2 changes: 1 addition & 1 deletion 2012-11-19-ns_enum-ns_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ And on that note, this week's topic has to do with two simple-but-handy macros:

---

Introduced in Foundation with iOS 6 / Mac OS X 10.8, the `NS_ENUM` and `NS_OPTIONS` macros are the new, preferred way to declare `enum` types.
Introduced in Foundation with iOS 6 / OS X Mountain Lion, the `NS_ENUM` and `NS_OPTIONS` macros are the new, preferred way to declare `enum` types.

> If you'd like to use either macro when targeting a previous version of iOS or OS X, you can simply inline like so:
Expand Down
2 changes: 1 addition & 1 deletion 2012-11-26-nsorderedset.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ However, to reap any benefit from this arrangement, all of the existing APIs wou

---

`NSOrderedSet` was introduced in iOS 5 & Mac OS X 10.7. The only APIs changed to add support for `NSOrderedSet`, though, were part of [Core Data](http://developer.apple.com/library/mac/#releasenotes/DataManagement/RN-CoreData/_index.html).
`NSOrderedSet` was introduced in iOS 5 & OS X Lion. The only APIs changed to add support for `NSOrderedSet`, though, were part of [Core Data](http://developer.apple.com/library/mac/#releasenotes/DataManagement/RN-CoreData/_index.html).

This was fantastic news for anyone using Core Data at the time, as it solved one of the long-standing annoyances of not having a way to arbitrarily order relationship collections. Previously, you'd have to add a `position` attribute, which would be re-calculated every time a collection was modified. There wasn't a built-in way to validate that your collection positions were unique or that the sequence didn't have any gaps.

Expand Down
2 changes: 1 addition & 1 deletion 2012-12-17-cggeometry.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ excerpt: "Unless you were a Math Geek or an Ancient Greek, Geometry was probably

Unless you were a Math Geek or an Ancient Greek, Geometry was probably not your favorite subject in high school. No, chances are that you were that kid in class who dutifully programmed all of the necessary formulæ into your TI-8X calculator.

So for those of you who spent more time learning TI-BASIC than Euclidean geometry, here's the cheat-sheet for how geometry works in [Quartz 2D][1], the drawing system used in iOS and Mac OS X:
So for those of you who spent more time learning TI-BASIC than Euclidean geometry, here's the cheat-sheet for how geometry works in [Quartz 2D][1], the drawing system used in iOS and OS X:

- A `CGPoint` is a struct that represents a point in a two-dimensional coordinate system. For iOS, the origin is at the top-left, so points move right and down as their `x` and `y` values, respectively, increase. OS X, by contrast, is oriented with `(0, 0)` in the bottom left, with `y` moving up as it increases.

Expand Down
6 changes: 3 additions & 3 deletions 2013-01-14-__attribute__.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ To check the availability of a particular attribute, you can use the `__has_attr
void f(void) __attribute__((availability(macosx,introduced=10.4,deprecated=10.6,obsoleted=10.7)));
~~~

> The `availability` attribute states that `f` was introduced in Mac OS X 10.4, deprecated in Mac OS X 10.6, and obsoleted in Mac OS X 10.7.
> The `availability` attribute states that `f` was introduced in OS X Tiger, deprecated in OS X Snow Leopard, and obsoleted in OS X Lion.
> This information is used by Clang to determine when it is safe to use `f`: for example, if Clang is instructed to compile code for Mac OS X 10.5, a call to f() succeeds. If Clang is instructed to compile code for Mac OS X 10.6, the call succeeds but Clang emits a warning specifying that the function is deprecated. Finally, if Clang is instructed to compile code for Mac OS X 10.7, the call fails because `f()` is no longer available.
> This information is used by Clang to determine when it is safe to use `f`: for example, if Clang is instructed to compile code for OS X Leopard, a call to f() succeeds. If Clang is instructed to compile code for OS X Snow Leopard, the call succeeds but Clang emits a warning specifying that the function is deprecated. Finally, if Clang is instructed to compile code for OS X Lion, the call fails because `f()` is no longer available.
> The `availability` attribute is a comma-separated list starting with the platform name and then including clauses specifying important milestones in the declaration's lifetime (in any order) along with additional information.
Expand All @@ -128,7 +128,7 @@ void f(void) __attribute__((availability(macosx,introduced=10.4,deprecated=10.6,
Supported Platforms:

- `ios`: Apple’s iOS operating system. The minimum deployment target is specified by the `-mios-version-min=*version*` or `-miphoneos-version-min=*version*` command-line arguments.
- `macosx`: Apple’s Mac OS X operating system. The minimum deployment target is specified by the `-mmacosx-version-min=*version*` command-line argument.
- `macosx`: Apple’s OS X operating system. The minimum deployment target is specified by the `-mmacosx-version-min=*version*` command-line argument.

### `overloadable`

Expand Down
4 changes: 2 additions & 2 deletions 2013-02-11-nsurlcache.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ As of iOS 5, a shared `NSURLCache` is set for the application by default. [Quoth

> Applications that do not have special caching requirements or constraints should find the default shared cache instance acceptable. An application with more specific needs can create a custom NSURLCache object and set it as the shared cache instance using setSharedURLCache:. The application should do so before any calls to this method.
Those having such special caching requirements can set a shared URL cache in `-application:didFinishLaunchingWithOptions:` on iOS, or `–applicationDidFinishLaunching:` on Mac OS X:
Those having such special caching requirements can set a shared URL cache in `-application:didFinishLaunchingWithOptions:` on iOS, or `–applicationDidFinishLaunching:` on OS X:

~~~{objective-c}
- (BOOL)application:(UIApplication *)application
Expand Down Expand Up @@ -183,7 +183,7 @@ As of iOS 5, disk caching is supported, but only for HTTP, not HTTPS, requests (

---

`NSURLCache` reminds us of how important it is to be familiar with the systems we interact with. Chief among them when developing for iOS or Mac OS X is, of course, the [URL Loading System](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html#//apple_ref/doc/uid/10000165i).
`NSURLCache` reminds us of how important it is to be familiar with the systems we interact with. Chief among them when developing for iOS or OS X is, of course, the [URL Loading System](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html#//apple_ref/doc/uid/10000165i).

Untold numbers of developers have hacked together an awkward, fragile system for network caching functionality, all because they weren't aware that `NSURLCache` could be setup in two lines and do it 100× better. Even more developers have never known the benefits of network caching, and never attempted a solution, causing their apps to make untold numbers of unnecessary requests to the server.

Expand Down
2 changes: 1 addition & 1 deletion 2013-02-18-reactivecocoa.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Capturing and responding to changes has a long tradition in Cocoa, and ReactiveC

[Bindings](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/CocoaBindings.html) are magic—voodoo, really.

Although essential to managing the complexity of a Mac OS X application, Bindings' cultural relevance has waned for years, as the focus has shifted to iOS and UIKit, which notably lacks support. Bindings replace a lot of boilerplate glue code and allow programming to be done in Interface Builder, but they're severely limited and _impossible_ to debug. RAC offers a clear, understandable, and extensible code-based API that works in iOS and is apt to replace all but the most trivial uses of bindings in your OS X application.
Although essential to managing the complexity of a OS X application, Bindings' cultural relevance has waned for years, as the focus has shifted to iOS and UIKit, which notably lacks support. Bindings replace a lot of boilerplate glue code and allow programming to be done in Interface Builder, but they're severely limited and _impossible_ to debug. RAC offers a clear, understandable, and extensible code-based API that works in iOS and is apt to replace all but the most trivial uses of bindings in your OS X application.

---

Expand Down
4 changes: 2 additions & 2 deletions 2013-03-04-backrow.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ That's right: this edition of NSHipster covers a topic so obscure, _it doesn't e

---

Back Row is a private framework used in the Apple TV user experience. Its name is a reference to [Front Row][1], an application included in Mac OS X 10.4 – 10.6 that paired with the Apple Remote to transform the Mac into a couch-friendly media center.
Back Row is a private framework used in the Apple TV user experience. Its name is a reference to [Front Row][1], an application included in OS X Tiger – 10.6 that paired with the Apple Remote to transform the Mac into a couch-friendly media center.

The original Apple TV could be described as a "short Mac Mini", which ran a modified version of Front Row on a stripped-down build of Mac OS X. It was little more than an iTunes remote, streaming content from a shared iTunes library on a separate computer.
The original Apple TV could be described as a "short Mac Mini", which ran a modified version of Front Row on a stripped-down build of OS X. It was little more than an iTunes remote, streaming content from a shared iTunes library on a separate computer.

The second generation of the device took a smaller form factor, shifting its focus from media storage and management to on-demand streaming. The second generation Apple TV user interface reflected this in both its design and implementation. BackRow was ported from OS X to iOS, as it transcended its original role coordinating iTunes libraries to become an extensible platform for streaming media appliances.

Expand Down
2 changes: 1 addition & 1 deletion 2013-03-25-search-kit.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If only everyone knew that they could harness the same killer search functionali

Search Kit is a C framework for searching and indexing content in human languages. It supports matching on phrase or partial word, including logical (`AND`, `OR`) and wildcard (`*`) operators, and can rank results by relevance. Search Kit also provides document summarization, which is useful for generating representative excerpts. And best of all: it's thread-safe.

All of the whiz-bang search-as-you-type features in Mac OS X—from Mail.app and Xcode to System Preferences and Spotlight—use Search Kit under the hood.
All of the whiz-bang search-as-you-type features in OS X—from Mail.app and Xcode to System Preferences and Spotlight—use Search Kit under the hood.

But to understand how Search Kit does its magic, it's important to explain some of the basics of Information Retrieval and Natural Language Processing.

Expand Down
2 changes: 1 addition & 1 deletion 2013-04-15-nssecurecoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A short post for this week: everything you need to know about `NSSecureCoding`.

---

`NSSecureCoding` is a protocol introduced in the iOS 6 / Mac OS X 10.8 SDKs. Aside from a few mentions at WWDC, `NSSecureCoding` remains relatively obscure—most developers have perhaps heard of it, but perhaps never went so far as to look up what it does.
`NSSecureCoding` is a protocol introduced in the iOS 6 / OS X Mountain Lion SDKs. Aside from a few mentions at WWDC, `NSSecureCoding` remains relatively obscure—most developers have perhaps heard of it, but perhaps never went so far as to look up what it does.

`NSSecureCoding` extends the `NSCoding` protocol by adding the class method `supportsSecureCoding`:

Expand Down
2 changes: 1 addition & 1 deletion 2013-05-13-nscoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ excerpt: "Among the most important architectural decisions made when building an

Among the most important architectural decisions made when building an app is how to persist data between launches. The question of how, exactly, to re-create the state of the app from the time it was last opened; of how to describe the object graph in such a way that it can be flawlessly reconstructed next time.

On iOS and Mac OS X, Apple provides two options: [Core Data][1] or [`NSKeyedArchiver`][2] / [`NSKeyedUnarchiver`][3] (which serializes `<NSCoding>`-compliant classes to and from a data representation).
On iOS and OS X, Apple provides two options: [Core Data][1] or [`NSKeyedArchiver`][2] / [`NSKeyedUnarchiver`][3] (which serializes `<NSCoding>`-compliant classes to and from a data representation).

> Or rather: three, if you include `NSURLCache`. In the case of a client-server application, having the client load necessary data on each launch is a viable design, especially when combined with a disk-based cache, which allows stored server responses to be returned immediately from matching requests. In practice, some combination of network and object caching is advisable.
Expand Down
6 changes: 3 additions & 3 deletions 2013-05-20-core-data-libraries-and-utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ Fortunately, there are a wealth of open-source libraries that can help alleviate

#### [RestKit](https://github.com/RestKit/RestKit)

> RestKit is a modern Objective-C framework for implementing RESTful web services clients on iOS and Mac OS X. It provides a powerful [object mapping](https://github.com/RestKit/RestKit/wiki/Object-mapping) engine that seamlessly integrates with [Core Data](http://developer.apple.com/library/mac/#documentation/cocoa/Conceptual/CoreData/cdProgrammingGuide.html) and a simple set of networking primitives for mapping HTTP requests and responses built on top of [AFNetworking](https://github.com/AFNetworking/AFNetworking). It has an elegant, carefully designed set of APIs that make accessing and modeling RESTful resources feel almost magical.
> RestKit is a modern Objective-C framework for implementing RESTful web services clients on iOS and OS X. It provides a powerful [object mapping](https://github.com/RestKit/RestKit/wiki/Object-mapping) engine that seamlessly integrates with [Core Data](http://developer.apple.com/library/mac/#documentation/cocoa/Conceptual/CoreData/cdProgrammingGuide.html) and a simple set of networking primitives for mapping HTTP requests and responses built on top of [AFNetworking](https://github.com/AFNetworking/AFNetworking). It has an elegant, carefully designed set of APIs that make accessing and modeling RESTful resources feel almost magical.
#### [AFIncrementalStore](https://github.com/AFNetworking/AFIncrementalStore)

> AFIncrementalStore is an NSIncrementalStore subclass that uses AFNetworking to automatically request resources as properties and relationships are needed.
#### [MMRecord](https://github.com/mutualmobile/MMRecord)

> MMRecord is a block-based seamless web service integration library for iOS and Mac OS X. It leverages the Core Data model configuration to automatically create and populate a complete object graph from an API response. It works with any networking library, is simple to setup, and includes many popular features that make working with web services even easier.
> MMRecord is a block-based seamless web service integration library for iOS and OS X. It leverages the Core Data model configuration to automatically create and populate a complete object graph from an API response. It works with any networking library, is simple to setup, and includes many popular features that make working with web services even easier.
#### [SLRESTfulCoreData](https://github.com/OliverLetterer/SLRESTfulCoreData)

Expand All @@ -217,7 +217,7 @@ Whereas adapters synchronize information through an existing, general purpose in

### [TICoreDataSync](https://github.com/nothirst/TICoreDataSync)

> Automatic synchronization for Core Data Apps, between any combination of Mac OS X and iOS: Mac to iPhone to iPad to iPod touch and back again
> Automatic synchronization for Core Data Apps, between any combination of OS X and iOS: Mac to iPhone to iPad to iPod touch and back again
#### [UbiquityStoreManager](https://github.com/lhunath/UbiquityStoreManager)

Expand Down
4 changes: 2 additions & 2 deletions 2013-07-01-enumerators.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Apple recommends that you use `NSFastEnumeration` `for/in`-style enumeration for

## `NSEnumerator`

But of course, before `NSFastEnumeration` (circa OS X 10.5 / iOS 2.0), there was the venerable `NSEnumerator`.
But of course, before `NSFastEnumeration` (circa OS X Leopard / iOS 2.0), there was the venerable `NSEnumerator`.

For the uninitiated, `NSEnumerator` is an abstract class that implements two methods:

Expand Down Expand Up @@ -126,7 +126,7 @@ Some quick points of interest about `NSEnumeration`:

## Enumerate With Blocks

Finally, with the introduction of blocks in OS X 10.6 / iOS 4, came a new block-based way to enumerate collections:
Finally, with the introduction of blocks in OS X Snow Leopard / iOS 4, came a new block-based way to enumerate collections:

~~~{objective-c}
[array enumerateObjectsUsingBlock:^(id object, NSUInteger idx, BOOL *stop) {
Expand Down
2 changes: 1 addition & 1 deletion 2013-07-08-nsexpression.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ id value = [expression expressionValueWithObject:nil context:nil]; // => 3.21859
If you found the [Key-Value Coding Simple Collection Operators](http://nshipster.com/kvc-collection-operators/) (`@avg`, `@sum`, et al.) lacking, perhaps `NSExpression`'s built-in statistical, arithmetic, and bitwise functions will pique your interest.

> **A word of caution**: [according to this table in Apple's documentation for `NSExpression`](http://developer.apple.com/library/ios/#documentation/cocoa/reference/foundation/Classes/NSExpression_Class/Reference/NSExpression.html), there is apparently no overlap between the availability of functions between Mac OS X & iOS. It would appear that recent versions of iOS do, indeed, support functions like `stddev:`, but this is not reflected in headers or documentation. Any details [in the form of a pull request](https://github.com/NSHipster/articles/pulls) would be greatly appreciated.
> **A word of caution**: [according to this table in Apple's documentation for `NSExpression`](http://developer.apple.com/library/ios/#documentation/cocoa/reference/foundation/Classes/NSExpression_Class/Reference/NSExpression.html), there is apparently no overlap between the availability of functions between OS X & iOS. It would appear that recent versions of iOS do, indeed, support functions like `stddev:`, but this is not reflected in headers or documentation. Any details [in the form of a pull request](https://github.com/NSHipster/articles/pulls) would be greatly appreciated.
### Statistics

Expand Down
2 changes: 1 addition & 1 deletion 2013-08-05-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Every modern programming language has comments: non-executable natural language

In Objective-C, the documentation tool of choice is [`appledoc`](https://github.com/tomaz/appledoc). Using a [Javadoc](http://en.wikipedia.org/wiki/Javadoc)-like syntax, `appledoc` is able to generate HTML and Xcode-compatible `.docset` docs from `.h` files that [look nearly identical](http://cocoadocs.org/docsets/AFNetworking/1.3.1/Classes/AFHTTPClient.html) to [Apple's official documentation](https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html).

> [Doxygen](http://www.stack.nl/~dimitri/doxygen/), used primarily for C++, is another viable option for Objective-C, but is generally dispreffered by the iOS / Mac OS X developer community.
> [Doxygen](http://www.stack.nl/~dimitri/doxygen/), used primarily for C++, is another viable option for Objective-C, but is generally dispreffered by the iOS / OS X developer community.
Here are some examples from well-documented Objective-C projects:

Expand Down
Loading

0 comments on commit aa4840f

Please sign in to comment.