Skip to content

Instantly share code, notes, and snippets.

View arturlector's full-sized avatar

Artur Igberdin arturlector

  • Kazan
View GitHub Profile

Objective-C Coding Convention and Best Practices

Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.

This document is mainly targeted toward iOS development, but definitely applies to Mac as well.

Operators

NSString *foo = @"bar";
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@adamgit
adamgit / .gitignore
Last active March 20, 2025 10:01
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
@dautermann
dautermann / ObjCLinkedList
Created November 13, 2012 19:11
LinkedList implementation in Objective C
// instructions for actually running & trying this out are at the bottom of this file...
@interface LList : NSObject
{
NSInteger _currentValue;
LList * _next;
}
- (void) insert: (NSInteger) valueToInsert;
- (void) printValue;
@nasirkhan
nasirkhan / git command.markdown
Last active May 12, 2022 03:17
`git` discard all local changes/commits and pull from upstream

git discard all local changes/commits and pull from upstream

git reset --hard origin/master

git pull origin master

@hpique
hpique / OSX10.9-notifications.h
Created December 31, 2013 15:13
List of all public notifications in OSX 10.9 (or at least those whose constants are properly named).
// Accounts.framework/Headers/ACAccountStore.h
ACCOUNTS_EXTERN NSString * const ACAccountStoreDidChangeNotification NS_AVAILABLE(10_8, 5_0);
// AddressBook.framework/Headers/ABGlobals.h
extern NSString * const kABDatabaseChangedNotification;
extern NSString * const kABDatabaseChangedExternallyNotification;
// AddressBook.framework/Headers/ABPeoplePickerView.h
extern NSString * const ABPeoplePickerGroupSelectionDidChangeNotification AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
extern NSString * const ABPeoplePickerNameSelectionDidChangeNotification AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
@luvtechno
luvtechno / cocoapods_rank.md
Last active June 11, 2019 14:40
CocoaPods Rank
@nickbauman
nickbauman / ios_imperatives_for_approval.md
Last active November 1, 2019 12:10
Condensed iOS Human Interface Guidelines, formulated as imperatives.

Condensed iOS Human Interface Guidelines

Imperatives for AppStore approval

For iPhone app developers. Emphasis on getting the fastest app store approval. Everything stated as suggestion made into an imperative. When "violating" these imperatives, you can check for yourself what the caveats are. Generally speaking, deviating will more likely cause your app to be hung up in approval.

You can read this entire document in about 20 minutes. This is faster than reading and understanding the entire Human Interface Guidelines.

Overview

### Совершенный код
* [Идеальный программист](http://www.ozon.ru/context/detail/id/7360633/) (Роберт Мартин)
* [Совершенный код](http://www.ozon.ru/context/detail/id/5508646/) (С. Макконнелл)
* [Программист-прагматик. Путь от подмастерья к мастеру](http://www.ozon.ru/context/detail/id/3353337/) (Э.Хант, Д.Томас)
* [Паттерны проектирования](http://www.ozon.ru/context/detail/id/6108824/) (Э. Фримен, Э. Фимен, К. Сьерра, Б. Бейтс)
* [Приемы объектно-ориентированного проектирования. Паттерны проектирования](http://www.ozon.ru/context/detail/id/2457392/) (Э.Гамма, Р.Хелм, Р.Джонсон, Дж.Влиссидес)
* [Чистый код](http://www.ozon.ru/context/detail/id/6733562/) (Роберт Мартин)
* [Принципы, паттерны и методики гибкой разработки на языке C#](http://www.ozon.ru/context/detail/id/5800704/) (Р.С.Мартин, М.Мартин)
* [Рефакторинг с использованием шаблонов](http://www.ozon.ru/context/detail/id/2909721/) (Джошуа Кериевски)
@arturlector
arturlector / ios-questions-interview.md
Last active March 3, 2025 15:02
Вопросы на собеседование iOS разработчика.

Вопросы на собеседование iOS разработчика (дополненное издание):

General:

  • Что такое полиморфизм?

  • Что такое *инкапсуляция? Что такое *нарушение инкапсуляции?

  • Чем абстрактный класс отличается от интерфейса?

  • Расскажите о паттерне MVC. Чем отличается пассивная модель от активной?