2020年7月20日月曜日

UIKit Catalog が Use of unresolved identifier 'UICollectionLayoutListConfiguration' エラーでコンパイルできない

UIKit Catalogの最新版(2020/7/19)を Xcode 11.6 で実行すると以下のような大量のコンパイルエラーになりました。

/UIKitCatalogCreatingAndCustomizingViewsAndControls/UIKitCatalog/OutlineViewController.swift:209:39: Use of undeclared type 'NSDiffableDataSourceSectionSnapshot'
/UIKitCatalogCreatingAndCustomizingViewsAndControls/UIKitCatalog/OutlineViewController.swift:204:33: Use of unresolved identifier 'UICollectionLayoutListConfiguration'

原因は、上記が iOS14 用の新しいクラスであったためでした。
Xcode 12 bata 2 にバージョンアップすることで解消しました。

発生環境は以下の通り

MAC OS Catalina 10.15.6

UIKit Catalog
  • Availability
  • iOS 14.0+ Beta
  • Xcode 11.5+
  • Mac Catalyst 14.0+
XCode
  • Version 11.6 (11E708)
  • Version 12.0 beta 2 (12A6163b)
Overview
Xcode 12 beta 2 includes SDKs for iOS 14, iPadOS 14, tvOS 14, watchOS 7, and macOS 11. The Xcode 12 beta 2 release supports on-device debugging for iOS 9 and later, tvOS 9 and later, and watchOS 2 and later. Xcode 12 beta 2 requires a Mac running macOS Catalina 10.15.4 or later.