Skip to content

Commit 78c7479

Browse files
committed
🛁 Cleanup: Remove Debug Logs
1 parent 588e6dd commit 78c7479

File tree

4 files changed

+4
-73
lines changed

4 files changed

+4
-73
lines changed

ios/src/ReactNative/RNIContextMenu/RNIMenuActionItem.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,7 @@ extension RNIMenuActionItem {
153153

154154
typealias ActionItemHandler = ([String: Any], UIAction) -> Void;
155155

156-
func createAction(handler: @escaping ActionItemHandler) -> UIAction {
157-
#if DEBUG
158-
print("RNIMenuActionItem, makeUIAction...");
159-
#endif
160-
156+
func createAction(handler: @escaping ActionItemHandler) -> UIAction {
161157
let action = UIAction(
162158
title : self.actionTitle,
163159
image : self.icon?.image,

ios/src/ReactNative/RNIContextMenu/RNIMenuItem.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,15 @@ class RNIMenuItem: RNIMenuElement {
7979
guard let dictItem = $0 as? NSDictionary else { return nil };
8080

8181
if let menuItem = RNIMenuItem(dictionary: dictItem) {
82-
#if DEBUG
83-
print("RNIMenuItem, init - compactMap: Creating RNIMenuItem...");
84-
#endif
8582
return menuItem;
8683

8784
} else if let menuAction = RNIMenuActionItem(dictionary: dictItem) {
88-
#if DEBUG
89-
print("RNIMenuItem, init - compactMap: Creating RNIMenuActionItem...");
90-
#endif
9185
return menuAction;
9286

9387
} else if let deferredElement = RNIDeferredMenuElement(dictionary: dictItem) {
9488
return deferredElement;
9589

9690
} else {
97-
#if DEBUG
98-
print("RNIMenuItem, init - compactMap: nil");
99-
#endif
10091
return nil;
10192
};
10293
};

ios/src/ReactNative/RNIContextMenuButton/RNIContextMenuButton.swift

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ class RNIContextMenuButton: UIButton {
7373

7474
let rootMenuConfig = RNIMenuItem(dictionary: rawMenuConfig)
7575
else { return };
76-
77-
#if DEBUG
78-
print("RNIContextMenuButton"
79-
+ " - menuConfig didSet"
80-
+ " - RNIMenuItem init"
81-
);
82-
#endif
8376

8477
// cleanup `deferredElementCompletionMap`
8578
self.cleanupOrphanedDeferredElements(currentMenuConfig: rootMenuConfig);
@@ -321,12 +314,6 @@ extension RNIContextMenuButton {
321314
// context menu display begins
322315
override func contextMenuInteraction(_ interaction: UIContextMenuInteraction, willDisplayMenuFor configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionAnimating?) {
323316
super.contextMenuInteraction(interaction, willDisplayMenuFor: configuration, animator: animator);
324-
325-
#if DEBUG
326-
print("RNIContextMenuButton, UIContextMenuInteractionDelegate"
327-
+ " - contextMenuInteraction: will show"
328-
);
329-
#endif
330317

331318
self.isContextMenuVisible = true;
332319

@@ -340,12 +327,6 @@ extension RNIContextMenuButton {
340327
override func contextMenuInteraction(_ interaction: UIContextMenuInteraction, willEndFor configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionAnimating?) {
341328
super.contextMenuInteraction(interaction, willEndFor: configuration, animator: animator);
342329

343-
#if DEBUG
344-
print("RNIContextMenuButton, UIContextMenuInteractionDelegate"
345-
+ " - contextMenuInteraction: will hide"
346-
);
347-
#endif
348-
349330
guard self.isContextMenuVisible else { return };
350331

351332
self.onMenuWillHide?([:]);

ios/src/ReactNative/RNIContextMenuView/RNIContextMenuView.swift

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,6 @@ class RNIContextMenuView: UIView {
116116

117117
menuConfig.shouldUseDiscoverabilityTitleAsFallbackValueForSubtitle =
118118
self.shouldUseDiscoverabilityTitleAsFallbackValueForSubtitle;
119-
120-
#if DEBUG
121-
print("menuConfig didSet"
122-
+ " - RNIMenuItem init"
123-
+ " - menuConfig count: \(menuConfigDict.count)"
124-
);
125-
#endif
126119

127120
self.updateContextMenuIfVisible(with: menuConfig);
128121

@@ -457,14 +450,8 @@ fileprivate extension RNIContextMenuView {
457450

458451
/// create `UIMenu` based on `menuConfig` prop
459452
func createMenu(_ suggestedAction: [UIMenuElement]) -> UIMenu? {
460-
guard let menuConfig = self._menuConfig else {
461-
#if DEBUG
462-
print("RNIContextMenuView, createMenu"
463-
+ " - guard check failed, menuConfig: nil"
464-
);
465-
#endif
466-
return nil;
467-
};
453+
guard let menuConfig = self._menuConfig
454+
else { return nil };
468455

469456
return menuConfig.createMenu(actionItemHandler: {
470457
// A. menu item has been pressed...
@@ -554,13 +541,7 @@ fileprivate extension RNIContextMenuView {
554541
self.isContextMenuVisible,
555542
let interaction: UIContextMenuInteraction = self.contextMenuInteraction
556543
else { return };
557-
558-
#if DEBUG
559-
print("menuConfig didSet"
560-
+ " - Updating visible menu"
561-
);
562-
#endif
563-
544+
564545
// context menu is open, update the menu items
565546
interaction.updateVisibleMenu { _ in
566547
return menuConfig.createMenu(
@@ -1149,12 +1130,6 @@ extension RNIContextMenuView: UIContextMenuInteractionDelegate {
11491130
willDisplayMenuFor configuration: UIContextMenuConfiguration,
11501131
animator: UIContextMenuInteractionAnimating?
11511132
) {
1152-
1153-
#if DEBUG
1154-
print("RNIContextMenuView, UIContextMenuInteractionDelegate"
1155-
+ " - contextMenuInteraction: will show"
1156-
);
1157-
#endif
11581133

11591134
self.isContextMenuVisible = true;
11601135
self.onMenuWillShow?([:]);
@@ -1201,12 +1176,6 @@ extension RNIContextMenuView: UIContextMenuInteractionDelegate {
12011176
willEndFor configuration: UIContextMenuConfiguration,
12021177
animator: UIContextMenuInteractionAnimating?
12031178
) {
1204-
1205-
#if DEBUG
1206-
print("RNIContextMenuView, UIContextMenuInteractionDelegate"
1207-
+ " - contextMenuInteraction: will hide"
1208-
);
1209-
#endif
12101179

12111180
guard self.isContextMenuVisible else { return };
12121181

@@ -1243,12 +1212,6 @@ extension RNIContextMenuView: UIContextMenuInteractionDelegate {
12431212
willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration,
12441213
animator: UIContextMenuInteractionCommitAnimating
12451214
) {
1246-
1247-
#if DEBUG
1248-
print("RNIContextMenuView, UIContextMenuInteractionDelegate"
1249-
+ " - contextMenuInteraction: preview tapped"
1250-
);
1251-
#endif
12521215

12531216
// MARK: Experimental - "Auxiliary Context Menu Preview"-Related
12541217
// hide preview auxiliary view

0 commit comments

Comments
 (0)