Slide 38
Slide 38 text
ղܾࡦ: Development AssetsΛͬͯΞΫηαʔίʔυͷڞ
௨ϞδϡʔϧʹϦιʔεΛຒΊࠐΉ
#if DEBUG
let isInPreviews = ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1"
if isInPreviews {
// Xcode Previewsͷ࣮ߦڥͰ `Bundle(for: BundleFinder.self)` ͕
// Derived Dataͷதͷ `Debug-iphonesimulator` (`BUILT_PRODUCTS_DIR` ૬) Λฦ͢ɻ
if let bundle = Bundle(for: BundleFinder.self)
.url(forResource: "SharedUICommonMediaAssets", withExtension: "framework")
.flatMap(Bundle.init(url:))
{
return bundle
}
}
return Bundle.main
#else
return Bundle.main
#endif
38