'Swift Package storyboard localization

I'm trying to create a Swift Package with a localized Storyboard inside (following the Apple docs). Let's say my package manifest is:

// swift-tools-version: 5.6
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "MyPackage",
    defaultLocalization: "en",
    products: [
        .library(
            name: "MyPackage",
            targets: ["MyPackage"]),
    ],
    targets: [
        .target(
            name: "MyPackage",
            dependencies: [])
    ]
)

I want my package to contain a localized Storyboard, so I created a structure like this:

enter image description here

where main.strings in en.lproj is:

"T63-i3-Tqi.text" = "Hello World";

and main.strings in it.lproj is:

"T63-i3-Tqi.text" = "Ciao a tutti!";

Then I link this package to an app and I set the app localization to both english and italian. Unfortunately, though, when I change the app language nothing changes. I mean, the app always takes the english localization of the Storyboard. Can you help me? Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source