{"id":17424135,"url":"https://github.com/ctreffs/swiftui-previews-module-resources-fix","last_synced_at":"2025-04-16T00:20:55.433Z","repository":{"id":105030074,"uuid":"498840224","full_name":"ctreffs/swiftui-previews-module-resources-fix","owner":"ctreffs","description":"Swiftui Xcode previews module resources fix","archived":false,"fork":false,"pushed_at":"2022-06-08T14:28:05.000Z","size":48,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T03:11:50.723Z","etag":null,"topics":["resources","spm","swift","swift-package-manager","swiftui","xcode","xcpreviews"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctreffs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-01T17:47:38.000Z","updated_at":"2024-08-23T14:34:53.000Z","dependencies_parsed_at":"2023-03-13T14:51:51.769Z","dependency_job_id":null,"html_url":"https://github.com/ctreffs/swiftui-previews-module-resources-fix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctreffs%2Fswiftui-previews-module-resources-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctreffs%2Fswiftui-previews-module-resources-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctreffs%2Fswiftui-previews-module-resources-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctreffs%2Fswiftui-previews-module-resources-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctreffs","download_url":"https://codeload.github.com/ctreffs/swiftui-previews-module-resources-fix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249174129,"owners_count":21224662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["resources","spm","swift","swift-package-manager","swiftui","xcode","xcpreviews"],"created_at":"2024-10-17T05:06:17.112Z","updated_at":"2025-04-16T00:20:55.389Z","avatar_url":"https://github.com/ctreffs.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swiftui Xcode previews module resources fix\n\nA demo of a fix for a XCPreviewAgent crash due to resource dependencies accross modules.\n\nIt specificially fixes crashes like this:\n\n```swift\nunable to find bundle named \u003cPACKAGE\u003e_\u003cTARGET\u003e\n\n----------------------------------------\n\nCrashReportError: `fatalError` in resource_bundle_accessor.swift\n\nXCPreviewAgent crashed due to fatalError in resource_bundle_accessor.swift at line 27.\n\nunable to find bundle named \u003cPACKAGE\u003e_\u003cTARGET\u003e\n\nProcess: XCPreviewAgent\n\n```\n\n### See the crash\n\nTo see the crash in action: `git switch crash`.   \nThe `crash` branch demonstrates the implementation as it should work with XCPreviews.  \nJust try to open `ModulUI`'s preview.  \n \n### Resouces \n\n- https://forums.swift.org/t/xcode-previews-swiftpm-resources-xcpreviewagent-crashed/51680/8\n- https://stackoverflow.com/questions/64540082/xcode-12-swiftui-preview-doesnt-work-on-swift-package-when-have-another-swift/65789298#65789298\n- https://feedbackassistant.apple.com/feedback/10102512\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctreffs%2Fswiftui-previews-module-resources-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctreffs%2Fswiftui-previews-module-resources-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctreffs%2Fswiftui-previews-module-resources-fix/lists"}