Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

delete me #146

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 28 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# NYTimes Objective-C Style Guide
# Tile Objective-C Style Guide

This style guide outlines the coding conventions of the iOS teams at The New York Times. We welcome your feedback in [issues](https://github.com/NYTimes/objective-c-style-guide/issues) and [pull requests](https://github.com/NYTimes/objective-c-style-guide/pulls). Also, [we’re hiring](http://www.nytco.com/careers/).

Thanks to all of [our contributors](https://github.com/NYTimes/objective-c-style-guide/graphs/contributors).
This style guide outlines the coding conventions of the iOS teams at Tile. This guide was highly based off of the [New York Times Objective-C Style Guide](https://github.com/NYTimes/objective-c-style-guide/).

## Introduction

Expand Down Expand Up @@ -40,6 +38,8 @@ This style guide conforms to IETF's [RFC 2119](http://tools.ietf.org/html/rfc211
* [Imports](#imports)
* [Protocols](#protocols)
* [Xcode Project](#xcode-project)
* [Generics](#generics)
* [Nullability Annotations](#nullability-annotations)

## Dot Notation Syntax

Expand Down Expand Up @@ -516,15 +516,29 @@ The physical files SHOULD be kept in sync with the Xcode project files in order

Target Build Setting “Treat Warnings as Errors” SHOULD be enabled. Enable as many [additional warnings](http://boredzo.org/blog/archives/2009-11-07/warnings) as possible. If you need to ignore a specific warning, use [Clang’s pragma feature](http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas).

# Other Objective-C Style Guides
## Generics

All collection (NSArray, NSDictionary, NSSet, etc.) type objects SHOULD use generics.

**For example:**

```objc
NSArray<NSDate *> *dueDates;
NSDictionary<NSNumber *, NSString *> *dataDictionary;
```
## Nullability Annotations

If ours doesn’t fit your tastes, have a look at some other style guides:
Nonnull SHALL be the default nullability annotion. Any nullable references need to be made explicitly.

**For example:**

```objc
NS_ASSUME_NONNULL_BEGIN
@interface Robot : NSObject
@property (copy,readonly) NSString *name;
- (nullable instancetype)initWithName:(NSString *)name;
- (nullable NSString *)tellMeSomething;
@end
NS_ASSUME_NONNULL_END
```

* [Google](http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml)
* [GitHub](https://github.com/github/objective-c-style-guide)
* [Adium](https://trac.adium.im/wiki/CodingStyle)
* [Sam Soffes](https://gist.github.com/soffes/812796)
* [CocoaDevCentral](http://cocoadevcentral.com/articles/000082.php)
* [Luke Redpath](http://lukeredpath.co.uk/blog/2011/06/28/my-objective-c-style-guide/)
* [Marcus Zarra](http://www.cimgf.com/zds-code-style-guide/)
* [Wikimedia](https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/iOS/ObjectiveCStyleGuide)