Skip to content

Commit

Permalink
fix extension renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrico972 committed Dec 13, 2024
1 parent 4853436 commit e12dda4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugin/src/withAirshipIOS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { mergeContents, MergeResults } from '@expo/config-plugins/build/utils/ge

const DEFAULT_NOTIFICATION_SERVICE_EXTENSION_TARGET_NAME = "NotificationServiceExtension";
const NOTIFICATION_SERVICE_FILE_NAME = "AirshipNotificationService.swift";
const NOTIFICATION_SERVICE_INFO_PLIST_FILE_NAME = "AirshipNotificationServiceExtension-Info.plist";
const NOTIFICATION_SERVICE_INFO_PLIST_FILE_NAME = "NotificationServiceExtension-Info.plist";

const withCapabilities: ConfigPlugin<AirshipIOSPluginProps> = (config, props) => {
return withInfoPlist(config, (plist) => {
Expand Down Expand Up @@ -216,13 +216,13 @@ const withAirshipServiceExtensionPod: ConfigPlugin<AirshipIOSPluginProps> = (con
});
};

const withEasManagedCredentials: ConfigPlugin<AirshipIOSPluginProps> = (config) => {
const withEasManagedCredentials: ConfigPlugin<AirshipIOSPluginProps> = (config, props) => {
assert(config.ios?.bundleIdentifier, "Missing 'ios.bundleIdentifier' in app config.")
config.extra = getEasManagedCredentialsConfigExtra(config as ExpoConfig);
config.extra = getEasManagedCredentialsConfigExtra(config as ExpoConfig, props);
return config;
}

function getEasManagedCredentialsConfigExtra(config: ExpoConfig): {[k: string]: any} {
function getEasManagedCredentialsConfigExtra(config: ExpoConfig, props: AirshipIOSPluginProps): {[k: string]: any} {
return {
...config.extra,
eas: {
Expand All @@ -237,8 +237,8 @@ function getEasManagedCredentialsConfigExtra(config: ExpoConfig): {[k: string]:
...(config.extra?.eas?.build?.experimental?.ios?.appExtensions ?? []),
{
// Sync up with the new target
targetName: NOTIFICATION_SERVICE_EXTENSION_TARGET_NAME,
bundleIdentifier: `${config?.ios?.bundleIdentifier}.${NOTIFICATION_SERVICE_EXTENSION_TARGET_NAME}`,
targetName: props.notificationServiceTargetName ?? DEFAULT_NOTIFICATION_SERVICE_EXTENSION_TARGET_NAME,
bundleIdentifier: `${config?.ios?.bundleIdentifier}.${props.notificationServiceTargetName ?? DEFAULT_NOTIFICATION_SERVICE_EXTENSION_TARGET_NAME}`,
}
]
}
Expand Down

0 comments on commit e12dda4

Please sign in to comment.