Skip to content

Commit

Permalink
fix(cli/ios): Read handleApplicationNotifications configuration option (
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Oct 26, 2022
1 parent aea5310 commit 99ccf18
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cli/src/declarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,15 @@ export interface CapacitorConfig {
* @default recommended
*/
preferredContentMode?: 'recommended' | 'desktop' | 'mobile';

/**
* Configure if Capacitor will handle local/push notifications.
* Set to false if you want to use your own UNUserNotificationCenter to handle notifications.
*
* @since 4.4.1
* @default true
*/
handleApplicationNotifications?: boolean;
};

server?: {
Expand Down
3 changes: 3 additions & 0 deletions ios/Capacitor/Capacitor/CAPInstanceDescriptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ internal extension InstanceDescriptor {
if let preferredMode = (config[keyPath: "ios.preferredContentMode"] as? String) {
preferredContentMode = preferredMode
}
if let handleNotifications = config[keyPath: "ios.handleApplicationNotifications"] as? Bool {
handleApplicationNotifications = handleNotifications
}
}
}
// swiftlint:enable cyclomatic_complexity
Expand Down

0 comments on commit 99ccf18

Please sign in to comment.