Skip to content

Commit fdf949c

Browse files
committed
refactor: deprecate suppressNotification parameter in icon methods
1 parent 46f2cb4 commit fdf949c

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

ios/Sources/AppIconPlugin/AppIconPlugin.swift

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,18 @@ public class AppIconPlugin: CAPPlugin, CAPBridgedPlugin {
3030
}
3131

3232
@objc func reset(_ call: CAPPluginCall) {
33-
let suppressNotification = call.getBool("suppressNotification") ?? true
34-
35-
setIcon(iconName: nil, suppressNotification: suppressNotification, call)
33+
let _ = call.getBool("suppressNotification") // Deprecated: parameter is ignored
34+
setIcon(iconName: nil, call)
3635
}
3736

3837
@objc func change(_ call: CAPPluginCall) {
39-
4038
guard let iconName = call.getString("name") else {
4139
call.reject("Must provide an icon name.")
4240
return
4341
}
4442

45-
let suppressNotification = call.getBool("suppressNotification") ?? true
46-
47-
setIcon(iconName: iconName, suppressNotification: suppressNotification, call)
43+
let _ = call.getBool("suppressNotification") // Deprecated: parameter is ignored
44+
setIcon(iconName: iconName, call)
4845
}
4946

5047
func setIcon(iconName: String?, suppressNotification: Bool, _ call: CAPPluginCall) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@capacitor-community/app-icon",
3-
"version": "6.0.0",
3+
"version": "6.1.0",
44
"description": "Capacitor community plugin for changing an iOS app icon.",
55
"main": "dist/plugin.cjs.js",
66
"module": "dist/esm/index.js",

src/definitions.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@ export interface IconOptions {
1010
disable?: string[];
1111
/**
1212
* Flag controlling the in app notification which shows after icon is changed. (iOS)
13+
* @deprecated This parameter is ignored as it no longer works reliably on iOS 17+ and risks App Store rejection. The system notification will always be shown.
14+
* @since 6.1.0
1315
*/
14-
suppressNotification: boolean;
16+
suppressNotification?: boolean;
1517
}
1618

1719
export interface ResetOptions {
1820
/**
1921
* Flag controlling the in app notification which shows after icon is changed (iOS).
22+
* @deprecated This parameter is ignored as it no longer works reliably on iOS 17+ and risks App Store rejection. The system notification will always be shown.
23+
* @since 6.1.0
2024
*/
21-
suppressNotification: boolean;
25+
suppressNotification?: boolean;
2226

2327
/**
2428
* Name of icons to disable. This is not used for iOS, but required for Android.

0 commit comments

Comments
 (0)