Skip to content

Commit

Permalink
make notification service extension optionnal
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrico972 committed Nov 26, 2024
1 parent 1135465 commit c896b36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions plugin/src/withAirship.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export type AirshipAndroidPluginProps = {

export type AirshipIOSPluginProps = {
mode: 'development' | 'production';
notificationServiceExtension?: boolean;
}

export type AirshipPluginProps = {
Expand Down
9 changes: 6 additions & 3 deletions plugin/src/withAirshipIOS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,11 @@ const withAirshipServiceExtensionPod: ConfigPlugin<AirshipIOSPluginProps> = (con
export const withAirshipIOS: ConfigPlugin<AirshipIOSPluginProps> = (config, props) => {
config = withCapabilities(config, props);
config = withAPNSEnvironment(config, props);
config = withNotificationServiceExtension(config, props);
config = withExtensionTargetInXcodeProject(config, props);
config = withAirshipServiceExtensionPod(config, props);

if (props.notificationServiceExtension) {
config = withNotificationServiceExtension(config, props);
config = withExtensionTargetInXcodeProject(config, props);
config = withAirshipServiceExtensionPod(config, props);
}
return config;
};

0 comments on commit c896b36

Please sign in to comment.