@use-voltra/ios-client 1.4.1 → 2.0.0-rc.2
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/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 +105 -19
- package/src/VoltraModule.ts +2 -0
- package/src/components/VoltraLiveActivityPreview.tsx +29 -0
- package/src/components/VoltraView.tsx +49 -0
- package/src/components/VoltraWidgetPreview.tsx +38 -0
- package/src/events.ts +70 -0
- package/src/helpers.ts +21 -0
- package/src/index.ts +52 -0
- package/src/live-activity/api.ts +224 -0
- package/src/logger.ts +35 -0
- package/src/native/NativeVoltra.ts +118 -0
- package/src/native/VoltraRNNativeComponent.ts +9 -0
- package/src/preload.ts +50 -0
- package/src/types.ts +12 -0
- package/src/utils/assertRunningOnApple.ts +10 -0
- package/src/utils/helpers.ts +1 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/useUpdateOnHMR.ts +25 -0
- package/src/widgets/server-credentials.ts +16 -0
- package/src/widgets/widget-api.ts +65 -0
- 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,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.VOLTRA_WIDGET_STRINGS_BASENAME = void 0;
|
|
37
|
+
exports.getIOSWidgetExtensionFiles = getIOSWidgetExtensionFiles;
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const expo_plugin_1 = require("@use-voltra/expo-plugin");
|
|
41
|
+
/** Table name matches basename without extension; co-located per locale in *.lproj */
|
|
42
|
+
exports.VOLTRA_WIDGET_STRINGS_BASENAME = 'VoltraWidgets.strings';
|
|
43
|
+
/**
|
|
44
|
+
* Scans the widget extension target directory and returns categorized file lists.
|
|
45
|
+
*
|
|
46
|
+
* This function only reads the directory structure - it does NOT copy or create files.
|
|
47
|
+
* File generation should be done before this is called.
|
|
48
|
+
*
|
|
49
|
+
* @param targetPath - Path to the widget extension target directory
|
|
50
|
+
* @param targetName - Name of the target (for entitlements file)
|
|
51
|
+
* @returns Categorized lists of files for Xcode project configuration
|
|
52
|
+
*/
|
|
53
|
+
function getIOSWidgetExtensionFiles(targetPath, targetName) {
|
|
54
|
+
const widgetFiles = {
|
|
55
|
+
swiftFiles: [],
|
|
56
|
+
entitlementFiles: [],
|
|
57
|
+
plistFiles: [],
|
|
58
|
+
assetDirectories: [],
|
|
59
|
+
intentFiles: [],
|
|
60
|
+
localizedStringResources: [],
|
|
61
|
+
};
|
|
62
|
+
if (!fs.existsSync(targetPath)) {
|
|
63
|
+
expo_plugin_1.logger.warn(`Widget target directory does not exist: ${targetPath}`);
|
|
64
|
+
// Still include required generated files even if directory doesn't exist yet
|
|
65
|
+
const initialStatesFile = 'VoltraWidgetInitialStates.swift';
|
|
66
|
+
widgetFiles.swiftFiles.push(initialStatesFile);
|
|
67
|
+
const targetEntitlements = `${targetName}.entitlements`;
|
|
68
|
+
widgetFiles.entitlementFiles.push(targetEntitlements);
|
|
69
|
+
return widgetFiles;
|
|
70
|
+
}
|
|
71
|
+
const files = fs.readdirSync(targetPath);
|
|
72
|
+
for (const entry of files) {
|
|
73
|
+
if (!entry.endsWith('.lproj')) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const stringsPath = path.join(targetPath, entry, exports.VOLTRA_WIDGET_STRINGS_BASENAME);
|
|
77
|
+
if (fs.existsSync(stringsPath)) {
|
|
78
|
+
widgetFiles.localizedStringResources.push(`${entry}/${exports.VOLTRA_WIDGET_STRINGS_BASENAME}`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
for (const file of files) {
|
|
82
|
+
const itemPath = path.join(targetPath, file);
|
|
83
|
+
const isDirectory = fs.lstatSync(itemPath).isDirectory();
|
|
84
|
+
// Handle directories (Assets.xcassets)
|
|
85
|
+
if (isDirectory) {
|
|
86
|
+
if (file === 'Assets.xcassets') {
|
|
87
|
+
widgetFiles.assetDirectories.push(file);
|
|
88
|
+
}
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
// Categorize files by extension
|
|
92
|
+
const ext = path.extname(file).toLowerCase();
|
|
93
|
+
switch (ext) {
|
|
94
|
+
case '.swift':
|
|
95
|
+
widgetFiles.swiftFiles.push(file);
|
|
96
|
+
break;
|
|
97
|
+
case '.entitlements':
|
|
98
|
+
widgetFiles.entitlementFiles.push(file);
|
|
99
|
+
break;
|
|
100
|
+
case '.plist':
|
|
101
|
+
widgetFiles.plistFiles.push(file);
|
|
102
|
+
break;
|
|
103
|
+
case '.intentdefinition':
|
|
104
|
+
widgetFiles.intentFiles.push(file);
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Always include the target entitlements file
|
|
109
|
+
const targetEntitlements = `${targetName}.entitlements`;
|
|
110
|
+
if (!widgetFiles.entitlementFiles.includes(targetEntitlements)) {
|
|
111
|
+
widgetFiles.entitlementFiles.push(targetEntitlements);
|
|
112
|
+
}
|
|
113
|
+
// Always include VoltraWidgetInitialStates.swift (generated by config plugin)
|
|
114
|
+
const initialStatesFile = 'VoltraWidgetInitialStates.swift';
|
|
115
|
+
if (!widgetFiles.swiftFiles.includes(initialStatesFile)) {
|
|
116
|
+
widgetFiles.swiftFiles.push(initialStatesFile);
|
|
117
|
+
}
|
|
118
|
+
return widgetFiles;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=fileDiscovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileDiscovery.js","sourceRoot":"","sources":["../../../src/utils/fileDiscovery.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,gEA4EC;AA/FD,uCAAwB;AACxB,2CAA4B;AAG5B,yDAAgD;AAEhD,sFAAsF;AACzE,QAAA,8BAA8B,GAAG,uBAAuB,CAAA;AAErE;;;;;;;;;GASG;AACH,SAAgB,0BAA0B,CAAC,UAAkB,EAAE,UAAkB;IAC/E,MAAM,WAAW,GAA4B;QAC3C,UAAU,EAA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use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ensureURLScheme = ensureURLScheme;
|
|
4
|
+
/**
|
|
5
|
+
* Ensures the main app has a URL scheme set so widgetURL can open it.
|
|
6
|
+
* This is an optional feature for deep linking from widgets.
|
|
7
|
+
*
|
|
8
|
+
* @param config - The Expo config object
|
|
9
|
+
* @returns The modified config with URL scheme ensured
|
|
10
|
+
*/
|
|
11
|
+
function ensureURLScheme(config) {
|
|
12
|
+
const scheme = typeof config.scheme === 'string' ? config.scheme : config.ios?.bundleIdentifier;
|
|
13
|
+
if (!scheme) {
|
|
14
|
+
return config;
|
|
15
|
+
}
|
|
16
|
+
const existingInfoPlist = config.ios?.infoPlist || {};
|
|
17
|
+
const existingTypes = existingInfoPlist.CFBundleURLTypes || [];
|
|
18
|
+
// Check if scheme already exists
|
|
19
|
+
const hasScheme = existingTypes.some((t) => Array.isArray(t?.CFBundleURLSchemes) && t.CFBundleURLSchemes.includes(scheme));
|
|
20
|
+
if (hasScheme) {
|
|
21
|
+
return config;
|
|
22
|
+
}
|
|
23
|
+
// Add the URL scheme
|
|
24
|
+
return {
|
|
25
|
+
...config,
|
|
26
|
+
ios: {
|
|
27
|
+
...config.ios,
|
|
28
|
+
infoPlist: {
|
|
29
|
+
...existingInfoPlist,
|
|
30
|
+
CFBundleURLTypes: [
|
|
31
|
+
...existingTypes,
|
|
32
|
+
{
|
|
33
|
+
CFBundleURLSchemes: [scheme],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=urlScheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlScheme.js","sourceRoot":"","sources":["../../../src/utils/urlScheme.ts"],"names":[],"mappings":";;AASA,0CAmCC;AA1CD;;;;;;GAMG;AACH,SAAgB,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,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateIOSWidgetConfig = validateIOSWidgetConfig;
|
|
4
|
+
exports.validateIOSConfigPluginProps = validateIOSConfigPluginProps;
|
|
5
|
+
const expo_plugin_1 = require("@use-voltra/expo-plugin");
|
|
6
|
+
const VALID_FAMILIES = new Set([
|
|
7
|
+
'systemSmall',
|
|
8
|
+
'systemMedium',
|
|
9
|
+
'systemLarge',
|
|
10
|
+
'systemExtraLarge',
|
|
11
|
+
'accessoryCircular',
|
|
12
|
+
'accessoryRectangular',
|
|
13
|
+
'accessoryInline',
|
|
14
|
+
]);
|
|
15
|
+
function validateIOSWidgetConfig(widget) {
|
|
16
|
+
(0, expo_plugin_1.validateHomeScreenWidgetId)(widget.id);
|
|
17
|
+
(0, expo_plugin_1.validateWidgetLabel)(widget.displayName, widget.id, 'displayName');
|
|
18
|
+
(0, expo_plugin_1.validateWidgetLabel)(widget.description, widget.id, 'description');
|
|
19
|
+
(0, expo_plugin_1.validateInitialStatePath)(widget.initialStatePath, widget.id);
|
|
20
|
+
if (widget.supportedFamilies) {
|
|
21
|
+
if (!Array.isArray(widget.supportedFamilies)) {
|
|
22
|
+
throw new Error(`Widget '${widget.id}': supportedFamilies must be an array`);
|
|
23
|
+
}
|
|
24
|
+
for (const family of widget.supportedFamilies) {
|
|
25
|
+
if (!VALID_FAMILIES.has(family)) {
|
|
26
|
+
throw new Error(`Widget '${widget.id}': Invalid widget family '${family}'. ` +
|
|
27
|
+
`Valid families are: ${Array.from(VALID_FAMILIES).join(', ')}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function validateIOSConfigPluginProps(props) {
|
|
33
|
+
if (props.groupIdentifier !== undefined) {
|
|
34
|
+
if (typeof props.groupIdentifier !== 'string') {
|
|
35
|
+
throw new Error('groupIdentifier must be a string');
|
|
36
|
+
}
|
|
37
|
+
if (!props.groupIdentifier.startsWith('group.')) {
|
|
38
|
+
throw new Error(`groupIdentifier '${props.groupIdentifier}' must start with 'group.'`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (props.widgets !== undefined) {
|
|
42
|
+
if (!Array.isArray(props.widgets)) {
|
|
43
|
+
throw new Error('widgets must be an array');
|
|
44
|
+
}
|
|
45
|
+
const seenIds = new Set();
|
|
46
|
+
for (const widget of props.widgets) {
|
|
47
|
+
validateIOSWidgetConfig(widget);
|
|
48
|
+
if (seenIds.has(widget.id)) {
|
|
49
|
+
throw new Error(`Duplicate widget ID: '${widget.id}'`);
|
|
50
|
+
}
|
|
51
|
+
seenIds.add(widget.id);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/validation.ts"],"names":[],"mappings":";;AAcA,0DAoBC;AAED,oEA0BC;AA9DD,yDAAmH;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,SAAgB,uBAAuB,CAAC,MAAuB;IAC7D,IAAA,wCAA0B,EAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACrC,IAAA,iCAAmB,EAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,CAAA;IACjE,IAAA,iCAAmB,EAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,CAAA;IACjE,IAAA,sCAAwB,EAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;IAE5D,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC;YAC7C,MAAM,IAAI,KAAK,CAAC,WAAW,MAAM,CAAC,EAAE,uCAAuC,CAAC,CAAA;QAC9E,CAAC;QAED,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC9C,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CACb,WAAW,MAAM,CAAC,EAAE,6BA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0',
|
|
3
|
+
SWIFT_VERSION: '5.0',
|
|
4
|
+
DEVICE_FAMILY: '1,2',
|
|
5
|
+
LAST_SWIFT_MIGRATION: 1250,
|
|
6
|
+
};
|
|
7
|
+
/** Default path for user-provided widget images */
|
|
8
|
+
export const DEFAULT_USER_IMAGES_PATH = './assets/voltra';
|
|
9
|
+
export const SUPPORTED_IMAGE_EXTENSIONS = /\.(png|jpg|jpeg)$/i;
|
|
10
|
+
export const DEFAULT_WIDGET_FAMILIES = ['systemSmall', 'systemMedium', 'systemLarge'];
|
|
11
|
+
export const WIDGET_FAMILY_MAP = {
|
|
12
|
+
systemSmall: '.systemSmall',
|
|
13
|
+
systemMedium: '.systemMedium',
|
|
14
|
+
systemLarge: '.systemLarge',
|
|
15
|
+
systemExtraLarge: '.systemExtraLarge',
|
|
16
|
+
accessoryCircular: '.accessoryCircular',
|
|
17
|
+
accessoryRectangular: '.accessoryRectangular',
|
|
18
|
+
accessoryInline: '.accessoryInline',
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,iBAAiB,EAAE,MAAM;IACzB,aAAa,EAAE,KAAK;IACpB,aAAa,EAAE,KAAK;IACpB,oBAAoB,EAAE,IAAI;CAClB,CAAA;AAEV,mDAAmD;AACnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAA;AAEzD,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAAoB,CAAA;AAE9D,MAAM,CAAC,MAAM,uBAAuB,GAAsB,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC,CAAA;AAExG,MAAM,CAAC,MAAM,iBAAiB,GAAoC;IAChE,WAAW,EAAE,cAAc;IAC3B,YAAY,EAAE,eAAe;IAC7B,WAAW,EAAE,cAAc;IAC3B,gBAAgB,EAAE,mBAAmB;IACrC,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,uBAAuB;IAC7C,eAAe,EAAE,kBAAkB;CACpC,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { IOSConfig } from 'expo/config-plugins';
|
|
2
|
+
import { IOS } from './constants';
|
|
3
|
+
import { withIOS, withPushNotifications } from './ios';
|
|
4
|
+
import { withIOS as withIOSWidget } from './ios-widget';
|
|
5
|
+
import { ensureURLScheme } from './utils/urlScheme';
|
|
6
|
+
import { validateIOSConfigPluginProps } from './validation';
|
|
7
|
+
/**
|
|
8
|
+
* Voltra iOS Expo config plugin.
|
|
9
|
+
*
|
|
10
|
+
* Configures Live Activities, the widget extension, and optional push-to-start support.
|
|
11
|
+
*/
|
|
12
|
+
const withVoltraIos = (config, props = {}) => {
|
|
13
|
+
validateIOSConfigPluginProps(props);
|
|
14
|
+
const iosBundleIdentifier = config.ios?.bundleIdentifier;
|
|
15
|
+
if (!iosBundleIdentifier) {
|
|
16
|
+
return config;
|
|
17
|
+
}
|
|
18
|
+
const deploymentTarget = props.deploymentTarget || IOS.DEPLOYMENT_TARGET;
|
|
19
|
+
const targetName = props.targetName || `${IOSConfig.XcodeUtils.sanitizedName(config.name)}LiveActivity`;
|
|
20
|
+
const bundleIdentifier = `${iosBundleIdentifier}.${targetName}`;
|
|
21
|
+
const version = config.version || '1.0.0';
|
|
22
|
+
const buildNumber = config.ios?.buildNumber || '1';
|
|
23
|
+
config = ensureURLScheme(config);
|
|
24
|
+
const hasServerDrivenWidgets = props.widgets?.some((w) => w.serverUpdate) ?? false;
|
|
25
|
+
const keychainGroup = props.keychainGroup ?? (hasServerDrivenWidgets ? `$(AppIdentifierPrefix)${iosBundleIdentifier}` : undefined);
|
|
26
|
+
config = withIOS(config, {
|
|
27
|
+
groupIdentifier: props.groupIdentifier,
|
|
28
|
+
widgetIds: props.widgets && props.widgets.length > 0 ? props.widgets.map((w) => w.id) : undefined,
|
|
29
|
+
widgets: props.widgets,
|
|
30
|
+
keychainGroup,
|
|
31
|
+
});
|
|
32
|
+
config = withIOSWidget(config, {
|
|
33
|
+
targetName,
|
|
34
|
+
bundleIdentifier,
|
|
35
|
+
deploymentTarget,
|
|
36
|
+
widgets: props.widgets,
|
|
37
|
+
version,
|
|
38
|
+
buildNumber,
|
|
39
|
+
...(props.groupIdentifier ? { groupIdentifier: props.groupIdentifier } : {}),
|
|
40
|
+
...(keychainGroup ? { keychainGroup } : {}),
|
|
41
|
+
...(props.fonts ? { fonts: props.fonts } : {}),
|
|
42
|
+
});
|
|
43
|
+
if (props.enablePushNotifications) {
|
|
44
|
+
config = withPushNotifications(config);
|
|
45
|
+
}
|
|
46
|
+
return config;
|
|
47
|
+
};
|
|
48
|
+
export default withVoltraIos;
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,cAAc,CAAA;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAA;AAE3D;;;;GAIG;AACH,MAAM,aAAa,GAA0B,CAAC,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IAClE,4BAA4B,CAAC,KAAK,CAAC,CAAA;IAEnC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,EAAE,gBAAgB,CAAA;IACxD,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,OAAO,MAAM,CAAA;IACf,CAAC;IAED,MAAM,gBAA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AAK,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5E,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC/C,CAAC,CAAA;IAEF,IAAI,KAAK,CAAC,uBAAuB,EAAE,CAAC;QAClC,MAAM,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAA;IACxC,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { addApplicationGroupsEntitlement } from '@use-voltra/expo-plugin';
|
|
2
|
+
/**
|
|
3
|
+
* Configures main app for EAS builds.
|
|
4
|
+
*
|
|
5
|
+
* This adds the app group entitlement to the main app's entitlements
|
|
6
|
+
* so that EAS can properly configure provisioning profiles.
|
|
7
|
+
*/
|
|
8
|
+
export const configureEas = (config, props = {}) => {
|
|
9
|
+
if (!props.groupIdentifier) {
|
|
10
|
+
// No group identifier provided, skip EAS configuration
|
|
11
|
+
return config;
|
|
12
|
+
}
|
|
13
|
+
// Ensure ios.entitlements exists in config for EAS to detect
|
|
14
|
+
if (!config.ios) {
|
|
15
|
+
config.ios = {};
|
|
16
|
+
}
|
|
17
|
+
if (!config.ios.entitlements) {
|
|
18
|
+
config.ios.entitlements = {};
|
|
19
|
+
}
|
|
20
|
+
// Add app groups entitlement for EAS
|
|
21
|
+
addApplicationGroupsEntitlement(config.ios.entitlements, props.groupIdentifier);
|
|
22
|
+
return config;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=eas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eas.js","sourceRoot":"","sources":["../../../src/ios/eas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAA;AAMzE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAoC,CAAC,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IAClF,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;QAC3B,uDAAuD;QACvD,OAAO,MAAM,CAAA;IACf,CAAC;IAED,6DAA6D;IAC7D,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,GAAG,GAAG,EAAE,CAAA;IACjB,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;QAC7B,MAAM,CAAC,GAAG,CAAC,YAAY,GAAG,EAAE,CAAA;IAC9B,CAAC;IAED,qCAAqC;IACrC,+BAA+B,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,eAAe,CAAC,CAAA;IAE/E,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { addApplicationGroupsEntitlement } from '@use-voltra/expo-plugin';
|
|
2
|
+
/**
|
|
3
|
+
* Configures main app entitlements for app groups and keychain sharing.
|
|
4
|
+
*
|
|
5
|
+
* This adds:
|
|
6
|
+
* - com.apple.security.application-groups entitlement for data sharing
|
|
7
|
+
* - keychain-access-groups entitlement for shared credential access (if keychainGroup provided)
|
|
8
|
+
*/
|
|
9
|
+
export const configureEntitlements = (config, props = {}) => {
|
|
10
|
+
if (!props.groupIdentifier && !props.keychainGroup) {
|
|
11
|
+
// Nothing to configure
|
|
12
|
+
return config;
|
|
13
|
+
}
|
|
14
|
+
if (!config.ios) {
|
|
15
|
+
config.ios = {};
|
|
16
|
+
}
|
|
17
|
+
if (!config.ios.entitlements) {
|
|
18
|
+
config.ios.entitlements = {};
|
|
19
|
+
}
|
|
20
|
+
if (props.groupIdentifier) {
|
|
21
|
+
addApplicationGroupsEntitlement(config.ios.entitlements, props.groupIdentifier);
|
|
22
|
+
}
|
|
23
|
+
if (props.keychainGroup) {
|
|
24
|
+
addKeychainAccessGroupEntitlement(config.ios.entitlements, props.keychainGroup);
|
|
25
|
+
}
|
|
26
|
+
return config;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Adds keychain-access-groups entitlement to an entitlements object.
|
|
30
|
+
* Ensures the group list is deduped and preserves existing order.
|
|
31
|
+
*/
|
|
32
|
+
function addKeychainAccessGroupEntitlement(entitlements, keychainGroup) {
|
|
33
|
+
const existingGroups = (entitlements['keychain-access-groups'] ?? []).filter(Boolean);
|
|
34
|
+
const deduped = Array.from(new Set(existingGroups));
|
|
35
|
+
if (deduped.includes(keychainGroup)) {
|
|
36
|
+
entitlements['keychain-access-groups'] = deduped;
|
|
37
|
+
return entitlements;
|
|
38
|
+
}
|
|
39
|
+
entitlements['keychain-access-groups'] = [...deduped, keychainGroup];
|
|
40
|
+
return entitlements;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=entitlements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../src/ios/entitlements.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAA;AAOzE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA6C,CAAC,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IACpG,IAAI,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QACnD,uBAAuB;QACvB,OAAO,MAAM,CAAA;IACf,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,GAAG,GAAG,EAAE,CAAA;IACjB,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;QAC7B,MAAM,CAAC,GAAG,CAAC,YAAY,GAAG,EAAE,CAAA;IAC9B,CAAC;IAED,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1B,+BAA+B,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,eAAe,CAAC,CAAA;IACjF,CAAC;IAED,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;QACxB,iCAAiC,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;IACjF,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED;;;GAGG;AACH,SAAS,iCAAiC,CACxC,YAAiC,EACjC,aAAqB;IAErB,MAAM,cAAc,GAAG,CAAE,YAAY,CAAC,wBAAwB,CAAc,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACnG,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,CAAC,CAAA;IAEnD,IAAI,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACpC,YAAY,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAA;QAChD,OAAO,YAAY,CAAA;IACrB,CAAC;IAED,YAAY,CAAC,wBAAwB,CAAC,GAAG,CAAC,GAAG,OAAO,EAAE,aAAa,CAAC,CAAA;IACpE,OAAO,YAAY,CAAA;AACrB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { configureEas } from './eas';
|
|
2
|
+
import { configureEntitlements } from './entitlements';
|
|
3
|
+
import { configureInfoPlist } from './infoPlist';
|
|
4
|
+
/**
|
|
5
|
+
* Main iOS app configuration.
|
|
6
|
+
*
|
|
7
|
+
* This configures the main app (not the widget extension) for:
|
|
8
|
+
* - Live Activities support (Info.plist)
|
|
9
|
+
* - App groups for widget communication (entitlements)
|
|
10
|
+
* - Keychain sharing for widget server credentials (entitlements)
|
|
11
|
+
* - EAS build configuration
|
|
12
|
+
*/
|
|
13
|
+
export function withIOS(config, props) {
|
|
14
|
+
// Configure Info.plist
|
|
15
|
+
config = configureInfoPlist(config, {
|
|
16
|
+
groupIdentifier: props.groupIdentifier,
|
|
17
|
+
widgetIds: props.widgetIds,
|
|
18
|
+
widgets: props.widgets,
|
|
19
|
+
keychainGroup: props.keychainGroup,
|
|
20
|
+
});
|
|
21
|
+
// Configure entitlements
|
|
22
|
+
config = configureEntitlements(config, {
|
|
23
|
+
groupIdentifier: props.groupIdentifier,
|
|
24
|
+
keychainGroup: props.keychainGroup,
|
|
25
|
+
});
|
|
26
|
+
// Configure EAS
|
|
27
|
+
config = configureEas(config, {
|
|
28
|
+
groupIdentifier: props.groupIdentifier,
|
|
29
|
+
});
|
|
30
|
+
return config;
|
|
31
|
+
}
|
|
32
|
+
// Re-export for convenience
|
|
33
|
+
export { withPushNotifications } from './pushNotifications';
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ios/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAShD;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CAAC,MAAkB,EAAE,KAAqB;IAC/D,uBAAuB;IACvB,MAAM,GAAG,kBAAkB,CAAC,MAAM,EAAE;QAClC,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,aAAa,EAAE,KAAK,CAAC,aAAa;KACnC,CAAC,CAAA;IAEF,yBAAyB;IACzB,MAAM,GAAG,qBAAqB,CAAC,MAAM,EAAE;QACrC,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,aAAa,EAAE,KAAK,CAAC,aAAa;KACnC,CAAC,CAAA;IAEF,gBAAgB;IAChB,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE;QAC5B,eAAe,EAAE,KAAK,CAAC,eAAe;KACvC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC;AAED,4BAA4B;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { withInfoPlist } from '@expo/config-plugins';
|
|
2
|
+
/**
|
|
3
|
+
* Configures main app Info.plist for Live Activities and widgets.
|
|
4
|
+
*
|
|
5
|
+
* This adds:
|
|
6
|
+
* - NSSupportsLiveActivities: Enables Live Activities support
|
|
7
|
+
* - Voltra_AppGroupIdentifier: App group ID for widget communication (if provided)
|
|
8
|
+
* - Voltra_WidgetIds: Array of widget IDs for native module access (if provided)
|
|
9
|
+
* - Voltra_WidgetServerUrls: Map of widget IDs to server URLs (if any widgets have serverUpdate)
|
|
10
|
+
* - Voltra_WidgetServerIntervals: Map of widget IDs to update intervals (if any widgets have serverUpdate)
|
|
11
|
+
* - Voltra_KeychainGroup: Keychain access group for shared credentials (if provided)
|
|
12
|
+
*/
|
|
13
|
+
export const configureInfoPlist = (config, props = {}) => {
|
|
14
|
+
return withInfoPlist(config, (mod) => {
|
|
15
|
+
mod.modResults.NSSupportsLiveActivities = true;
|
|
16
|
+
mod.modResults.NSSupportsLiveActivitiesFrequentUpdates = false;
|
|
17
|
+
// Only add group identifier if provided
|
|
18
|
+
if (props.groupIdentifier) {
|
|
19
|
+
mod.modResults.Voltra_AppGroupIdentifier = props.groupIdentifier;
|
|
20
|
+
}
|
|
21
|
+
// Store widget IDs in Info.plist for native module to access
|
|
22
|
+
if (props.widgetIds && props.widgetIds.length > 0) {
|
|
23
|
+
mod.modResults.Voltra_WidgetIds = props.widgetIds;
|
|
24
|
+
}
|
|
25
|
+
// Configure server update URLs and intervals for widgets
|
|
26
|
+
if (props.widgets && props.widgets.length > 0) {
|
|
27
|
+
const serverUrls = {};
|
|
28
|
+
const serverIntervals = {};
|
|
29
|
+
for (const widget of props.widgets) {
|
|
30
|
+
if (widget.serverUpdate) {
|
|
31
|
+
serverUrls[widget.id] = widget.serverUpdate.url;
|
|
32
|
+
serverIntervals[widget.id] = widget.serverUpdate.intervalMinutes ?? 15;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (Object.keys(serverUrls).length > 0) {
|
|
36
|
+
mod.modResults.Voltra_WidgetServerUrls = serverUrls;
|
|
37
|
+
mod.modResults.Voltra_WidgetServerIntervals = serverIntervals;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// Store Keychain group identifier for shared credential access
|
|
41
|
+
if (props.keychainGroup) {
|
|
42
|
+
mod.modResults.Voltra_KeychainGroup = props.keychainGroup;
|
|
43
|
+
}
|
|
44
|
+
return mod;
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=infoPlist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infoPlist.js","sourceRoot":"","sources":["../../../src/ios/infoPlist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAWlE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA0C,CAAC,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IAC9F,OAAO,aAAa,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;QACnC,GAAG,CAAC,UAAU,CAAC,wBAAwB,GAAG,IAAI,CAAA;QAC9C,GAAG,CAAC,UAAU,CAAC,uCAAuC,GAAG,KAAK,CAAA;QAE9D,wCAAwC;QACxC,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;YAC1B,GAAG,CAAC,U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'@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 const withPushNotifications = (config) => withInfoPlist(withEntitlementsPlist(config, (mod) => {
|
|
10
|
+
// NOTE: For App Store builds, provisioning profiles typically inject 'production'.
|
|
11
|
+
// This sets a default for debug/dev builds.
|
|
12
|
+
mod.modResults['aps-environment'] = 'development';
|
|
13
|
+
return mod;
|
|
14
|
+
}), (mod) => {
|
|
15
|
+
mod.modResults['Voltra_EnablePushNotifications'] = true;
|
|
16
|
+
return mod;
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=pushNotifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pushNotifications.js","sourceRoot":"","sources":["../../../src/ios/pushNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,qBAAqB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAiB,CAAC,MAAM,EAAE,EAAE,CAC5D,aAAa,CACX,qBAAqB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;IACpC,mFAAmF;IACnF,4CAA4C;IAC5C,GAAG,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,aAAa,CAAA;IACjD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAC,EACF,CAAC,GAAG,EAAE,EAAE;IACN,GAAG,CAAC,UAAU,CAAC,gCAAgC,CAAC,GAAG,IAAI,CAAA;IACvD,OAAO,GAAG,CAAA;AACZ,CAAC,CACF,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { addApplicationGroupsEntitlement } from '@use-voltra/expo-plugin';
|
|
2
|
+
import { getWidgetExtensionEntitlements } from './files/entitlements';
|
|
3
|
+
/**
|
|
4
|
+
* Plugin step that configures EAS build settings for the widget extension.
|
|
5
|
+
*
|
|
6
|
+
* This:
|
|
7
|
+
* - Adds the widget extension to the EAS build experimental iOS appExtensions
|
|
8
|
+
* - Configures entitlements for both the extension and main app
|
|
9
|
+
*/
|
|
10
|
+
export const configureEasBuild = (config, { bundleIdentifier, targetName, groupIdentifier }) => {
|
|
11
|
+
let configIndex = null;
|
|
12
|
+
// Check if extension already exists
|
|
13
|
+
config.extra?.eas?.build?.experimental?.ios?.appExtensions?.forEach((ext, index) => {
|
|
14
|
+
if (ext.targetName === targetName) {
|
|
15
|
+
configIndex = index;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
// Add extension if not already present
|
|
19
|
+
if (configIndex === null) {
|
|
20
|
+
config.extra = {
|
|
21
|
+
...config.extra,
|
|
22
|
+
eas: {
|
|
23
|
+
...config.extra?.eas,
|
|
24
|
+
build: {
|
|
25
|
+
...config.extra?.eas?.build,
|
|
26
|
+
experimental: {
|
|
27
|
+
...config.extra?.eas?.build?.experimental,
|
|
28
|
+
ios: {
|
|
29
|
+
...config.extra?.eas?.build?.experimental?.ios,
|
|
30
|
+
appExtensions: [
|
|
31
|
+
...(config.extra?.eas?.build?.experimental?.ios?.appExtensions ?? []),
|
|
32
|
+
{
|
|
33
|
+
targetName,
|
|
34
|
+
bundleIdentifier,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
configIndex = (config.extra?.eas?.build?.experimental?.ios?.appExtensions?.length ?? 1) - 1;
|
|
43
|
+
}
|
|
44
|
+
// Configure entitlements (may be empty if no groupIdentifier)
|
|
45
|
+
if (configIndex != null && config.extra) {
|
|
46
|
+
const widgetsExtensionConfig = config.extra.eas.build.experimental.ios.appExtensions[configIndex];
|
|
47
|
+
widgetsExtensionConfig.entitlements = {
|
|
48
|
+
...widgetsExtensionConfig.entitlements,
|
|
49
|
+
...getWidgetExtensionEntitlements(groupIdentifier),
|
|
50
|
+
};
|
|
51
|
+
if (groupIdentifier) {
|
|
52
|
+
config.ios = {
|
|
53
|
+
...config.ios,
|
|
54
|
+
entitlements: {
|
|
55
|
+
...addApplicationGroupsEntitlement(config.ios?.entitlements ?? {}, groupIdentifier),
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return config;
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=eas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eas.js","sourceRoot":"","sources":["../../../src/ios-widget/eas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAA;AAQrE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAyC,CACrE,MAAM,EACN,EAAE,gBAAgB,EAAE,UAAU,EAAE,eAAe,EAAE,EACjD,EAAE;IACF,IAAI,WAAW,GAAkB,IAAI,CAAA;IAErC,oCAAoC;IACpC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC,GAAQ,EAAE,KAAa,EAAE,EAAE;QAC9F,IAAI,GAAG,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;YAClC,WAAW,GAAG,KAAK,CAAA;QACrB,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,uCAAuC;IACvC,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QACzB,MAAM,CAAC,KAAK,GAAG;YACb,GAAG,MAAM,CAAC,KAAK;YACf,GAAG,EAAE;gBACH,GAAG,MAAM,CAAC,KAAK,EAAE,GAAG;gBACpB,KAAK,EAAE;oBACL,GAAG,MAAM,CAAC,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