Skip to content

App Settings

The App Settings feature allows users to quickly access the app’s system settings, making it easier to manage permissions, notifications, and other preferences. By integrating a native method in Swift and exposing it to JavaScript, web-based views can seamlessly trigger the settings page, enhancing user experience and accessibility.

Implementation

  1. Integrate with Your View Controller
    • Add the following method to MainViewController.swift to handle openning app settings:
swift
@objc func openAppSettings(_ params: [String: String]) {
    UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!, options: [:], completionHandler: nil)
}
  1. Open App Settings in JavaScript
    • To open app settings from JavaScript, call the native openAppSettings method:
javascript
enClose({
    nativeCall: 'openAppSettings'
});