Skip to content

Instantly share code, notes, and snippets.

Nikolay Morev kolyuchiy

Block or report user

Report or block kolyuchiy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:772bfc4d1d9ac25eeca0b03a3f26e936
// ==UserScript==
// @name Open LOC in AppCode
// @namespace http://kolia.pp.ru/
// @version 0.2
// @description try to take over the world!
// @author nepolina@yandex-team.ru
// @match https://github.*/*/pull/*
// @grant none
// ==/UserScript==
View ignore_specified_objc_exceptions.py
import lldb
import re
import shlex
# This script allows Xcode to selectively ignore Obj-C exceptions
# based on any selector on the NSException instance
def getRegister(target):
if target.triple.startswith('x86_64'):
return "rdi"
View text.md

Быстрый старт iOS приложения на примере iOS Почты Mail.Ru

Слайд-заголовок

Всем привет! Меня зовут Николай Морев, и я разрабатываю приложение Почты Mail.Ru для iOS. Для тех, кто никогда о нем не слышал, несколько фактов:

О нашем приложении

  • Это email клиент, позволяющий работать с любым почтовым сервисом, а не только
View sample-jb.sh
SANDBOX_PATH=`SSH_TO_DEVICE ipainstaller -i "$BUNDLE_ID" | grep '^Data: ' | awk '{print $2}'`
SANDBOX_PATH="${SANDBOX_PATH//[$'\t\r\n ']}"
COMPLETION_PATH="$SANDBOX_PATH/Documents/$COMPLETION_INDICATOR"
LOG_PATH="$SANDBOX_PATH/Documents/$LOG_NAME"
for i in $(seq 1 $NUMBER_OF_RUNS)
do
SSH_TO_DEVICE open "$BUNDLE_ID"
sleep $MOUNT_SECONDS_PEDIOD
View sample.sh
for i in $(seq 1 $NUMBER_OF_RUNS)
do
$IDEVICEDEBUG --udid "$DEVICE_ID" run "$BUNDLE_ID" >/dev/null 2>/dev/null &
COMPLETION_PATH="$MOUNTPOINT_PATH/$COMPLETION_INDICATOR"
LOG_PATH="$MOUNTPOINT_PATH/$LOG_NAME"
for j in $(seq 1 5)
do
sleep $MOUNT_SECONDS_PEDIOD
View install.sh
APP_BUNDLE="$PROJECT_ROOT/build/${CONFIGURATION}-iphoneos/$PRODUCT.app"
cd "$PROJECT_ROOT/build"
rm -rf Payload; mkdir -p Payload
cp -a "$APP_BUNDLE" Payload/
rm -f MRMail.ipa; zip -r MRMail.ipa Payload
SCP_TO_DEVICE MRMail.ipa root@localhost:
SSH_TO_DEVICE ipainstaller MRMail.ipa
View ios-deploy.sh
APP_BUNDLE="$PROJECT_ROOT/build/${CONFIGURATION}-iphoneos/$PRODUCT.app"
$IOS_DEPLOY --bundle "$APP_BUNDLE" --id "$DEVICE_ID" \
--noninteractive --justlaunch
View build.sh
$XCODEBUILD -project MRMail.xcodeproj -target "$TARGET" -configuration "$CONFIGURATION" \
-destination "platform=iOS" -parallelizeTargets -jobs 4 \
CODE_SIGN_IDENTITY="iPhone Developer" \
MAIN_INFOPLIST_FILE="tools/profiler/Info.plist" \
GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS ENABLE_TIME_LOGGER=1 DISABLE_FLURRY=1'
View LazyImage.m
+ (UIImage *)imageWithBlock:(UIImage *(^)(void))block {
MRLazyImage *lazyImage = [(MRLazyImage *)[self alloc] initWithBlock:block];
return (UIImage *)lazyImage;
}
- (UIImage *)image {
if (!_image && self.block) {
_image = self.block();
self.block = nil;
}
View LayoutLogging.m
static void LayoutLoggingForClassSelector(Class cls, SEL selector) {
static NSMutableDictionary *counters = nil;
if (!counters) {
counters = [NSMutableDictionary dictionary];
}
SEL selector = NSSelectorFromString(selectorName);
[cls aspect_hookSelector:selector withOptions:AspectPositionBefore usingBlock:^(id<AspectInfo> info) {
TLLOG(NL(@"lob %s %p"), class_getName([[info instance] class]), (void *)[info instance]);
} error:nil];
You can’t perform that action at this time.