diff --git a/Actions.xcodeproj/project.pbxproj b/Actions.xcodeproj/project.pbxproj index 617e28b..b2bf5ad 100644 --- a/Actions.xcodeproj/project.pbxproj +++ b/Actions.xcodeproj/project.pbxproj @@ -845,7 +845,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ME2UKFKL5H; + DEVELOPMENT_TEAM = "$(DEVELOPMENT_TEAM)"; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "Intents Extension/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Intents Extension"; @@ -945,6 +945,7 @@ COPY_PHASE_STRIP = NO; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = "$(DEVELOPMENT_TEAM)"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; ENABLE_USER_SCRIPT_SANDBOXING = NO; @@ -1011,6 +1012,7 @@ COPY_PHASE_STRIP = NO; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = YG56YK5RN5; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_USER_SCRIPT_SANDBOXING = NO; @@ -1042,7 +1044,7 @@ CODE_SIGN_ENTITLEMENTS = Shared/Actions.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ME2UKFKL5H; + DEVELOPMENT_TEAM = "$(DEVELOPMENT_TEAM)"; ENABLE_BITCODE = NO; "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES; ENABLE_PREVIEWS = YES; diff --git a/Config.xcconfig b/Config.xcconfig index 28e2569..9712d2e 100644 --- a/Config.xcconfig +++ b/Config.xcconfig @@ -3,4 +3,7 @@ CURRENT_PROJECT_VERSION = 47 // Source for the base of all bundle IDs // -> Intents extensions and app will derive bundleID from here -PRODUCT_BUNDLE_IDENTIFIER = com.sindresorhus.Actions-dev +PRODUCT_BUNDLE_IDENTIFIER = com.sindresorhus.Actions + +// This makes it easier to not commit the dev team +DEVELOPMENT_TEAM = YG56YK5RN5 diff --git a/Shared/Actions/CreateMenuItem.swift b/Shared/Actions/CreateMenuItem.swift index 5ea7415..e80920c 100644 --- a/Shared/Actions/CreateMenuItem.swift +++ b/Shared/Actions/CreateMenuItem.swift @@ -24,61 +24,55 @@ Add an "Add to Variable" action below this to populate a list and then use that ) static var parameterSummary: some ParameterSummary { - When(\.$menuTitle, .hasAnyValue) { - Switch(\.$iconType) { - // MARK: SFSymbol - Case(RMIconType.sfSymbol) { - When(\.$backgroundShape, .notEqualTo, .noBackground) { - Summary("Create \(\.$systemName) with \(\.$menuTitle) and \(\.$subtitle)") { - \.$iconType - \.$foreground - \.$backgroundShape - \.$background - \.$data - } - } otherwise: { - Summary("Create \(\.$systemName) with \(\.$menuTitle) and \(\.$subtitle)") { - \.$iconType - \.$foreground - \.$backgroundShape - \.$background - \.$data - } + Switch(\.$iconType) { + // MARK: SFSymbol + Case(RMIconType.sfSymbol) { + When(\.$backgroundShape, .equalTo, .noBackground) { + Summary("Create \(\.$menuTitle) with \(\.$systemName) and \(\.$subtitle)") { + \.$iconType + \.$foreground + \.$backgroundShape + \.$data } - } - - // MARK: Emoji - Case(RMIconType.emoji) { - When(\.$backgroundShape, .equalTo, .noBackground) { - Summary("Create \(\.$emoji) with \(\.$menuTitle) and \(\.$subtitle)") { - \.$iconType - \.$backgroundShape - \.$background - \.$data - } - } otherwise: { - Summary("Create \(\.$emoji) with \(\.$menuTitle) and \(\.$subtitle)") { - \.$iconType - \.$foreground - \.$backgroundShape - \.$background - \.$data - } + } otherwise: { + Summary("Create \(\.$menuTitle) with \(\.$systemName) and \(\.$subtitle)") { + \.$iconType + \.$foreground + \.$backgroundShape + \.$background + \.$data } } - - DefaultCase { - Summary("Create Item with \(\.$menuTitle) and \(\.$subtitle)") { + } + + // MARK: Emoji + Case(RMIconType.emoji) { + When(\.$backgroundShape, .equalTo, .noBackground) { + Summary("Create \(\.$menuTitle) with \(\.$emoji) and \(\.$subtitle)") { + \.$iconType + \.$foreground + \.$backgroundShape + \.$data + } + } otherwise: { + Summary("Create \(\.$menuTitle) with \(\.$emoji) and \(\.$subtitle)") { \.$iconType + \.$foreground \.$backgroundShape \.$background \.$data } } } - } otherwise: { - // MARK: No Title - Summary("Create Menu Item with \(\.$menuTitle)") + + DefaultCase { + Summary("Create Item with \(\.$menuTitle) and \(\.$subtitle)") { + \.$iconType + \.$backgroundShape + \.$background + \.$data + } + } } } @@ -108,13 +102,12 @@ Use this in combination with background shape to show a background behind your i // SF Symbol @Parameter( - title: "SF Symbol Name", + title: "SF Symbol", description: """ The name of a SF Symbol For available symbols see Apple's website (https://developer.apple.com/sf-symbols/) - """, - default: "plus" + """ ) var systemName: String @@ -189,13 +182,13 @@ The style of the icon's background. // MARK: Menu Item struct MenuItem: TransientAppEntity { init() { - self.init(title: nil, subtitle: nil) + self.init(title: "", subtitle: nil) } static let typeDisplayRepresentation: TypeDisplayRepresentation = "Menu Item" var displayRepresentation: DisplayRepresentation { - let title: LocalizedStringResource = "\(title ?? "")" + let title: LocalizedStringResource = "\(title)" let subtitle: LocalizedStringResource? = if let subtitle { "\(subtitle)" } else { nil } let image: DisplayRepresentation.Image? = if let icon { if #available(iOS 17.0, macOS 14.0, *) { @@ -215,7 +208,7 @@ struct MenuItem: TransientAppEntity { } @Property(title: "Title") - var title: String? + var title: String @Property(title: "Subtitle") var subtitle: String? @@ -224,12 +217,12 @@ struct MenuItem: TransientAppEntity { var icon: IntentFile? init( - title: String? = nil, + title: String, subtitle: String? = nil, icon: Data? = nil ) { if let icon { - self.icon = .init(data: icon, filename: "icon.png", type: .image) + self.icon = .init(data: icon, filename: "icon.png", type: .png) } else { self.icon = nil } @@ -423,7 +416,7 @@ struct RMIconContainer: View { /** Initializes with a an SFSymbol icon with the specified background color - Parameters: - - sfSymbol: SF Symbol Name , + - sfSymbol: SF Symbol , - background: a color - backgroundShape: Shape for the background */