I am attempting to implement modularization in my iOS app by breaking it down into separate modules utilizing Swift Package deal Supervisor (SPM). Particularly, I’ve created an SPM named ‘Assets’ to deal with string recordsdata and localization. Nonetheless, I’ve encountered a difficulty the place the localization choice will not be obtainable within the file inspector for my string recordsdata throughout the SPM. I’ve noticed that others have their SPM folders displayed with a blue and cogwheel icon in Xcode, however mine do not need cogwheel. Localization works completely positive in the principle undertaking listing, so it appears to be associated to the SPM setup. I’ve looked for info on this downside, however I could not discover any options. I would enormously recognize any steerage or insights into why the localization choice is lacking inside my SPM and the way I can resolve this concern. Thanks in your help.
And right here is my Package deal.swift file
// swift-tools-version: 5.5
// The swift-tools-version declares the minimal model of Swift required to construct this bundle.
import PackageDescription
let bundle = Package deal(
identify: "Assets",
platforms: [
.iOS(.v15)
],
merchandise: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Resources",
targets: ["Resources"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "Resources",
dependencies: []),
.testTarget(
identify: "ResourcesTests",
dependencies: ["Resources"]),
]
)
- I added my bundle into Goal > Frameworks, Libraries and Embedded Content material as a static bundle.
- I’ve ensuted that Mission > Construct Settings > Use Compiler to Extract Swift Strings choice is chosen as sure.
- Use Base Internationalization choice is chosen, however sadly, I’ve zero recordsdata localized as a result of the Localization choice is lacking in my String File’s File Inspector. (Mission > Data > Localizations > Use Base Internationalization)
