2020 Accessibility & InclusionSwift
WWDC20 · 16 min · Accessibility & Inclusion / Swift
Swift packages: Resources and localization
Bring your resources along for the ride when you organize and share code using Swift packages. Discover how to include assets like images and storyboards in a package and how to access them from code. And learn how to add localized strings to make your code accessible to people around the world. To get the most out of this session, you should be familiar with Swift and packaging code. For an overview, watch “Creating Swift Packages” from WWDC19.
Watch at developer.apple.com ↗Code shown on screen · 1 snippet
Package Manifest file
// swift-tools-version:5.3
import PackageDescription
let package = Package(name: "MyGame",
products: [
.library(name: "GameLogic",
targets: ["GameLogic"])
],
targets: [
.target(name: "GameLogic",
excludes: [
"Internal Notes.txt",
"Artwork Creation"],
resources: [
.process("Logo.png"),
.copy("Game Data")]
)
]
) Resources
Related sessions
-
26 min -
22 min -
24 min -
15 min -
15 min -
8 min -
32 min -
35 min -
33 min -
31 min