@@ -19,8 +19,13 @@ const withVoltra: VoltraConfigPlugin = (config, props) => {
1919 // Validate props at entry point
2020 validateProps ( props )
2121
22+ // After validation, props is guaranteed to be defined and have groupIdentifier
23+ if ( ! props ) {
24+ throw new Error ( 'Voltra plugin requires configuration. Please provide at least groupIdentifier in your plugin config.' )
25+ }
26+
2227 // Use deploymentTarget from props if provided, otherwise fall back to default
23- const deploymentTarget = props ? .deploymentTarget || IOS . DEPLOYMENT_TARGET
28+ const deploymentTarget = props . deploymentTarget || IOS . DEPLOYMENT_TARGET
2429 const targetName = `${ IOSConfig . XcodeUtils . sanitizedName ( config . name ) } LiveActivity`
2530 const bundleIdentifier = `${ config . ios ?. bundleIdentifier } .${ targetName } `
2631
@@ -34,9 +39,9 @@ const withVoltra: VoltraConfigPlugin = (config, props) => {
3439 ...config . ios ?. infoPlist ,
3540 NSSupportsLiveActivities : true ,
3641 NSSupportsLiveActivitiesFrequentUpdates : false ,
37- ... ( props ?. groupIdentifier ? { Voltra_AppGroupIdentifier : props . groupIdentifier } : { } ) ,
42+ Voltra_AppGroupIdentifier : props . groupIdentifier ,
3843 // Store widget IDs in Info.plist for native module to access
39- ...( props ? .widgets && props . widgets . length > 0 ? { Voltra_WidgetIds : props . widgets . map ( ( w ) => w . id ) } : { } ) ,
44+ ...( props . widgets && props . widgets . length > 0 ? { Voltra_WidgetIds : props . widgets . map ( ( w ) => w . id ) } : { } ) ,
4045 } ,
4146 }
4247
@@ -45,12 +50,12 @@ const withVoltra: VoltraConfigPlugin = (config, props) => {
4550 targetName,
4651 bundleIdentifier,
4752 deploymentTarget,
48- widgets : props ? .widgets ,
49- groupIdentifier : props ? .groupIdentifier ,
53+ widgets : props . widgets ,
54+ groupIdentifier : props . groupIdentifier ,
5055 } )
5156
5257 // Optionally enable push notifications
53- if ( props ? .enablePushNotifications ) {
58+ if ( props . enablePushNotifications ) {
5459 config = withPushNotifications ( config )
5560 }
5661
0 commit comments