Skip to content

Instantly share code, notes, and snippets.

@dodikk
dodikk / 1.md
Created March 13, 2017 10:56
Carthage Time Workaround

Carthage/Carthage#342

I'm not sure if this helps the discussion but I ended up creating a Run Script before Compilation phase in XCode that simply checks a few points. I also exclude the mentioned Carthage/.Cartfile.resolved file from my repo via my .gitignore file. Conditions the script checks:

If Carthage/Build directory exists
If the file Carthage/.Cartfile.resolved exists
If the files Cartfile.resolved and Carthage/.Cartfile.resolved don't differ
@dodikk
dodikk / 1.md
Created March 13, 2017 10:56
Carthage Time Workaround

Carthage/Carthage#342

I'm not sure if this helps the discussion but I ended up creating a Run Script before Compilation phase in XCode that simply checks a few points. I also exclude the mentioned Carthage/.Cartfile.resolved file from my repo via my .gitignore file. Conditions the script checks:

If Carthage/Build directory exists
If the file Carthage/.Cartfile.resolved exists
If the files Cartfile.resolved and Carthage/.Cartfile.resolved don't differ
@dodikk
dodikk / StackTrace.txt
Created March 27, 2017 15:42 — forked from soxjke/StackTrace.txt
RaceCondition2
Thread 5Queue : com.apple.root.user-initiated-qos (concurrent)
#0 0x000000010f181d2b in objc_release ()
#1 0x000000010f1831d1 in (anonymous namespace)::AutoreleasePoolPage::pop(void*) ()
#2 0x00000001125037ce in _dispatch_root_queue_drain ()
#3 0x0000000112503059 in _dispatch_worker_thread3 ()
#4 0x00000001128cb4de in _pthread_wqthread ()
#5 0x00000001128c9341 in start_wqthread ()
@dodikk
dodikk / gist:73ec0ef7e378ed641fd489a5abb48247
Created April 5, 2017 09:32
[ios] Singing frameworks inside other frameworks
[4/5/17, 11:32:17 AM] Shcherbinin Anatoly: @question может кто-нибудь знает как заставить подписываться встроенные в фреймворк фреймворки?
[4/5/17, 11:33:04 AM] Shcherbinin Anatoly: вылетает no suitable image found. Did find:... required code signature missing for...
[4/5/17, 12:01:47 PM] Dmitry Savenok: 1) можно добавить в Other Code Signing Flags строку --deep --force
2) можно добавить build phase в которой делать
codesign --deep --force -v -s "$CODE_SIGN_IDENTITY" "$TARGET_BUILD_DIR/$EXECUTABLE_NAME.app"
лучше 1е
@dodikk
dodikk / BubbleView1.m
Created April 5, 2017 14:23
A chat round rect bubble with triangle on top left or top right.
//
// BubbleView1.m
// ChatBubbleGuiPrototype
//
// Created by Alexander Dodatko on 4/5/17.
// Copyright © 2017 monspace. All rights reserved.
//
#import "BubbleView1.h"
@dodikk
dodikk / ChatRoomView.swift
Last active January 26, 2018 16:15
Bubble code for NMessenger ticket #115
import UIKit
import AsyncDisplayKit
import NMessenger
import VHChatLogic
class ChatRoomView: NMessengerViewController, ViewType
{
public var controller: ChatRoomController?
private let vhBubbleConfig = VHBubbleConfiguration()
override func viewDidLoad()
@dodikk
dodikk / AfnImageCacheForAsdk.swift
Created April 27, 2017 08:51
AlamofireImage integration for AsyncDisplayKit
//
// AfnImageCacheForAsdk.swift
//
// Created by Alexander Dodatko on 4/26/17.
//
import Foundation
import AlamofireImage
import AsyncDisplayKit
enum APIError : ErrorType {
// Can't connect to the server (maybe offline?)
case ConnectionError(error: NSError)
// The server responded with a non 200 status code
case ServerError(statusCode: Int, error: NSError)
// We got no data (0 bytes) back from the server
case NoDataError
// The server response can't be converted from JSON to a Dictionary
case JSONSerializationError(error: ErrorType)
// The Argo decoding Failed
@dodikk
dodikk / Localized.swift
Created May 5, 2017 09:43 — forked from tapoton/Localized.swift
Strongly typed localization for domain grouped strings.
import Foundation
protocol Domain {
associatedtype Parent = Domain
static var name: String { get }
static var fullName: String { get }
}
@dodikk
dodikk / PhotosCameraRoll.m
Created May 19, 2017 14:40 — forked from Koze/PhotosCameraRoll.m
Getting Camera Roll with Photos.framework
PHFetchResult *result = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum
subtype:PHAssetCollectionSubtypeSmartAlbumUserLibrary
options:nil];
PHAssetCollection *assetCollection = result.firstObject;
NSLog(@"%@", assetCollection.localizedTitle);
// Camera Roll