@cap-kit/settings 8.0.0 → 8.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/web.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
- import { SettingsErrorCode } from './definitions';
3
2
  /**
4
3
  * Web implementation of the Settings plugin.
5
4
  *
@@ -24,11 +23,7 @@ export class SettingsWeb extends WebPlugin {
24
23
  * provide APIs to open operating system settings.
25
24
  */
26
25
  async open() {
27
- return {
28
- success: false,
29
- error: 'Opening system settings is not supported on the Web.',
30
- code: SettingsErrorCode.UNAVAILABLE,
31
- };
26
+ this.unavailable('Opening system settings is not supported on the Web.');
32
27
  }
33
28
  /**
34
29
  * Attempts to open an iOS settings screen.
@@ -36,11 +31,7 @@ export class SettingsWeb extends WebPlugin {
36
31
  * This operation is not supported on the Web.
37
32
  */
38
33
  async openIOS() {
39
- return {
40
- success: false,
41
- error: 'iOS settings are not available in web environments.',
42
- code: SettingsErrorCode.UNAVAILABLE,
43
- };
34
+ this.unavailable('iOS settings are not available in web environments.');
44
35
  }
45
36
  /**
46
37
  * Attempts to open an Android settings screen.
@@ -48,11 +39,7 @@ export class SettingsWeb extends WebPlugin {
48
39
  * This operation is not supported on the Web.
49
40
  */
50
41
  async openAndroid() {
51
- return {
52
- success: false,
53
- error: 'Android settings are not available in web environments.',
54
- code: SettingsErrorCode.UNAVAILABLE,
55
- };
42
+ this.unavailable('Android settings are not available in web environments.');
56
43
  }
57
44
  // --- Plugin Info ---
