Skip to content

Commit

Permalink
add dev_team variable for DEBUG (not release)
Browse files Browse the repository at this point in the history
remove progressive disclosure in summary
  • Loading branch information
NoahKamara committed Sep 27, 2023
1 parent f8090a7 commit 8801e98
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 57 deletions.
6 changes: 4 additions & 2 deletions Actions.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1011,6 +1012,7 @@
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = YG56YK5RN5;

This comment was marked as off-topic.

Copy link
@muescha

muescha Sep 27, 2023

here also?

DEVELOPMENT_TEAM = "$(DEVELOPMENT_TEAM)";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion Config.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
101 changes: 47 additions & 54 deletions Shared/Actions/CreateMenuItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)") {
}

Check warning on line 47 in Shared/Actions/CreateMenuItem.swift

View workflow job for this annotation

GitHub Actions / lint

Trailing Whitespace Violation: Lines should not have trailing whitespace (trailing_whitespace)
// 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)")

Check warning on line 67 in Shared/Actions/CreateMenuItem.swift

View workflow job for this annotation

GitHub Actions / lint

Trailing Whitespace Violation: Lines should not have trailing whitespace (trailing_whitespace)
DefaultCase {
Summary("Create Item with \(\.$menuTitle) and \(\.$subtitle)") {
\.$iconType
\.$backgroundShape
\.$background
\.$data
}
}
}
}

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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, *) {
Expand All @@ -215,7 +208,7 @@ struct MenuItem: TransientAppEntity {
}

@Property(title: "Title")
var title: String?
var title: String

@Property(title: "Subtitle")
var subtitle: String?
Expand All @@ -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
}
Expand Down Expand Up @@ -423,7 +416,7 @@ struct RMIconContainer<Icon: View>: 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
*/
Expand Down

0 comments on commit 8801e98

Please sign in to comment.