Skip to content

Commit fee6433

Browse files
committed
Refactor Shortcuts frameworks to fix duplicate entity issue
1 parent 8e2ce31 commit fee6433

File tree

64 files changed

+266
-75
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+266
-75
lines changed

.tool-versions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
ruby 3.3.4
1+
ruby 3.3.4
2+
tuist latest

App/Mobile/Sources/AppShortcutsPackage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Copyright © 2024 Cocoatype, LLC. All rights reserved.
33

44
import AppIntents
5-
import Shortcuts
5+
import AppShortcuts
66

77
struct AppShortcutsPackage: AppIntentsPackage {
88
static var includedPackages: [any AppIntentsPackage.Type] {

App/Mobile/Sources/BarcMobileApp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
// Copyright © 2023 Cocoatype, LLC. All rights reserved.
33

44
import AppIntents
5+
import AppShortcuts
56
import Defaults
67
import ErrorHandling
78
import Navigation
89
import Persistence
910
import Purchasing
1011
import Releases
1112
import Root
12-
import Shortcuts
1313
import SwiftUI
1414
import SwiftUIIntrospect
1515

Modules/Shortcuts/Resources/en.lproj/Localizable.strings renamed to Modules/AppShortcuts/Resources/en.lproj/Localizable.strings

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
// Display name of the barcode entity type
2-
"BarcodeEntity.typeDisplayRepresentation" = "Barcode";
3-
4-
// Display name of the barcode format entity type
5-
"BarcodeFormatEntity.typeDisplayRepresentation" = "Barcode Format";
6-
7-
// Name of the Codabar format
8-
"BarcodeFormatEntity.codabar" = "Codabar";
9-
10-
// Name of the Code 39 format
11-
"BarcodeFormatEntity.code39" = "Code 39";
12-
13-
// Name of the Code 128 format
14-
"BarcodeFormatEntity.code128" = "Code 128";
15-
16-
// Name of the EAN-13 format
17-
"BarcodeFormatEntity.ean13" = "UPC/EAN-13";
18-
19-
// Name of the PDF417 format
20-
"BarcodeFormatEntity.pdf417" = "PDF417";
21-
22-
// Name of the QR format
23-
"BarcodeFormatEntity.qr" = "QR";
24-
251
// Description for the "create code" intent
262
"CreateBarcodeIntent.description" = "Creates a barcode with a given value.";
273

File renamed without changes.

Modules/Shortcuts/Sources/ImageError.swift renamed to Modules/AppShortcuts/Sources/ImageError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Foundation
66
enum ImageError: Error, CustomLocalizedStringResourceConvertible {
77
case cannotCreateImageFromData
88

9-
typealias StringResources = ShortcutsStringResources.ImageError
9+
typealias StringResources = AppShortcutsStringResources.ImageError
1010
var localizedStringResource: LocalizedStringResource {
1111
switch self {
1212
case .cannotCreateImageFromData: StringResources.cannotCreateImageFromData

Modules/Shortcuts/Sources/Intents/CreateBarcodeIntent.swift renamed to Modules/AppShortcuts/Sources/Intents/CreateBarcodeIntent.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Barcodes
66
import ErrorHandling
77
import PDF417
88
import Persistence
9+
import ShortcutsModels
910

1011
struct CreateBarcodeIntent: AppIntent {
1112
static let title: LocalizedStringResource = "CreateBarcodeIntent.title"
@@ -34,9 +35,9 @@ struct CreateBarcodeIntent: AppIntent {
3435
var name: String?
3536

3637
private var codeName: String {
37-
guard let name else { return ShortcutsStrings.CreateBarcodeIntent.defaultName }
38+
guard let name else { return AppShortcutsStrings.CreateBarcodeIntent.defaultName }
3839

39-
if name.isEmpty { return ShortcutsStrings.CreateBarcodeIntent.defaultName }
40+
if name.isEmpty { return AppShortcutsStrings.CreateBarcodeIntent.defaultName }
4041
else { return name }
4142
}
4243

Modules/Shortcuts/Sources/Intents/DisplayBarcodeIntent.swift renamed to Modules/AppShortcuts/Sources/Intents/DisplayBarcodeIntent.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import AppIntents
55
import BarcodeGenerator
66
import ErrorHandling
7+
import ShortcutsModels
78
import SwiftUI
89
import UniformTypeIdentifiers
910

Modules/Shortcuts/Sources/Intents/GetBarcodeValueIntent.swift renamed to Modules/AppShortcuts/Sources/Intents/GetBarcodeValueIntent.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Copyright © 2024 Cocoatype, LLC. All rights reserved.
33

44
import AppIntents
5+
import ShortcutsModels
56

67
struct GetBarcodeValueIntent: AppIntent {
78
static let title: LocalizedStringResource = "GetBarcodeValueIntent.title"

Modules/Shortcuts/Sources/Intents/ListBarcodesIntent.swift renamed to Modules/AppShortcuts/Sources/Intents/ListBarcodesIntent.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Copyright © 2024 Cocoatype, LLC. All rights reserved.
33

44
import AppIntents
5+
import ShortcutsModels
56

67
struct ListBarcodesIntent: AppIntent {
78
static let title: LocalizedStringResource = "ListBarcodesIntent.title"

0 commit comments

Comments
 (0)