58
45
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAuD,MAAM,eAAe,CAAC;AAEvG;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,WAAY,SAAQ,SAAS;IACxC;QACE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gB;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;CACF"}
@@ -465,11 +465,7 @@ class SettingsWeb extends core.WebPlugin {
465
465
  * provide APIs to open operating system settings.
466
466
  */
467
467
  async open() {
468
- return {
469
- success: false,
470
- error: 'Opening system settings is not supported on the Web.',
471
- code: exports.SettingsErrorCode.UNAVAILABLE,
472
- };
468
+ this.unavailable('Opening system settings is not supported on the Web.');
473
469
  }
474
470
  /**
475
471
  * Attempts to open an iOS settings screen.
@@ -477,11 +473,7 @@ class SettingsWeb extends core.WebPlugin {
477
473
  * This operation is not supported on the Web.
478
474
  */
479
475
  async openIOS() {
480
- return {
481
- success: false,
482
- error: 'iOS settings are not available in web environments.',
483
- code: exports.SettingsErrorCode.UNAVAILABLE,
484
- };
476
+ this.unavailable('iOS settings are not available in web environments.');
485
477
  }
486
478
  /**
487
479
  * Attempts to open an Android settings screen.
@@ -489,11 +481,7 @@ class SettingsWeb extends core.WebPlugin {
489
481
  * This operation is not supported on the Web.
490
482
  */
491
483
  async openAndroid() {
492
- return {
493
- success: false,
494
- error: 'Android settings are not available in web environments.',
495
- code: exports.SettingsErrorCode.UNAVAILABLE,
496
- };
484
+ this.unavailable('Android settings are not available in web environments.');
497
485
  }
498
486
  // --- Plugin Info ---
499
487
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n/**\n * Standardized error codes used by the Settings plugin.\n *\n * These codes are returned as part of structured error objects\n * and allow consumers to implement programmatic error handling.\n *\n * Note:\n * On iOS (Swift Package Manager), errors are returned as data\n * objects rather than rejected Promises.\n *\n * @since 1.0.0\n */\nexport var SettingsErrorCode;\n(function (SettingsErrorCode) {\n /** The device does not have the requested hardware. */\n SettingsErrorCode[\"UNAVAILABLE\"] = \"UNAVAILABLE\";\n /** The user denied the permission or the feature is disabled in settings. */\n SettingsErrorCode[\"PERMISSION_DENIED\"] = \"PERMISSION_DENIED\";\n /** The Settings plugin failed to initialize (e.g., runtime error or Looper failure). */\n SettingsErrorCode[\"INIT_FAILED\"] = \"INIT_FAILED\";\n /** The requested Settings plugin type is not valid or not supported by the plugin. */\n SettingsErrorCode[\"UNKNOWN_TYPE\"] = \"UNKNOWN_TYPE\";\n})(SettingsErrorCode || (SettingsErrorCode = {}));\n/**\n * Enumeration of supported Android system settings.\n *\n * @platform Android\n *\n * @remarks\n * Android settings are opened via system Intents.\n * Availability depends on:\n *\n * - Android version\n * - device manufacturer (OEM)\n * - system configuration and user restrictions\n *\n * Some intents are not part of the public Android SDK and may not be\n * available on all devices.\n *\n * When a requested settings screen cannot be resolved, the plugin\n * resolves with:\n * `{ success: false, code: SettingsErrorCode.UNAVAILABLE }`\n *\n * @since 1.0.0\n */\nexport var AndroidSettings;\n(function (AndroidSettings) {\n /**\n * Opens Accessibility settings.\n */\n AndroidSettings[\"Accessibility\"] = \"accessibility\";\n /**\n * Opens the Add Account screen.\n */\n AndroidSettings[\"Account\"] = \"account\";\n /**\n * Opens Airplane Mode settings.\n */\n AndroidSettings[\"AirplaneMode\"] = \"airplane_mode\";\n /**\n * Opens Access Point Name (APN) settings.\n */\n AndroidSettings[\"Apn\"] = \"apn\";\n /**\n * Opens the Application Details screen for the current app.\n */\n AndroidSettings[\"ApplicationDetails\"] = \"application_details\";\n /**\n * Opens Application Development settings.\n *\n * Availability depends on developer options being enabled.\n */\n AndroidSettings[\"ApplicationDevelopment\"] = \"application_development\";\n /**\n * Opens Application settings.\n */\n AndroidSettings[\"Application\"] = \"application\";\n /**\n * Opens app-specific notification settings.\n */\n AndroidSettings[\"AppNotification\"] = \"app_notification\";\n /**\n * Opens Battery Optimization settings.\n *\n * Allows managing apps excluded from battery optimizations.\n */\n AndroidSettings[\"BatteryOptimization\"] = \"battery_optimization\";\n /**\n * Opens Bluetooth settings.\n */\n AndroidSettings[\"Bluetooth\"] = \"bluetooth\";\n /**\n * Opens Captioning settings.\n */\n AndroidSettings[\"Captioning\"] = \"captioning\";\n /**\n * Opens Cast device settings.\n */\n AndroidSettings[\"Cast\"] = \"cast\";\n /**\n * Opens Data Roaming settings.\n */\n AndroidSettings[\"DataRoaming\"] = \"data_roaming\";\n /**\n * Opens Date & Time settings.\n */\n AndroidSettings[\"Date\"] = \"date\";\n /**\n * Opens Display settings.\n */\n AndroidSettings[\"Display\"] = \"display\";\n /**\n * Opens Dream (Daydream / Screensaver) settings.\n */\n AndroidSettings[\"Dream\"] = \"dream\";\n /**\n * Opens Home app selection settings.\n */\n AndroidSettings[\"Home\"] = \"home\";\n /**\n * Opens Input Method (Keyboard) settings.\n */\n AndroidSettings[\"Keyboard\"] = \"keyboard\";\n /**\n * Opens Input Method Subtype settings.\n */\n AndroidSettings[\"KeyboardSubType\"] = \"keyboard_subtype\";\n /**\n * Opens Language & Input (Locale) settings.\n */\n AndroidSettings[\"Locale\"] = \"locale\";\n /**\n * Opens Location Services settings.\n */\n AndroidSettings[\"Location\"] = \"location\";\n /**\n * Opens Manage Applications settings.\n */\n AndroidSettings[\"ManageApplications\"] = \"manage_applications\";\n /**\n * Opens Manage All Applications settings.\n *\n * Availability depends on Android version and OEM.\n */\n AndroidSettings[\"ManageAllApplications\"] = \"manage_all_applications\";\n /**\n * Show settings for memory card storage\n */\n AndroidSettings[\"MemoryCard\"] = \"memory_card\";\n /**\n * Opens Network Operator settings.\n */\n AndroidSettings[\"Network\"] = \"network\";\n /**\n * Opens NFC settings.\n */\n AndroidSettings[\"Nfc\"] = \"nfc\";\n /**\n * Opens NFC Sharing settings.\n */\n AndroidSettings[\"NfcSharing\"] = \"nfcsharing\";\n /**\n * Opens NFC Payment settings.\n */\n AndroidSettings[\"NfcPayment\"] = \"nfc_payment\";\n /**\n * Opens Print settings.\n */\n AndroidSettings[\"Print\"] = \"print\";\n /**\n * Opens Privacy settings.\n */\n AndroidSettings[\"Privacy\"] = \"privacy\";\n /**\n * Opens Quick Launch settings.\n */\n AndroidSettings[\"QuickLaunch\"] = \"quick_launch\";\n /**\n * Opens Search settings.\n */\n AndroidSettings[\"Search\"] = \"search\";\n /**\n * Opens Security settings.\n */\n AndroidSettings[\"Security\"] = \"security\";\n /**\n * Opens the main System Settings screen.\n */\n AndroidSettings[\"Settings\"] = \"settings\";\n /**\n * Opens Regulatory Information screen.\n */\n AndroidSettings[\"ShowRegulatoryInfo\"] = \"show_regulatory_info\";\n /**\n * Opens Sound & Volume settings.\n */\n AndroidSettings[\"Sound\"] = \"sound\";\n /**\n * Opens Internal Storage settings.\n */\n AndroidSettings[\"Storage\"] = \"storage\";\n /**\n * Opens Sync settings.\n */\n AndroidSettings[\"Sync\"] = \"sync\";\n /**\n * Opens Text-to-Speech (TTS) settings.\n *\n * Uses a non-public intent on some devices.\n */\n AndroidSettings[\"TextToSpeech\"] = \"text_to_speech\";\n /**\n * Opens Usage Access settings.\n *\n * Allows managing apps with access to usage data.\n */\n AndroidSettings[\"Usage\"] = \"usage\";\n /**\n * Opens User Dictionary settings.\n */\n AndroidSettings[\"UserDictionary\"] = \"user_dictionary\";\n /**\n * Opens Voice Input settings.\n */\n AndroidSettings[\"VoiceInput\"] = \"voice_input\";\n /**\n * Opens VPN settings.\n */\n AndroidSettings[\"VPN\"] = \"vpn\";\n /**\n * Opens Wi-Fi settings.\n */\n AndroidSettings[\"Wifi\"] = \"wifi\";\n /**\n * Opens Wi-Fi IP settings.\n *\n * Availability varies by device and Android version.\n */\n AndroidSettings[\"WifiIp\"] = \"wifi_ip\";\n /**\n * Opens Wireless & Networks settings.\n */\n AndroidSettings[\"Wireless\"] = \"wireless\";\n /**\n * Opens Zen Mode (Do Not Disturb) settings.\n *\n * This uses a non-public intent and may not work on all devices.\n */\n AndroidSettings[\"ZenMode\"] = \"zen_mode\";\n /**\n * Opens Zen Mode Priority settings.\n */\n AndroidSettings[\"ZenModePriority\"] = \"zen_mode_priority\";\n /**\n * Opens Zen Mode Blocked Effects settings.\n */\n AndroidSettings[\"ZenModeBlockedEffects\"] = \"zen_mode_blocked_effects\";\n})(AndroidSettings || (AndroidSettings = {}));\n/**\n * Enumeration of supported iOS system settings.\n *\n * @platform iOS\n *\n * @remarks\n * Apple officially supports opening only the app-specific settings screen.\n * All other values rely on undocumented URL schemes and may:\n *\n * - behave differently across iOS versions\n * - stop working in future releases\n * - be restricted during App Store review\n *\n * Availability is best-effort and not guaranteed.\n *\n * @since 1.0.0\n */\nexport var IOSSettings;\n(function (IOSSettings) {\n /**\n * Opens the app-specific settings screen.\n *\n * This is the ONLY settings destination officially supported by Apple\n * and is considered App Store safe.\n */\n IOSSettings[\"App\"] = \"app\";\n /**\n * Opens the app-specific notification settings.\n *\n * - iOS 16+: opens the dedicated notification settings screen\n * - iOS <16: falls back to the app settings screen\n */\n IOSSettings[\"AppNotification\"] = \"appNotification\";\n /**\n * Opens iOS \"About\" settings.\n */\n IOSSettings[\"About\"] = \"about\";\n /**\n * Opens Auto-Lock settings.\n */\n IOSSettings[\"AutoLock\"] = \"autoLock\";\n /**\n * Opens Bluetooth settings.\n */\n IOSSettings[\"Bluetooth\"] = \"bluetooth\";\n /**\n * Opens Date & Time settings.\n */\n IOSSettings[\"DateTime\"] = \"dateTime\";\n /**\n * Opens FaceTime settings.\n */\n IOSSettings[\"FaceTime\"] = \"facetime\";\n /**\n * Opens General settings.\n */\n IOSSettings[\"General\"] = \"general\";\n /**\n * Opens Keyboard settings.\n */\n IOSSettings[\"Keyboard\"] = \"keyboard\";\n /**\n * Opens iCloud settings.\n */\n IOSSettings[\"ICloud\"] = \"iCloud\";\n /**\n * Opens iCloud Storage & Backup settings.\n */\n IOSSettings[\"ICloudStorageBackup\"] = \"iCloudStorageBackup\";\n /**\n * Opens Language & Region (International) settings.\n */\n IOSSettings[\"International\"] = \"international\";\n /**\n * Opens Location Services settings.\n */\n IOSSettings[\"LocationServices\"] = \"locationServices\";\n /**\n * Opens Music settings.\n */\n IOSSettings[\"Music\"] = \"music\";\n /**\n * Opens Notes settings.\n */\n IOSSettings[\"Notes\"] = \"notes\";\n /**\n * Opens Notifications settings.\n *\n * Note: this is the global notifications screen,\n * not app-specific notifications.\n */\n IOSSettings[\"Notifications\"] = \"notifications\";\n /**\n * Opens Phone settings.\n */\n IOSSettings[\"Phone\"] = \"phone\";\n /**\n * Opens Photos settings.\n */\n IOSSettings[\"Photos\"] = \"photos\";\n /**\n * Opens Managed Configuration profiles list.\n */\n IOSSettings[\"ManagedConfigurationList\"] = \"managedConfigurationList\";\n /**\n * Opens Reset settings.\n */\n IOSSettings[\"Reset\"] = \"reset\";\n /**\n * Opens Ringtone settings.\n */\n IOSSettings[\"Ringtone\"] = \"ringtone\";\n /**\n * Opens Sounds settings.\n */\n IOSSettings[\"Sounds\"] = \"sounds\";\n /**\n * Opens Software Update settings.\n */\n IOSSettings[\"SoftwareUpdate\"] = \"softwareUpdate\";\n /**\n * Opens App Store settings.\n */\n IOSSettings[\"Store\"] = \"store\";\n /**\n * Opens App Tracking Transparency settings.\n *\n * Available on iOS 14+.\n */\n IOSSettings[\"Tracking\"] = \"tracking\";\n /**\n * Opens Wallpaper settings.\n */\n IOSSettings[\"Wallpaper\"] = \"wallpaper\";\n /**\n * Opens Wi-Fi settings.\n */\n IOSSettings[\"WiFi\"] = \"wifi\";\n /**\n * Opens Personal Hotspot (Tethering) settings.\n */\n IOSSettings[\"Tethering\"] = \"tethering\";\n /**\n * Opens Do Not Disturb settings.\n */\n IOSSettings[\"DoNotDisturb\"] = \"doNotDisturb\";\n /**\n * Opens Touch ID / Passcode settings.\n */\n IOSSettings[\"TouchIdPasscode\"] = \"touchIdPasscode\";\n /**\n * Opens Screen Time settings.\n */\n IOSSettings[\"ScreenTime\"] = \"screenTime\";\n /**\n * Opens Accessibility settings.\n */\n IOSSettings[\"Accessibility\"] = \"accessibility\";\n /**\n * Opens VPN settings.\n */\n IOSSettings[\"VPN\"] = \"vpn\";\n})(IOSSettings || (IOSSettings = {}));\n//# sourceMappingURL=definitions.js.map","/**\n * @file index.ts\n * This file exports the Settings and registers it with Capacitor.\n * It acts as the main entry point for accessing the plugin's functionality\n * across different platforms, including web.\n */\nimport { registerPlugin } from '@capacitor/core';\n/**\n * Main entry point for the Settings Capacitor plugin.\n *\n * This file registers the plugin with Capacitor and exports\n * both the runtime instance and the public TypeScript types.\n */\nconst Settings = registerPlugin('Settings', {\n web: () => import('./web').then((m) => new m.SettingsWeb()),\n});\nexport * from './definitions';\nexport { Settings };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { SettingsErrorCode } from './definitions';\n/**\n * Web implementation of the Settings plugin.\n *\n * This implementation exists to satisfy Capacitor's multi-platform contract.\n * Opening native system settings is not supported in web browsers.\n *\n * All methods follow the same state-based result model used on\n * Android and iOS:\n * - operations never throw\n * - Promise rejection is not used\n * - failures are reported via structured result objects\n */\nexport class SettingsWeb extends WebPlugin {\n constructor() {\n super();\n }\n // --- Open Settings ---\n /**\n * Attempts to open a platform-specific settings screen.\n *\n * This operation is not supported on the Web, as browsers do not\n * provide APIs to open operating system settings.\n */\n async open() {\n return {\n success: false,\n error: 'Opening system settings is not supported on the Web.',\n code: SettingsErrorCode.UNAVAILABLE,\n };\n }\n /**\n * Attempts to open an iOS settings screen.\n *\n * This operation is not supported on the Web.\n */\n async openIOS() {\n return {\n success: false,\n error: 'iOS settings are not available in web environments.',\n code: SettingsErrorCode.UNAVAILABLE,\n };\n }\n /**\n * Attempts to open an Android settings screen.\n *\n * This operation is not supported on the Web.\n */\n async openAndroid() {\n return {\n success: false,\n error: 'Android settings are not available in web environments.',\n code: SettingsErrorCode.UNAVAILABLE,\n };\n }\n // --- Plugin Info ---\n /**\n * Returns the plugin version.\n *\n * On the Web, this value represents the JavaScript package version\n * rather than a native implementation.\n */\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["SettingsErrorCode","AndroidSettings","IOSSettings","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;A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ACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACK,MAAC,QAAQ,GAAGC,mBAAc,CAAC,UAAU,EAAE;AAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/D,CAAC;;ACbD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,WAAW,SAASC,cAAS,CAAC;AAC3C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,EAAE;AACf,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,OAAO;AACf,YAAY,OAAO,EAAE,KAAK;AAC1B,YAAY,KAAK,EAAE,sDAAsD;AACzE,YAAY,IAAI,EAAEJ,yBAAiB,CAAC,WAAW;AAC/C,SAAS;AACT,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,OAAO,GAAG;AACpB,QAAQ,OAAO;AACf,YAAY,OAAO,EAAE,KAAK;AAC1B,YAAY,KAAK,EAAE,qDAAqD;AACxE,YAAY,IAAI,EAAEA,yBAAiB,CAAC,WAAW;AAC/C,SAAS;AACT,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,OAAO;AACf,YAAY,OAAO,EAAE,KAAK;AAC1B,YAAY,KAAK,EAAE,yDAAyD;AAC5E,YAAY,IAAI,EAAEA,yBAAiB,CAAC,WAAW;AAC/C,SAAS;AACT,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n/**\n * Standardized error codes used by the Settings plugin.\n *\n * These codes are returned as part of structured error objects\n * and allow consumers to implement programmatic error handling.\n *\n * Note:\n * On iOS (Swift Package Manager), errors are returned as data\n * objects rather than rejected Promises.\n *\n * @since 1.0.0\n */\nexport var SettingsErrorCode;\n(function (SettingsErrorCode) {\n /** The device does not have the requested hardware. */\n SettingsErrorCode[\"UNAVAILABLE\"] = \"UNAVAILABLE\";\n /** The user denied the permission or the feature is disabled in settings. */\n SettingsErrorCode[\"PERMISSION_DENIED\"] = \"PERMISSION_DENIED\";\n /** The Settings plugin failed to initialize (e.g., runtime error or Looper failure). */\n SettingsErrorCode[\"INIT_FAILED\"] = \"INIT_FAILED\";\n /** The requested Settings plugin type is not valid or not supported by the plugin. */\n SettingsErrorCode[\"UNKNOWN_TYPE\"] = \"UNKNOWN_TYPE\";\n})(SettingsErrorCode || (SettingsErrorCode = {}));\n/**\n * Enumeration of supported Android system settings.\n *\n * @platform Android\n *\n * @remarks\n * Android settings are opened via system Intents.\n * Availability depends on:\n *\n * - Android version\n * - device manufacturer (OEM)\n * - system configuration and user restrictions\n *\n * Some intents are not part of the public Android SDK and may not be\n * available on all devices.\n *\n * When a requested settings screen cannot be resolved, the plugin\n * resolves with:\n * `{ success: false, code: SettingsErrorCode.UNAVAILABLE }`\n *\n * @since 1.0.0\n */\nexport var AndroidSettings;\n(function (AndroidSettings) {\n /**\n * Opens Accessibility settings.\n */\n AndroidSettings[\"Accessibility\"] = \"accessibility\";\n /**\n * Opens the Add Account screen.\n */\n AndroidSettings[\"Account\"] = \"account\";\n /**\n * Opens Airplane Mode settings.\n */\n AndroidSettings[\"AirplaneMode\"] = \"airplane_mode\";\n /**\n * Opens Access Point Name (APN) settings.\n */\n AndroidSettings[\"Apn\"] = \"apn\";\n /**\n * Opens the Application Details screen for the current app.\n */\n AndroidSettings[\"ApplicationDetails\"] = \"application_details\";\n /**\n * Opens Application Development settings.\n *\n * Availability depends on developer options being enabled.\n */\n AndroidSettings[\"ApplicationDevelopment\"] = \"application_development\";\n /**\n * Opens Application settings.\n */\n AndroidSettings[\"Application\"] = \"application\";\n /**\n * Opens app-specific notification settings.\n */\n AndroidSettings[\"AppNotification\"] = \"app_notification\";\n /**\n * Opens Battery Optimization settings.\n *\n * Allows managing apps excluded from battery optimizations.\n */\n AndroidSettings[\"BatteryOptimization\"] = \"battery_optimization\";\n /**\n * Opens Bluetooth settings.\n */\n AndroidSettings[\"Bluetooth\"] = \"bluetooth\";\n /**\n * Opens Captioning settings.\n */\n AndroidSettings[\"Captioning\"] = \"captioning\";\n /**\n * Opens Cast device settings.\n */\n AndroidSettings[\"Cast\"] = \"cast\";\n /**\n * Opens Data Roaming settings.\n */\n AndroidSettings[\"DataRoaming\"] = \"data_roaming\";\n /**\n * Opens Date & Time settings.\n */\n AndroidSettings[\"Date\"] = \"date\";\n /**\n * Opens Display settings.\n */\n AndroidSettings[\"Display\"] = \"display\";\n /**\n * Opens Dream (Daydream / Screensaver) settings.\n */\n AndroidSettings[\"Dream\"] = \"dream\";\n /**\n * Opens Home app selection settings.\n */\n AndroidSettings[\"Home\"] = \"home\";\n /**\n * Opens Input Method (Keyboard) settings.\n */\n AndroidSettings[\"Keyboard\"] = \"keyboard\";\n /**\n * Opens Input Method Subtype settings.\n */\n AndroidSettings[\"KeyboardSubType\"] = \"keyboard_subtype\";\n /**\n * Opens Language & Input (Locale) settings.\n */\n AndroidSettings[\"Locale\"] = \"locale\";\n /**\n * Opens Location Services settings.\n */\n AndroidSettings[\"Location\"] = \"location\";\n /**\n * Opens Manage Applications settings.\n */\n AndroidSettings[\"ManageApplications\"] = \"manage_applications\";\n /**\n * Opens Manage All Applications settings.\n *\n * Availability depends on Android version and OEM.\n */\n AndroidSettings[\"ManageAllApplications\"] = \"manage_all_applications\";\n /**\n * Show settings for memory card storage\n */\n AndroidSettings[\"MemoryCard\"] = \"memory_card\";\n /**\n * Opens Network Operator settings.\n */\n AndroidSettings[\"Network\"] = \"network\";\n /**\n * Opens NFC settings.\n */\n AndroidSettings[\"Nfc\"] = \"nfc\";\n /**\n * Opens NFC Sharing settings.\n */\n AndroidSettings[\"NfcSharing\"] = \"nfcsharing\";\n /**\n * Opens NFC Payment settings.\n */\n AndroidSettings[\"NfcPayment\"] = \"nfc_payment\";\n /**\n * Opens Print settings.\n */\n AndroidSettings[\"Print\"] = \"print\";\n /**\n * Opens Privacy settings.\n */\n AndroidSettings[\"Privacy\"] = \"privacy\";\n /**\n * Opens Quick Launch settings.\n */\n AndroidSettings[\"QuickLaunch\"] = \"quick_launch\";\n /**\n * Opens Search settings.\n */\n AndroidSettings[\"Search\"] = \"search\";\n /**\n * Opens Security settings.\n */\n AndroidSettings[\"Security\"] = \"security\";\n /**\n * Opens the main System Settings screen.\n */\n AndroidSettings[\"Settings\"] = \"settings\";\n /**\n * Opens Regulatory Information screen.\n */\n AndroidSettings[\"ShowRegulatoryInfo\"] = \"show_regulatory_info\";\n /**\n * Opens Sound & Volume settings.\n */\n AndroidSettings[\"Sound\"] = \"sound\";\n /**\n * Opens Internal Storage settings.\n */\n AndroidSettings[\"Storage\"] = \"storage\";\n /**\n * Opens Sync settings.\n */\n AndroidSettings[\"Sync\"] = \"sync\";\n /**\n * Opens Text-to-Speech (TTS) settings.\n *\n * Uses a non-public intent on some devices.\n */\n AndroidSettings[\"TextToSpeech\"] = \"text_to_speech\";\n /**\n * Opens Usage Access settings.\n *\n * Allows managing apps with access to usage data.\n */\n AndroidSettings[\"Usage\"] = \"usage\";\n /**\n * Opens User Dictionary settings.\n */\n AndroidSettings[\"UserDictionary\"] = \"user_dictionary\";\n /**\n * Opens Voice Input settings.\n */\n AndroidSettings[\"VoiceInput\"] = \"voice_input\";\n /**\n * Opens VPN settings.\n */\n AndroidSettings[\"VPN\"] = \"vpn\";\n /**\n * Opens Wi-Fi settings.\n */\n AndroidSettings[\"Wifi\"] = \"wifi\";\n /**\n * Opens Wi-Fi IP settings.\n *\n * Availability varies by device and Android version.\n */\n AndroidSettings[\"WifiIp\"] = \"wifi_ip\";\n /**\n * Opens Wireless & Networks settings.\n */\n AndroidSettings[\"Wireless\"] = \"wireless\";\n /**\n * Opens Zen Mode (Do Not Disturb) settings.\n *\n * This uses a non-public intent and may not work on all devices.\n */\n AndroidSettings[\"ZenMode\"] = \"zen_mode\";\n /**\n * Opens Zen Mode Priority settings.\n */\n AndroidSettings[\"ZenModePriority\"] = \"zen_mode_priority\";\n /**\n * Opens Zen Mode Blocked Effects settings.\n */\n AndroidSettings[\"ZenModeBlockedEffects\"] = \"zen_mode_blocked_effects\";\n})(AndroidSettings || (AndroidSettings = {}));\n/**\n * Enumeration of supported iOS system settings.\n *\n * @platform iOS\n *\n * @remarks\n * Apple officially supports opening only the app-specific settings screen.\n * All other values rely on undocumented URL schemes and may:\n *\n * - behave differently across iOS versions\n * - stop working in future releases\n * - be restricted during App Store review\n *\n * Availability is best-effort and not guaranteed.\n *\n * @since 1.0.0\n */\nexport var IOSSettings;\n(function (IOSSettings) {\n /**\n * Opens the app-specific settings screen.\n *\n * This is the ONLY settings destination officially supported by Apple\n * and is considered App Store safe.\n */\n IOSSettings[\"App\"] = \"app\";\n /**\n * Opens the app-specific notification settings.\n *\n * - iOS 16+: opens the dedicated notification settings screen\n * - iOS <16: falls back to the app settings screen\n */\n IOSSettings[\"AppNotification\"] = \"appNotification\";\n /**\n * Opens iOS \"About\" settings.\n */\n IOSSettings[\"About\"] = \"about\";\n /**\n * Opens Auto-Lock settings.\n */\n IOSSettings[\"AutoLock\"] = \"autoLock\";\n /**\n * Opens Bluetooth settings.\n */\n IOSSettings[\"Bluetooth\"] = \"bluetooth\";\n /**\n * Opens Date & Time settings.\n */\n IOSSettings[\"DateTime\"] = \"dateTime\";\n /**\n * Opens FaceTime settings.\n */\n IOSSettings[\"FaceTime\"] = \"facetime\";\n /**\n * Opens General settings.\n */\n IOSSettings[\"General\"] = \"general\";\n /**\n * Opens Keyboard settings.\n */\n IOSSettings[\"Keyboard\"] = \"keyboard\";\n /**\n * Opens iCloud settings.\n */\n IOSSettings[\"ICloud\"] = \"iCloud\";\n /**\n * Opens iCloud Storage & Backup settings.\n */\n IOSSettings[\"ICloudStorageBackup\"] = \"iCloudStorageBackup\";\n /**\n * Opens Language & Region (International) settings.\n */\n IOSSettings[\"International\"] = \"international\";\n /**\n * Opens Location Services settings.\n */\n IOSSettings[\"LocationServices\"] = \"locationServices\";\n /**\n * Opens Music settings.\n */\n IOSSettings[\"Music\"] = \"music\";\n /**\n * Opens Notes settings.\n */\n IOSSettings[\"Notes\"] = \"notes\";\n /**\n * Opens Notifications settings.\n *\n * Note: this is the global notifications screen,\n * not app-specific notifications.\n */\n IOSSettings[\"Notifications\"] = \"notifications\";\n /**\n * Opens Phone settings.\n */\n IOSSettings[\"Phone\"] = \"phone\";\n /**\n * Opens Photos settings.\n */\n IOSSettings[\"Photos\"] = \"photos\";\n /**\n * Opens Managed Configuration profiles list.\n */\n IOSSettings[\"ManagedConfigurationList\"] = \"managedConfigurationList\";\n /**\n * Opens Reset settings.\n */\n IOSSettings[\"Reset\"] = \"reset\";\n /**\n * Opens Ringtone settings.\n */\n IOSSettings[\"Ringtone\"] = \"ringtone\";\n /**\n * Opens Sounds settings.\n */\n IOSSettings[\"Sounds\"] = \"sounds\";\n /**\n * Opens Software Update settings.\n */\n IOSSettings[\"SoftwareUpdate\"] = \"softwareUpdate\";\n /**\n * Opens App Store settings.\n */\n IOSSettings[\"Store\"] = \"store\";\n /**\n * Opens App Tracking Transparency settings.\n *\n * Available on iOS 14+.\n */\n IOSSettings[\"Tracking\"] = \"tracking\";\n /**\n * Opens Wallpaper settings.\n */\n IOSSettings[\"Wallpaper\"] = \"wallpaper\";\n /**\n * Opens Wi-Fi settings.\n */\n IOSSettings[\"WiFi\"] = \"wifi\";\n /**\n * Opens Personal Hotspot (Tethering) settings.\n */\n IOSSettings[\"Tethering\"] = \"tethering\";\n /**\n * Opens Do Not Disturb settings.\n */\n IOSSettings[\"DoNotDisturb\"] = \"doNotDisturb\";\n /**\n * Opens Touch ID / Passcode settings.\n */\n IOSSettings[\"TouchIdPasscode\"] = \"touchIdPasscode\";\n /**\n * Opens Screen Time settings.\n */\n IOSSettings[\"ScreenTime\"] = \"screenTime\";\n /**\n * Opens Accessibility settings.\n */\n IOSSettings[\"Accessibility\"] = \"accessibility\";\n /**\n * Opens VPN settings.\n */\n IOSSettings[\"VPN\"] = \"vpn\";\n})(IOSSettings || (IOSSettings = {}));\n//# sourceMappingURL=definitions.js.map","/**\n * @file index.ts\n * This file exports the Settings and registers it with Capacitor.\n * It acts as the main entry point for accessing the plugin's functionality\n * across different platforms, including web.\n */\nimport { registerPlugin } from '@capacitor/core';\n/**\n * Main entry point for the Settings Capacitor plugin.\n *\n * This file registers the plugin with Capacitor and exports\n * both the runtime instance and the public TypeScript types.\n */\nconst Settings = registerPlugin('Settings', {\n web: () => import('./web').then((m) => new m.SettingsWeb()),\n});\nexport * from './definitions';\nexport { Settings };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\n/**\n * Web implementation of the Settings plugin.\n *\n * This implementation exists to satisfy Capacitor's multi-platform contract.\n * Opening native system settings is not supported in web browsers.\n *\n * All methods follow the same state-based result model used on\n * Android and iOS:\n * - operations never throw\n * - Promise rejection is not used\n * - failures are reported via structured result objects\n */\nexport class SettingsWeb extends WebPlugin {\n constructor() {\n super();\n }\n // --- Open Settings ---\n /**\n * Attempts to open a platform-specific settings screen.\n *\n * This operation is not supported on the Web, as browsers do not\n * provide APIs to open operating system settings.\n */\n async open() {\n this.unavailable('Opening system settings is not supported on the Web.');\n }\n /**\n * Attempts to open an iOS settings screen.\n *\n * This operation is not supported on the Web.\n */\n async openIOS() {\n this.unavailable('iOS settings are not available in web environments.');\n }\n /**\n * Attempts to open an Android settings screen.\n *\n * This operation is not supported on the Web.\n */\n async openAndroid() {\n this.unavailable('Android settings are not available in web environments.');\n }\n // --- Plugin Info ---\n /**\n * Returns the plugin version.\n *\n * On the Web, this value represents the JavaScript package version\n * rather than a native implementation.\n */\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["SettingsErrorCode","AndroidSettings","IOSSettings","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACWA;AACX,CAAC,UAAU,iBAAiB,EAAE;AAC9B;AACA,IAAI,iBAAiB,CAAC,aAAa,CAAC,GAAG,aAAa;AACpD;AACA,IAAI,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,mBAAmB;AAChE;AACA,IAAI,iBAAiB,CAAC,aAAa,CAAC,GAAG,aAAa;AACpD;AACA,IAAI,iBAAiB,CAAC,cAAc,CAAC,GAAG,cAAc;AACtD,CAAC,EAAEA,yBAAiB,KAAKA,yBAAiB,GAAG,EAAE,CAAC,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACWC;AACX,CAAC,UAAU,eAAe,EAAE;AAC5B;AACA;AACA;AACA,IAAI,eAAe,CAAC,eAAe,CAAC,GAAG,eAAe;AACtD;AACA;AACA;AACA,IAAI,eAAe,CAAC,SAAS,CAAC,GAAG,SAAS;AAC1C;AACA;AACA;AACA,IAAI,eAAe,CAAC,cAAc,CAAC,GAAG,eAAe;AACrD;AACA;AACA;AACA,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,KAAK;AAClC;AACA;AACA;AACA,IAAI,eAAe,CAAC,oBAAoB,CAAC,GAAG,qBAAqB;AACjE;AACA;AACA;AACA;AACA;AACA,IAAI,eAAe,CAAC,wBAAwB,CAAC,GAAG,yBAAyB;AACzE;AACA;AACA;AACA,IAAI,eAAe,CAAC,aAAa,CAAC,GAAG,aAAa;AAClD;AACA;AACA;AACA,IAAI,eAAe,CAAC,iBAAiB,CAAC,GAAG,kBAAkB;AAC3D;AACA;AACA;AACA;AACA;AACA,IAA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eAAe;AAClD;AACA;AACA;AACA,IAAI,WAAW,CAAC,KAAK,CAAC,GAAG,KAAK;AAC9B,CAAC,EAAEA,mBAAW,KAAKA,mBAAW,GAAG,EAAE,CAAC,CAAC;;ACrarC;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACK,MAAC,QAAQ,GAAGC,mBAAc,CAAC,UAAU,EAAE;AAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/D,CAAC;;ACdD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,WAAW,SAASC,cAAS,CAAC;AAC3C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,EAAE;AACf,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,IAAI,CAAC,WAAW,CAAC,sDAAsD,CAAC;AAChF,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,OAAO,GAAG;AACpB,QAAQ,IAAI,CAAC,WAAW,CAAC,qDAAqD,CAAC;AAC/E,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,IAAI,CAAC,WAAW,CAAC,yDAAyD,CAAC;AACnF,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -464,11 +464,7 @@ var capacitorSettings = (function (exports, core) {
464
464
  * provide APIs to open operating system settings.
465
465
  */
466
466
  async open() {
467
- return {
468
- success: false,
469
- error: 'Opening system settings is not supported on the Web.',
470
- code: exports.SettingsErrorCode.UNAVAILABLE,
471
- };
467
+ this.unavailable('Opening system settings is not supported on the Web.');
472
468
  }
473
469
  /**
474
470
  * Attempts to open an iOS settings screen.
@@ -476,11 +472,7 @@ var capacitorSettings = (function (exports, core) {
476
472
  * This operation is not supported on the Web.
477
473
  */
478
474
  async openIOS() {
479
- return {
480
- success: false,
481
- error: 'iOS settings are not available in web environments.',
482
- code: exports.SettingsErrorCode.UNAVAILABLE,
483
- };
475
+ this.unavailable('iOS settings are not available in web environments.');
484
476
  }
485
477
  /**
486
478
  * Attempts to open an Android settings screen.
@@ -488,11 +480,7 @@ var capacitorSettings = (function (exports, core) {
488
480
  * This operation is not supported on the Web.
489
481
  */
490
482
  async openAndroid() {
491
- return {
492
- success: false,
493
- error: 'Android settings are not available in web environments.',
494
- code: exports.SettingsErrorCode.UNAVAILABLE,
495
- };
483
+ this.unavailable('Android settings are not available in web environments.');
496
484
  }
497
485
  // --- Plugin Info ---
498
486
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n/**\n * Standardized error codes used by the Settings plugin.\n *\n * These codes are returned as part of structured error objects\n * and allow consumers to implement programmatic error handling.\n *\n * Note:\n * On iOS (Swift Package Manager), errors are returned as data\n * objects rather than rejected Promises.\n *\n * @since 1.0.0\n */\nexport var SettingsErrorCode;\n(function (SettingsErrorCode) {\n /** The device does not have the requested hardware. */\n SettingsErrorCode[\"UNAVAILABLE\"] = \"UNAVAILABLE\";\n /** The user denied the permission or the feature is disabled in settings. */\n SettingsErrorCode[\"PERMISSION_DENIED\"] = \"PERMISSION_DENIED\";\n /** The Settings plugin failed to initialize (e.g., runtime error or Looper failure). */\n SettingsErrorCode[\"INIT_FAILED\"] = \"INIT_FAILED\";\n /** The requested Settings plugin type is not valid or not supported by the plugin. */\n SettingsErrorCode[\"UNKNOWN_TYPE\"] = \"UNKNOWN_TYPE\";\n})(SettingsErrorCode || (SettingsErrorCode = {}));\n/**\n * Enumeration of supported Android system settings.\n *\n * @platform Android\n *\n * @remarks\n * Android settings are opened via system Intents.\n * Availability depends on:\n *\n * - Android version\n * - device manufacturer (OEM)\n * - system configuration and user restrictions\n *\n * Some intents are not part of the public Android SDK and may not be\n * available on all devices.\n *\n * When a requested settings screen cannot be resolved, the plugin\n * resolves with:\n * `{ success: false, code: SettingsErrorCode.UNAVAILABLE }`\n *\n * @since 1.0.0\n */\nexport var AndroidSettings;\n(function (AndroidSettings) {\n /**\n * Opens Accessibility settings.\n */\n AndroidSettings[\"Accessibility\"] = \"accessibility\";\n /**\n * Opens the Add Account screen.\n */\n AndroidSettings[\"Account\"] = \"account\";\n /**\n * Opens Airplane Mode settings.\n */\n AndroidSettings[\"AirplaneMode\"] = \"airplane_mode\";\n /**\n * Opens Access Point Name (APN) settings.\n */\n AndroidSettings[\"Apn\"] = \"apn\";\n /**\n * Opens the Application Details screen for the current app.\n */\n AndroidSettings[\"ApplicationDetails\"] = \"application_details\";\n /**\n * Opens Application Development settings.\n *\n * Availability depends on developer options being enabled.\n */\n AndroidSettings[\"ApplicationDevelopment\"] = \"application_development\";\n /**\n * Opens Application settings.\n */\n AndroidSettings[\"Application\"] = \"application\";\n /**\n * Opens app-specific notification settings.\n */\n AndroidSettings[\"AppNotification\"] = \"app_notification\";\n /**\n * Opens Battery Optimization settings.\n *\n * Allows managing apps excluded from battery optimizations.\n */\n AndroidSettings[\"BatteryOptimization\"] = \"battery_optimization\";\n /**\n * Opens Bluetooth settings.\n */\n AndroidSettings[\"Bluetooth\"] = \"bluetooth\";\n /**\n * Opens Captioning settings.\n */\n AndroidSettings[\"Captioning\"] = \"captioning\";\n /**\n * Opens Cast device settings.\n */\n AndroidSettings[\"Cast\"] = \"cast\";\n /**\n * Opens Data Roaming settings.\n */\n AndroidSettings[\"DataRoaming\"] = \"data_roaming\";\n /**\n * Opens Date & Time settings.\n */\n AndroidSettings[\"Date\"] = \"date\";\n /**\n * Opens Display settings.\n */\n AndroidSettings[\"Display\"] = \"display\";\n /**\n * Opens Dream (Daydream / Screensaver) settings.\n */\n AndroidSettings[\"Dream\"] = \"dream\";\n /**\n * Opens Home app selection settings.\n */\n AndroidSettings[\"Home\"] = \"home\";\n /**\n * Opens Input Method (Keyboard) settings.\n */\n AndroidSettings[\"Keyboard\"] = \"keyboard\";\n /**\n * Opens Input Method Subtype settings.\n */\n AndroidSettings[\"KeyboardSubType\"] = \"keyboard_subtype\";\n /**\n * Opens Language & Input (Locale) settings.\n */\n AndroidSettings[\"Locale\"] = \"locale\";\n /**\n * Opens Location Services settings.\n */\n AndroidSettings[\"Location\"] = \"location\";\n /**\n * Opens Manage Applications settings.\n */\n AndroidSettings[\"ManageApplications\"] = \"manage_applications\";\n /**\n * Opens Manage All Applications settings.\n *\n * Availability depends on Android version and OEM.\n */\n AndroidSettings[\"ManageAllApplications\"] = \"manage_all_applications\";\n /**\n * Show settings for memory card storage\n */\n AndroidSettings[\"MemoryCard\"] = \"memory_card\";\n /**\n * Opens Network Operator settings.\n */\n AndroidSettings[\"Network\"] = \"network\";\n /**\n * Opens NFC settings.\n */\n AndroidSettings[\"Nfc\"] = \"nfc\";\n /**\n * Opens NFC Sharing settings.\n */\n AndroidSettings[\"NfcSharing\"] = \"nfcsharing\";\n /**\n * Opens NFC Payment settings.\n */\n AndroidSettings[\"NfcPayment\"] = \"nfc_payment\";\n /**\n * Opens Print settings.\n */\n AndroidSettings[\"Print\"] = \"print\";\n /**\n * Opens Privacy settings.\n */\n AndroidSettings[\"Privacy\"] = \"privacy\";\n /**\n * Opens Quick Launch settings.\n */\n AndroidSettings[\"QuickLaunch\"] = \"quick_launch\";\n /**\n * Opens Search settings.\n */\n AndroidSettings[\"Search\"] = \"search\";\n /**\n * Opens Security settings.\n */\n AndroidSettings[\"Security\"] = \"security\";\n /**\n * Opens the main System Settings screen.\n */\n AndroidSettings[\"Settings\"] = \"settings\";\n /**\n * Opens Regulatory Information screen.\n */\n AndroidSettings[\"ShowRegulatoryInfo\"] = \"show_regulatory_info\";\n /**\n * Opens Sound & Volume settings.\n */\n AndroidSettings[\"Sound\"] = \"sound\";\n /**\n * Opens Internal Storage settings.\n */\n AndroidSettings[\"Storage\"] = \"storage\";\n /**\n * Opens Sync settings.\n */\n AndroidSettings[\"Sync\"] = \"sync\";\n /**\n * Opens Text-to-Speech (TTS) settings.\n *\n * Uses a non-public intent on some devices.\n */\n AndroidSettings[\"TextToSpeech\"] = \"text_to_speech\";\n /**\n * Opens Usage Access settings.\n *\n * Allows managing apps with access to usage data.\n */\n AndroidSettings[\"Usage\"] = \"usage\";\n /**\n * Opens User Dictionary settings.\n */\n AndroidSettings[\"UserDictionary\"] = \"user_dictionary\";\n /**\n * Opens Voice Input settings.\n */\n AndroidSettings[\"VoiceInput\"] = \"voice_input\";\n /**\n * Opens VPN settings.\n */\n AndroidSettings[\"VPN\"] = \"vpn\";\n /**\n * Opens Wi-Fi settings.\n */\n AndroidSettings[\"Wifi\"] = \"wifi\";\n /**\n * Opens Wi-Fi IP settings.\n *\n * Availability varies by device and Android version.\n */\n AndroidSettings[\"WifiIp\"] = \"wifi_ip\";\n /**\n * Opens Wireless & Networks settings.\n */\n AndroidSettings[\"Wireless\"] = \"wireless\";\n /**\n * Opens Zen Mode (Do Not Disturb) settings.\n *\n * This uses a non-public intent and may not work on all devices.\n */\n AndroidSettings[\"ZenMode\"] = \"zen_mode\";\n /**\n * Opens Zen Mode Priority settings.\n */\n AndroidSettings[\"ZenModePriority\"] = \"zen_mode_priority\";\n /**\n * Opens Zen Mode Blocked Effects settings.\n */\n AndroidSettings[\"ZenModeBlockedEffects\"] = \"zen_mode_blocked_effects\";\n})(AndroidSettings || (AndroidSettings = {}));\n/**\n * Enumeration of supported iOS system settings.\n *\n * @platform iOS\n *\n * @remarks\n * Apple officially supports opening only the app-specific settings screen.\n * All other values rely on undocumented URL schemes and may:\n *\n * - behave differently across iOS versions\n * - stop working in future releases\n * - be restricted during App Store review\n *\n * Availability is best-effort and not guaranteed.\n *\n * @since 1.0.0\n */\nexport var IOSSettings;\n(function (IOSSettings) {\n /**\n * Opens the app-specific settings screen.\n *\n * This is the ONLY settings destination officially supported by Apple\n * and is considered App Store safe.\n */\n IOSSettings[\"App\"] = \"app\";\n /**\n * Opens the app-specific notification settings.\n *\n * - iOS 16+: opens the dedicated notification settings screen\n * - iOS <16: falls back to the app settings screen\n */\n IOSSettings[\"AppNotification\"] = \"appNotification\";\n /**\n * Opens iOS \"About\" settings.\n */\n IOSSettings[\"About\"] = \"about\";\n /**\n * Opens Auto-Lock settings.\n */\n IOSSettings[\"AutoLock\"] = \"autoLock\";\n /**\n * Opens Bluetooth settings.\n */\n IOSSettings[\"Bluetooth\"] = \"bluetooth\";\n /**\n * Opens Date & Time settings.\n */\n IOSSettings[\"DateTime\"] = \"dateTime\";\n /**\n * Opens FaceTime settings.\n */\n IOSSettings[\"FaceTime\"] = \"facetime\";\n /**\n * Opens General settings.\n */\n IOSSettings[\"General\"] = \"general\";\n /**\n * Opens Keyboard settings.\n */\n IOSSettings[\"Keyboard\"] = \"keyboard\";\n /**\n * Opens iCloud settings.\n */\n IOSSettings[\"ICloud\"] = \"iCloud\";\n /**\n * Opens iCloud Storage & Backup settings.\n */\n IOSSettings[\"ICloudStorageBackup\"] = \"iCloudStorageBackup\";\n /**\n * Opens Language & Region (International) settings.\n */\n IOSSettings[\"International\"] = \"international\";\n /**\n * Opens Location Services settings.\n */\n IOSSettings[\"LocationServices\"] = \"locationServices\";\n /**\n * Opens Music settings.\n */\n IOSSettings[\"Music\"] = \"music\";\n /**\n * Opens Notes settings.\n */\n IOSSettings[\"Notes\"] = \"notes\";\n /**\n * Opens Notifications settings.\n *\n * Note: this is the global notifications screen,\n * not app-specific notifications.\n */\n IOSSettings[\"Notifications\"] = \"notifications\";\n /**\n * Opens Phone settings.\n */\n IOSSettings[\"Phone\"] = \"phone\";\n /**\n * Opens Photos settings.\n */\n IOSSettings[\"Photos\"] = \"photos\";\n /**\n * Opens Managed Configuration profiles list.\n */\n IOSSettings[\"ManagedConfigurationList\"] = \"managedConfigurationList\";\n /**\n * Opens Reset settings.\n */\n IOSSettings[\"Reset\"] = \"reset\";\n /**\n * Opens Ringtone settings.\n */\n IOSSettings[\"Ringtone\"] = \"ringtone\";\n /**\n * Opens Sounds settings.\n */\n IOSSettings[\"Sounds\"] = \"sounds\";\n /**\n * Opens Software Update settings.\n */\n IOSSettings[\"SoftwareUpdate\"] = \"softwareUpdate\";\n /**\n * Opens App Store settings.\n */\n IOSSettings[\"Store\"] = \"store\";\n /**\n * Opens App Tracking Transparency settings.\n *\n * Available on iOS 14+.\n */\n IOSSettings[\"Tracking\"] = \"tracking\";\n /**\n * Opens Wallpaper settings.\n */\n IOSSettings[\"Wallpaper\"] = \"wallpaper\";\n /**\n * Opens Wi-Fi settings.\n */\n IOSSettings[\"WiFi\"] = \"wifi\";\n /**\n * Opens Personal Hotspot (Tethering) settings.\n */\n IOSSettings[\"Tethering\"] = \"tethering\";\n /**\n * Opens Do Not Disturb settings.\n */\n IOSSettings[\"DoNotDisturb\"] = \"doNotDisturb\";\n /**\n * Opens Touch ID / Passcode settings.\n */\n IOSSettings[\"TouchIdPasscode\"] = \"touchIdPasscode\";\n /**\n * Opens Screen Time settings.\n */\n IOSSettings[\"ScreenTime\"] = \"screenTime\";\n /**\n * Opens Accessibility settings.\n */\n IOSSettings[\"Accessibility\"] = \"accessibility\";\n /**\n * Opens VPN settings.\n */\n IOSSettings[\"VPN\"] = \"vpn\";\n})(IOSSettings || (IOSSettings = {}));\n//# sourceMappingURL=definitions.js.map","/**\n * @file index.ts\n * This file exports the Settings and registers it with Capacitor.\n * It acts as the main entry point for accessing the plugin's functionality\n * across different platforms, including web.\n */\nimport { registerPlugin } from '@capacitor/core';\n/**\n * Main entry point for the Settings Capacitor plugin.\n *\n * This file registers the plugin with Capacitor and exports\n * both the runtime instance and the public TypeScript types.\n */\nconst Settings = registerPlugin('Settings', {\n web: () => import('./web').then((m) => new m.SettingsWeb()),\n});\nexport * from './definitions';\nexport { Settings };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { SettingsErrorCode } from './definitions';\n/**\n * Web implementation of the Settings plugin.\n *\n * This implementation exists to satisfy Capacitor's multi-platform contract.\n * Opening native system settings is not supported in web browsers.\n *\n * All methods follow the same state-based result model used on\n * Android and iOS:\n * - operations never throw\n * - Promise rejection is not used\n * - failures are reported via structured result objects\n */\nexport class SettingsWeb extends WebPlugin {\n constructor() {\n super();\n }\n // --- Open Settings ---\n /**\n * Attempts to open a platform-specific settings screen.\n *\n * This operation is not supported on the Web, as browsers do not\n * provide APIs to open operating system settings.\n */\n async open() {\n return {\n success: false,\n error: 'Opening system settings is not supported on the Web.',\n code: SettingsErrorCode.UNAVAILABLE,\n };\n }\n /**\n * Attempts to open an iOS settings screen.\n *\n * This operation is not supported on the Web.\n */\n async openIOS() {\n return {\n success: false,\n error: 'iOS settings are not available in web environments.',\n code: SettingsErrorCode.UNAVAILABLE,\n };\n }\n /**\n * Attempts to open an Android settings screen.\n *\n * This operation is not supported on the Web.\n */\n async openAndroid() {\n return {\n success: false,\n error: 'Android settings are not available in web environments.',\n code: SettingsErrorCode.UNAVAILABLE,\n };\n }\n // --- Plugin Info ---\n /**\n * Returns the plugin version.\n *\n * On the Web, this value represents the JavaScript package version\n * rather than a native implementation.\n */\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["SettingsErrorCode","AndroidSettings","IOSSettings","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACWA;IACX,CAAC,UAAU,iBAAiB,EAAE;IAC9B;IACA,IAAI,iBAAiB,CAAC,aAAa,CAAC,GAAG,aAAa;IACpD;IACA,IAAI,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,mBAAmB;IAChE;IACA,IAAI,iBAAiB,CAAC,aAAa,CAAC,GAAG,aAAa;IACpD;IACA,I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IACA;IACA;IACA;IACO,MAAM,WAAW,SAASC,cAAS,CAAC;IAC3C,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE;IACf,IAAI;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,OAAO;IACf,YAAY,OAAO,EAAE,KAAK;IAC1B,YAAY,KAAK,EAAE,sDAAsD;IACzE,YAAY,IAAI,EAAEJ,yBAAiB,CAAC,WAAW;IAC/C,SAAS;IACT,IAAI;IACJ;IACA;IACA;IACA;IACA;IACA,IAAI,MAAM,OAAO,GAAG;IACpB,QAAQ,OAAO;IACf,YAAY,OAAO,EAAE,KAAK;IAC1B,YAAY,KAAK,EAAE,qDAAqD;IACxE,YAAY,IAAI,EAAEA,yBAAiB,CAAC,WAAW;IAC/C,SAAS;IACT,IAAI;IACJ;IACA;IACA;IACA;IACA;IACA,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,OAAO;IACf,YAAY,OAAO,EAAE,KAAK;IAC1B,YAAY,KAAK,EAAE,yDAAyD;IAC5E,YAAY,IAAI,EAAEA,yBAAiB,CAAC,WAAW;IAC/C,SAAS;IACT,IAAI;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n/**\n * Standardized error codes used by the Settings plugin.\n *\n * These codes are returned as part of structured error objects\n * and allow consumers to implement programmatic error handling.\n *\n * Note:\n * On iOS (Swift Package Manager), errors are returned as data\n * objects rather than rejected Promises.\n *\n * @since 1.0.0\n */\nexport var SettingsErrorCode;\n(function (SettingsErrorCode) {\n /** The device does not have the requested hardware. */\n SettingsErrorCode[\"UNAVAILABLE\"] = \"UNAVAILABLE\";\n /** The user denied the permission or the feature is disabled in settings. */\n SettingsErrorCode[\"PERMISSION_DENIED\"] = \"PERMISSION_DENIED\";\n /** The Settings plugin failed to initialize (e.g., runtime error or Looper failure). */\n SettingsErrorCode[\"INIT_FAILED\"] = \"INIT_FAILED\";\n /** The requested Settings plugin type is not valid or not supported by the plugin. */\n SettingsErrorCode[\"UNKNOWN_TYPE\"] = \"UNKNOWN_TYPE\";\n})(SettingsErrorCode || (SettingsErrorCode = {}));\n/**\n * Enumeration of supported Android system settings.\n *\n * @platform Android\n *\n * @remarks\n * Android settings are opened via system Intents.\n * Availability depends on:\n *\n * - Android version\n * - device manufacturer (OEM)\n * - system configuration and user restrictions\n *\n * Some intents are not part of the public Android SDK and may not be\n * available on all devices.\n *\n * When a requested settings screen cannot be resolved, the plugin\n * resolves with:\n * `{ success: false, code: SettingsErrorCode.UNAVAILABLE }`\n *\n * @since 1.0.0\n */\nexport var AndroidSettings;\n(function (AndroidSettings) {\n /**\n * Opens Accessibility settings.\n */\n AndroidSettings[\"Accessibility\"] = \"accessibility\";\n /**\n * Opens the Add Account screen.\n */\n AndroidSettings[\"Account\"] = \"account\";\n /**\n * Opens Airplane Mode settings.\n */\n AndroidSettings[\"AirplaneMode\"] = \"airplane_mode\";\n /**\n * Opens Access Point Name (APN) settings.\n */\n AndroidSettings[\"Apn\"] = \"apn\";\n /**\n * Opens the Application Details screen for the current app.\n */\n AndroidSettings[\"ApplicationDetails\"] = \"application_details\";\n /**\n * Opens Application Development settings.\n *\n * Availability depends on developer options being enabled.\n */\n AndroidSettings[\"ApplicationDevelopment\"] = \"application_development\";\n /**\n * Opens Application settings.\n */\n AndroidSettings[\"Application\"] = \"application\";\n /**\n * Opens app-specific notification settings.\n */\n AndroidSettings[\"AppNotification\"] = \"app_notification\";\n /**\n * Opens Battery Optimization settings.\n *\n * Allows managing apps excluded from battery optimizations.\n */\n AndroidSettings[\"BatteryOptimization\"] = \"battery_optimization\";\n /**\n * Opens Bluetooth settings.\n */\n AndroidSettings[\"Bluetooth\"] = \"bluetooth\";\n /**\n * Opens Captioning settings.\n */\n AndroidSettings[\"Captioning\"] = \"captioning\";\n /**\n * Opens Cast device settings.\n */\n AndroidSettings[\"Cast\"] = \"cast\";\n /**\n * Opens Data Roaming settings.\n */\n AndroidSettings[\"DataRoaming\"] = \"data_roaming\";\n /**\n * Opens Date & Time settings.\n */\n AndroidSettings[\"Date\"] = \"date\";\n /**\n * Opens Display settings.\n */\n AndroidSettings[\"Display\"] = \"display\";\n /**\n * Opens Dream (Daydream / Screensaver) settings.\n */\n AndroidSettings[\"Dream\"] = \"dream\";\n /**\n * Opens Home app selection settings.\n */\n AndroidSettings[\"Home\"] = \"home\";\n /**\n * Opens Input Method (Keyboard) settings.\n */\n AndroidSettings[\"Keyboard\"] = \"keyboard\";\n /**\n * Opens Input Method Subtype settings.\n */\n AndroidSettings[\"KeyboardSubType\"] = \"keyboard_subtype\";\n /**\n * Opens Language & Input (Locale) settings.\n */\n AndroidSettings[\"Locale\"] = \"locale\";\n /**\n * Opens Location Services settings.\n */\n AndroidSettings[\"Location\"] = \"location\";\n /**\n * Opens Manage Applications settings.\n */\n AndroidSettings[\"ManageApplications\"] = \"manage_applications\";\n /**\n * Opens Manage All Applications settings.\n *\n * Availability depends on Android version and OEM.\n */\n AndroidSettings[\"ManageAllApplications\"] = \"manage_all_applications\";\n /**\n * Show settings for memory card storage\n */\n AndroidSettings[\"MemoryCard\"] = \"memory_card\";\n /**\n * Opens Network Operator settings.\n */\n AndroidSettings[\"Network\"] = \"network\";\n /**\n * Opens NFC settings.\n */\n AndroidSettings[\"Nfc\"] = \"nfc\";\n /**\n * Opens NFC Sharing settings.\n */\n AndroidSettings[\"NfcSharing\"] = \"nfcsharing\";\n /**\n * Opens NFC Payment settings.\n */\n AndroidSettings[\"NfcPayment\"] = \"nfc_payment\";\n /**\n * Opens Print settings.\n */\n AndroidSettings[\"Print\"] = \"print\";\n /**\n * Opens Privacy settings.\n */\n AndroidSettings[\"Privacy\"] = \"privacy\";\n /**\n * Opens Quick Launch settings.\n */\n AndroidSettings[\"QuickLaunch\"] = \"quick_launch\";\n /**\n * Opens Search settings.\n */\n AndroidSettings[\"Search\"] = \"search\";\n /**\n * Opens Security settings.\n */\n AndroidSettings[\"Security\"] = \"security\";\n /**\n * Opens the main System Settings screen.\n */\n AndroidSettings[\"Settings\"] = \"settings\";\n /**\n * Opens Regulatory Information screen.\n */\n AndroidSettings[\"ShowRegulatoryInfo\"] = \"show_regulatory_info\";\n /**\n * Opens Sound & Volume settings.\n */\n AndroidSettings[\"Sound\"] = \"sound\";\n /**\n * Opens Internal Storage settings.\n */\n AndroidSettings[\"Storage\"] = \"storage\";\n /**\n * Opens Sync settings.\n */\n AndroidSettings[\"Sync\"] = \"sync\";\n /**\n * Opens Text-to-Speech (TTS) settings.\n *\n * Uses a non-public intent on some devices.\n */\n AndroidSettings[\"TextToSpeech\"] = \"text_to_speech\";\n /**\n * Opens Usage Access settings.\n *\n * Allows managing apps with access to usage data.\n */\n AndroidSettings[\"Usage\"] = \"usage\";\n /**\n * Opens User Dictionary settings.\n */\n AndroidSettings[\"UserDictionary\"] = \"user_dictionary\";\n /**\n * Opens Voice Input settings.\n */\n AndroidSettings[\"VoiceInput\"] = \"voice_input\";\n /**\n * Opens VPN settings.\n */\n AndroidSettings[\"VPN\"] = \"vpn\";\n /**\n * Opens Wi-Fi settings.\n */\n AndroidSettings[\"Wifi\"] = \"wifi\";\n /**\n * Opens Wi-Fi IP settings.\n *\n * Availability varies by device and Android version.\n */\n AndroidSettings[\"WifiIp\"] = \"wifi_ip\";\n /**\n * Opens Wireless & Networks settings.\n */\n AndroidSettings[\"Wireless\"] = \"wireless\";\n /**\n * Opens Zen Mode (Do Not Disturb) settings.\n *\n * This uses a non-public intent and may not work on all devices.\n */\n AndroidSettings[\"ZenMode\"] = \"zen_mode\";\n /**\n * Opens Zen Mode Priority settings.\n */\n AndroidSettings[\"ZenModePriority\"] = \"zen_mode_priority\";\n /**\n * Opens Zen Mode Blocked Effects settings.\n */\n AndroidSettings[\"ZenModeBlockedEffects\"] = \"zen_mode_blocked_effects\";\n})(AndroidSettings || (AndroidSettings = {}));\n/**\n * Enumeration of supported iOS system settings.\n *\n * @platform iOS\n *\n * @remarks\n * Apple officially supports opening only the app-specific settings screen.\n * All other values rely on undocumented URL schemes and may:\n *\n * - behave differently across iOS versions\n * - stop working in future releases\n * - be restricted during App Store review\n *\n * Availability is best-effort and not guaranteed.\n *\n * @since 1.0.0\n */\nexport var IOSSettings;\n(function (IOSSettings) {\n /**\n * Opens the app-specific settings screen.\n *\n * This is the ONLY settings destination officially supported by Apple\n * and is considered App Store safe.\n */\n IOSSettings[\"App\"] = \"app\";\n /**\n * Opens the app-specific notification settings.\n *\n * - iOS 16+: opens the dedicated notification settings screen\n * - iOS <16: falls back to the app settings screen\n */\n IOSSettings[\"AppNotification\"] = \"appNotification\";\n /**\n * Opens iOS \"About\" settings.\n */\n IOSSettings[\"About\"] = \"about\";\n /**\n * Opens Auto-Lock settings.\n */\n IOSSettings[\"AutoLock\"] = \"autoLock\";\n /**\n * Opens Bluetooth settings.\n */\n IOSSettings[\"Bluetooth\"] = \"bluetooth\";\n /**\n * Opens Date & Time settings.\n */\n IOSSettings[\"DateTime\"] = \"dateTime\";\n /**\n * Opens FaceTime settings.\n */\n IOSSettings[\"FaceTime\"] = \"facetime\";\n /**\n * Opens General settings.\n */\n IOSSettings[\"General\"] = \"general\";\n /**\n * Opens Keyboard settings.\n */\n IOSSettings[\"Keyboard\"] = \"keyboard\";\n /**\n * Opens iCloud settings.\n */\n IOSSettings[\"ICloud\"] = \"iCloud\";\n /**\n * Opens iCloud Storage & Backup settings.\n */\n IOSSettings[\"ICloudStorageBackup\"] = \"iCloudStorageBackup\";\n /**\n * Opens Language & Region (International) settings.\n */\n IOSSettings[\"International\"] = \"international\";\n /**\n * Opens Location Services settings.\n */\n IOSSettings[\"LocationServices\"] = \"locationServices\";\n /**\n * Opens Music settings.\n */\n IOSSettings[\"Music\"] = \"music\";\n /**\n * Opens Notes settings.\n */\n IOSSettings[\"Notes\"] = \"notes\";\n /**\n * Opens Notifications settings.\n *\n * Note: this is the global notifications screen,\n * not app-specific notifications.\n */\n IOSSettings[\"Notifications\"] = \"notifications\";\n /**\n * Opens Phone settings.\n */\n IOSSettings[\"Phone\"] = \"phone\";\n /**\n * Opens Photos settings.\n */\n IOSSettings[\"Photos\"] = \"photos\";\n /**\n * Opens Managed Configuration profiles list.\n */\n IOSSettings[\"ManagedConfigurationList\"] = \"managedConfigurationList\";\n /**\n * Opens Reset settings.\n */\n IOSSettings[\"Reset\"] = \"reset\";\n /**\n * Opens Ringtone settings.\n */\n IOSSettings[\"Ringtone\"] = \"ringtone\";\n /**\n * Opens Sounds settings.\n */\n IOSSettings[\"Sounds\"] = \"sounds\";\n /**\n * Opens Software Update settings.\n */\n IOSSettings[\"SoftwareUpdate\"] = \"softwareUpdate\";\n /**\n * Opens App Store settings.\n */\n IOSSettings[\"Store\"] = \"store\";\n /**\n * Opens App Tracking Transparency settings.\n *\n * Available on iOS 14+.\n */\n IOSSettings[\"Tracking\"] = \"tracking\";\n /**\n * Opens Wallpaper settings.\n */\n IOSSettings[\"Wallpaper\"] = \"wallpaper\";\n /**\n * Opens Wi-Fi settings.\n */\n IOSSettings[\"WiFi\"] = \"wifi\";\n /**\n * Opens Personal Hotspot (Tethering) settings.\n */\n IOSSettings[\"Tethering\"] = \"tethering\";\n /**\n * Opens Do Not Disturb settings.\n */\n IOSSettings[\"DoNotDisturb\"] = \"doNotDisturb\";\n /**\n * Opens Touch ID / Passcode settings.\n */\n IOSSettings[\"TouchIdPasscode\"] = \"touchIdPasscode\";\n /**\n * Opens Screen Time settings.\n */\n IOSSettings[\"ScreenTime\"] = \"screenTime\";\n /**\n * Opens Accessibility settings.\n */\n IOSSettings[\"Accessibility\"] = \"accessibility\";\n /**\n * Opens VPN settings.\n */\n IOSSettings[\"VPN\"] = \"vpn\";\n})(IOSSettings || (IOSSettings = {}));\n//# sourceMappingURL=definitions.js.map","/**\n * @file index.ts\n * This file exports the Settings and registers it with Capacitor.\n * It acts as the main entry point for accessing the plugin's functionality\n * across different platforms, including web.\n */\nimport { registerPlugin } from '@capacitor/core';\n/**\n * Main entry point for the Settings Capacitor plugin.\n *\n * This file registers the plugin with Capacitor and exports\n * both the runtime instance and the public TypeScript types.\n */\nconst Settings = registerPlugin('Settings', {\n web: () => import('./web').then((m) => new m.SettingsWeb()),\n});\nexport * from './definitions';\nexport { Settings };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\n/**\n * Web implementation of the Settings plugin.\n *\n * This implementation exists to satisfy Capacitor's multi-platform contract.\n * Opening native system settings is not supported in web browsers.\n *\n * All methods follow the same state-based result model used on\n * Android and iOS:\n * - operations never throw\n * - Promise rejection is not used\n * - failures are reported via structured result objects\n */\nexport class SettingsWeb extends WebPlugin {\n constructor() {\n super();\n }\n // --- Open Settings ---\n /**\n * Attempts to open a platform-specific settings screen.\n *\n * This operation is not supported on the Web, as browsers do not\n * provide APIs to open operating system settings.\n */\n async open() {\n this.unavailable('Opening system settings is not supported on the Web.');\n }\n /**\n * Attempts to open an iOS settings screen.\n *\n * This operation is not supported on the Web.\n */\n async openIOS() {\n this.unavailable('iOS settings are not available in web environments.');\n }\n /**\n * Attempts to open an Android settings screen.\n *\n * This operation is not supported on the Web.\n */\n async openAndroid() {\n this.unavailable('Android settings are not available in web environments.');\n }\n // --- Plugin Info ---\n /**\n * Returns the plugin version.\n *\n * On the Web, this value represents the JavaScript package version\n * rather than a native implementation.\n */\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["SettingsErrorCode","AndroidSettings","IOSSettings","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACWA;IACX,CAAC,UAAU,iBAAiB,EAAE;IAC9B;IACA,IAAI,i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C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;;ICdD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACO,MAAM,WAAW,SAASC,cAAS,CAAC;IAC3C,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE;IACf,IAAI;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,IAAI,CAAC,WAAW,CAAC,sDAAsD,CAAC;IAChF,IAAI;IACJ;IACA;IACA;IACA;IACA;IACA,IAAI,MAAM,OAAO,GAAG;IACpB,QAAQ,IAAI,CAAC,WAAW,CAAC,qDAAqD,CAAC;IAC/E,IAAI;IACJ;IACA;IACA;IACA;IACA;IACA,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,IAAI,CAAC,WAAW,CAAC,yDAAyD,CAAC;IACnF,IAAI;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ;;;;;;;;;;;;;;;"}
@@ -36,7 +36,7 @@ public struct SettingsConfig {
36
36
  // MARK: - Private Defaults
37
37
 
38
38
  // Default values
39
- private let defaultVerboseLogging = false
39
+ private static let defaultVerboseLogging = false
40
40
 
41
41
  // MARK: - Init
42
42
 
@@ -46,9 +46,10 @@ public struct SettingsConfig {
46
46
  - Parameter plugin: The CAPPlugin instance used to access typed configuration.
47
47
  */
48
48
  init(plugin: CAPPlugin) {
49
- // Use getConfigValue(key) to ensure compatibility across all v8 environments
49
+ let config = plugin.getConfig()
50
50
 
51
- // Bool - Verbose Logging
52
- verboseLogging = plugin.getConfigValue(Keys.verboseLogging) as? Bool ?? defaultVerboseLogging
51
+ // Bool
52
+ verboseLogging =
53
+ config.getBoolean(Keys.verboseLogging, Self.defaultVerboseLogging)
53
54
  }
54
55
  }
@@ -0,0 +1,30 @@
1
+ import Foundation
2
+
3
+ /**
4
+ Native error model for the Settings plugin (iOS).
5
+
6
+ This enum represents all possible error categories
7
+ produced by the native implementation.
8
+
9
+ IMPORTANT:
10
+ - Must NOT reference Capacitor
11
+ - Must NOT reference JavaScript
12
+ - Mapping to JS-facing error codes happens ONLY in the Plugin layer
13
+ */
14
+ enum SettingsError: Error {
15
+ case unavailable(String)
16
+ case permissionDenied(String)
17
+ case initFailed(String)
18
+ case unknownType(String)
19
+
20
+ /// Human-readable error message
21
+ var message: String {
22
+ switch self {
23
+ case .unavailable(let message),
24
+ .permissionDenied(let message),
25
+ .initFailed(let message),
26
+ .unknownType(let message):
27
+ return message
28
+ }
29
+ }
30
+ }
@@ -4,13 +4,14 @@ import UIKit
4
4
  /**
5
5
  Native iOS implementation for the Settings plugin.
6
6
 
7
- This class contains ONLY platform logic and must not:
8
- - access CAPPluginCall
9
- - depend on Capacitor
10
- - contain JavaScript or bridge-related logic
11
-
12
- Mapping from JavaScript-facing options to platform-specific
13
- settings URLs is delegated to SettingsUtils.
7
+ Responsibilities:
8
+ - Perform platform-specific operations
9
+ - Throw typed SettingsError values on failure
10
+
11
+ Forbidden:
12
+ - Accessing CAPPluginCall
13
+ - Referencing Capacitor APIs
14
+ - Constructing JS payloads
14
15
  */
15
16
  @objc public final class SettingsImpl: NSObject {
16
17
 
@@ -22,22 +23,13 @@ import UIKit
22
23
  super.init()
23
24
  }
24
25
 
25
- // MARK: - Result
26
-
27
- struct Result {
28
- let success: Bool
29
- let error: String?
30
- let code: String?
31
- }
32
-
33
26
  // MARK: - Configuration
34
27
 
35
28
  /**
36
- Applies the plugin configuration.
29
+ Applies static plugin configuration.
37
30
 
38
- This method should be called exactly once during plugin initialization.
39
- Its responsibility is to translate configuration values into runtime
40
- behavior (e.g. enabling verbose logging).
31
+ This method must be called exactly once
32
+ during plugin initialization.
41
33
  */
42
34
  func applyConfig(_ config: SettingsConfig) {
43
35
  self.config = config
@@ -50,35 +42,24 @@ import UIKit
50
42
  /**
51
43
  Opens the requested iOS settings page.
52
44
 
53
- - Parameter option: The settings option to open.
54
-
55
- - Returns:
56
- - success: Indicates whether the URL was valid and dispatched.
57
- - error: Optional human-readable error.
58
- - code: Optional machine-readable error code.
45
+ - Parameter option: JS-facing settings key
46
+ - Throws: SettingsError if the operation cannot be completed
59
47
  */
60
- func open(option: String?) -> Result {
48
+ func open(option: String?) throws {
61
49
  guard let url = SettingsUtils.resolveSettingsURL(for: option) else {
62
- return Result(
63
- success: false,
64
- error: "Requested setting is not available on iOS",
65
- code: "UNAVAILABLE"
50
+ throw SettingsError.unavailable(
51
+ "Requested setting is not available on iOS"
66
52
  )
67
53
  }
68
54
 
69
55
  guard UIApplication.shared.canOpenURL(url) else {
70
- SettingsLogger.debug("Cannot open URL:", url.absoluteString)
71
- return Result(
72
- success: false,
73
- error: "Cannot open settings URL",
74
- code: "UNAVAILABLE"
56
+ throw SettingsError.unavailable(
57
+ "Cannot open settings URL"
75
58
  )
76
59
  }
77
60
 
78
- DispatchQueue.main.async(execute: DispatchWorkItem {
61
+ DispatchQueue.main.async {
79
62
  UIApplication.shared.open(url, options: [:])
80
- })
81
-
82
- return Result(success: true, error: nil, code: nil)
63
+ }
83
64
  }
84
65
  }
@@ -4,20 +4,22 @@ import Capacitor
4
4
  /**
5
5
  Capacitor bridge for the Settings plugin.
6
6
 
7
- This file MUST:
8
- - read input from CAPPluginCall
9
- - delegate logic to SettingsImpl
10
- - resolve calls using state-based results
7
+ Responsibilities:
8
+ - Parse JS input
9
+ - Delegate to SettingsImpl
10
+ - Resolve or reject CAPPluginCall
11
11
  */
12
12
  @objc(SettingsPlugin)
13
13
  public final class SettingsPlugin: CAPPlugin, CAPBridgedPlugin {
14
14
 
15
- // Configuration instance
16
- private var config: SettingsConfig?
15
+ // MARK: - Properties
17
16
 
18
17
  /// An instance of the implementation class that contains the plugin's core functionality.
19
18
  private let implementation = SettingsImpl()
20
19
 
20
+ // Configuration instance
21
+ private var config: SettingsConfig?
22
+
21
23
  /// The unique identifier for the plugin.
22
24
  public let identifier = "SettingsPlugin"
23
25
 
@@ -36,6 +38,8 @@ public final class SettingsPlugin: CAPPlugin, CAPBridgedPlugin {
36
38
  CAPPluginMethod(name: "getPluginVersion", returnType: CAPPluginReturnPromise)
37
39
  ]
38
40
 
41
+ // MARK: - Lifecycle
42
+
39
43
  /**
40
44
  Plugin lifecycle entry point.
41
45
 
@@ -52,19 +56,55 @@ public final class SettingsPlugin: CAPPlugin, CAPBridgedPlugin {
52
56
  implementation.applyConfig(cfg)
53
57
 
54
58
  // Log if verbose logging is enabled
55
- SettingsLogger.debug("Settings plugin loaded with config:", cfg)
59
+ SettingsLogger.debug("Settings plugin loaded")
60
+ }
61
+
62
+ // MARK: - Error Mapping
63
+
64
+ /**
65
+ Maps native SettingsError values to JS-facing error codes.
66
+ */
67
+ private func reject(_ call: CAPPluginCall, error: SettingsError) {
68
+ let code: String
69
+
70
+ switch error {
71
+ case .unavailable:
72
+ code = "UNAVAILABLE"
73
+ case .permissionDenied:
74
+ code = "PERMISSION_DENIED"
75
+ case .initFailed:
76
+ code = "INIT_FAILED"
77
+ case .unknownType:
78
+ code = "UNKNOWN_TYPE"
79
+ }
80
+
81
+ call.reject(error.message, code)
56
82
  }
57
83
 
58
84
  // MARK: - Settings
59
85
 
60
86
  /// Opens the requested iOS settings page.
61
87
  @objc func open(_ call: CAPPluginCall) {
62
- resolveOpenResult(call, option: call.getString("optionIOS", ""))
88
+ let option = call.getString("optionIOS", "")
89
+ handleOpen(call, option: option)
63
90
  }
64
91
 
65
92
  /// Opens the requested iOS settings page.
66
93
  @objc func openIOS(_ call: CAPPluginCall) {
67
- resolveOpenResult(call, option: call.getString("option", ""))
94
+ let option = call.getString("option", "")
95
+ handleOpen(call, option: option)
96
+ }
97
+
98
+ ///
99
+ private func handleOpen(_ call: CAPPluginCall, option: String) {
100
+ do {
101
+ try implementation.open(option: option)
102
+ call.resolve()
103
+ } catch let error as SettingsError {
104
+ reject(call, error: error)
105
+ } catch {
106
+ call.reject("Unknown error", "UNKNOWN")
107
+ }
68
108
  }
69
109
 
70
110
  // MARK: - Version
@@ -76,28 +116,4 @@ public final class SettingsPlugin: CAPPlugin, CAPBridgedPlugin {
76
116
  "version": PluginVersion.number
77
117
  ])
78
118
  }
79
-
80
- // MARK: - Helpers
81
-
82
- /// Resolves the result of an open settings call.
83
- private func resolveOpenResult(
84
- _ call: CAPPluginCall,
85
- option: String
86
- ) {
87
- let result = implementation.open(option: option)
88
-
89
- var payload: [String: Any] = [
90
- "success": result.success
91
- ]
92
-
93
- if let error = result.error {
94
- payload["error"] = error
95
- }
96
-
97
- if let code = result.code {
98
- payload["code"] = code
99
- }
100
-
101
- call.resolve(payload)
102
- }
103
119
  }
@@ -10,7 +10,7 @@ import Foundation
10
10
  public enum PluginVersion {
11
11
  /**
12
12
  The semantic version string of the plugin.
13
- Value synchronized from package.json: "8.0.0"
13
+ Value synchronized from package.json: "8.0.2"
14
14
  */
15
- public static let number = "8.0.0"
15
+ public static let number = "8.0.2"
16
16
  }