Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/simonnickel/fb13261000-colorfromassetinpackage


https://github.com/simonnickel/fb13261000-colorfromassetinpackage

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Color from Asset in Package crashes Preview in Package

__This is fixed in Xcode 15.3.__

## Scenario

A Swift Package (Package A) has a dependency to Package B.
Package B contains a Color Asset and exposes it to Package A.
Package A contains a Preview using the Color Asset from Package B.

## Issue

The Preview in Package A crashes.

Using the Color Asset in a project instead of a package does not crash the preview.

## Example Code

A Package with an Asset is available at: https://github.com/simonnickel/FB-PackageWithColorAsset.git

The example is a Package using FB-PackageWithColorAsset and a Preview using the color from the package.

Opening the preview crashes.

## Crash

== PREVIEW UPDATE ERROR:

CrashReportError: Fatal Error in resource_bundle_accessor.swift

XCPreviewAgent crashed due to fatalError in resource_bundle_accessor.swift at line 44.

unable to find bundle named FBPackageWithColorAsset_FBPackageWithColorAsset

Full crashlog can be found in Report.txt

## Workaround

There seems to be some kind of workaround: https://developer.apple.com/forums/thread/664295

## Tested on

- Xcode Version 15.0 (15A240d)

## Fixed

This is fixed in Xcode 15.3.