You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
SwiftLint 0.22で追加された multiple_closures_with_trailing_closure というルールをご存知でしょうか。これは次のような複数のクロージャを引数に取るAPIを使用する時に、最後の引数のクロージャをTrailing Closureとして渡すことを警告するというルールです。 func fetch(id: Int, success: () -> Void, failure: (Error) -> Void) { ... } // NG fetch( id: 12345, success: { print("success") } ) { error in print("error: \(error)" } // OK fetch( id: 12345, success: { print("success") }, failure: { error
技術部モバイル基盤グループの ヴァンサン です。 西山が 以前紹介したように 、クックパッドでは 2014 年から Swift を使っています。長い間、海外向けのアプリや みんなのお弁当 だけに使われていましたが、去年の5月から、 クックパッド iOS アプリ の開発にも Swift を使うようになりました。歴史のある iOS アプリなので Objective-C でのコードの方がまだ多いのですが、いまは既存の画面の変更を除いて新しいコードが Swift で書かれています。既存の画面を Swift で書き直すこともあります。 Xcode 8.0 がリリースされてから数ヶ月 Swift 2 を使っていましたが、去年の12月のリリース直後に Swift 3 へのマイグレーションをしてから、開発で Swift 3 を使っています。2017年2月1日にリリースされた 17.1.1.0 が Swif
Graydon has been on Swift for a while, and there are a few other prominent Rust contributors there as well. I hope they are enjoying themselves and make good things. Indeed, Huon Wilson and Alexis Beingessner are both at Apple now, and happily they remain active in the Rust community as well (though under no uncertain circumstances are they allowed to submit code).I can understand why this is on H
iOSアプリのライブラリ依存管理ツールとして Swift Package Managerを使うのは まだしばらく先かなと思った話
Apple’s Swift Team is happy to announce that Swift’s benchmark suite is now open source. The suite contains source code for benchmarks, libraries, and utilities designed to help track Swift performance and catch performance regressions before they are committed, including: 75 benchmarks covering a number of important Swift workloads Libraries providing commonly needed benchmarking functions A driv
海外事業向けのiOSアプリケーション開発を担当している西山(@yuseinishiyama)です。クックパッドは現在、海外複数カ国に向けてサービスを展開しています。 主にObjective-Cで記述されたアプリケーションを全面的にSwiftに書き換える機会があったので、その際に得た知見や書き換えるに至った動機を共有します。 書き換えに至るまでの経緯 この項では、書き換えに至るまでの経緯について説明します。 Objective-C期 アプリケーションの開発は2014年7月頃にスタートしました。Swiftの発表直後でしたが、時期尚早ということもあり、Objective-Cで実装することになりました。 Objective-C、Swift混在期 2014年10月頃から、Swiftへの段階的な移行のために、新規のコードをSwiftで書くようになりました。Swiftの記述力や、ヘッダと実装を行き来しな
In a talk last week at Swift Summit, I spoke a bit about Swift and performance, and about how structs and generic functions in Swift allow you to write high-level code without paying a significant performance penalty. This built on the example I posted a couple of weeks back about sorting nibbles in Swift. Towards the end, I gave a couple of lines of code that seemingly behave the same, but are ac
I’ve become a fan of creating one’s own test doubles (aka mock objects) instead of using a mock framework like OCMock or OCMockito. Uncle Bob describes this process in one of his Clean Code videos, and it seems to work very well in Swift. Why create your own mock objects? There are a couple reasons for doing this. Tests can be more readable. I say “can” because its really up to you to create reada
Mar 20, 2015 Objective-Cではテストケース毎にオブジェクトの一部だけ挙動を変えたい場合に、OCMockなどのライブラリを使うのが普通でした。 それらのライブラリはNSInvocationやMethod Swizzlingなどを使ったいわゆる魔術的なコードで実現されていることが多く、 “テストコードを書いているのによくわからんコードが動いてる!”ってなってモヤモヤしたりします。 一方、Swiftではmanual mockingという手法が取られたりするみたいです。 例えば、 class Object { var foo: String { return "foo" } var bar: String { return "bar" } } class ObjectTests: XCTestCase { func testFoo() { class ObjectMock:
Swift is now open source. For the latest news, visit the Swift open source blog Today Swift 1.2 was released as part of Xcode 6.3 beta. This beta release includes a significantly enhanced Swift compiler, as well as new features in the Swift language itself. For the complete list of changes, read the release notes. This blog post will focus on the highlights. Compiler improvementsThe Swift 1.2 comp
TL;DR: CocoaPods 0.36 will bring the long-awaited support for Frameworks and Swift. It isn't released and considered stable yet, but a beta is now available for everyone via [sudo] gem install cocoapods --pre. Pod authors will especially want to try this version to make sure their pods will work with the upcoming release. This is because if a single dependency in a user's project requires being a
この記事ははてなエンジニアアドベントカレンダー2014の16日目です。昨日はid:nobuokaによる「【Retrofit を読む】 利用者が定義したインターフェイスに実装を提供する Java ライブラリの作り方 【リフクレション】」でした。 こんにちは。はてなアプリケーションエンジニアのid:cockscombです。 Webと連携するスマートフォンアプリを開発するとき、Web APIを抽象化したAPIクライアントを作ることがよくあります。これはWeb APIのエンドポイントとメソッドを紐付け、パラメータに名前をつけて、返ってくるJSONのレスポンスを何らかのクラスに当てはめ型付けする、といったようなものになります。 Swiftのモダンな言語機能を利用して、このAPIクライアントを書きましたので、以下に詳解します。例としてGitHubのStatus APIを取り上げています。 またネットワ
この記事は Swift Advent Calendar 2014 の22日目の記事です。 21日目は MeguMegu1978 さんの ローカルルールをSwiftで でした。 はじめに Swift が発表されて半年が経ちました。仕事やプライベートの開発で Swift は書いてますが、記法や設計など、もっと良い方法があるのではないか?といつも思っています。 日常ではまとまった時間を確保するのは難しい、まとまった時間のとれる年末年始に Swift 再入門するぞ! そんな思いでSwift勉強のための書籍・サイトをリストアップしてみました。 Apple公式資料 まずは公式の資料です。 iBooks The Swift Programming Language (Swift 5.5) Apple Inc.ProgrammingFree https://itunes.apple.com/us/book
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く