@use-voltra/ios-client 1.4.0 → 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -0
- package/Voltra.podspec +28 -0
- package/build/commonjs/VoltraModule.js +13 -0
- package/build/commonjs/VoltraModule.js.map +1 -0
- package/build/commonjs/components/VoltraLiveActivityPreview.js +30 -0
- package/build/commonjs/components/VoltraLiveActivityPreview.js.map +1 -0
- package/build/commonjs/components/VoltraView.js +50 -0
- package/build/commonjs/components/VoltraView.js.map +1 -0
- package/build/commonjs/components/VoltraWidgetPreview.js +58 -0
- package/build/commonjs/components/VoltraWidgetPreview.js.map +1 -0
- package/build/commonjs/events.js +32 -0
- package/build/commonjs/events.js.map +1 -0
- package/build/commonjs/helpers.js +26 -0
- package/build/commonjs/helpers.js.map +1 -0
- package/build/commonjs/index.js +226 -0
- package/build/commonjs/index.js.map +1 -0
- package/build/commonjs/live-activity/api.js +168 -0
- package/build/commonjs/live-activity/api.js.map +1 -0
- package/build/commonjs/logger.js +39 -0
- package/build/commonjs/logger.js.map +1 -0
- package/build/commonjs/native/NativeVoltra.js +15 -0
- package/build/commonjs/native/NativeVoltra.js.map +1 -0
- package/build/commonjs/native/VoltraRNNativeComponent.ts +9 -0
- package/build/commonjs/package.json +1 -0
- package/build/commonjs/preload.js +54 -0
- package/build/commonjs/preload.js.map +1 -0
- package/build/commonjs/types.js +2 -0
- package/build/commonjs/types.js.map +1 -0
- package/build/commonjs/utils/assertRunningOnApple.js +16 -0
- package/build/commonjs/utils/assertRunningOnApple.js.map +1 -0
- package/build/commonjs/utils/helpers.js +19 -0
- package/build/commonjs/utils/helpers.js.map +1 -0
- package/build/commonjs/utils/index.js +28 -0
- package/build/commonjs/utils/index.js.map +1 -0
- package/build/commonjs/utils/useUpdateOnHMR.js +25 -0
- package/build/commonjs/utils/useUpdateOnHMR.js.map +1 -0
- package/build/commonjs/widgets/server-credentials.js +18 -0
- package/build/commonjs/widgets/server-credentials.js.map +1 -0
- package/build/commonjs/widgets/widget-api.js +55 -0
- package/build/commonjs/widgets/widget-api.js.map +1 -0
- package/build/module/VoltraModule.js +4 -0
- package/build/module/VoltraModule.js.map +1 -0
- package/build/module/components/VoltraLiveActivityPreview.js +25 -0
- package/build/module/components/VoltraLiveActivityPreview.js.map +1 -0
- package/build/module/components/VoltraView.js +44 -0
- package/build/module/components/VoltraView.js.map +1 -0
- package/build/module/components/VoltraWidgetPreview.js +53 -0
- package/build/module/components/VoltraWidgetPreview.js.map +1 -0
- package/build/module/events.js +28 -0
- package/build/module/events.js.map +1 -0
- package/build/module/helpers.js +21 -0
- package/build/module/helpers.js.map +1 -0
- package/build/module/index.js +17 -0
- package/build/module/index.js.map +1 -0
- package/build/module/live-activity/api.js +158 -0
- package/build/module/live-activity/api.js.map +1 -0
- package/build/module/logger.js +35 -0
- package/build/module/logger.js.map +1 -0
- package/build/module/native/NativeVoltra.js +11 -0
- package/build/module/native/NativeVoltra.js.map +1 -0
- package/build/module/native/VoltraRNNativeComponent.ts +9 -0
- package/build/module/package.json +1 -0
- package/build/module/preload.js +48 -0
- package/build/module/preload.js.map +1 -0
- package/build/module/types.js +2 -0
- package/build/module/types.js.map +1 -0
- package/build/module/utils/assertRunningOnApple.js +11 -0
- package/build/module/utils/assertRunningOnApple.js.map +1 -0
- package/build/module/utils/helpers.js +4 -0
- package/build/module/utils/helpers.js.map +1 -0
- package/build/module/utils/index.js +5 -0
- package/build/module/utils/index.js.map +1 -0
- package/build/module/utils/useUpdateOnHMR.js +20 -0
- package/build/module/utils/useUpdateOnHMR.js.map +1 -0
- package/build/module/widgets/server-credentials.js +13 -0
- package/build/module/widgets/server-credentials.js.map +1 -0
- package/build/module/widgets/widget-api.js +45 -0
- package/build/module/widgets/widget-api.js.map +1 -0
- package/build/typescript/commonjs/VoltraModule.d.ts +3 -0
- package/build/typescript/commonjs/VoltraModule.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraLiveActivityPreview.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraView.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraWidgetPreview.d.ts.map +1 -0
- package/build/typescript/commonjs/events.d.ts.map +1 -0
- package/build/typescript/commonjs/helpers.d.ts.map +1 -0
- package/build/{types → typescript/commonjs}/index.d.ts +5 -0
- package/build/typescript/commonjs/index.d.ts.map +1 -0
- package/build/typescript/commonjs/live-activity/api.d.ts.map +1 -0
- package/build/typescript/commonjs/logger.d.ts.map +1 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts +100 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts.map +1 -0
- package/build/typescript/commonjs/native/VoltraRNNativeComponent.d.ts +8 -0
- package/build/typescript/commonjs/native/VoltraRNNativeComponent.d.ts.map +1 -0
- package/build/typescript/commonjs/package.json +1 -0
- package/build/typescript/commonjs/preload.d.ts.map +1 -0
- package/build/typescript/commonjs/types.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/assertRunningOnApple.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/helpers.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/index.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/useUpdateOnHMR.d.ts.map +1 -0
- package/build/typescript/commonjs/widgets/server-credentials.d.ts.map +1 -0
- package/build/typescript/commonjs/widgets/widget-api.d.ts.map +1 -0
- package/build/typescript/module/VoltraModule.d.ts +3 -0
- package/build/typescript/module/VoltraModule.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraLiveActivityPreview.d.ts +7 -0
- package/build/typescript/module/components/VoltraLiveActivityPreview.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraView.d.ts +12 -0
- package/build/typescript/module/components/VoltraView.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraWidgetPreview.d.ts +9 -0
- package/build/typescript/module/components/VoltraWidgetPreview.d.ts.map +1 -0
- package/build/typescript/module/events.d.ts +33 -0
- package/build/typescript/module/events.d.ts.map +1 -0
- package/build/typescript/module/helpers.d.ts +3 -0
- package/build/typescript/module/helpers.d.ts.map +1 -0
- package/build/typescript/module/index.d.ts +18 -0
- package/build/typescript/module/index.d.ts.map +1 -0
- package/build/typescript/module/live-activity/api.d.ts +35 -0
- package/build/typescript/module/live-activity/api.d.ts.map +1 -0
- package/build/typescript/module/logger.d.ts +16 -0
- package/build/typescript/module/logger.d.ts.map +1 -0
- package/build/typescript/module/native/NativeVoltra.d.ts +100 -0
- package/build/typescript/module/native/NativeVoltra.d.ts.map +1 -0
- package/build/typescript/module/native/VoltraRNNativeComponent.d.ts +8 -0
- package/build/typescript/module/native/VoltraRNNativeComponent.d.ts.map +1 -0
- package/build/typescript/module/package.json +1 -0
- package/build/typescript/module/preload.d.ts +6 -0
- package/build/typescript/module/preload.d.ts.map +1 -0
- package/build/typescript/module/types.d.ts +2 -0
- package/build/typescript/module/types.d.ts.map +1 -0
- package/build/typescript/module/utils/assertRunningOnApple.d.ts +2 -0
- package/build/typescript/module/utils/assertRunningOnApple.d.ts.map +1 -0
- package/build/{esm/utils/helpers.js → typescript/module/utils/helpers.d.ts} +1 -1
- package/build/typescript/module/utils/helpers.d.ts.map +1 -0
- package/build/{esm/utils/index.js → typescript/module/utils/index.d.ts} +1 -1
- package/build/typescript/module/utils/index.d.ts.map +1 -0
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts +5 -0
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts.map +1 -0
- package/build/typescript/module/widgets/server-credentials.d.ts +5 -0
- package/build/typescript/module/widgets/server-credentials.d.ts.map +1 -0
- package/build/typescript/module/widgets/widget-api.d.ts +11 -0
- package/build/typescript/module/widgets/widget-api.d.ts.map +1 -0
- package/expo-plugin/app.plugin.js +3 -0
- package/expo-plugin/build/cjs/constants.js +23 -0
- package/expo-plugin/build/cjs/constants.js.map +1 -0
- package/expo-plugin/build/cjs/index.js +51 -0
- package/expo-plugin/build/cjs/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios/eas.js +28 -0
- package/expo-plugin/build/cjs/ios/eas.js.map +1 -0
- package/expo-plugin/build/cjs/ios/entitlements.js +46 -0
- package/expo-plugin/build/cjs/ios/entitlements.js.map +1 -0
- package/expo-plugin/build/cjs/ios/index.js +39 -0
- package/expo-plugin/build/cjs/ios/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios/infoPlist.js +51 -0
- package/expo-plugin/build/cjs/ios/infoPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios/pushNotifications.js +22 -0
- package/expo-plugin/build/cjs/ios/pushNotifications.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/eas.js +66 -0
- package/expo-plugin/build/cjs/ios-widget/eas.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/assets.js +199 -0
- package/expo-plugin/build/cjs/ios-widget/files/assets.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/entitlements.js +77 -0
- package/expo-plugin/build/cjs/ios-widget/files/entitlements.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/index.js +92 -0
- package/expo-plugin/build/cjs/ios-widget/files/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js +91 -0
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift.js +443 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/fonts.js +151 -0
- package/expo-plugin/build/cjs/ios-widget/fonts.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/index.js +46 -0
- package/expo-plugin/build/cjs/ios-widget/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/podfile.js +41 -0
- package/expo-plugin/build/cjs/ios-widget/podfile.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js +99 -0
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js +247 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js +91 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js +79 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js +155 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js +71 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js +74 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js +113 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js.map +1 -0
- package/expo-plugin/build/cjs/utils/fileDiscovery.js +120 -0
- package/expo-plugin/build/cjs/utils/fileDiscovery.js.map +1 -0
- package/expo-plugin/build/cjs/utils/urlScheme.js +40 -0
- package/expo-plugin/build/cjs/utils/urlScheme.js.map +1 -0
- package/expo-plugin/build/cjs/validation.js +55 -0
- package/expo-plugin/build/cjs/validation.js.map +1 -0
- package/expo-plugin/build/esm/constants.js +20 -0
- package/expo-plugin/build/esm/constants.js.map +1 -0
- package/expo-plugin/build/esm/index.js +49 -0
- package/expo-plugin/build/esm/index.js.map +1 -0
- package/expo-plugin/build/esm/ios/eas.js +24 -0
- package/expo-plugin/build/esm/ios/eas.js.map +1 -0
- package/expo-plugin/build/esm/ios/entitlements.js +42 -0
- package/expo-plugin/build/esm/ios/entitlements.js.map +1 -0
- package/expo-plugin/build/esm/ios/index.js +34 -0
- package/expo-plugin/build/esm/ios/index.js.map +1 -0
- package/expo-plugin/build/esm/ios/infoPlist.js +47 -0
- package/expo-plugin/build/esm/ios/infoPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios/pushNotifications.js +18 -0
- package/expo-plugin/build/esm/ios/pushNotifications.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/eas.js +62 -0
- package/expo-plugin/build/esm/ios-widget/eas.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/assets.js +163 -0
- package/expo-plugin/build/esm/ios-widget/files/assets.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/entitlements.js +37 -0
- package/expo-plugin/build/esm/ios-widget/files/entitlements.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/index.js +55 -0
- package/expo-plugin/build/esm/ios-widget/files/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js +55 -0
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/swift.js +403 -0
- package/expo-plugin/build/esm/ios-widget/files/swift.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/fonts.js +111 -0
- package/expo-plugin/build/esm/ios-widget/fonts.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/index.js +42 -0
- package/expo-plugin/build/esm/ios-widget/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/podfile.js +37 -0
- package/expo-plugin/build/esm/ios-widget/podfile.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js +92 -0
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js +210 -0
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js +87 -0
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js +75 -0
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/index.js +118 -0
- package/expo-plugin/build/esm/ios-widget/xcode/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js +68 -0
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js +70 -0
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/target.js +108 -0
- package/expo-plugin/build/esm/ios-widget/xcode/target.js.map +1 -0
- package/expo-plugin/build/esm/utils/fileDiscovery.js +83 -0
- package/expo-plugin/build/esm/utils/fileDiscovery.js.map +1 -0
- package/expo-plugin/build/esm/utils/urlScheme.js +37 -0
- package/expo-plugin/build/esm/utils/urlScheme.js.map +1 -0
- package/expo-plugin/build/esm/validation.js +51 -0
- package/expo-plugin/build/esm/validation.js.map +1 -0
- package/expo-plugin/build/types/constants.d.ts +13 -0
- package/expo-plugin/build/types/constants.d.ts.map +1 -0
- package/expo-plugin/build/types/index.d.ts +10 -0
- package/expo-plugin/build/types/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/eas.d.ts +12 -0
- package/expo-plugin/build/types/ios/eas.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/entitlements.d.ts +14 -0
- package/expo-plugin/build/types/ios/entitlements.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/index.d.ts +19 -0
- package/expo-plugin/build/types/ios/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/infoPlist.d.ts +21 -0
- package/expo-plugin/build/types/ios/infoPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/pushNotifications.d.ts +10 -0
- package/expo-plugin/build/types/ios/pushNotifications.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/eas.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/eas.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/assets.d.ts +13 -0
- package/expo-plugin/build/types/ios-widget/files/assets.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/entitlements.d.ts +17 -0
- package/expo-plugin/build/types/ios-widget/files/entitlements.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/index.d.ts +24 -0
- package/expo-plugin/build/types/ios-widget/files/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts +10 -0
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts +24 -0
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/fonts.d.ts +22 -0
- package/expo-plugin/build/types/ios-widget/fonts.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/index.d.ts +31 -0
- package/expo-plugin/build/types/ios-widget/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/podfile.d.ts +9 -0
- package/expo-plugin/build/types/ios-widget/podfile.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts +25 -0
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts +14 -0
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts +42 -0
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts.map +1 -0
- package/expo-plugin/build/types/types.d.ts +74 -0
- package/expo-plugin/build/types/types.d.ts.map +1 -0
- package/expo-plugin/build/types/utils/fileDiscovery.d.ts +15 -0
- package/expo-plugin/build/types/utils/fileDiscovery.d.ts.map +1 -0
- package/expo-plugin/build/types/utils/urlScheme.d.ts +10 -0
- package/expo-plugin/build/types/utils/urlScheme.d.ts.map +1 -0
- package/expo-plugin/build/types/validation.d.ts +4 -0
- package/expo-plugin/build/types/validation.d.ts.map +1 -0
- package/expo-plugin/jest.config.js +18 -0
- package/expo-plugin/src/constants.ts +25 -0
- package/expo-plugin/src/index.ts +72 -0
- package/expo-plugin/src/ios/eas.ts +33 -0
- package/expo-plugin/src/ios/entitlements.ts +59 -0
- package/expo-plugin/src/ios/index.ts +47 -0
- package/expo-plugin/src/ios/infoPlist.ts +63 -0
- package/expo-plugin/src/ios/pushNotifications.ts +22 -0
- package/expo-plugin/src/ios-widget/eas.ts +79 -0
- package/expo-plugin/src/ios-widget/files/assets.ts +201 -0
- package/expo-plugin/src/ios-widget/files/entitlements.ts +48 -0
- package/expo-plugin/src/ios-widget/files/index.ts +74 -0
- package/expo-plugin/src/ios-widget/files/infoPlist.ts +57 -0
- package/expo-plugin/src/ios-widget/files/swift.node.test.ts +22 -0
- package/expo-plugin/src/ios-widget/files/swift.ts +476 -0
- package/expo-plugin/src/ios-widget/fonts.ts +132 -0
- package/expo-plugin/src/ios-widget/index.ts +73 -0
- package/expo-plugin/src/ios-widget/podfile.ts +44 -0
- package/expo-plugin/src/ios-widget/widgetPlist.ts +115 -0
- package/expo-plugin/src/ios-widget/xcode/buildPhases.ts +301 -0
- package/expo-plugin/src/ios-widget/xcode/configurationList.ts +127 -0
- package/expo-plugin/src/ios-widget/xcode/groups.ts +101 -0
- package/expo-plugin/src/ios-widget/xcode/index.ts +149 -0
- package/expo-plugin/src/ios-widget/xcode/mainAppSettings.ts +95 -0
- package/expo-plugin/src/ios-widget/xcode/productFile.ts +91 -0
- package/expo-plugin/src/ios-widget/xcode/target.ts +148 -0
- package/expo-plugin/src/types.ts +89 -0
- package/expo-plugin/src/utils/fileDiscovery.ts +96 -0
- package/expo-plugin/src/utils/urlScheme.ts +45 -0
- package/expo-plugin/src/validation.node.test.ts +19 -0
- package/expo-plugin/src/validation.ts +63 -0
- package/expo-plugin/tsconfig.base.json +17 -0
- package/expo-plugin/tsconfig.cjs.json +9 -0
- package/expo-plugin/tsconfig.esm.json +9 -0
- package/expo-plugin/tsconfig.jest.json +8 -0
- package/expo-plugin/tsconfig.typecheck.json +12 -0
- package/expo-plugin/tsconfig.types.json +10 -0
- package/ios/Package.swift +68 -0
- package/ios/Tests/JSGradientParserTests.swift +201 -0
- package/ios/Tests/VoltraSharedTests/SmokeTests.swift +8 -0
- package/ios/VoltraWidget.podspec +30 -0
- package/ios/app/NativeVoltra.h +5 -0
- package/ios/app/NativeVoltra.mm +211 -0
- package/ios/app/VoltraActivity.swift +5 -0
- package/ios/app/VoltraImagePreload.swift +154 -0
- package/ios/app/VoltraLiveActivityManager.swift +228 -0
- package/ios/app/VoltraLiveActivityService.swift +306 -0
- package/ios/app/VoltraModule.swift +215 -0
- package/ios/app/VoltraModuleImpl.swift +331 -0
- package/ios/app/VoltraOptions.swift +27 -0
- package/ios/app/VoltraViewComponentView.h +10 -0
- package/ios/app/VoltraViewComponentView.mm +67 -0
- package/ios/app/VoltraViewRoot.swift +63 -0
- package/ios/app/VoltraWidgetService.swift +154 -0
- package/ios/shared/BrotliCompression.swift +81 -0
- package/ios/shared/ComponentTypeID.swift +117 -0
- package/ios/shared/Data+hexString.swift +8 -0
- package/ios/shared/Date+toTimerInterval.swift +25 -0
- package/ios/shared/JSONValue.swift +128 -0
- package/ios/shared/ShortNames.swift +180 -0
- package/ios/shared/VoltraAttributes.swift +58 -0
- package/ios/shared/VoltraConfig.swift +18 -0
- package/ios/shared/VoltraConstants.swift +45 -0
- package/ios/shared/VoltraElement.swift +153 -0
- package/ios/shared/VoltraEvent.swift +72 -0
- package/ios/shared/VoltraEventBus.swift +80 -0
- package/ios/shared/VoltraImageStore.swift +119 -0
- package/ios/shared/VoltraInitialStateLocale.swift +54 -0
- package/ios/shared/VoltraInteractionIntent.swift +39 -0
- package/ios/shared/VoltraKeychainHelper.swift +178 -0
- package/ios/shared/VoltraLiveActivityPayload.swift +113 -0
- package/ios/shared/VoltraLogger.swift +30 -0
- package/ios/shared/VoltraNode.swift +194 -0
- package/ios/shared/VoltraPayloadMigrator.swift +63 -0
- package/ios/shared/VoltraPersistentEventQueue.swift +67 -0
- package/ios/shared/VoltraRefreshIntent.swift +29 -0
- package/ios/shared/VoltraRegion.swift +37 -0
- package/ios/shared/VoltraWidgetDefaults.swift +114 -0
- package/ios/shared/VoltraWidgetServerFetcher.swift +166 -0
- package/ios/target/VoltraHomeWidget.swift +508 -0
- package/ios/target/VoltraWidget.swift +158 -0
- package/ios/ui/Extensions/View.modifiers.swift +28 -0
- package/ios/ui/Extensions/VoltraNode+Parameters.swift +18 -0
- package/ios/ui/Generated/Parameters/.generated +8 -0
- package/ios/ui/Generated/Parameters/ButtonParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/ChartParameters.swift +33 -0
- package/ios/ui/Generated/Parameters/CircularProgressViewParameters.swift +59 -0
- package/ios/ui/Generated/Parameters/ComponentParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/DividerParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/GaugeParameters.swift +54 -0
- package/ios/ui/Generated/Parameters/GlassContainerParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/GroupBoxParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/HStackParameters.swift +34 -0
- package/ios/ui/Generated/Parameters/ImageParameters.swift +29 -0
- package/ios/ui/Generated/Parameters/LabelParameters.swift +18 -0
- package/ios/ui/Generated/Parameters/LinearGradientParameters.swift +27 -0
- package/ios/ui/Generated/Parameters/LinearProgressViewParameters.swift +64 -0
- package/ios/ui/Generated/Parameters/LinkParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/MaskParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/SpacerParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/SymbolParameters.swift +59 -0
- package/ios/ui/Generated/Parameters/TextParameters.swift +18 -0
- package/ios/ui/Generated/Parameters/TimerParameters.swift +54 -0
- package/ios/ui/Generated/Parameters/ToggleParameters.swift +24 -0
- package/ios/ui/Generated/Parameters/VStackParameters.swift +34 -0
- package/ios/ui/Generated/Parameters/ViewParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/ZStackParameters.swift +15 -0
- package/ios/ui/Helpers/VoltraDeepLinkResolver.swift +43 -0
- package/ios/ui/Helpers/VoltraProgressDriver.swift +52 -0
- package/ios/ui/Layout/FlexContainerHelper.swift +114 -0
- package/ios/ui/Layout/VoltraFlexStackLayout.swift +417 -0
- package/ios/ui/Protocols/VoltraView.swift +29 -0
- package/ios/ui/Style/BackgroundValue.swift +27 -0
- package/ios/ui/Style/CompositeStyle.swift +81 -0
- package/ios/ui/Style/DecorationStyle.swift +207 -0
- package/ios/ui/Style/FlexEnvironment.swift +35 -0
- package/ios/ui/Style/FontVariant.swift +4 -0
- package/ios/ui/Style/GlassEffect.swift +6 -0
- package/ios/ui/Style/JSColorParser.swift +517 -0
- package/ios/ui/Style/JSGradientParser.swift +674 -0
- package/ios/ui/Style/JSStyleParser.swift +223 -0
- package/ios/ui/Style/LayoutStyle.swift +184 -0
- package/ios/ui/Style/Overflow.swift +4 -0
- package/ios/ui/Style/RenderingStyle.swift +33 -0
- package/ios/ui/Style/StyleConverter.swift +202 -0
- package/ios/ui/Style/TextDecoration.swift +6 -0
- package/ios/ui/Style/TextStyle.swift +50 -0
- package/ios/ui/Style/View+applyStyle.swift +38 -0
- package/ios/ui/Views/VoltraButton.swift +57 -0
- package/ios/ui/Views/VoltraChart.swift +840 -0
- package/ios/ui/Views/VoltraCircularProgressView.swift +103 -0
- package/ios/ui/Views/VoltraDivider.swift +16 -0
- package/ios/ui/Views/VoltraFlexView.swift +33 -0
- package/ios/ui/Views/VoltraGauge.swift +65 -0
- package/ios/ui/Views/VoltraGlassContainer.swift +29 -0
- package/ios/ui/Views/VoltraGroupBox.swift +26 -0
- package/ios/ui/Views/VoltraHStack.swift +70 -0
- package/ios/ui/Views/VoltraImage.swift +109 -0
- package/ios/ui/Views/VoltraLabel.swift +24 -0
- package/ios/ui/Views/VoltraLinearGradient.swift +115 -0
- package/ios/ui/Views/VoltraLinearProgressView.swift +118 -0
- package/ios/ui/Views/VoltraLink.swift +25 -0
- package/ios/ui/Views/VoltraMask.swift +23 -0
- package/ios/ui/Views/VoltraSpacer.swift +16 -0
- package/ios/ui/Views/VoltraSymbol.swift +160 -0
- package/ios/ui/Views/VoltraText.swift +87 -0
- package/ios/ui/Views/VoltraTimer.swift +131 -0
- package/ios/ui/Views/VoltraToggle.swift +39 -0
- package/ios/ui/Views/VoltraVStack.swift +68 -0
- package/ios/ui/Views/VoltraZStack.swift +33 -0
- package/ios/ui/Voltra.swift +86 -0
- package/package.json +91 -18
- package/build/cjs/VoltraModule.js +0 -6
- package/build/cjs/VoltraModule.js.map +0 -1
- package/build/cjs/components/VoltraLiveActivityPreview.js +0 -20
- package/build/cjs/components/VoltraLiveActivityPreview.js.map +0 -1
- package/build/cjs/components/VoltraView.js +0 -37
- package/build/cjs/components/VoltraView.js.map +0 -1
- package/build/cjs/components/VoltraWidgetPreview.js +0 -26
- package/build/cjs/components/VoltraWidgetPreview.js.map +0 -1
- package/build/cjs/events.js +0 -19
- package/build/cjs/events.js.map +0 -1
- package/build/cjs/helpers.js +0 -30
- package/build/cjs/helpers.js.map +0 -1
- package/build/cjs/index.js +0 -49
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/live-activity/api.js +0 -158
- package/build/cjs/live-activity/api.js.map +0 -1
- package/build/cjs/logger.js +0 -36
- package/build/cjs/logger.js.map +0 -1
- package/build/cjs/preload.js +0 -54
- package/build/cjs/preload.js.map +0 -1
- package/build/cjs/utils/assertRunningOnApple.js +0 -13
- package/build/cjs/utils/assertRunningOnApple.js.map +0 -1
- package/build/cjs/utils/helpers.js +0 -7
- package/build/cjs/utils/helpers.js.map +0 -1
- package/build/cjs/utils/index.js +0 -19
- package/build/cjs/utils/index.js.map +0 -1
- package/build/cjs/utils/useUpdateOnHMR.js +0 -22
- package/build/cjs/utils/useUpdateOnHMR.js.map +0 -1
- package/build/cjs/widgets/server-credentials.js +0 -18
- package/build/cjs/widgets/server-credentials.js.map +0 -1
- package/build/cjs/widgets/widget-api.js +0 -59
- package/build/cjs/widgets/widget-api.js.map +0 -1
- package/build/esm/VoltraModule.js +0 -4
- package/build/esm/VoltraModule.js.map +0 -1
- package/build/esm/components/VoltraLiveActivityPreview.js +0 -17
- package/build/esm/components/VoltraLiveActivityPreview.js.map +0 -1
- package/build/esm/components/VoltraView.js +0 -34
- package/build/esm/components/VoltraView.js.map +0 -1
- package/build/esm/components/VoltraWidgetPreview.js +0 -23
- package/build/esm/components/VoltraWidgetPreview.js.map +0 -1
- package/build/esm/events.js +0 -13
- package/build/esm/events.js.map +0 -1
- package/build/esm/helpers.js +0 -23
- package/build/esm/helpers.js.map +0 -1
- package/build/esm/index.js +0 -10
- package/build/esm/index.js.map +0 -1
- package/build/esm/live-activity/api.js +0 -146
- package/build/esm/live-activity/api.js.map +0 -1
- package/build/esm/logger.js +0 -33
- package/build/esm/logger.js.map +0 -1
- package/build/esm/preload.js +0 -46
- package/build/esm/preload.js.map +0 -1
- package/build/esm/utils/assertRunningOnApple.js +0 -9
- package/build/esm/utils/assertRunningOnApple.js.map +0 -1
- package/build/esm/utils/helpers.js.map +0 -1
- package/build/esm/utils/index.js.map +0 -1
- package/build/esm/utils/useUpdateOnHMR.js +0 -18
- package/build/esm/utils/useUpdateOnHMR.js.map +0 -1
- package/build/esm/widgets/server-credentials.js +0 -11
- package/build/esm/widgets/server-credentials.js.map +0 -1
- package/build/esm/widgets/widget-api.js +0 -47
- package/build/esm/widgets/widget-api.js.map +0 -1
- package/build/types/VoltraModule.d.ts +0 -44
- package/build/types/VoltraModule.d.ts.map +0 -1
- package/build/types/components/VoltraLiveActivityPreview.d.ts.map +0 -1
- package/build/types/components/VoltraView.d.ts.map +0 -1
- package/build/types/components/VoltraWidgetPreview.d.ts.map +0 -1
- package/build/types/events.d.ts.map +0 -1
- package/build/types/helpers.d.ts.map +0 -1
- package/build/types/index.d.ts.map +0 -1
- package/build/types/live-activity/api.d.ts.map +0 -1
- package/build/types/logger.d.ts.map +0 -1
- package/build/types/preload.d.ts.map +0 -1
- package/build/types/types.d.ts.map +0 -1
- package/build/types/utils/assertRunningOnApple.d.ts.map +0 -1
- package/build/types/utils/helpers.d.ts.map +0 -1
- package/build/types/utils/index.d.ts.map +0 -1
- package/build/types/utils/useUpdateOnHMR.d.ts.map +0 -1
- package/build/types/widgets/server-credentials.d.ts.map +0 -1
- package/build/types/widgets/widget-api.d.ts.map +0 -1
- /package/build/{types → typescript/commonjs}/components/VoltraLiveActivityPreview.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/components/VoltraView.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/components/VoltraWidgetPreview.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/events.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/helpers.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/live-activity/api.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/logger.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/preload.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/types.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/assertRunningOnApple.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/helpers.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/index.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/useUpdateOnHMR.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/widgets/server-credentials.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/widgets/widget-api.d.ts +0 -0
- /package/{build → expo-plugin/build}/cjs/package.json +0 -0
- /package/{build → expo-plugin/build}/cjs/types.js +0 -0
- /package/{build → expo-plugin/build}/cjs/types.js.map +0 -0
- /package/{build → expo-plugin/build}/esm/package.json +0 -0
- /package/{build → expo-plugin/build}/esm/types.js +0 -0
- /package/{build → expo-plugin/build}/esm/types.js.map +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { ConfigPlugin, withXcodeProject } from '@expo/config-plugins'
|
|
2
|
+
import * as path from 'path'
|
|
3
|
+
|
|
4
|
+
import { getIOSWidgetExtensionFiles } from '../../utils/fileDiscovery'
|
|
5
|
+
import { addBuildPhases, ensureBuildPhases } from './buildPhases'
|
|
6
|
+
import { addXCConfigurationList, ensureXCConfigurationList } from './configurationList'
|
|
7
|
+
import { addPbxGroup, ensurePbxGroup } from './groups'
|
|
8
|
+
import { getMainAppTargetSettings } from './mainAppSettings'
|
|
9
|
+
import { addProductFile, ensureProductFile } from './productFile'
|
|
10
|
+
import { configureTarget, ensureTargetAttributes, ensureTargetDependency } from './target'
|
|
11
|
+
|
|
12
|
+
export interface ConfigureXcodeProjectProps {
|
|
13
|
+
targetName: string
|
|
14
|
+
bundleIdentifier: string
|
|
15
|
+
deploymentTarget: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Plugin step that configures the Xcode project for the widget extension.
|
|
20
|
+
*
|
|
21
|
+
* This:
|
|
22
|
+
* - Adds XCConfigurationList with Debug/Release configurations
|
|
23
|
+
* - Adds the product file (.appex)
|
|
24
|
+
* - Configures the native target
|
|
25
|
+
* - Adds build phases (Sources, CopyFiles, Frameworks, Resources)
|
|
26
|
+
* - Adds PBXGroup for widget files
|
|
27
|
+
*
|
|
28
|
+
* This should run after generateWidgetExtensionFiles so the files exist.
|
|
29
|
+
*/
|
|
30
|
+
export const configureXcodeProject: ConfigPlugin<ConfigureXcodeProjectProps> = (config, props) => {
|
|
31
|
+
const { targetName, bundleIdentifier, deploymentTarget } = props
|
|
32
|
+
|
|
33
|
+
return withXcodeProject(config, (config) => {
|
|
34
|
+
if (config.modRequest.introspect) {
|
|
35
|
+
return config
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const xcodeProject = config.modResults
|
|
39
|
+
const groupName = 'Embed Foundation Extensions'
|
|
40
|
+
|
|
41
|
+
// Check if target already exists
|
|
42
|
+
const nativeTargets = xcodeProject.pbxNativeTargetSection()
|
|
43
|
+
const existingTargetKey = xcodeProject.findTargetKey(targetName)
|
|
44
|
+
const existingTarget = existingTargetKey ? nativeTargets[existingTargetKey] : null
|
|
45
|
+
|
|
46
|
+
const { platformProjectRoot } = config.modRequest
|
|
47
|
+
const targetPath = path.join(platformProjectRoot, targetName)
|
|
48
|
+
const widgetFiles = getIOSWidgetExtensionFiles(targetPath, targetName)
|
|
49
|
+
|
|
50
|
+
// Read main app target settings to synchronize code signing
|
|
51
|
+
const mainAppSettings = getMainAppTargetSettings(xcodeProject)
|
|
52
|
+
|
|
53
|
+
// Use the deploymentTarget from plugin config (or default), ignore main app's deployment target
|
|
54
|
+
// This allows the widget extension to have its own deployment target independent of the main app
|
|
55
|
+
|
|
56
|
+
if (existingTarget && existingTargetKey) {
|
|
57
|
+
// Ensure configuration list is up to date
|
|
58
|
+
const xCConfigurationList = ensureXCConfigurationList(
|
|
59
|
+
xcodeProject,
|
|
60
|
+
{
|
|
61
|
+
targetName,
|
|
62
|
+
bundleIdentifier,
|
|
63
|
+
deploymentTarget,
|
|
64
|
+
codeSignStyle: mainAppSettings?.codeSignStyle,
|
|
65
|
+
developmentTeam: mainAppSettings?.developmentTeam,
|
|
66
|
+
provisioningProfileSpecifier: mainAppSettings?.provisioningProfileSpecifier,
|
|
67
|
+
},
|
|
68
|
+
existingTarget.buildConfigurationList
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
// Ensure product file exists
|
|
72
|
+
const productFile = ensureProductFile(xcodeProject, {
|
|
73
|
+
targetName,
|
|
74
|
+
groupName,
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
// Update target references
|
|
78
|
+
existingTarget.productReference = productFile.fileRef
|
|
79
|
+
existingTarget.buildConfigurationList = xCConfigurationList.uuid
|
|
80
|
+
existingTarget.productType = `"com.apple.product-type.app-extension"`
|
|
81
|
+
existingTarget.name = targetName
|
|
82
|
+
existingTarget.productName = targetName
|
|
83
|
+
if (!existingTarget.buildPhases) {
|
|
84
|
+
existingTarget.buildPhases = []
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Ensure build phases and groups
|
|
88
|
+
ensureBuildPhases(xcodeProject, {
|
|
89
|
+
targetUuid: existingTargetKey,
|
|
90
|
+
groupName,
|
|
91
|
+
productFile,
|
|
92
|
+
widgetFiles,
|
|
93
|
+
mainTargetUuid: xcodeProject.getFirstTarget().uuid,
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
ensurePbxGroup(xcodeProject, {
|
|
97
|
+
targetName,
|
|
98
|
+
widgetFiles,
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
ensureTargetAttributes(xcodeProject, existingTargetKey)
|
|
102
|
+
ensureTargetDependency(xcodeProject, existingTargetKey)
|
|
103
|
+
|
|
104
|
+
return config
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Add configuration list
|
|
108
|
+
const targetUuid = xcodeProject.generateUuid()
|
|
109
|
+
|
|
110
|
+
const xCConfigurationList = addXCConfigurationList(xcodeProject, {
|
|
111
|
+
targetName,
|
|
112
|
+
bundleIdentifier,
|
|
113
|
+
deploymentTarget,
|
|
114
|
+
codeSignStyle: mainAppSettings?.codeSignStyle,
|
|
115
|
+
developmentTeam: mainAppSettings?.developmentTeam,
|
|
116
|
+
provisioningProfileSpecifier: mainAppSettings?.provisioningProfileSpecifier,
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
// Add product file
|
|
120
|
+
const productFile = addProductFile(xcodeProject, {
|
|
121
|
+
targetName,
|
|
122
|
+
groupName,
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
// Configure target (native target, project section, dependency)
|
|
126
|
+
configureTarget(xcodeProject, {
|
|
127
|
+
targetName,
|
|
128
|
+
targetUuid,
|
|
129
|
+
productFile,
|
|
130
|
+
xCConfigurationList,
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
// Add build phases
|
|
134
|
+
addBuildPhases(xcodeProject, {
|
|
135
|
+
targetUuid,
|
|
136
|
+
groupName,
|
|
137
|
+
productFile,
|
|
138
|
+
widgetFiles,
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
// Add PBX group
|
|
142
|
+
addPbxGroup(xcodeProject, {
|
|
143
|
+
targetName,
|
|
144
|
+
widgetFiles,
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
return config
|
|
148
|
+
})
|
|
149
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { XcodeProject } from '@expo/config-plugins'
|
|
2
|
+
|
|
3
|
+
export interface MainAppTargetSettings {
|
|
4
|
+
deploymentTarget: string
|
|
5
|
+
codeSignStyle?: string
|
|
6
|
+
developmentTeam?: string
|
|
7
|
+
provisioningProfileSpecifier?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Reads build settings from the main app target to synchronize code signing with the widget extension.
|
|
12
|
+
*
|
|
13
|
+
* @param xcodeProject The Xcode project instance
|
|
14
|
+
* @returns The main app target's build settings, or null if not found
|
|
15
|
+
*/
|
|
16
|
+
export function getMainAppTargetSettings(xcodeProject: XcodeProject): MainAppTargetSettings | null {
|
|
17
|
+
try {
|
|
18
|
+
const mainAppTarget = xcodeProject.getFirstTarget()?.firstTarget
|
|
19
|
+
|
|
20
|
+
if (!mainAppTarget) {
|
|
21
|
+
return null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Get the build configuration list for the main app target
|
|
25
|
+
const buildConfigurationListId = mainAppTarget.buildConfigurationList
|
|
26
|
+
if (!buildConfigurationListId) {
|
|
27
|
+
return null
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Extract UUID from buildConfigurationListId (it might include a comment like "UUID /* comment */")
|
|
31
|
+
const buildConfigurationListUuid = buildConfigurationListId.split(' ')[0]
|
|
32
|
+
|
|
33
|
+
const buildConfigurationList =
|
|
34
|
+
xcodeProject.hash.project.objects['XCConfigurationList']?.[buildConfigurationListUuid]
|
|
35
|
+
if (!buildConfigurationList || !buildConfigurationList.buildConfigurations) {
|
|
36
|
+
return null
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Get the first build configuration (usually Debug) to read settings
|
|
40
|
+
const firstConfigRef = buildConfigurationList.buildConfigurations[0]
|
|
41
|
+
if (!firstConfigRef) {
|
|
42
|
+
return null
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Extract UUID from config reference (it might include a comment)
|
|
46
|
+
const firstConfigUuid =
|
|
47
|
+
typeof firstConfigRef === 'string' ? firstConfigRef.split(' ')[0] : firstConfigRef.value?.split(' ')[0]
|
|
48
|
+
if (!firstConfigUuid) {
|
|
49
|
+
return null
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const buildConfiguration = xcodeProject.hash.project.objects['XCBuildConfiguration']?.[firstConfigUuid]
|
|
53
|
+
if (!buildConfiguration || !buildConfiguration.buildSettings) {
|
|
54
|
+
return null
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const buildSettings = buildConfiguration.buildSettings
|
|
58
|
+
|
|
59
|
+
// Extract deployment target (remove quotes if present)
|
|
60
|
+
const deploymentTarget =
|
|
61
|
+
buildSettings.IPHONEOS_DEPLOYMENT_TARGET?.replace(/^"|"$/g, '') ||
|
|
62
|
+
buildSettings['IPHONEOS_DEPLOYMENT_TARGET']?.replace(/^"|"$/g, '') ||
|
|
63
|
+
null
|
|
64
|
+
|
|
65
|
+
// Extract code signing settings
|
|
66
|
+
const codeSignStyle =
|
|
67
|
+
buildSettings.CODE_SIGN_STYLE?.replace(/^"|"$/g, '') ||
|
|
68
|
+
buildSettings['CODE_SIGN_STYLE']?.replace(/^"|"$/g, '') ||
|
|
69
|
+
null
|
|
70
|
+
|
|
71
|
+
const developmentTeam =
|
|
72
|
+
buildSettings.DEVELOPMENT_TEAM?.replace(/^"|"$/g, '') ||
|
|
73
|
+
buildSettings['DEVELOPMENT_TEAM']?.replace(/^"|"$/g, '') ||
|
|
74
|
+
null
|
|
75
|
+
|
|
76
|
+
const provisioningProfileSpecifier =
|
|
77
|
+
buildSettings.PROVISIONING_PROFILE_SPECIFIER?.replace(/^"|"$/g, '') ||
|
|
78
|
+
buildSettings['PROVISIONING_PROFILE_SPECIFIER']?.replace(/^"|"$/g, '') ||
|
|
79
|
+
null
|
|
80
|
+
|
|
81
|
+
if (!deploymentTarget) {
|
|
82
|
+
return null
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
deploymentTarget,
|
|
87
|
+
codeSignStyle: codeSignStyle || undefined,
|
|
88
|
+
developmentTeam: developmentTeam || undefined,
|
|
89
|
+
provisioningProfileSpecifier: provisioningProfileSpecifier || undefined,
|
|
90
|
+
}
|
|
91
|
+
} catch {
|
|
92
|
+
// If we can't read the settings, return null and use fallback values
|
|
93
|
+
return null
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { XcodeProject } from '@expo/config-plugins'
|
|
2
|
+
|
|
3
|
+
export interface AddProductFileOptions {
|
|
4
|
+
targetName: string
|
|
5
|
+
groupName: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function findProductFileReference(xcodeProject: XcodeProject, targetName: string): { fileRef: string } | null {
|
|
9
|
+
const fileReferenceSection = xcodeProject.pbxFileReferenceSection()
|
|
10
|
+
const targetProductName = `${targetName}.appex`
|
|
11
|
+
|
|
12
|
+
for (const key of Object.keys(fileReferenceSection)) {
|
|
13
|
+
if (/_comment$/.test(key)) {
|
|
14
|
+
continue
|
|
15
|
+
}
|
|
16
|
+
const entry = fileReferenceSection[key]
|
|
17
|
+
const path = typeof entry?.path === 'string' ? entry.path.replace(/^"|"$/g, '') : ''
|
|
18
|
+
const name = typeof entry?.name === 'string' ? entry.name.replace(/^"|"$/g, '') : ''
|
|
19
|
+
|
|
20
|
+
if (path === targetProductName || name === targetProductName) {
|
|
21
|
+
return { fileRef: key }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return null
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function findBuildFileForFileRef(xcodeProject: XcodeProject, fileRef: string): { uuid: string } | null {
|
|
29
|
+
const buildFileSection = xcodeProject.pbxBuildFileSection()
|
|
30
|
+
|
|
31
|
+
for (const key of Object.keys(buildFileSection)) {
|
|
32
|
+
if (/_comment$/.test(key)) {
|
|
33
|
+
continue
|
|
34
|
+
}
|
|
35
|
+
const entry = buildFileSection[key]
|
|
36
|
+
if (entry?.fileRef === fileRef) {
|
|
37
|
+
return { uuid: key }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return null
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Adds the product file (.appex) for the widget extension.
|
|
46
|
+
*/
|
|
47
|
+
export function addProductFile(xcodeProject: XcodeProject, options: AddProductFileOptions) {
|
|
48
|
+
const { targetName, groupName } = options
|
|
49
|
+
|
|
50
|
+
const productFileOptions = {
|
|
51
|
+
basename: `${targetName}.appex`,
|
|
52
|
+
group: groupName,
|
|
53
|
+
explicitFileType: 'wrapper.app-extension',
|
|
54
|
+
settings: {
|
|
55
|
+
ATTRIBUTES: ['RemoveHeadersOnCopy'],
|
|
56
|
+
},
|
|
57
|
+
includeInIndex: 0,
|
|
58
|
+
path: `${targetName}.appex`,
|
|
59
|
+
sourceTree: 'BUILT_PRODUCTS_DIR',
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const productFile = xcodeProject.addProductFile(targetName, productFileOptions)
|
|
63
|
+
|
|
64
|
+
return productFile
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Ensures the product file (.appex) exists and returns it.
|
|
69
|
+
*/
|
|
70
|
+
export function ensureProductFile(xcodeProject: XcodeProject, options: AddProductFileOptions) {
|
|
71
|
+
const { targetName, groupName } = options
|
|
72
|
+
const existingFile = findProductFileReference(xcodeProject, targetName)
|
|
73
|
+
|
|
74
|
+
if (!existingFile) {
|
|
75
|
+
return addProductFile(xcodeProject, options)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const buildFile = findBuildFileForFileRef(xcodeProject, existingFile.fileRef)
|
|
79
|
+
const productFile = {
|
|
80
|
+
uuid: buildFile?.uuid ?? xcodeProject.generateUuid(),
|
|
81
|
+
fileRef: existingFile.fileRef,
|
|
82
|
+
basename: `${targetName}.appex`,
|
|
83
|
+
group: groupName,
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (!buildFile) {
|
|
87
|
+
xcodeProject.addToPbxBuildFileSection(productFile as any)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return productFile
|
|
91
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { XcodeProject } from '@expo/config-plugins'
|
|
2
|
+
|
|
3
|
+
import { IOS } from '../../constants'
|
|
4
|
+
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// Types
|
|
7
|
+
// ============================================================================
|
|
8
|
+
|
|
9
|
+
export interface ConfigureTargetOptions {
|
|
10
|
+
targetName: string
|
|
11
|
+
targetUuid: string
|
|
12
|
+
productFile: { fileRef: string }
|
|
13
|
+
xCConfigurationList: { uuid: string }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface AddNativeTargetOptions {
|
|
17
|
+
targetName: string
|
|
18
|
+
targetUuid: string
|
|
19
|
+
productFile: { fileRef: string }
|
|
20
|
+
xCConfigurationList: { uuid: string }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// Main Function
|
|
25
|
+
// ============================================================================
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Configures the widget extension target in the Xcode project.
|
|
29
|
+
*
|
|
30
|
+
* This:
|
|
31
|
+
* - Adds the target to PBXNativeTarget section
|
|
32
|
+
* - Adds the target to PBXProject section
|
|
33
|
+
* - Adds a dependency from the main app to the widget extension
|
|
34
|
+
*/
|
|
35
|
+
export function configureTarget(xcodeProject: XcodeProject, options: ConfigureTargetOptions) {
|
|
36
|
+
const target = addToPbxNativeTargetSection(xcodeProject, options)
|
|
37
|
+
addToPbxProjectSection(xcodeProject, target)
|
|
38
|
+
addTargetDependency(xcodeProject, target)
|
|
39
|
+
|
|
40
|
+
return target
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Ensures target attributes (LastSwiftMigration) exist for the target.
|
|
45
|
+
*/
|
|
46
|
+
export function ensureTargetAttributes(xcodeProject: XcodeProject, targetUuid: string): void {
|
|
47
|
+
const projectSection = xcodeProject.pbxProjectSection()
|
|
48
|
+
const firstProject = xcodeProject.getFirstProject()
|
|
49
|
+
|
|
50
|
+
if (!projectSection[firstProject.uuid].attributes.TargetAttributes) {
|
|
51
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes = {}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (!projectSection[firstProject.uuid].attributes.TargetAttributes[targetUuid]) {
|
|
55
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes[targetUuid] = {
|
|
56
|
+
LastSwiftMigration: IOS.LAST_SWIFT_MIGRATION,
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Ensures a target dependency exists so the main app depends on the widget extension.
|
|
63
|
+
*/
|
|
64
|
+
export function ensureTargetDependency(xcodeProject: XcodeProject, targetUuid: string): void {
|
|
65
|
+
if (!xcodeProject.hash.project.objects['PBXTargetDependency']) {
|
|
66
|
+
xcodeProject.hash.project.objects['PBXTargetDependency'] = {}
|
|
67
|
+
}
|
|
68
|
+
if (!xcodeProject.hash.project.objects['PBXContainerItemProxy']) {
|
|
69
|
+
xcodeProject.hash.project.objects['PBXContainerItemProxy'] = {}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const mainTargetUuid = xcodeProject.getFirstTarget().uuid
|
|
73
|
+
const mainTarget = xcodeProject.pbxNativeTargetSection()[mainTargetUuid]
|
|
74
|
+
const existingDeps = mainTarget?.dependencies ?? []
|
|
75
|
+
const targetDependencySection = xcodeProject.hash.project.objects['PBXTargetDependency'] || {}
|
|
76
|
+
|
|
77
|
+
const alreadyExists = existingDeps.some((dep: any) => {
|
|
78
|
+
const dependency = targetDependencySection[dep.value]
|
|
79
|
+
return dependency?.target === targetUuid
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
if (!alreadyExists) {
|
|
83
|
+
xcodeProject.addTargetDependency(mainTargetUuid, [targetUuid])
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// ============================================================================
|
|
88
|
+
// Helper Functions
|
|
89
|
+
// ============================================================================
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Adds the widget extension target to the PBXNativeTarget section.
|
|
93
|
+
*/
|
|
94
|
+
function addToPbxNativeTargetSection(xcodeProject: XcodeProject, options: AddNativeTargetOptions) {
|
|
95
|
+
const { targetName, targetUuid, productFile, xCConfigurationList } = options
|
|
96
|
+
|
|
97
|
+
const target = {
|
|
98
|
+
uuid: targetUuid,
|
|
99
|
+
pbxNativeTarget: {
|
|
100
|
+
isa: 'PBXNativeTarget',
|
|
101
|
+
name: targetName,
|
|
102
|
+
productName: targetName,
|
|
103
|
+
productReference: productFile.fileRef,
|
|
104
|
+
productType: `"com.apple.product-type.app-extension"`,
|
|
105
|
+
buildConfigurationList: xCConfigurationList.uuid,
|
|
106
|
+
buildPhases: [],
|
|
107
|
+
buildRules: [],
|
|
108
|
+
dependencies: [],
|
|
109
|
+
},
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
xcodeProject.addToPbxNativeTargetSection(target)
|
|
113
|
+
|
|
114
|
+
return target
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Adds the target to the PBXProject section.
|
|
119
|
+
*/
|
|
120
|
+
function addToPbxProjectSection(xcodeProject: XcodeProject, target: { uuid: string }): void {
|
|
121
|
+
xcodeProject.addToPbxProjectSection(target)
|
|
122
|
+
|
|
123
|
+
// Add target attributes to project section
|
|
124
|
+
const projectSection = xcodeProject.pbxProjectSection()
|
|
125
|
+
const firstProject = xcodeProject.getFirstProject()
|
|
126
|
+
|
|
127
|
+
if (!projectSection[firstProject.uuid].attributes.TargetAttributes) {
|
|
128
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes = {}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes[target.uuid] = {
|
|
132
|
+
LastSwiftMigration: IOS.LAST_SWIFT_MIGRATION,
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Adds a target dependency so the main app depends on the widget extension.
|
|
138
|
+
*/
|
|
139
|
+
function addTargetDependency(xcodeProject: XcodeProject, target: { uuid: string }): void {
|
|
140
|
+
if (!xcodeProject.hash.project.objects['PBXTargetDependency']) {
|
|
141
|
+
xcodeProject.hash.project.objects['PBXTargetDependency'] = {}
|
|
142
|
+
}
|
|
143
|
+
if (!xcodeProject.hash.project.objects['PBXContainerItemProxy']) {
|
|
144
|
+
xcodeProject.hash.project.objects['PBXContainerItemProxy'] = {}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
xcodeProject.addTargetDependency(xcodeProject.getFirstTarget().uuid, [target.uuid])
|
|
148
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { ConfigPlugin } from '@expo/config-plugins'
|
|
2
|
+
|
|
3
|
+
import type { WidgetInitialStatePath, WidgetLabel } from '@use-voltra/expo-plugin'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Supported iOS Home Screen widget size families.
|
|
7
|
+
*/
|
|
8
|
+
export type IOSWidgetFamily =
|
|
9
|
+
| 'systemSmall'
|
|
10
|
+
| 'systemMedium'
|
|
11
|
+
| 'systemLarge'
|
|
12
|
+
| 'systemExtraLarge'
|
|
13
|
+
| 'accessoryCircular'
|
|
14
|
+
| 'accessoryRectangular'
|
|
15
|
+
| 'accessoryInline'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Configuration for a single iOS home screen widget.
|
|
19
|
+
*/
|
|
20
|
+
export interface IOSWidgetConfig {
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier for the widget (used as the widget kind and in JS API)
|
|
23
|
+
*/
|
|
24
|
+
id: string
|
|
25
|
+
displayName: WidgetLabel
|
|
26
|
+
description: WidgetLabel
|
|
27
|
+
/** @default ['systemSmall', 'systemMedium', 'systemLarge'] */
|
|
28
|
+
supportedFamilies?: IOSWidgetFamily[]
|
|
29
|
+
initialStatePath?: WidgetInitialStatePath
|
|
30
|
+
serverUpdate?: IOSWidgetServerUpdateConfig
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Server-driven iOS widget updates (WidgetKit background refresh).
|
|
35
|
+
*/
|
|
36
|
+
export interface IOSWidgetServerUpdateConfig {
|
|
37
|
+
url: string
|
|
38
|
+
/** @default 15 */
|
|
39
|
+
intervalMinutes?: number
|
|
40
|
+
/** @default false */
|
|
41
|
+
refresh?: boolean
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Files in the widget extension target (Xcode build phases / groups).
|
|
46
|
+
*/
|
|
47
|
+
export interface IOSWidgetExtensionFiles {
|
|
48
|
+
swiftFiles: string[]
|
|
49
|
+
entitlementFiles: string[]
|
|
50
|
+
plistFiles: string[]
|
|
51
|
+
assetDirectories: string[]
|
|
52
|
+
intentFiles: string[]
|
|
53
|
+
/** Paths relative to the widget extension root (e.g. en.lproj/VoltraWidgets.strings) */
|
|
54
|
+
localizedStringResources: string[]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Options for `@use-voltra/ios-client` Expo config plugin.
|
|
59
|
+
*/
|
|
60
|
+
export interface IOSConfigPluginProps {
|
|
61
|
+
enablePushNotifications?: boolean
|
|
62
|
+
groupIdentifier?: string
|
|
63
|
+
widgets?: IOSWidgetConfig[]
|
|
64
|
+
deploymentTarget?: string
|
|
65
|
+
targetName?: string
|
|
66
|
+
fonts?: string[]
|
|
67
|
+
keychainGroup?: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type VoltraIosConfigPlugin = ConfigPlugin<IOSConfigPluginProps | undefined>
|
|
71
|
+
|
|
72
|
+
export interface IOSMainAppPluginProps {
|
|
73
|
+
groupIdentifier?: string
|
|
74
|
+
widgetIds?: string[]
|
|
75
|
+
widgets?: IOSWidgetConfig[]
|
|
76
|
+
keychainGroup?: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface IOSWidgetExtensionPluginProps {
|
|
80
|
+
targetName: string
|
|
81
|
+
bundleIdentifier: string
|
|
82
|
+
deploymentTarget: string
|
|
83
|
+
widgets?: IOSWidgetConfig[]
|
|
84
|
+
groupIdentifier?: string
|
|
85
|
+
keychainGroup?: string
|
|
86
|
+
fonts?: string[]
|
|
87
|
+
version: string
|
|
88
|
+
buildNumber: string
|
|
89
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as fs from 'fs'
|
|
2
|
+
import * as path from 'path'
|
|
3
|
+
|
|
4
|
+
import type { IOSWidgetExtensionFiles } from '../types'
|
|
5
|
+
import { logger } from '@use-voltra/expo-plugin'
|
|
6
|
+
|
|
7
|
+
/** Table name matches basename without extension; co-located per locale in *.lproj */
|
|
8
|
+
export const VOLTRA_WIDGET_STRINGS_BASENAME = 'VoltraWidgets.strings'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Scans the widget extension target directory and returns categorized file lists.
|
|
12
|
+
*
|
|
13
|
+
* This function only reads the directory structure - it does NOT copy or create files.
|
|
14
|
+
* File generation should be done before this is called.
|
|
15
|
+
*
|
|
16
|
+
* @param targetPath - Path to the widget extension target directory
|
|
17
|
+
* @param targetName - Name of the target (for entitlements file)
|
|
18
|
+
* @returns Categorized lists of files for Xcode project configuration
|
|
19
|
+
*/
|
|
20
|
+
export function getIOSWidgetExtensionFiles(targetPath: string, targetName: string): IOSWidgetExtensionFiles {
|
|
21
|
+
const widgetFiles: IOSWidgetExtensionFiles = {
|
|
22
|
+
swiftFiles: [],
|
|
23
|
+
entitlementFiles: [],
|
|
24
|
+
plistFiles: [],
|
|
25
|
+
assetDirectories: [],
|
|
26
|
+
intentFiles: [],
|
|
27
|
+
localizedStringResources: [],
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (!fs.existsSync(targetPath)) {
|
|
31
|
+
logger.warn(`Widget target directory does not exist: ${targetPath}`)
|
|
32
|
+
// Still include required generated files even if directory doesn't exist yet
|
|
33
|
+
const initialStatesFile = 'VoltraWidgetInitialStates.swift'
|
|
34
|
+
widgetFiles.swiftFiles.push(initialStatesFile)
|
|
35
|
+
const targetEntitlements = `${targetName}.entitlements`
|
|
36
|
+
widgetFiles.entitlementFiles.push(targetEntitlements)
|
|
37
|
+
return widgetFiles
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const files = fs.readdirSync(targetPath)
|
|
41
|
+
|
|
42
|
+
for (const entry of files) {
|
|
43
|
+
if (!entry.endsWith('.lproj')) {
|
|
44
|
+
continue
|
|
45
|
+
}
|
|
46
|
+
const stringsPath = path.join(targetPath, entry, VOLTRA_WIDGET_STRINGS_BASENAME)
|
|
47
|
+
if (fs.existsSync(stringsPath)) {
|
|
48
|
+
widgetFiles.localizedStringResources.push(`${entry}/${VOLTRA_WIDGET_STRINGS_BASENAME}`)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
for (const file of files) {
|
|
53
|
+
const itemPath = path.join(targetPath, file)
|
|
54
|
+
const isDirectory = fs.lstatSync(itemPath).isDirectory()
|
|
55
|
+
|
|
56
|
+
// Handle directories (Assets.xcassets)
|
|
57
|
+
if (isDirectory) {
|
|
58
|
+
if (file === 'Assets.xcassets') {
|
|
59
|
+
widgetFiles.assetDirectories.push(file)
|
|
60
|
+
}
|
|
61
|
+
continue
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Categorize files by extension
|
|
65
|
+
const ext = path.extname(file).toLowerCase()
|
|
66
|
+
|
|
67
|
+
switch (ext) {
|
|
68
|
+
case '.swift':
|
|
69
|
+
widgetFiles.swiftFiles.push(file)
|
|
70
|
+
break
|
|
71
|
+
case '.entitlements':
|
|
72
|
+
widgetFiles.entitlementFiles.push(file)
|
|
73
|
+
break
|
|
74
|
+
case '.plist':
|
|
75
|
+
widgetFiles.plistFiles.push(file)
|
|
76
|
+
break
|
|
77
|
+
case '.intentdefinition':
|
|
78
|
+
widgetFiles.intentFiles.push(file)
|
|
79
|
+
break
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Always include the target entitlements file
|
|
84
|
+
const targetEntitlements = `${targetName}.entitlements`
|
|
85
|
+
if (!widgetFiles.entitlementFiles.includes(targetEntitlements)) {
|
|
86
|
+
widgetFiles.entitlementFiles.push(targetEntitlements)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Always include VoltraWidgetInitialStates.swift (generated by config plugin)
|
|
90
|
+
const initialStatesFile = 'VoltraWidgetInitialStates.swift'
|
|
91
|
+
if (!widgetFiles.swiftFiles.includes(initialStatesFile)) {
|
|
92
|
+
widgetFiles.swiftFiles.push(initialStatesFile)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return widgetFiles
|
|
96
|
+
}
|