Skip to content

Commit 9e8fe18

Browse files
authored
feat!: rename method fixAlerts -> enableAlertSupport (#1)
This change affects the installation steps and breaks existing installations.
1 parent 28fee24 commit 9e8fe18

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you are using RN >= 0.60, only run `npx pod-install`. Then rebuild your proje
2424
To enable this, please follow the steps below:
2525
1. Open your `/ios/{projectName}/AppDelegate.m` file
2626
1. At the top of the file, import the OverrideColorScheme module: `#import <OverrideColorScheme.h>`
27-
1. And then, within your existing `didFinishLaunchingWithOptions` method, add `[OverrideColorScheme fixAlerts];` to the top of the method (see below).
27+
1. And then, within your existing `didFinishLaunchingWithOptions` method, add `[OverrideColorScheme enableAlertSupport];` to the top of the method (see below).
2828

2929
```Objective-C
3030

@@ -34,7 +34,7 @@ To enable this, please follow the steps below:
3434

3535
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
3636
{
37-
[OverrideColorScheme fixAlerts]; // <--- and add this line
37+
[OverrideColorScheme enableAlertSupport]; // <--- and add this line
3838
//...
3939
}
4040
```

example/ios/OverrideColorSchemeExample/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4242
moduleName:@"OverrideColorSchemeExample"
4343
initialProperties:nil];
4444

45-
[OverrideColorScheme fixAlerts];
45+
[OverrideColorScheme enableAlertSupport];
4646

4747
if (@available(iOS 13.0, *)) {
4848
rootView.backgroundColor = [UIColor systemBackgroundColor];

ios/OverrideColorScheme.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
@class OverrideColorScheme;
1010

1111
@interface OverrideColorScheme : NSObject
12-
+ (void)fixAlerts;
12+
+ (void)enableAlertSupport;
1313
@end

ios/OverrideColorScheme.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class OverrideColorScheme: NSObject {
2626
}
2727

2828
@objc
29-
static func fixAlerts() {
29+
static func enableAlertSupport() {
3030
UIAlertController.swizzle()
3131
}
3232
}

0 commit comments

Comments
 (0)