'Adding SpriteKit scene to Swift Playground App project on Xcode?
I want to add an SKScene (.sks) to my Swift Playground App project (.swiftpm) on Xcode but when I add it to the project navigator I get the following error:
found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
How do I make it work without adding other Swift Packages to the project?
Solution 1:[1]
I had the same problem and I searched everywhere but did not find the solution.
I created new App on Playgrounds and looked into the "Package.swift" file in the root folder of the App using "Show Package Contents" by right clicking on Playgrounds project folder.
On comparing I found that "resources" tag was missing from targets. I added resources tag and assigned the "Resources" folder name and that fixed the issue.
targets: [
.executableTarget(
name: "AppModule",
dependencies: [
.product(name: "Lottie", package: "lottie-ios")
],
path: ".",
resources: [
.process("Resources")
]
)
]
Check if following code is missing from targets in "Package.swift" file.
resources: [ .process("Resources") ]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mayank Bhaisora |
