Skip to content
This repository was archived by the owner on Jun 12, 2025. It is now read-only.

Commit ab5eb10

Browse files
[iOS] Remove no longer needed hack for .module
1 parent c168b20 commit ab5eb10

5 files changed

Lines changed: 15 additions & 49 deletions

File tree

ios/PresentationLayer/UIToolkit/Sources/UIToolkit/Extensions/Bundle+Extensions.swift

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// Created by Petr Chmelar on 30.05.2022
3+
// Copyright © 2022 Matee. All rights reserved.
4+
//
5+
6+
import Foundation
7+
8+
private final class BundleToken {}

ios/PresentationLayer/UIToolkit/Sources/UIToolkit/Utilities/Plurals.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ public enum Plurals: String {
2222

2323
func stringForCount(_ count: Int) -> String {
2424
if count == 0 { // swiftlint:disable:this empty_count
25-
return String(format: NSLocalizedString("zero_\(rawValue)", bundle: .myModule, comment: ""), count)
25+
return String(format: NSLocalizedString("zero_\(rawValue)", bundle: .module, comment: ""), count)
2626
} else if abs(count) == 1 {
27-
return String(format: NSLocalizedString("one_\(rawValue)", bundle: .myModule, comment: ""), count)
27+
return String(format: NSLocalizedString("one_\(rawValue)", bundle: .module, comment: ""), count)
2828
} else if abs(count) > 1 && abs(count) < 5 {
29-
return String(format: NSLocalizedString("few_\(rawValue)", bundle: .myModule, comment: ""), count)
29+
return String(format: NSLocalizedString("few_\(rawValue)", bundle: .module, comment: ""), count)
3030
} else if abs(count) >= 5 {
31-
return String(format: NSLocalizedString("many_\(rawValue)", bundle: .myModule, comment: ""), count)
31+
return String(format: NSLocalizedString("many_\(rawValue)", bundle: .module, comment: ""), count)
3232
} else {
33-
return String(format: NSLocalizedString("other_\(rawValue)", bundle: .myModule, comment: ""), count)
33+
return String(format: NSLocalizedString("other_\(rawValue)", bundle: .module, comment: ""), count)
3434
}
3535
}
3636
}

ios/PresentationLayer/UIToolkit/Sources/UIToolkit/swiftgen-strings.stencil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Revision: 7e13d641745b56775d9a7f983a5468d2d9952ada
44

55
// Modifications:
6-
// - Use `.myModule` [workaround](https://developer.apple.com/forums/thread/664295) to address SwiftUI Previews crashes
76
// - Use snake_case instead of camelCase, this is done by changing `swiftIdentifier:"pretty"` to `swiftIdentifier`
87
// - Ability to change localization via Environment.localization
98

@@ -102,7 +101,7 @@ extension {{enumName}} {
102101
private final class BundleToken {
103102
static let bundle: Bundle = {
104103
#if SWIFT_PACKAGE
105-
return Bundle.myModule
104+
return Bundle.module
106105
#else
107106
return Bundle(for: BundleToken.self)
108107
#endif

ios/PresentationLayer/UIToolkit/Sources/UIToolkit/swiftgen-xcassets.stencil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Revision: 937d05fa32ff389c63f93f0f9e2919d2c461b3c9
44

55
// Modifications:
6-
// - Use `.myModule` [workaround](https://developer.apple.com/forums/thread/664295) to address SwiftUI Previews crashes
76
// - Ensure SwiftUI-first behavior for colors by renaming `.color` to `.uiColor` and `.swiftUIColor` to `.color`
87
// - Ensure SwiftUI-first behavior for images by renaming `.image` to `.uiImage` and `.swiftUIImage` to `.image`
98

@@ -433,7 +432,7 @@
433432
private final class BundleToken {
434433
static let bundle: Bundle = {
435434
#if SWIFT_PACKAGE
436-
return Bundle.myModule
435+
return Bundle.module
437436
#else
438437
return Bundle(for: BundleToken.self)
439438
#endif

0 commit comments

Comments
 (0)