プロジェクトに問題があります。アプリケーションのデバッグ時にアサーション メッセージを出力せず、アプリがクラッシュします。通常、次のように表示されます。
2017-02-05 20:13:54.687 MyPlayground[29372:221950] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.6.21/UITableView.m:1610
2017-02-05 20:13:54.690 MyPlayground[29372:221950] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (10) must be equal to the number of rows contained in that section before the update (10), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'
しかし、私が得るのは最初のメッセージだけです。アサーションが失敗したことだけを知っており、その理由についての説明はありません。これにより、クラッシュの原因がわからないため、デバッグが本来よりもはるかに困難になります。
2017-02-05 20:07:00.958 myProject[28876:215448] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.6.21/UITableView.m:1315
周りを見回したところ、最適化がオンになっていることが原因ではないかと誰かが示唆していましたが、そうではありません。プロジェクトとターゲットの両方でデバッグの最適化が [なし] に設定されており、プロジェクトをデバッグ構成で実行していると確信しています。できる限りのことを試しましたが、これまでのところ何も役に立ちませんでした。これが何であるかのアイデアが不足しています。
私はXcode 8を使用しています。プロジェクトはSwift 3.0 + Objective-Cが混在しています。以前はココアポッドを持っていましたが、カルタゴに切り替えました (これが役立つことを願っていましたが、そうではありませんでした)。