sudo ln -s /Applications/Xcode8_1.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.1\ \(14B72\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.1
まだうまくいったことなし
extension Notification { | |
// MARK: - Identifier | |
enum Identifier: String { | |
case DidChangeSession | |
} | |
// MARK: - UserInfoKey | |
enum UserInfoKey: String { | |
case Session |
/// | |
/// https://stackoverflow.com/a/29741007 | |
/// | |
let s = Struct() // Struct | |
withUnsafePointer(to: s) { | |
print(String(format: "%p", $0) | |
} | |
/// | |
/// http://stackoverflow.com/a/36539213/226791 |
import RealmSwift | |
final class Foo: Object { | |
dynamic var code: String = UUID().uuidString | |
dynamic var timestamp: Date = Date() | |
override static func primaryKey() -> String? { | |
return "code" | |
} |
/// | |
/// MARK: - BadgeButton | |
/// | |
class BadgeButton: UIButton { | |
let badgeLabel: BadgeLabel = BadgeLabel() | |
required init?(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder) | |
initialize() | |
} |
import Foundation | |
public struct Configuration { | |
public static var baseURL: NSURL { | |
return NSURL(string: "\(scheme)://\(host)\(scriptName)")! | |
} | |
private static var scheme: String { | |
return useSSL ? "https" : "http" | |
} |
// | |
// UnwrappedNSNull.swift | |
// WeddingApps | |
// | |
// Created by Kosuke Matsuda on 2016/06/24. | |
// Copyright © 2016年 Appirits Inc. All rights reserved. | |
// | |
import Foundation |
// | |
// https://github.com/Alamofire/Alamofire#response-serialization-1 | |
// | |
import Alamofire | |
import Himotoki | |
protocol ResponseObjectSerializable: Decodable { | |
} |
import UIKit | |
#if DEBUG | |
func exceptionHandler(exception : NSException) { | |
NSLog("CRASH: %@", exception); | |
NSLog("Stack Trace: %@", exception.callStackSymbols); | |
// Internal error reporting | |
} | |
#endif |
# http://bendodson.com/weblog/2014/10/02/showing-todo-as-warning-in-swift-xcode-project/ | |
TAGS="TODO:|FIXME:|WARNING:" | |
echo "searching ${SRCROOT} for ${TAGS}" | |
# find "${SRCROOT}" \( -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/" | |
find "${SRCROOT}/${PROJECT_NAME}" \( -name "*.swift" ! -type d \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/" |