@use-voltra/ios-client 1.4.1 → 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,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads build settings from the main app target to synchronize code signing with the widget extension.
|
|
3
|
+
*
|
|
4
|
+
* @param xcodeProject The Xcode project instance
|
|
5
|
+
* @returns The main app target's build settings, or null if not found
|
|
6
|
+
*/
|
|
7
|
+
export function getMainAppTargetSettings(xcodeProject) {
|
|
8
|
+
try {
|
|
9
|
+
const mainAppTarget = xcodeProject.getFirstTarget()?.firstTarget;
|
|
10
|
+
if (!mainAppTarget) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
// Get the build configuration list for the main app target
|
|
14
|
+
const buildConfigurationListId = mainAppTarget.buildConfigurationList;
|
|
15
|
+
if (!buildConfigurationListId) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
// Extract UUID from buildConfigurationListId (it might include a comment like "UUID /* comment */")
|
|
19
|
+
const buildConfigurationListUuid = buildConfigurationListId.split(' ')[0];
|
|
20
|
+
const buildConfigurationList = xcodeProject.hash.project.objects['XCConfigurationList']?.[buildConfigurationListUuid];
|
|
21
|
+
if (!buildConfigurationList || !buildConfigurationList.buildConfigurations) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
// Get the first build configuration (usually Debug) to read settings
|
|
25
|
+
const firstConfigRef = buildConfigurationList.buildConfigurations[0];
|
|
26
|
+
if (!firstConfigRef) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
// Extract UUID from config reference (it might include a comment)
|
|
30
|
+
const firstConfigUuid = typeof firstConfigRef === 'string' ? firstConfigRef.split(' ')[0] : firstConfigRef.value?.split(' ')[0];
|
|
31
|
+
if (!firstConfigUuid) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const buildConfiguration = xcodeProject.hash.project.objects['XCBuildConfiguration']?.[firstConfigUuid];
|
|
35
|
+
if (!buildConfiguration || !buildConfiguration.buildSettings) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
const buildSettings = buildConfiguration.buildSettings;
|
|
39
|
+
// Extract deployment target (remove quotes if present)
|
|
40
|
+
const deploymentTarget = buildSettings.IPHONEOS_DEPLOYMENT_TARGET?.replace(/^"|"$/g, '') ||
|
|
41
|
+
buildSettings['IPHONEOS_DEPLOYMENT_TARGET']?.replace(/^"|"$/g, '') ||
|
|
42
|
+
null;
|
|
43
|
+
// Extract code signing settings
|
|
44
|
+
const codeSignStyle = buildSettings.CODE_SIGN_STYLE?.replace(/^"|"$/g, '') ||
|
|
45
|
+
buildSettings['CODE_SIGN_STYLE']?.replace(/^"|"$/g, '') ||
|
|
46
|
+
null;
|
|
47
|
+
const developmentTeam = buildSettings.DEVELOPMENT_TEAM?.replace(/^"|"$/g, '') ||
|
|
48
|
+
buildSettings['DEVELOPMENT_TEAM']?.replace(/^"|"$/g, '') ||
|
|
49
|
+
null;
|
|
50
|
+
const provisioningProfileSpecifier = buildSettings.PROVISIONING_PROFILE_SPECIFIER?.replace(/^"|"$/g, '') ||
|
|
51
|
+
buildSettings['PROVISIONING_PROFILE_SPECIFIER']?.replace(/^"|"$/g, '') ||
|
|
52
|
+
null;
|
|
53
|
+
if (!deploymentTarget) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
deploymentTarget,
|
|
58
|
+
codeSignStyle: codeSignStyle || undefined,
|
|
59
|
+
developmentTeam: developmentTeam || undefined,
|
|
60
|
+
provisioningProfileSpecifier: provisioningProfileSpecifier || undefined,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// If we can't read the settings, return null and use fallback values
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=mainAppSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mainAppSettings.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/mainAppSettings.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,YAA0B;IACjE,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,YAAY,CAAC,cAAc,EAAE,EAAE,WAAW,CAAA;QAEhE,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,2DAA2D;QAC3D,MAAM,wBAAwB,GAAG,aAAa,CAAC,sBAAsB,CAAA;QACrE,IAAI,CAAC,wBAAwB,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAA;QACb,CAAC;QAED,oGAAoG;QACpG,MAAM,0BAA0B,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAEzE,MAAM,sBAAsB,GAC1B,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE,CAAC,0BAA0B,CAAC,CAAA;QACxF,IAAI,CAAC,sBAAsB,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,EAAE,CAAC;YAC3E,OAAO,IAAI,CAAA;QACb,CAAC;QAED,qEAAqE;QACrE,MAAM,cAAc,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAA;QACpE,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,kEAAkE;QAClE,MAAM,eAAe,GACnB,OAAO,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,C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AAI,CAAA;QAEN,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,OAAO;YACL,gBAAgB;YAChB,aAAa,EAAE,aAAa,IAAI,SAAS;YACzC,eAAe,EAAE,eAAe,IAAI,SAAS;YAC7C,4BAA4B,EAAE,4BAA4B,IAAI,SAAS;SACxE,CAAA;IACH,CAAC;IAAC,MAAM,CAAC;QACP,qEAAqE;QACrE,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function findProductFileReference(xcodeProject, targetName) {
|
|
2
|
+
const fileReferenceSection = xcodeProject.pbxFileReferenceSection();
|
|
3
|
+
const targetProductName = `${targetName}.appex`;
|
|
4
|
+
for (const key of Object.keys(fileReferenceSection)) {
|
|
5
|
+
if (/_comment$/.test(key)) {
|
|
6
|
+
continue;
|
|
7
|
+
}
|
|
8
|
+
const entry = fileReferenceSection[key];
|
|
9
|
+
const path = typeof entry?.path === 'string' ? entry.path.replace(/^"|"$/g, '') : '';
|
|
10
|
+
const name = typeof entry?.name === 'string' ? entry.name.replace(/^"|"$/g, '') : '';
|
|
11
|
+
if (path === targetProductName || name === targetProductName) {
|
|
12
|
+
return { fileRef: key };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
function findBuildFileForFileRef(xcodeProject, fileRef) {
|
|
18
|
+
const buildFileSection = xcodeProject.pbxBuildFileSection();
|
|
19
|
+
for (const key of Object.keys(buildFileSection)) {
|
|
20
|
+
if (/_comment$/.test(key)) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const entry = buildFileSection[key];
|
|
24
|
+
if (entry?.fileRef === fileRef) {
|
|
25
|
+
return { uuid: key };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Adds the product file (.appex) for the widget extension.
|
|
32
|
+
*/
|
|
33
|
+
export function addProductFile(xcodeProject, options) {
|
|
34
|
+
const { targetName, groupName } = options;
|
|
35
|
+
const productFileOptions = {
|
|
36
|
+
basename: `${targetName}.appex`,
|
|
37
|
+
group: groupName,
|
|
38
|
+
explicitFileType: 'wrapper.app-extension',
|
|
39
|
+
settings: {
|
|
40
|
+
ATTRIBUTES: ['RemoveHeadersOnCopy'],
|
|
41
|
+
},
|
|
42
|
+
includeInIndex: 0,
|
|
43
|
+
path: `${targetName}.appex`,
|
|
44
|
+
sourceTree: 'BUILT_PRODUCTS_DIR',
|
|
45
|
+
};
|
|
46
|
+
const productFile = xcodeProject.addProductFile(targetName, productFileOptions);
|
|
47
|
+
return productFile;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Ensures the product file (.appex) exists and returns it.
|
|
51
|
+
*/
|
|
52
|
+
export function ensureProductFile(xcodeProject, options) {
|
|
53
|
+
const { targetName, groupName } = options;
|
|
54
|
+
const existingFile = findProductFileReference(xcodeProject, targetName);
|
|
55
|
+
if (!existingFile) {
|
|
56
|
+
return addProductFile(xcodeProject, options);
|
|
57
|
+
}
|
|
58
|
+
const buildFile = findBuildFileForFileRef(xcodeProject, existingFile.fileRef);
|
|
59
|
+
const productFile = {
|
|
60
|
+
uuid: buildFile?.uuid ?? xcodeProject.generateUuid(),
|
|
61
|
+
fileRef: existingFile.fileRef,
|
|
62
|
+
basename: `${targetName}.appex`,
|
|
63
|
+
group: groupName,
|
|
64
|
+
};
|
|
65
|
+
if (!buildFile) {
|
|
66
|
+
xcodeProject.addToPbxBuildFileSection(productFile);
|
|
67
|
+
}
|
|
68
|
+
return productFile;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=productFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productFile.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/productFile.ts"],"names":[],"mappings":"AAOA,SAAS,wBAAwB,CAAC,YAA0B,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AAI,CAAC,SAAS,EAAE,CAAC;QACf,YAAY,CAAC,wBAAwB,CAAC,WAAkB,CAAC,CAAA;IAC3D,CAAC;IAED,OAAO,WAAW,CAAA;AACpB,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { IOS } from '../../constants';
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// Main Function
|
|
4
|
+
// ============================================================================
|
|
5
|
+
/**
|
|
6
|
+
* Configures the widget extension target in the Xcode project.
|
|
7
|
+
*
|
|
8
|
+
* This:
|
|
9
|
+
* - Adds the target to PBXNativeTarget section
|
|
10
|
+
* - Adds the target to PBXProject section
|
|
11
|
+
* - Adds a dependency from the main app to the widget extension
|
|
12
|
+
*/
|
|
13
|
+
export function configureTarget(xcodeProject, options) {
|
|
14
|
+
const target = addToPbxNativeTargetSection(xcodeProject, options);
|
|
15
|
+
addToPbxProjectSection(xcodeProject, target);
|
|
16
|
+
addTargetDependency(xcodeProject, target);
|
|
17
|
+
return target;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Ensures target attributes (LastSwiftMigration) exist for the target.
|
|
21
|
+
*/
|
|
22
|
+
export function ensureTargetAttributes(xcodeProject, targetUuid) {
|
|
23
|
+
const projectSection = xcodeProject.pbxProjectSection();
|
|
24
|
+
const firstProject = xcodeProject.getFirstProject();
|
|
25
|
+
if (!projectSection[firstProject.uuid].attributes.TargetAttributes) {
|
|
26
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes = {};
|
|
27
|
+
}
|
|
28
|
+
if (!projectSection[firstProject.uuid].attributes.TargetAttributes[targetUuid]) {
|
|
29
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes[targetUuid] = {
|
|
30
|
+
LastSwiftMigration: IOS.LAST_SWIFT_MIGRATION,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Ensures a target dependency exists so the main app depends on the widget extension.
|
|
36
|
+
*/
|
|
37
|
+
export function ensureTargetDependency(xcodeProject, targetUuid) {
|
|
38
|
+
if (!xcodeProject.hash.project.objects['PBXTargetDependency']) {
|
|
39
|
+
xcodeProject.hash.project.objects['PBXTargetDependency'] = {};
|
|
40
|
+
}
|
|
41
|
+
if (!xcodeProject.hash.project.objects['PBXContainerItemProxy']) {
|
|
42
|
+
xcodeProject.hash.project.objects['PBXContainerItemProxy'] = {};
|
|
43
|
+
}
|
|
44
|
+
const mainTargetUuid = xcodeProject.getFirstTarget().uuid;
|
|
45
|
+
const mainTarget = xcodeProject.pbxNativeTargetSection()[mainTargetUuid];
|
|
46
|
+
const existingDeps = mainTarget?.dependencies ?? [];
|
|
47
|
+
const targetDependencySection = xcodeProject.hash.project.objects['PBXTargetDependency'] || {};
|
|
48
|
+
const alreadyExists = existingDeps.some((dep) => {
|
|
49
|
+
const dependency = targetDependencySection[dep.value];
|
|
50
|
+
return dependency?.target === targetUuid;
|
|
51
|
+
});
|
|
52
|
+
if (!alreadyExists) {
|
|
53
|
+
xcodeProject.addTargetDependency(mainTargetUuid, [targetUuid]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// ============================================================================
|
|
57
|
+
// Helper Functions
|
|
58
|
+
// ============================================================================
|
|
59
|
+
/**
|
|
60
|
+
* Adds the widget extension target to the PBXNativeTarget section.
|
|
61
|
+
*/
|
|
62
|
+
function addToPbxNativeTargetSection(xcodeProject, options) {
|
|
63
|
+
const { targetName, targetUuid, productFile, xCConfigurationList } = options;
|
|
64
|
+
const target = {
|
|
65
|
+
uuid: targetUuid,
|
|
66
|
+
pbxNativeTarget: {
|
|
67
|
+
isa: 'PBXNativeTarget',
|
|
68
|
+
name: targetName,
|
|
69
|
+
productName: targetName,
|
|
70
|
+
productReference: productFile.fileRef,
|
|
71
|
+
productType: `"com.apple.product-type.app-extension"`,
|
|
72
|
+
buildConfigurationList: xCConfigurationList.uuid,
|
|
73
|
+
buildPhases: [],
|
|
74
|
+
buildRules: [],
|
|
75
|
+
dependencies: [],
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
xcodeProject.addToPbxNativeTargetSection(target);
|
|
79
|
+
return target;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Adds the target to the PBXProject section.
|
|
83
|
+
*/
|
|
84
|
+
function addToPbxProjectSection(xcodeProject, target) {
|
|
85
|
+
xcodeProject.addToPbxProjectSection(target);
|
|
86
|
+
// Add target attributes to project section
|
|
87
|
+
const projectSection = xcodeProject.pbxProjectSection();
|
|
88
|
+
const firstProject = xcodeProject.getFirstProject();
|
|
89
|
+
if (!projectSection[firstProject.uuid].attributes.TargetAttributes) {
|
|
90
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes = {};
|
|
91
|
+
}
|
|
92
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes[target.uuid] = {
|
|
93
|
+
LastSwiftMigration: IOS.LAST_SWIFT_MIGRATION,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Adds a target dependency so the main app depends on the widget extension.
|
|
98
|
+
*/
|
|
99
|
+
function addTargetDependency(xcodeProject, target) {
|
|
100
|
+
if (!xcodeProject.hash.project.objects['PBXTargetDependency']) {
|
|
101
|
+
xcodeProject.hash.project.objects['PBXTargetDependency'] = {};
|
|
102
|
+
}
|
|
103
|
+
if (!xcodeProject.hash.project.objects['PBXContainerItemProxy']) {
|
|
104
|
+
xcodeProject.hash.project.objects['PBXContainerItemProxy'] = {};
|
|
105
|
+
}
|
|
106
|
+
xcodeProject.addTargetDependency(xcodeProject.getFirstTarget().uuid, [target.uuid]);
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/target.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAoBrC,+EAA+E;AAC/E,gBAAgB;AAChB,+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CAAC,mBAAmB,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;AACrF,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import { logger } from '@use-voltra/expo-plugin';
|
|
4
|
+
/** Table name matches basename without extension; co-located per locale in *.lproj */
|
|
5
|
+
export const VOLTRA_WIDGET_STRINGS_BASENAME = 'VoltraWidgets.strings';
|
|
6
|
+
/**
|
|
7
|
+
* Scans the widget extension target directory and returns categorized file lists.
|
|
8
|
+
*
|
|
9
|
+
* This function only reads the directory structure - it does NOT copy or create files.
|
|
10
|
+
* File generation should be done before this is called.
|
|
11
|
+
*
|
|
12
|
+
* @param targetPath - Path to the widget extension target directory
|
|
13
|
+
* @param targetName - Name of the target (for entitlements file)
|
|
14
|
+
* @returns Categorized lists of files for Xcode project configuration
|
|
15
|
+
*/
|
|
16
|
+
export function getIOSWidgetExtensionFiles(targetPath, targetName) {
|
|
17
|
+
const widgetFiles = {
|
|
18
|
+
swiftFiles: [],
|
|
19
|
+
entitlementFiles: [],
|
|
20
|
+
plistFiles: [],
|
|
21
|
+
assetDirectories: [],
|
|
22
|
+
intentFiles: [],
|
|
23
|
+
localizedStringResources: [],
|
|
24
|
+
};
|
|
25
|
+
if (!fs.existsSync(targetPath)) {
|
|
26
|
+
logger.warn(`Widget target directory does not exist: ${targetPath}`);
|
|
27
|
+
// Still include required generated files even if directory doesn't exist yet
|
|
28
|
+
const initialStatesFile = 'VoltraWidgetInitialStates.swift';
|
|
29
|
+
widgetFiles.swiftFiles.push(initialStatesFile);
|
|
30
|
+
const targetEntitlements = `${targetName}.entitlements`;
|
|
31
|
+
widgetFiles.entitlementFiles.push(targetEntitlements);
|
|
32
|
+
return widgetFiles;
|
|
33
|
+
}
|
|
34
|
+
const files = fs.readdirSync(targetPath);
|
|
35
|
+
for (const entry of files) {
|
|
36
|
+
if (!entry.endsWith('.lproj')) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
const stringsPath = path.join(targetPath, entry, VOLTRA_WIDGET_STRINGS_BASENAME);
|
|
40
|
+
if (fs.existsSync(stringsPath)) {
|
|
41
|
+
widgetFiles.localizedStringResources.push(`${entry}/${VOLTRA_WIDGET_STRINGS_BASENAME}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
for (const file of files) {
|
|
45
|
+
const itemPath = path.join(targetPath, file);
|
|
46
|
+
const isDirectory = fs.lstatSync(itemPath).isDirectory();
|
|
47
|
+
// Handle directories (Assets.xcassets)
|
|
48
|
+
if (isDirectory) {
|
|
49
|
+
if (file === 'Assets.xcassets') {
|
|
50
|
+
widgetFiles.assetDirectories.push(file);
|
|
51
|
+
}
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
// Categorize files by extension
|
|
55
|
+
const ext = path.extname(file).toLowerCase();
|
|
56
|
+
switch (ext) {
|
|
57
|
+
case '.swift':
|
|
58
|
+
widgetFiles.swiftFiles.push(file);
|
|
59
|
+
break;
|
|
60
|
+
case '.entitlements':
|
|
61
|
+
widgetFiles.entitlementFiles.push(file);
|
|
62
|
+
break;
|
|
63
|
+
case '.plist':
|
|
64
|
+
widgetFiles.plistFiles.push(file);
|
|
65
|
+
break;
|
|
66
|
+
case '.intentdefinition':
|
|
67
|
+
widgetFiles.intentFiles.push(file);
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// Always include the target entitlements file
|
|
72
|
+
const targetEntitlements = `${targetName}.entitlements`;
|
|
73
|
+
if (!widgetFiles.entitlementFiles.includes(targetEntitlements)) {
|
|
74
|
+
widgetFiles.entitlementFiles.push(targetEntitlements);
|
|
75
|
+
}
|
|
76
|
+
// Always include VoltraWidgetInitialStates.swift (generated by config plugin)
|
|
77
|
+
const initialStatesFile = 'VoltraWidgetInitialStates.swift';
|
|
78
|
+
if (!widgetFiles.swiftFiles.includes(initialStatesFile)) {
|
|
79
|
+
widgetFiles.swiftFiles.push(initialStatesFile);
|
|
80
|
+
}
|
|
81
|
+
return widgetFiles;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=fileDiscovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileDiscovery.js","sourceRoot":"","sources":["../../../src/utils/fileDiscovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAG5B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,sFAAsF;AACtF,MAAM,CAAC,MAAM,8BAA8B,GAAG,uBAAuB,CAAA;AAErE;;;;;;;;;GASG;AACH,MAAM,UAAU,0BAA0B,CAAC,UAAkB,EAAE,UAAkB;IAC/E,MAAM,WAAW,GAA4B;QAC3C,UAAU,EAAE,EAAE;QACd,gBAAgB,EAAE,EAAE;QACpB,UAAU,EAAE,EAAE;QACd,gBAAgB,EAAE,EAAE;QACpB,WAAW,EAAE,EAAE;QACf,wBAAwB,EAAE,EAAE;KAC7B,CAAA;IAED,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC,2CAA2C,UAAU,EAAE,CAAC,CAAA;QACpE,6EAA6E;QAC7E,MAAM,iBAAiB,GAAG,iCAAiC,CAAA;QAC3D,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;QAC9C,MAAM,kBAAkB,GAAG,GAAG,UAAU,eAAe,CAAA;QACvD,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;QACrD,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;IAExC,KAAK,MAAM,K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AAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBAClC,MAAK;QACT,CAAC;IACH,CAAC;IAED,8CAA8C;IAC9C,MAAM,kBAAkB,GAAG,GAAG,UAAU,eAAe,CAAA;IACvD,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAC/D,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;IACvD,CAAC;IAED,8EAA8E;IAC9E,MAAM,iBAAiB,GAAG,iCAAiC,CAAA;IAC3D,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACxD,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAChD,CAAC;IAED,OAAO,WAAW,CAAA;AACpB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ensures the main app has a URL scheme set so widgetURL can open it.
|
|
3
|
+
* This is an optional feature for deep linking from widgets.
|
|
4
|
+
*
|
|
5
|
+
* @param config - The Expo config object
|
|
6
|
+
* @returns The modified config with URL scheme ensured
|
|
7
|
+
*/
|
|
8
|
+
export function ensureURLScheme(config) {
|
|
9
|
+
const scheme = typeof config.scheme === 'string' ? config.scheme : config.ios?.bundleIdentifier;
|
|
10
|
+
if (!scheme) {
|
|
11
|
+
return config;
|
|
12
|
+
}
|
|
13
|
+
const existingInfoPlist = config.ios?.infoPlist || {};
|
|
14
|
+
const existingTypes = existingInfoPlist.CFBundleURLTypes || [];
|
|
15
|
+
// Check if scheme already exists
|
|
16
|
+
const hasScheme = existingTypes.some((t) => Array.isArray(t?.CFBundleURLSchemes) && t.CFBundleURLSchemes.includes(scheme));
|
|
17
|
+
if (hasScheme) {
|
|
18
|
+
return config;
|
|
19
|
+
}
|
|
20
|
+
// Add the URL scheme
|
|
21
|
+
return {
|
|
22
|
+
...config,
|
|
23
|
+
ios: {
|
|
24
|
+
...config.ios,
|
|
25
|
+
infoPlist: {
|
|
26
|
+
...existingInfoPlist,
|
|
27
|
+
CFBundleURLTypes: [
|
|
28
|
+
...existingTypes,
|
|
29
|
+
{
|
|
30
|
+
CFBundleURLSchemes: [scheme],
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=urlScheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlScheme.js","sourceRoot":"","sources":["../../../src/utils/urlScheme.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,MAAkB;IAChD,MAAM,MAAM,GAAG,OAAQ,MAAc,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAc,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,gBAAgB,CAAA;IAEjH,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,MAAM,CAAA;IACf,CAAC;IAED,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,EAAE,SAAS,IAAI,EAAE,CAAA;IACrD,MAAM,aAAa,GAAI,iBAAiB,CAAC,gBAA0B,IAAI,EAAE,CAAA;IAEzE,iCAAiC;IACjC,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAClC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,CACrF,CAAA;IAED,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,MAAM,CAAA;IACf,CAAC;IAED,qBAAqB;IACrB,OAAO;QACL,GAAG,MAAM;QACT,GAAG,EAAE;YACH,GAAG,MAAM,CAAC,GAAG;YACb,SAAS,EAAE;gBACT,GAAG,iBAAiB;gBACpB,gBAAgB,EAAE;oBAChB,GAAG,aAAa;oBAChB;wBACE,kBAAkB,EAAE,CAAC,MAAM,CAAC;qBAC7B;iBACF;aACF;SACF;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { validateHomeScreenWidgetId, validateInitialStatePath, validateWidgetLabel } from '@use-voltra/expo-plugin';
|
|
2
|
+
const VALID_FAMILIES = new Set([
|
|
3
|
+
'systemSmall',
|
|
4
|
+
'systemMedium',
|
|
5
|
+
'systemLarge',
|
|
6
|
+
'systemExtraLarge',
|
|
7
|
+
'accessoryCircular',
|
|
8
|
+
'accessoryRectangular',
|
|
9
|
+
'accessoryInline',
|
|
10
|
+
]);
|
|
11
|
+
export function validateIOSWidgetConfig(widget) {
|
|
12
|
+
validateHomeScreenWidgetId(widget.id);
|
|
13
|
+
validateWidgetLabel(widget.displayName, widget.id, 'displayName');
|
|
14
|
+
validateWidgetLabel(widget.description, widget.id, 'description');
|
|
15
|
+
validateInitialStatePath(widget.initialStatePath, widget.id);
|
|
16
|
+
if (widget.supportedFamilies) {
|
|
17
|
+
if (!Array.isArray(widget.supportedFamilies)) {
|
|
18
|
+
throw new Error(`Widget '${widget.id}': supportedFamilies must be an array`);
|
|
19
|
+
}
|
|
20
|
+
for (const family of widget.supportedFamilies) {
|
|
21
|
+
if (!VALID_FAMILIES.has(family)) {
|
|
22
|
+
throw new Error(`Widget '${widget.id}': Invalid widget family '${family}'. ` +
|
|
23
|
+
`Valid families are: ${Array.from(VALID_FAMILIES).join(', ')}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export function validateIOSConfigPluginProps(props) {
|
|
29
|
+
if (props.groupIdentifier !== undefined) {
|
|
30
|
+
if (typeof props.groupIdentifier !== 'string') {
|
|
31
|
+
throw new Error('groupIdentifier must be a string');
|
|
32
|
+
}
|
|
33
|
+
if (!props.groupIdentifier.startsWith('group.')) {
|
|
34
|
+
throw new Error(`groupIdentifier '${props.groupIdentifier}' must start with 'group.'`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (props.widgets !== undefined) {
|
|
38
|
+
if (!Array.isArray(props.widgets)) {
|
|
39
|
+
throw new Error('widgets must be an array');
|
|
40
|
+
}
|
|
41
|
+
const seenIds = new Set();
|
|
42
|
+
for (const widget of props.widgets) {
|
|
43
|
+
validateIOSWidgetConfig(widget);
|
|
44
|
+
if (seenIds.has(widget.id)) {
|
|
45
|
+
throw new Error(`Duplicate widget ID: '${widget.id}'`);
|
|
46
|
+
}
|
|
47
|
+
seenIds.add(widget.id);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAInH,MAAM,cAAc,GAAyB,IAAI,GAAG,CAAC;IACnD,aAAa;IACb,cAAc;IACd,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,sBAAsB;IACtB,iBAAiB;CAClB,CAAC,CAAA;AAEF,MAAM,UAAU,uBAAuB,CAAC,MAAuB;IAC7D,0BAA0B,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACrC,mBAAmB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,CAAA;IACjE,mBAAmB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,CAAA;IACjE,wBAAwB,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;IAE5D,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,CAAC,OAAO,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AAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;gBAC3B,MAAM,IAAI,KAAK,CAAC,yBAAyB,MAAM,CAAC,EAAE,GAAG,CAAC,CAAA;YACxD,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IOSWidgetFamily } from './types';
|
|
2
|
+
export declare const IOS: {
|
|
3
|
+
readonly DEPLOYMENT_TARGET: "17.0";
|
|
4
|
+
readonly SWIFT_VERSION: "5.0";
|
|
5
|
+
readonly DEVICE_FAMILY: "1,2";
|
|
6
|
+
readonly LAST_SWIFT_MIGRATION: 1250;
|
|
7
|
+
};
|
|
8
|
+
/** Default path for user-provided widget images */
|
|
9
|
+
export declare const DEFAULT_USER_IMAGES_PATH = "./assets/voltra";
|
|
10
|
+
export declare const SUPPORTED_IMAGE_EXTENSIONS: RegExp;
|
|
11
|
+
export declare const DEFAULT_WIDGET_FAMILIES: IOSWidgetFamily[];
|
|
12
|
+
export declare const WIDGET_FAMILY_MAP: Record<IOSWidgetFamily, string>;
|
|
13
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,eAAO,MAAM,GAAG;;;;;CAKN,CAAA;AAEV,mDAAmD;AACnD,eAAO,MAAM,wBAAwB,oBAAoB,CAAA;AAEzD,eAAO,MAAM,0BAA0B,QAAuB,CAAA;AAE9D,eAAO,MAAM,uBAAuB,EAAE,eAAe,EAAmD,CAAA;AAExG,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAQ7D,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VoltraIosConfigPlugin } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Voltra iOS Expo config plugin.
|
|
4
|
+
*
|
|
5
|
+
* Configures Live Activities, the widget extension, and optional push-to-start support.
|
|
6
|
+
*/
|
|
7
|
+
declare const withVoltraIos: VoltraIosConfigPlugin;
|
|
8
|
+
export default withVoltraIos;
|
|
9
|
+
export type { IOSConfigPluginProps, IOSMainAppPluginProps, IOSWidgetConfig, IOSWidgetExtensionFiles, IOSWidgetExtensionPluginProps, IOSWidgetFamily, IOSWidgetServerUpdateConfig, VoltraIosConfigPlugin, } from './types';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAwB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAI1E;;;;GAIG;AACH,QAAA,MAAM,aAAa,EAAE,qBA4CpB,CAAA;AAED,eAAe,aAAa,CAAA;AAE5B,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,6BAA6B,EAC7B,eAAe,EACf,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
export interface ConfigureEasProps {
|
|
3
|
+
groupIdentifier?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Configures main app for EAS builds.
|
|
7
|
+
*
|
|
8
|
+
* This adds the app group entitlement to the main app's entitlements
|
|
9
|
+
* so that EAS can properly configure provisioning profiles.
|
|
10
|
+
*/
|
|
11
|
+
export declare const configureEas: ConfigPlugin<ConfigureEasProps>;
|
|
12
|
+
//# sourceMappingURL=eas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eas.d.ts","sourceRoot":"","sources":["../../../src/ios/eas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,MAAM,WAAW,iBAAiB;IAChC,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,iBAAiB,CAkBxD,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
export interface ConfigureEntitlementsProps {
|
|
3
|
+
groupIdentifier?: string;
|
|
4
|
+
keychainGroup?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Configures main app entitlements for app groups and keychain sharing.
|
|
8
|
+
*
|
|
9
|
+
* This adds:
|
|
10
|
+
* - com.apple.security.application-groups entitlement for data sharing
|
|
11
|
+
* - keychain-access-groups entitlement for shared credential access (if keychainGroup provided)
|
|
12
|
+
*/
|
|
13
|
+
export declare const configureEntitlements: ConfigPlugin<ConfigureEntitlementsProps>;
|
|
14
|
+
//# sourceMappingURL=entitlements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entitlements.d.ts","sourceRoot":"","sources":["../../../src/ios/entitlements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,MAAM,WAAW,0BAA0B;IACzC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAAC,0BAA0B,CAsB1E,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ExpoConfig } from 'expo/config';
|
|
2
|
+
export interface IOSConfigProps {
|
|
3
|
+
groupIdentifier?: string;
|
|
4
|
+
widgetIds?: string[];
|
|
5
|
+
widgets?: import('../types').IOSWidgetConfig[];
|
|
6
|
+
keychainGroup?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Main iOS app configuration.
|
|
10
|
+
*
|
|
11
|
+
* This configures the main app (not the widget extension) for:
|
|
12
|
+
* - Live Activities support (Info.plist)
|
|
13
|
+
* - App groups for widget communication (entitlements)
|
|
14
|
+
* - Keychain sharing for widget server credentials (entitlements)
|
|
15
|
+
* - EAS build configuration
|
|
16
|
+
*/
|
|
17
|
+
export declare function withIOS(config: ExpoConfig, props: IOSConfigProps): ExpoConfig;
|
|
18
|
+
export { withPushNotifications } from './pushNotifications';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ios/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAM7C,MAAM,WAAW,cAAc;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,UAAU,EAAE,eAAe,EAAE,CAAA;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,GAAG,UAAU,CAqB7E;AAGD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
import type { IOSWidgetConfig } from '../types';
|
|
3
|
+
export interface ConfigureInfoPlistProps {
|
|
4
|
+
groupIdentifier?: string;
|
|
5
|
+
widgetIds?: string[];
|
|
6
|
+
widgets?: IOSWidgetConfig[];
|
|
7
|
+
keychainGroup?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Configures main app Info.plist for Live Activities and widgets.
|
|
11
|
+
*
|
|
12
|
+
* This adds:
|
|
13
|
+
* - NSSupportsLiveActivities: Enables Live Activities support
|
|
14
|
+
* - Voltra_AppGroupIdentifier: App group ID for widget communication (if provided)
|
|
15
|
+
* - Voltra_WidgetIds: Array of widget IDs for native module access (if provided)
|
|
16
|
+
* - Voltra_WidgetServerUrls: Map of widget IDs to server URLs (if any widgets have serverUpdate)
|
|
17
|
+
* - Voltra_WidgetServerIntervals: Map of widget IDs to update intervals (if any widgets have serverUpdate)
|
|
18
|
+
* - Voltra_KeychainGroup: Keychain access group for shared credentials (if provided)
|
|
19
|
+
*/
|
|
20
|
+
export declare const configureInfoPlist: ConfigPlugin<ConfigureInfoPlistProps>;
|
|
21
|
+
//# sourceMappingURL=infoPlist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infoPlist.d.ts","sourceRoot":"","sources":["../../../src/ios/infoPlist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,sBAAsB,CAAA;AAElE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,uBAAuB,CAwCpE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
/**
|
|
3
|
+
* Plugin that enables push notification support for Live Activities.
|
|
4
|
+
*
|
|
5
|
+
* This:
|
|
6
|
+
* - Adds the aps-environment entitlement for push notifications
|
|
7
|
+
* - Adds Voltra_EnablePushNotifications flag to Info.plist
|
|
8
|
+
*/
|
|
9
|
+
export declare const withPushNotifications: ConfigPlugin;
|
|
10
|
+
//# sourceMappingURL=pushNotifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pushNotifications.d.ts","sourceRoot":"","sources":["../../../src/ios/pushNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwC,MAAM,sBAAsB,CAAA;AAEzF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAYjC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
export interface ConfigureEasBuildProps {
|
|
3
|
+
bundleIdentifier: string;
|
|
4
|
+
targetName: string;
|
|
5
|
+
groupIdentifier?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Plugin step that configures EAS build settings for the widget extension.
|
|
9
|
+
*
|
|
10
|
+
* This:
|
|
11
|
+
* - Adds the widget extension to the EAS build experimental iOS appExtensions
|
|
12
|
+
* - Configures entitlements for both the extension and main app
|
|
13
|
+
*/
|
|
14
|
+
export declare const configureEasBuild: ConfigPlugin<ConfigureEasBuildProps>;
|
|
15
|
+
//# sourceMappingURL=eas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eas.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/eas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAKnD,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,sBAAsB,CA4DlE,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface GenerateAssetsOptions {
|
|
2
|
+
targetPath: string;
|
|
3
|
+
userImagesPath?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Generates all asset files for the widget extension.
|
|
7
|
+
*
|
|
8
|
+
* This creates:
|
|
9
|
+
* - Assets.xcassets/ directory structure
|
|
10
|
+
* - Copies user images to the asset catalog
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateAssets(options: GenerateAssetsOptions): void;
|
|
13
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/files/assets.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAMD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAUnE"}
|