Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions ios/Sources/AppIconPlugin/AppIconPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,18 @@ public class AppIconPlugin: CAPPlugin, CAPBridgedPlugin {
}

@objc func reset(_ call: CAPPluginCall) {
let suppressNotification = call.getBool("suppressNotification") ?? true

setIcon(iconName: nil, suppressNotification: suppressNotification, call)
let _ = call.getBool("suppressNotification") // Deprecated: parameter is ignored
setIcon(iconName: nil, call)
}

@objc func change(_ call: CAPPluginCall) {

guard let iconName = call.getString("name") else {
call.reject("Must provide an icon name.")
return
}

let suppressNotification = call.getBool("suppressNotification") ?? true

setIcon(iconName: iconName, suppressNotification: suppressNotification, call)
let _ = call.getBool("suppressNotification") // Deprecated: parameter is ignored
setIcon(iconName: iconName, call)
}

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

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setIcon method signature still includes the suppressNotification parameter, but the calls from reset() and change() no longer pass this argument. The method signature should be updated to remove the suppressNotification parameter, and the logic inside should be simplified to always use the public API (the else branch behavior).

Copilot uses AI. Check for mistakes.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor-community/app-icon",
"version": "6.0.0",
"version": "6.1.0",
"description": "Capacitor community plugin for changing an iOS app icon.",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down
8 changes: 6 additions & 2 deletions src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ export interface IconOptions {
disable?: string[];
/**
* Flag controlling the in app notification which shows after icon is changed. (iOS)
* @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.
* @since 6.1.0
*/
suppressNotification: boolean;
suppressNotification?: boolean;
}

export interface ResetOptions {
/**
* Flag controlling the in app notification which shows after icon is changed (iOS).
* @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.
* @since 6.1.0
*/
suppressNotification: boolean;
suppressNotification?: boolean;

/**
* Name of icons to disable. This is not used for iOS, but required for Android.
Expand Down
Loading