Skip to content

Commit

Permalink
🛠 Refactor: Remove RCTSwiftLog
Browse files Browse the repository at this point in the history
Related:
* TODO:2023-03-04-06-34-28 - Library Native Cleanup
* TODO:2023-03-16-15-19-13 - Remove `RCTSwiftLog`

Summary: Remove `RCTSwiftLog` + usage.
  • Loading branch information
dominicstop committed Mar 17, 2023
1 parent ef06d39 commit eb4322a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 93 deletions.
2 changes: 0 additions & 2 deletions ios/src_library/IosModal-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#import <React/RCTDevLoadingView.h>
#endif

#import "React Native/RCTSwiftLog/RCTSwiftLog.h"

#import <React/RCTBridge.h>
#import "React/RCTEventEmitter.h"

Expand Down
29 changes: 0 additions & 29 deletions ios/src_library/React Native/RCTSwiftLog/RCTLog.swift

This file was deleted.

18 changes: 0 additions & 18 deletions ios/src_library/React Native/RCTSwiftLog/RCTSwiftLog.h

This file was deleted.

38 changes: 0 additions & 38 deletions ios/src_library/React Native/RCTSwiftLog/RCTSwiftLog.m

This file was deleted.

24 changes: 18 additions & 6 deletions ios/src_library/React Native/RNIModalView/RNIModalView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ class RNIModalView: UIView {

guard let blurStyle = UIBlurEffect.Style.fromString(self.modalBGBlurEffectStyle)
else {
RCTLogWarn(
#if DEBUG
print(
"RNIModalView, modalBGBlurEffectStyle: Invalid value - "
+ "\(self.modalBGBlurEffectStyle) is not a valid blur style"
);
#endif
return;
};

Expand All @@ -120,10 +122,12 @@ class RNIModalView: UIView {

guard let style = UIModalPresentationStyle.fromString(self.modalPresentationStyle)
else {
RCTLogWarn(
#if DEBUG
print(
"RNIModalView, modalPresentationStyle: Invalid value - "
+ "\(self.modalPresentationStyle) is not a valid presentation style"
);
#endif
return;
};

Expand All @@ -140,10 +144,12 @@ class RNIModalView: UIView {
#endif

default:
RCTLogWarn(
#if DEBUG
print(
"RNIModalView, modalPresentationStyle: Unsupported Presentation Style - "
+ "\(self.modalPresentationStyle) is not a supported presenatation style"
);
#endif
};
}
};
Expand All @@ -156,7 +162,9 @@ class RNIModalView: UIView {

guard let style = UIModalTransitionStyle.fromString(self.modalTransitionStyle as String)
else {
RCTLogWarn("RNIModalView, modalTransitionStyle: Invalid value");
#if DEBUG
print("RNIModalView, modalTransitionStyle: Invalid value");
#endif
return;
};

Expand Down Expand Up @@ -257,7 +265,9 @@ class RNIModalView: UIView {
super.insertReactSubview(subview, at: atIndex);

guard (self.reactSubview == nil) else {
RCTLogWarn("RNIModalView, insertReactSubview: Modal view can only have one subview");
#if DEBUG
print("RNIModalView, insertReactSubview: Modal view can only have one subview");
#endif
return;
};

Expand Down Expand Up @@ -287,7 +297,9 @@ class RNIModalView: UIView {
super.removeReactSubview(subview);

guard self.reactSubview == subview else {
RCTLogWarn("RNIModalView, removeReactSubview: Cannot remove view other than modal view");
#if DEBUG
print("RNIModalView, removeReactSubview: Cannot remove view other than modal view");
#endif
return;
};

Expand Down

0 comments on commit eb4322a

Please sign in to comment.