This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### こたらさん(@kotala_b) What's new In Testing | |
VISITSで働いています、4週間目。 | |
WWDCのテストセッションより | |
#### Target selection | |
Xcodeのターゲットも設定でそれぞれにコードカバレッジを出力できる、Xcode9.3から使えるようになっている。 | |
### XCCOV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 関さん(@takasek)Measuring Performance Using Logging | |
> コードたくさん出てきて記録むずいのでセッションビデオと一緒に見てくれ!! | |
Measuring Performance Using Logging - WWDC 2018 - Videos - Apple Developer | |
https://developer.apple.com/videos/play/wwdc2018/405/ | |
os_log というものがあります。WWDC2016から導入された。 | |
2018からsignpost | |
Instrumentsでパフォーマンス計測に使えるように拡張されて軽いのでどんどん使ってくださいとのこと。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 佐藤さん(@hatakenokakashi) High Performance Auto Layout | |
High Performance Auto Layoutというセッションを振り返ります。 | |
MAMORIO株式会社でiOSエンジニアをしています。 | |
High Performance Auto LayoutはiOS12でAutoLayoutのパフォーマンスが上がったことが紹介されている。 | |
#### Independent Sibling Views | |
兄弟関係の、View間で関係のないView同士の描画パフォーマンスが改善された。 | |
#### Dependent Sibling Views・Nested Veiws |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static AppDelegate s_sharedApplication; | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
// request | |
NSURL *url = [NSURL URLWithString:@"http://xxx.appspot.com/"]; | |
NSURLRequest *request = [NSURLRequest requestWithURL:url | |
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData //キャッシュ無視 | |
timeoutInterval:30]; | |
NSURLResponse *response = nil; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
let request = URLRequest(url: URL(string: "http://xxx.appspot.com/")!) | |
NSURLConnection.sendAsynchronousRequest(request, queue: .main) { response, data, error in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PlaygroundSupport | |
let view = UIView(frame: CGRect(x: 0, y:0, width:320, height:44)) | |
view.backgroundColor = UIColor.black | |
PlaygroundPage.current.liveView = view | |
(0...2).forEach { | |
let sushi = UILabel(frame: CGRect(x: 320, y: 0, width: 44, height: 44)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .proto ファイル | |
// これからプログラムを生成したり出来る | |
// https://github.com/apple/swift-protobuf | |
message BookInfo { | |
int64 id = 1; | |
string title = 2; | |
string author = 3; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func get<T: JSONPrimitive>(_ key: String) throws -> T { // この T は型推論で左辺の型になる | |
guard let value = dictionary[key] else { | |
throw JSONDecodeError.missingRequiredKey(key) | |
} | |
// Int に let number: Int = get("key") とすればここは Int にキャストを試み、失敗したらエラーになる。 | |
guard let typed = value as? T else { | |
throw JSONDecodeError.unexpectedType( | |
key: key, | |
expected: T.self, | |
actual: type(of: value)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ProfileResponse: APIResponse { | |
let name: String | |
let age: Int | |
init(json: JSONObject) throws { | |
name = try json.get("name") | |
age = try json.get("age") | |
} | |
} | |
protocol APIEndpoint { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Package( | |
name: String, | |
pkgConfig: String? = nil, | |
providers: [SystemPackageProvider]? = nil, // brew や apt を提案できる。ユーザーに示すだけで実際SwiftPackageManagerが取得代行してくれるわけではない | |
targets: [Target] = [], | |
dependencies: [Package.Dependency] = [], // Versionとして指定できるのはセマンティックバージョニングに沿ったタグだけ。 | |
exclude: [String] = [] | |
) | |
// TestDependencies というテストに必要だが利用者には関係ないパッケージを入れる仕組みが一時あったが無くなった。今後話し合うらしい。 |