@use-voltra/ios-client 1.4.0 → 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -0
- package/Voltra.podspec +28 -0
- package/build/commonjs/VoltraModule.js +13 -0
- package/build/commonjs/VoltraModule.js.map +1 -0
- package/build/commonjs/components/VoltraLiveActivityPreview.js +30 -0
- package/build/commonjs/components/VoltraLiveActivityPreview.js.map +1 -0
- package/build/commonjs/components/VoltraView.js +50 -0
- package/build/commonjs/components/VoltraView.js.map +1 -0
- package/build/commonjs/components/VoltraWidgetPreview.js +58 -0
- package/build/commonjs/components/VoltraWidgetPreview.js.map +1 -0
- package/build/commonjs/events.js +32 -0
- package/build/commonjs/events.js.map +1 -0
- package/build/commonjs/helpers.js +26 -0
- package/build/commonjs/helpers.js.map +1 -0
- package/build/commonjs/index.js +226 -0
- package/build/commonjs/index.js.map +1 -0
- package/build/commonjs/live-activity/api.js +168 -0
- package/build/commonjs/live-activity/api.js.map +1 -0
- package/build/commonjs/logger.js +39 -0
- package/build/commonjs/logger.js.map +1 -0
- package/build/commonjs/native/NativeVoltra.js +15 -0
- package/build/commonjs/native/NativeVoltra.js.map +1 -0
- package/build/commonjs/native/VoltraRNNativeComponent.ts +9 -0
- package/build/commonjs/package.json +1 -0
- package/build/commonjs/preload.js +54 -0
- package/build/commonjs/preload.js.map +1 -0
- package/build/commonjs/types.js +2 -0
- package/build/commonjs/types.js.map +1 -0
- package/build/commonjs/utils/assertRunningOnApple.js +16 -0
- package/build/commonjs/utils/assertRunningOnApple.js.map +1 -0
- package/build/commonjs/utils/helpers.js +19 -0
- package/build/commonjs/utils/helpers.js.map +1 -0
- package/build/commonjs/utils/index.js +28 -0
- package/build/commonjs/utils/index.js.map +1 -0
- package/build/commonjs/utils/useUpdateOnHMR.js +25 -0
- package/build/commonjs/utils/useUpdateOnHMR.js.map +1 -0
- package/build/commonjs/widgets/server-credentials.js +18 -0
- package/build/commonjs/widgets/server-credentials.js.map +1 -0
- package/build/commonjs/widgets/widget-api.js +55 -0
- package/build/commonjs/widgets/widget-api.js.map +1 -0
- package/build/module/VoltraModule.js +4 -0
- package/build/module/VoltraModule.js.map +1 -0
- package/build/module/components/VoltraLiveActivityPreview.js +25 -0
- package/build/module/components/VoltraLiveActivityPreview.js.map +1 -0
- package/build/module/components/VoltraView.js +44 -0
- package/build/module/components/VoltraView.js.map +1 -0
- package/build/module/components/VoltraWidgetPreview.js +53 -0
- package/build/module/components/VoltraWidgetPreview.js.map +1 -0
- package/build/module/events.js +28 -0
- package/build/module/events.js.map +1 -0
- package/build/module/helpers.js +21 -0
- package/build/module/helpers.js.map +1 -0
- package/build/module/index.js +17 -0
- package/build/module/index.js.map +1 -0
- package/build/module/live-activity/api.js +158 -0
- package/build/module/live-activity/api.js.map +1 -0
- package/build/module/logger.js +35 -0
- package/build/module/logger.js.map +1 -0
- package/build/module/native/NativeVoltra.js +11 -0
- package/build/module/native/NativeVoltra.js.map +1 -0
- package/build/module/native/VoltraRNNativeComponent.ts +9 -0
- package/build/module/package.json +1 -0
- package/build/module/preload.js +48 -0
- package/build/module/preload.js.map +1 -0
- package/build/module/types.js +2 -0
- package/build/module/types.js.map +1 -0
- package/build/module/utils/assertRunningOnApple.js +11 -0
- package/build/module/utils/assertRunningOnApple.js.map +1 -0
- package/build/module/utils/helpers.js +4 -0
- package/build/module/utils/helpers.js.map +1 -0
- package/build/module/utils/index.js +5 -0
- package/build/module/utils/index.js.map +1 -0
- package/build/module/utils/useUpdateOnHMR.js +20 -0
- package/build/module/utils/useUpdateOnHMR.js.map +1 -0
- package/build/module/widgets/server-credentials.js +13 -0
- package/build/module/widgets/server-credentials.js.map +1 -0
- package/build/module/widgets/widget-api.js +45 -0
- package/build/module/widgets/widget-api.js.map +1 -0
- package/build/typescript/commonjs/VoltraModule.d.ts +3 -0
- package/build/typescript/commonjs/VoltraModule.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraLiveActivityPreview.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraView.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraWidgetPreview.d.ts.map +1 -0
- package/build/typescript/commonjs/events.d.ts.map +1 -0
- package/build/typescript/commonjs/helpers.d.ts.map +1 -0
- package/build/{types → typescript/commonjs}/index.d.ts +5 -0
- package/build/typescript/commonjs/index.d.ts.map +1 -0
- package/build/typescript/commonjs/live-activity/api.d.ts.map +1 -0
- package/build/typescript/commonjs/logger.d.ts.map +1 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts +100 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts.map +1 -0
- package/build/typescript/commonjs/native/VoltraRNNativeComponent.d.ts +8 -0
- package/build/typescript/commonjs/native/VoltraRNNativeComponent.d.ts.map +1 -0
- package/build/typescript/commonjs/package.json +1 -0
- package/build/typescript/commonjs/preload.d.ts.map +1 -0
- package/build/typescript/commonjs/types.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/assertRunningOnApple.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/helpers.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/index.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/useUpdateOnHMR.d.ts.map +1 -0
- package/build/typescript/commonjs/widgets/server-credentials.d.ts.map +1 -0
- package/build/typescript/commonjs/widgets/widget-api.d.ts.map +1 -0
- package/build/typescript/module/VoltraModule.d.ts +3 -0
- package/build/typescript/module/VoltraModule.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraLiveActivityPreview.d.ts +7 -0
- package/build/typescript/module/components/VoltraLiveActivityPreview.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraView.d.ts +12 -0
- package/build/typescript/module/components/VoltraView.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraWidgetPreview.d.ts +9 -0
- package/build/typescript/module/components/VoltraWidgetPreview.d.ts.map +1 -0
- package/build/typescript/module/events.d.ts +33 -0
- package/build/typescript/module/events.d.ts.map +1 -0
- package/build/typescript/module/helpers.d.ts +3 -0
- package/build/typescript/module/helpers.d.ts.map +1 -0
- package/build/typescript/module/index.d.ts +18 -0
- package/build/typescript/module/index.d.ts.map +1 -0
- package/build/typescript/module/live-activity/api.d.ts +35 -0
- package/build/typescript/module/live-activity/api.d.ts.map +1 -0
- package/build/typescript/module/logger.d.ts +16 -0
- package/build/typescript/module/logger.d.ts.map +1 -0
- package/build/typescript/module/native/NativeVoltra.d.ts +100 -0
- package/build/typescript/module/native/NativeVoltra.d.ts.map +1 -0
- package/build/typescript/module/native/VoltraRNNativeComponent.d.ts +8 -0
- package/build/typescript/module/native/VoltraRNNativeComponent.d.ts.map +1 -0
- package/build/typescript/module/package.json +1 -0
- package/build/typescript/module/preload.d.ts +6 -0
- package/build/typescript/module/preload.d.ts.map +1 -0
- package/build/typescript/module/types.d.ts +2 -0
- package/build/typescript/module/types.d.ts.map +1 -0
- package/build/typescript/module/utils/assertRunningOnApple.d.ts +2 -0
- package/build/typescript/module/utils/assertRunningOnApple.d.ts.map +1 -0
- package/build/{esm/utils/helpers.js → typescript/module/utils/helpers.d.ts} +1 -1
- package/build/typescript/module/utils/helpers.d.ts.map +1 -0
- package/build/{esm/utils/index.js → typescript/module/utils/index.d.ts} +1 -1
- package/build/typescript/module/utils/index.d.ts.map +1 -0
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts +5 -0
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts.map +1 -0
- package/build/typescript/module/widgets/server-credentials.d.ts +5 -0
- package/build/typescript/module/widgets/server-credentials.d.ts.map +1 -0
- package/build/typescript/module/widgets/widget-api.d.ts +11 -0
- package/build/typescript/module/widgets/widget-api.d.ts.map +1 -0
- package/expo-plugin/app.plugin.js +3 -0
- package/expo-plugin/build/cjs/constants.js +23 -0
- package/expo-plugin/build/cjs/constants.js.map +1 -0
- package/expo-plugin/build/cjs/index.js +51 -0
- package/expo-plugin/build/cjs/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios/eas.js +28 -0
- package/expo-plugin/build/cjs/ios/eas.js.map +1 -0
- package/expo-plugin/build/cjs/ios/entitlements.js +46 -0
- package/expo-plugin/build/cjs/ios/entitlements.js.map +1 -0
- package/expo-plugin/build/cjs/ios/index.js +39 -0
- package/expo-plugin/build/cjs/ios/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios/infoPlist.js +51 -0
- package/expo-plugin/build/cjs/ios/infoPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios/pushNotifications.js +22 -0
- package/expo-plugin/build/cjs/ios/pushNotifications.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/eas.js +66 -0
- package/expo-plugin/build/cjs/ios-widget/eas.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/assets.js +199 -0
- package/expo-plugin/build/cjs/ios-widget/files/assets.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/entitlements.js +77 -0
- package/expo-plugin/build/cjs/ios-widget/files/entitlements.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/index.js +92 -0
- package/expo-plugin/build/cjs/ios-widget/files/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js +91 -0
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift.js +443 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/fonts.js +151 -0
- package/expo-plugin/build/cjs/ios-widget/fonts.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/index.js +46 -0
- package/expo-plugin/build/cjs/ios-widget/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/podfile.js +41 -0
- package/expo-plugin/build/cjs/ios-widget/podfile.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js +99 -0
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js +247 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js +91 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js +79 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js +155 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js +71 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js +74 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js +113 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js.map +1 -0
- package/expo-plugin/build/cjs/utils/fileDiscovery.js +120 -0
- package/expo-plugin/build/cjs/utils/fileDiscovery.js.map +1 -0
- package/expo-plugin/build/cjs/utils/urlScheme.js +40 -0
- package/expo-plugin/build/cjs/utils/urlScheme.js.map +1 -0
- package/expo-plugin/build/cjs/validation.js +55 -0
- package/expo-plugin/build/cjs/validation.js.map +1 -0
- package/expo-plugin/build/esm/constants.js +20 -0
- package/expo-plugin/build/esm/constants.js.map +1 -0
- package/expo-plugin/build/esm/index.js +49 -0
- package/expo-plugin/build/esm/index.js.map +1 -0
- package/expo-plugin/build/esm/ios/eas.js +24 -0
- package/expo-plugin/build/esm/ios/eas.js.map +1 -0
- package/expo-plugin/build/esm/ios/entitlements.js +42 -0
- package/expo-plugin/build/esm/ios/entitlements.js.map +1 -0
- package/expo-plugin/build/esm/ios/index.js +34 -0
- package/expo-plugin/build/esm/ios/index.js.map +1 -0
- package/expo-plugin/build/esm/ios/infoPlist.js +47 -0
- package/expo-plugin/build/esm/ios/infoPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios/pushNotifications.js +18 -0
- package/expo-plugin/build/esm/ios/pushNotifications.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/eas.js +62 -0
- package/expo-plugin/build/esm/ios-widget/eas.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/assets.js +163 -0
- package/expo-plugin/build/esm/ios-widget/files/assets.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/entitlements.js +37 -0
- package/expo-plugin/build/esm/ios-widget/files/entitlements.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/index.js +55 -0
- package/expo-plugin/build/esm/ios-widget/files/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js +55 -0
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/swift.js +403 -0
- package/expo-plugin/build/esm/ios-widget/files/swift.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/fonts.js +111 -0
- package/expo-plugin/build/esm/ios-widget/fonts.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/index.js +42 -0
- package/expo-plugin/build/esm/ios-widget/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/podfile.js +37 -0
- package/expo-plugin/build/esm/ios-widget/podfile.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js +92 -0
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js +210 -0
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js +87 -0
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js +75 -0
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/index.js +118 -0
- package/expo-plugin/build/esm/ios-widget/xcode/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js +68 -0
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js +70 -0
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/target.js +108 -0
- package/expo-plugin/build/esm/ios-widget/xcode/target.js.map +1 -0
- package/expo-plugin/build/esm/utils/fileDiscovery.js +83 -0
- package/expo-plugin/build/esm/utils/fileDiscovery.js.map +1 -0
- package/expo-plugin/build/esm/utils/urlScheme.js +37 -0
- package/expo-plugin/build/esm/utils/urlScheme.js.map +1 -0
- package/expo-plugin/build/esm/validation.js +51 -0
- package/expo-plugin/build/esm/validation.js.map +1 -0
- package/expo-plugin/build/types/constants.d.ts +13 -0
- package/expo-plugin/build/types/constants.d.ts.map +1 -0
- package/expo-plugin/build/types/index.d.ts +10 -0
- package/expo-plugin/build/types/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/eas.d.ts +12 -0
- package/expo-plugin/build/types/ios/eas.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/entitlements.d.ts +14 -0
- package/expo-plugin/build/types/ios/entitlements.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/index.d.ts +19 -0
- package/expo-plugin/build/types/ios/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/infoPlist.d.ts +21 -0
- package/expo-plugin/build/types/ios/infoPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/pushNotifications.d.ts +10 -0
- package/expo-plugin/build/types/ios/pushNotifications.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/eas.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/eas.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/assets.d.ts +13 -0
- package/expo-plugin/build/types/ios-widget/files/assets.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/entitlements.d.ts +17 -0
- package/expo-plugin/build/types/ios-widget/files/entitlements.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/index.d.ts +24 -0
- package/expo-plugin/build/types/ios-widget/files/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts +10 -0
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts +24 -0
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/fonts.d.ts +22 -0
- package/expo-plugin/build/types/ios-widget/fonts.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/index.d.ts +31 -0
- package/expo-plugin/build/types/ios-widget/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/podfile.d.ts +9 -0
- package/expo-plugin/build/types/ios-widget/podfile.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts +25 -0
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts +14 -0
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts +42 -0
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts.map +1 -0
- package/expo-plugin/build/types/types.d.ts +74 -0
- package/expo-plugin/build/types/types.d.ts.map +1 -0
- package/expo-plugin/build/types/utils/fileDiscovery.d.ts +15 -0
- package/expo-plugin/build/types/utils/fileDiscovery.d.ts.map +1 -0
- package/expo-plugin/build/types/utils/urlScheme.d.ts +10 -0
- package/expo-plugin/build/types/utils/urlScheme.d.ts.map +1 -0
- package/expo-plugin/build/types/validation.d.ts +4 -0
- package/expo-plugin/build/types/validation.d.ts.map +1 -0
- package/expo-plugin/jest.config.js +18 -0
- package/expo-plugin/src/constants.ts +25 -0
- package/expo-plugin/src/index.ts +72 -0
- package/expo-plugin/src/ios/eas.ts +33 -0
- package/expo-plugin/src/ios/entitlements.ts +59 -0
- package/expo-plugin/src/ios/index.ts +47 -0
- package/expo-plugin/src/ios/infoPlist.ts +63 -0
- package/expo-plugin/src/ios/pushNotifications.ts +22 -0
- package/expo-plugin/src/ios-widget/eas.ts +79 -0
- package/expo-plugin/src/ios-widget/files/assets.ts +201 -0
- package/expo-plugin/src/ios-widget/files/entitlements.ts +48 -0
- package/expo-plugin/src/ios-widget/files/index.ts +74 -0
- package/expo-plugin/src/ios-widget/files/infoPlist.ts +57 -0
- package/expo-plugin/src/ios-widget/files/swift.node.test.ts +22 -0
- package/expo-plugin/src/ios-widget/files/swift.ts +476 -0
- package/expo-plugin/src/ios-widget/fonts.ts +132 -0
- package/expo-plugin/src/ios-widget/index.ts +73 -0
- package/expo-plugin/src/ios-widget/podfile.ts +44 -0
- package/expo-plugin/src/ios-widget/widgetPlist.ts +115 -0
- package/expo-plugin/src/ios-widget/xcode/buildPhases.ts +301 -0
- package/expo-plugin/src/ios-widget/xcode/configurationList.ts +127 -0
- package/expo-plugin/src/ios-widget/xcode/groups.ts +101 -0
- package/expo-plugin/src/ios-widget/xcode/index.ts +149 -0
- package/expo-plugin/src/ios-widget/xcode/mainAppSettings.ts +95 -0
- package/expo-plugin/src/ios-widget/xcode/productFile.ts +91 -0
- package/expo-plugin/src/ios-widget/xcode/target.ts +148 -0
- package/expo-plugin/src/types.ts +89 -0
- package/expo-plugin/src/utils/fileDiscovery.ts +96 -0
- package/expo-plugin/src/utils/urlScheme.ts +45 -0
- package/expo-plugin/src/validation.node.test.ts +19 -0
- package/expo-plugin/src/validation.ts +63 -0
- package/expo-plugin/tsconfig.base.json +17 -0
- package/expo-plugin/tsconfig.cjs.json +9 -0
- package/expo-plugin/tsconfig.esm.json +9 -0
- package/expo-plugin/tsconfig.jest.json +8 -0
- package/expo-plugin/tsconfig.typecheck.json +12 -0
- package/expo-plugin/tsconfig.types.json +10 -0
- package/ios/Package.swift +68 -0
- package/ios/Tests/JSGradientParserTests.swift +201 -0
- package/ios/Tests/VoltraSharedTests/SmokeTests.swift +8 -0
- package/ios/VoltraWidget.podspec +30 -0
- package/ios/app/NativeVoltra.h +5 -0
- package/ios/app/NativeVoltra.mm +211 -0
- package/ios/app/VoltraActivity.swift +5 -0
- package/ios/app/VoltraImagePreload.swift +154 -0
- package/ios/app/VoltraLiveActivityManager.swift +228 -0
- package/ios/app/VoltraLiveActivityService.swift +306 -0
- package/ios/app/VoltraModule.swift +215 -0
- package/ios/app/VoltraModuleImpl.swift +331 -0
- package/ios/app/VoltraOptions.swift +27 -0
- package/ios/app/VoltraViewComponentView.h +10 -0
- package/ios/app/VoltraViewComponentView.mm +67 -0
- package/ios/app/VoltraViewRoot.swift +63 -0
- package/ios/app/VoltraWidgetService.swift +154 -0
- package/ios/shared/BrotliCompression.swift +81 -0
- package/ios/shared/ComponentTypeID.swift +117 -0
- package/ios/shared/Data+hexString.swift +8 -0
- package/ios/shared/Date+toTimerInterval.swift +25 -0
- package/ios/shared/JSONValue.swift +128 -0
- package/ios/shared/ShortNames.swift +180 -0
- package/ios/shared/VoltraAttributes.swift +58 -0
- package/ios/shared/VoltraConfig.swift +18 -0
- package/ios/shared/VoltraConstants.swift +45 -0
- package/ios/shared/VoltraElement.swift +153 -0
- package/ios/shared/VoltraEvent.swift +72 -0
- package/ios/shared/VoltraEventBus.swift +80 -0
- package/ios/shared/VoltraImageStore.swift +119 -0
- package/ios/shared/VoltraInitialStateLocale.swift +54 -0
- package/ios/shared/VoltraInteractionIntent.swift +39 -0
- package/ios/shared/VoltraKeychainHelper.swift +178 -0
- package/ios/shared/VoltraLiveActivityPayload.swift +113 -0
- package/ios/shared/VoltraLogger.swift +30 -0
- package/ios/shared/VoltraNode.swift +194 -0
- package/ios/shared/VoltraPayloadMigrator.swift +63 -0
- package/ios/shared/VoltraPersistentEventQueue.swift +67 -0
- package/ios/shared/VoltraRefreshIntent.swift +29 -0
- package/ios/shared/VoltraRegion.swift +37 -0
- package/ios/shared/VoltraWidgetDefaults.swift +114 -0
- package/ios/shared/VoltraWidgetServerFetcher.swift +166 -0
- package/ios/target/VoltraHomeWidget.swift +508 -0
- package/ios/target/VoltraWidget.swift +158 -0
- package/ios/ui/Extensions/View.modifiers.swift +28 -0
- package/ios/ui/Extensions/VoltraNode+Parameters.swift +18 -0
- package/ios/ui/Generated/Parameters/.generated +8 -0
- package/ios/ui/Generated/Parameters/ButtonParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/ChartParameters.swift +33 -0
- package/ios/ui/Generated/Parameters/CircularProgressViewParameters.swift +59 -0
- package/ios/ui/Generated/Parameters/ComponentParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/DividerParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/GaugeParameters.swift +54 -0
- package/ios/ui/Generated/Parameters/GlassContainerParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/GroupBoxParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/HStackParameters.swift +34 -0
- package/ios/ui/Generated/Parameters/ImageParameters.swift +29 -0
- package/ios/ui/Generated/Parameters/LabelParameters.swift +18 -0
- package/ios/ui/Generated/Parameters/LinearGradientParameters.swift +27 -0
- package/ios/ui/Generated/Parameters/LinearProgressViewParameters.swift +64 -0
- package/ios/ui/Generated/Parameters/LinkParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/MaskParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/SpacerParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/SymbolParameters.swift +59 -0
- package/ios/ui/Generated/Parameters/TextParameters.swift +18 -0
- package/ios/ui/Generated/Parameters/TimerParameters.swift +54 -0
- package/ios/ui/Generated/Parameters/ToggleParameters.swift +24 -0
- package/ios/ui/Generated/Parameters/VStackParameters.swift +34 -0
- package/ios/ui/Generated/Parameters/ViewParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/ZStackParameters.swift +15 -0
- package/ios/ui/Helpers/VoltraDeepLinkResolver.swift +43 -0
- package/ios/ui/Helpers/VoltraProgressDriver.swift +52 -0
- package/ios/ui/Layout/FlexContainerHelper.swift +114 -0
- package/ios/ui/Layout/VoltraFlexStackLayout.swift +417 -0
- package/ios/ui/Protocols/VoltraView.swift +29 -0
- package/ios/ui/Style/BackgroundValue.swift +27 -0
- package/ios/ui/Style/CompositeStyle.swift +81 -0
- package/ios/ui/Style/DecorationStyle.swift +207 -0
- package/ios/ui/Style/FlexEnvironment.swift +35 -0
- package/ios/ui/Style/FontVariant.swift +4 -0
- package/ios/ui/Style/GlassEffect.swift +6 -0
- package/ios/ui/Style/JSColorParser.swift +517 -0
- package/ios/ui/Style/JSGradientParser.swift +674 -0
- package/ios/ui/Style/JSStyleParser.swift +223 -0
- package/ios/ui/Style/LayoutStyle.swift +184 -0
- package/ios/ui/Style/Overflow.swift +4 -0
- package/ios/ui/Style/RenderingStyle.swift +33 -0
- package/ios/ui/Style/StyleConverter.swift +202 -0
- package/ios/ui/Style/TextDecoration.swift +6 -0
- package/ios/ui/Style/TextStyle.swift +50 -0
- package/ios/ui/Style/View+applyStyle.swift +38 -0
- package/ios/ui/Views/VoltraButton.swift +57 -0
- package/ios/ui/Views/VoltraChart.swift +840 -0
- package/ios/ui/Views/VoltraCircularProgressView.swift +103 -0
- package/ios/ui/Views/VoltraDivider.swift +16 -0
- package/ios/ui/Views/VoltraFlexView.swift +33 -0
- package/ios/ui/Views/VoltraGauge.swift +65 -0
- package/ios/ui/Views/VoltraGlassContainer.swift +29 -0
- package/ios/ui/Views/VoltraGroupBox.swift +26 -0
- package/ios/ui/Views/VoltraHStack.swift +70 -0
- package/ios/ui/Views/VoltraImage.swift +109 -0
- package/ios/ui/Views/VoltraLabel.swift +24 -0
- package/ios/ui/Views/VoltraLinearGradient.swift +115 -0
- package/ios/ui/Views/VoltraLinearProgressView.swift +118 -0
- package/ios/ui/Views/VoltraLink.swift +25 -0
- package/ios/ui/Views/VoltraMask.swift +23 -0
- package/ios/ui/Views/VoltraSpacer.swift +16 -0
- package/ios/ui/Views/VoltraSymbol.swift +160 -0
- package/ios/ui/Views/VoltraText.swift +87 -0
- package/ios/ui/Views/VoltraTimer.swift +131 -0
- package/ios/ui/Views/VoltraToggle.swift +39 -0
- package/ios/ui/Views/VoltraVStack.swift +68 -0
- package/ios/ui/Views/VoltraZStack.swift +33 -0
- package/ios/ui/Voltra.swift +86 -0
- package/package.json +91 -18
- package/build/cjs/VoltraModule.js +0 -6
- package/build/cjs/VoltraModule.js.map +0 -1
- package/build/cjs/components/VoltraLiveActivityPreview.js +0 -20
- package/build/cjs/components/VoltraLiveActivityPreview.js.map +0 -1
- package/build/cjs/components/VoltraView.js +0 -37
- package/build/cjs/components/VoltraView.js.map +0 -1
- package/build/cjs/components/VoltraWidgetPreview.js +0 -26
- package/build/cjs/components/VoltraWidgetPreview.js.map +0 -1
- package/build/cjs/events.js +0 -19
- package/build/cjs/events.js.map +0 -1
- package/build/cjs/helpers.js +0 -30
- package/build/cjs/helpers.js.map +0 -1
- package/build/cjs/index.js +0 -49
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/live-activity/api.js +0 -158
- package/build/cjs/live-activity/api.js.map +0 -1
- package/build/cjs/logger.js +0 -36
- package/build/cjs/logger.js.map +0 -1
- package/build/cjs/preload.js +0 -54
- package/build/cjs/preload.js.map +0 -1
- package/build/cjs/utils/assertRunningOnApple.js +0 -13
- package/build/cjs/utils/assertRunningOnApple.js.map +0 -1
- package/build/cjs/utils/helpers.js +0 -7
- package/build/cjs/utils/helpers.js.map +0 -1
- package/build/cjs/utils/index.js +0 -19
- package/build/cjs/utils/index.js.map +0 -1
- package/build/cjs/utils/useUpdateOnHMR.js +0 -22
- package/build/cjs/utils/useUpdateOnHMR.js.map +0 -1
- package/build/cjs/widgets/server-credentials.js +0 -18
- package/build/cjs/widgets/server-credentials.js.map +0 -1
- package/build/cjs/widgets/widget-api.js +0 -59
- package/build/cjs/widgets/widget-api.js.map +0 -1
- package/build/esm/VoltraModule.js +0 -4
- package/build/esm/VoltraModule.js.map +0 -1
- package/build/esm/components/VoltraLiveActivityPreview.js +0 -17
- package/build/esm/components/VoltraLiveActivityPreview.js.map +0 -1
- package/build/esm/components/VoltraView.js +0 -34
- package/build/esm/components/VoltraView.js.map +0 -1
- package/build/esm/components/VoltraWidgetPreview.js +0 -23
- package/build/esm/components/VoltraWidgetPreview.js.map +0 -1
- package/build/esm/events.js +0 -13
- package/build/esm/events.js.map +0 -1
- package/build/esm/helpers.js +0 -23
- package/build/esm/helpers.js.map +0 -1
- package/build/esm/index.js +0 -10
- package/build/esm/index.js.map +0 -1
- package/build/esm/live-activity/api.js +0 -146
- package/build/esm/live-activity/api.js.map +0 -1
- package/build/esm/logger.js +0 -33
- package/build/esm/logger.js.map +0 -1
- package/build/esm/preload.js +0 -46
- package/build/esm/preload.js.map +0 -1
- package/build/esm/utils/assertRunningOnApple.js +0 -9
- package/build/esm/utils/assertRunningOnApple.js.map +0 -1
- package/build/esm/utils/helpers.js.map +0 -1
- package/build/esm/utils/index.js.map +0 -1
- package/build/esm/utils/useUpdateOnHMR.js +0 -18
- package/build/esm/utils/useUpdateOnHMR.js.map +0 -1
- package/build/esm/widgets/server-credentials.js +0 -11
- package/build/esm/widgets/server-credentials.js.map +0 -1
- package/build/esm/widgets/widget-api.js +0 -47
- package/build/esm/widgets/widget-api.js.map +0 -1
- package/build/types/VoltraModule.d.ts +0 -44
- package/build/types/VoltraModule.d.ts.map +0 -1
- package/build/types/components/VoltraLiveActivityPreview.d.ts.map +0 -1
- package/build/types/components/VoltraView.d.ts.map +0 -1
- package/build/types/components/VoltraWidgetPreview.d.ts.map +0 -1
- package/build/types/events.d.ts.map +0 -1
- package/build/types/helpers.d.ts.map +0 -1
- package/build/types/index.d.ts.map +0 -1
- package/build/types/live-activity/api.d.ts.map +0 -1
- package/build/types/logger.d.ts.map +0 -1
- package/build/types/preload.d.ts.map +0 -1
- package/build/types/types.d.ts.map +0 -1
- package/build/types/utils/assertRunningOnApple.d.ts.map +0 -1
- package/build/types/utils/helpers.d.ts.map +0 -1
- package/build/types/utils/index.d.ts.map +0 -1
- package/build/types/utils/useUpdateOnHMR.d.ts.map +0 -1
- package/build/types/widgets/server-credentials.d.ts.map +0 -1
- package/build/types/widgets/widget-api.d.ts.map +0 -1
- /package/build/{types → typescript/commonjs}/components/VoltraLiveActivityPreview.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/components/VoltraView.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/components/VoltraWidgetPreview.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/events.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/helpers.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/live-activity/api.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/logger.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/preload.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/types.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/assertRunningOnApple.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/helpers.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/index.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/useUpdateOnHMR.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/widgets/server-credentials.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/widgets/widget-api.d.ts +0 -0
- /package/{build → expo-plugin/build}/cjs/package.json +0 -0
- /package/{build → expo-plugin/build}/cjs/types.js +0 -0
- /package/{build → expo-plugin/build}/cjs/types.js.map +0 -0
- /package/{build → expo-plugin/build}/esm/package.json +0 -0
- /package/{build → expo-plugin/build}/esm/types.js +0 -0
- /package/{build → expo-plugin/build}/esm/types.js.map +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,GAAG,GAAG;IACjB,iBAAiB,EAAE,MAAM;IACzB,aAAa,EAAE,KAAK;IACpB,aAAa,EAAE,KAAK;IACpB,oBAAoB,EAAE,IAAI;CAClB,CAAA;AAEV,mDAAmD;AACtC,QAAA,wBAAwB,GAAG,iBAAiB,CAAA;AAE5C,QAAA,0BAA0B,GAAG,oBAAoB,CAAA;AAEjD,QAAA,uBAAuB,GAAsB,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC,CAAA;AAE3F,QAAA,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,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config_plugins_1 = require("expo/config-plugins");
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
const ios_1 = require("./ios");
|
|
6
|
+
const ios_widget_1 = require("./ios-widget");
|
|
7
|
+
const urlScheme_1 = require("./utils/urlScheme");
|
|
8
|
+
const validation_1 = require("./validation");
|
|
9
|
+
/**
|
|
10
|
+
* Voltra iOS Expo config plugin.
|
|
11
|
+
*
|
|
12
|
+
* Configures Live Activities, the widget extension, and optional push-to-start support.
|
|
13
|
+
*/
|
|
14
|
+
const withVoltraIos = (config, props = {}) => {
|
|
15
|
+
(0, validation_1.validateIOSConfigPluginProps)(props);
|
|
16
|
+
const iosBundleIdentifier = config.ios?.bundleIdentifier;
|
|
17
|
+
if (!iosBundleIdentifier) {
|
|
18
|
+
return config;
|
|
19
|
+
}
|
|
20
|
+
const deploymentTarget = props.deploymentTarget || constants_1.IOS.DEPLOYMENT_TARGET;
|
|
21
|
+
const targetName = props.targetName || `${config_plugins_1.IOSConfig.XcodeUtils.sanitizedName(config.name)}LiveActivity`;
|
|
22
|
+
const bundleIdentifier = `${iosBundleIdentifier}.${targetName}`;
|
|
23
|
+
const version = config.version || '1.0.0';
|
|
24
|
+
const buildNumber = config.ios?.buildNumber || '1';
|
|
25
|
+
config = (0, urlScheme_1.ensureURLScheme)(config);
|
|
26
|
+
const hasServerDrivenWidgets = props.widgets?.some((w) => w.serverUpdate) ?? false;
|
|
27
|
+
const keychainGroup = props.keychainGroup ?? (hasServerDrivenWidgets ? `$(AppIdentifierPrefix)${iosBundleIdentifier}` : undefined);
|
|
28
|
+
config = (0, ios_1.withIOS)(config, {
|
|
29
|
+
groupIdentifier: props.groupIdentifier,
|
|
30
|
+
widgetIds: props.widgets && props.widgets.length > 0 ? props.widgets.map((w) => w.id) : undefined,
|
|
31
|
+
widgets: props.widgets,
|
|
32
|
+
keychainGroup,
|
|
33
|
+
});
|
|
34
|
+
config = (0, ios_widget_1.withIOS)(config, {
|
|
35
|
+
targetName,
|
|
36
|
+
bundleIdentifier,
|
|
37
|
+
deploymentTarget,
|
|
38
|
+
widgets: props.widgets,
|
|
39
|
+
version,
|
|
40
|
+
buildNumber,
|
|
41
|
+
...(props.groupIdentifier ? { groupIdentifier: props.groupIdentifier } : {}),
|
|
42
|
+
...(keychainGroup ? { keychainGroup } : {}),
|
|
43
|
+
...(props.fonts ? { fonts: props.fonts } : {}),
|
|
44
|
+
});
|
|
45
|
+
if (props.enablePushNotifications) {
|
|
46
|
+
config = (0, ios_1.withPushNotifications)(config);
|
|
47
|
+
}
|
|
48
|
+
return config;
|
|
49
|
+
};
|
|
50
|
+
exports.default = withVoltraIos;
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,wDAA+C;AAE/C,2CAAiC;AACjC,+BAAsD;AACtD,6CAAuD;AAEvD,iDAAmD;AACnD,6CAA2D;AAE3D;;;;GAIG;AACH,MAAM,aAAa,GAA0B,CAAC,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IAClE,IAAA,yCAA4B,EAAC,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,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,IAAI,eAAG,CAAC,iBAAiB,CAAA;IACxE,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,GAAG,0BAAS,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAA;IACvG,MAAM,gBAAgB,GAAG,GAAG,mBAAmB,IAAI,UAAU,EAAE,CAAA;IAC/D,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,OAAO,CAAA;IACzC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,EAAE,WAAW,IAAI,GAAG,CAAA;IAElD,MAAM,GAAG,IAAA,2BAAe,EAAC,MAAM,CAAC,CAAA;IAEhC,MAAM,sBAAsB,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,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CAAC,CAAA;AAED,kBAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureEas = void 0;
|
|
4
|
+
const expo_plugin_1 = require("@use-voltra/expo-plugin");
|
|
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
|
+
const configureEas = (config, props = {}) => {
|
|
12
|
+
if (!props.groupIdentifier) {
|
|
13
|
+
// No group identifier provided, skip EAS configuration
|
|
14
|
+
return config;
|
|
15
|
+
}
|
|
16
|
+
// Ensure ios.entitlements exists in config for EAS to detect
|
|
17
|
+
if (!config.ios) {
|
|
18
|
+
config.ios = {};
|
|
19
|
+
}
|
|
20
|
+
if (!config.ios.entitlements) {
|
|
21
|
+
config.ios.entitlements = {};
|
|
22
|
+
}
|
|
23
|
+
// Add app groups entitlement for EAS
|
|
24
|
+
(0, expo_plugin_1.addApplicationGroupsEntitlement)(config.ios.entitlements, props.groupIdentifier);
|
|
25
|
+
return config;
|
|
26
|
+
};
|
|
27
|
+
exports.configureEas = configureEas;
|
|
28
|
+
//# sourceMappingURL=eas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eas.js","sourceRoot":"","sources":["../../../src/ios/eas.ts"],"names":[],"mappings":";;;AAEA,yDAAyE;AAMzE;;;;;GAKG;AACI,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,IAAA,6CAA+B,EAAC,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,eAAe,CAAC,CAAA;IAE/E,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAlBY,QAAA,YAAY,gBAkBxB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureEntitlements = void 0;
|
|
4
|
+
const expo_plugin_1 = require("@use-voltra/expo-plugin");
|
|
5
|
+
/**
|
|
6
|
+
* Configures main app entitlements for app groups and keychain sharing.
|
|
7
|
+
*
|
|
8
|
+
* This adds:
|
|
9
|
+
* - com.apple.security.application-groups entitlement for data sharing
|
|
10
|
+
* - keychain-access-groups entitlement for shared credential access (if keychainGroup provided)
|
|
11
|
+
*/
|
|
12
|
+
const configureEntitlements = (config, props = {}) => {
|
|
13
|
+
if (!props.groupIdentifier && !props.keychainGroup) {
|
|
14
|
+
// Nothing to configure
|
|
15
|
+
return config;
|
|
16
|
+
}
|
|
17
|
+
if (!config.ios) {
|
|
18
|
+
config.ios = {};
|
|
19
|
+
}
|
|
20
|
+
if (!config.ios.entitlements) {
|
|
21
|
+
config.ios.entitlements = {};
|
|
22
|
+
}
|
|
23
|
+
if (props.groupIdentifier) {
|
|
24
|
+
(0, expo_plugin_1.addApplicationGroupsEntitlement)(config.ios.entitlements, props.groupIdentifier);
|
|
25
|
+
}
|
|
26
|
+
if (props.keychainGroup) {
|
|
27
|
+
addKeychainAccessGroupEntitlement(config.ios.entitlements, props.keychainGroup);
|
|
28
|
+
}
|
|
29
|
+
return config;
|
|
30
|
+
};
|
|
31
|
+
exports.configureEntitlements = configureEntitlements;
|
|
32
|
+
/**
|
|
33
|
+
* Adds keychain-access-groups entitlement to an entitlements object.
|
|
34
|
+
* Ensures the group list is deduped and preserves existing order.
|
|
35
|
+
*/
|
|
36
|
+
function addKeychainAccessGroupEntitlement(entitlements, keychainGroup) {
|
|
37
|
+
const existingGroups = (entitlements['keychain-access-groups'] ?? []).filter(Boolean);
|
|
38
|
+
const deduped = Array.from(new Set(existingGroups));
|
|
39
|
+
if (deduped.includes(keychainGroup)) {
|
|
40
|
+
entitlements['keychain-access-groups'] = deduped;
|
|
41
|
+
return entitlements;
|
|
42
|
+
}
|
|
43
|
+
entitlements['keychain-access-groups'] = [...deduped, keychainGroup];
|
|
44
|
+
return entitlements;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=entitlements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../src/ios/entitlements.ts"],"names":[],"mappings":";;;AAEA,yDAAyE;AAOzE;;;;;;GAMG;AACI,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,IAAA,6CAA+B,EAAC,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;AAtBY,QAAA,qBAAqB,yBAsBjC;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,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withPushNotifications = void 0;
|
|
4
|
+
exports.withIOS = withIOS;
|
|
5
|
+
const eas_1 = require("./eas");
|
|
6
|
+
const entitlements_1 = require("./entitlements");
|
|
7
|
+
const infoPlist_1 = require("./infoPlist");
|
|
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
|
+
function withIOS(config, props) {
|
|
18
|
+
// Configure Info.plist
|
|
19
|
+
config = (0, infoPlist_1.configureInfoPlist)(config, {
|
|
20
|
+
groupIdentifier: props.groupIdentifier,
|
|
21
|
+
widgetIds: props.widgetIds,
|
|
22
|
+
widgets: props.widgets,
|
|
23
|
+
keychainGroup: props.keychainGroup,
|
|
24
|
+
});
|
|
25
|
+
// Configure entitlements
|
|
26
|
+
config = (0, entitlements_1.configureEntitlements)(config, {
|
|
27
|
+
groupIdentifier: props.groupIdentifier,
|
|
28
|
+
keychainGroup: props.keychainGroup,
|
|
29
|
+
});
|
|
30
|
+
// Configure EAS
|
|
31
|
+
config = (0, eas_1.configureEas)(config, {
|
|
32
|
+
groupIdentifier: props.groupIdentifier,
|
|
33
|
+
});
|
|
34
|
+
return config;
|
|
35
|
+
}
|
|
36
|
+
// Re-export for convenience
|
|
37
|
+
var pushNotifications_1 = require("./pushNotifications");
|
|
38
|
+
Object.defineProperty(exports, "withPushNotifications", { enumerable: true, get: function () { return pushNotifications_1.withPushNotifications; } });
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ios/index.ts"],"names":[],"mappings":";;;AAsBA,0BAqBC;AAzCD,+BAAoC;AACpC,iDAAsD;AACtD,2CAAgD;AAShD;;;;;;;;GAQG;AACH,SAAgB,OAAO,CAAC,MAAkB,EAAE,KAAqB;IAC/D,uBAAuB;IACvB,MAAM,GAAG,IAAA,8BAAkB,EAAC,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,IAAA,oCAAqB,EAAC,MAAM,EAAE;QACrC,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,aAAa,EAAE,KAAK,CAAC,aAAa;KACnC,CAAC,CAAA;IAEF,gBAAgB;IAChB,MAAM,GAAG,IAAA,kBAAY,EAAC,MAAM,EAAE;QAC5B,eAAe,EAAE,KAAK,CAAC,eAAe;KACvC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC;AAED,4BAA4B;AAC5B,yDAA2D;AAAlD,0HAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureInfoPlist = void 0;
|
|
4
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
|
+
/**
|
|
6
|
+
* Configures main app Info.plist for Live Activities and widgets.
|
|
7
|
+
*
|
|
8
|
+
* This adds:
|
|
9
|
+
* - NSSupportsLiveActivities: Enables Live Activities support
|
|
10
|
+
* - Voltra_AppGroupIdentifier: App group ID for widget communication (if provided)
|
|
11
|
+
* - Voltra_WidgetIds: Array of widget IDs for native module access (if provided)
|
|
12
|
+
* - Voltra_WidgetServerUrls: Map of widget IDs to server URLs (if any widgets have serverUpdate)
|
|
13
|
+
* - Voltra_WidgetServerIntervals: Map of widget IDs to update intervals (if any widgets have serverUpdate)
|
|
14
|
+
* - Voltra_KeychainGroup: Keychain access group for shared credentials (if provided)
|
|
15
|
+
*/
|
|
16
|
+
const configureInfoPlist = (config, props = {}) => {
|
|
17
|
+
return (0, config_plugins_1.withInfoPlist)(config, (mod) => {
|
|
18
|
+
mod.modResults.NSSupportsLiveActivities = true;
|
|
19
|
+
mod.modResults.NSSupportsLiveActivitiesFrequentUpdates = false;
|
|
20
|
+
// Only add group identifier if provided
|
|
21
|
+
if (props.groupIdentifier) {
|
|
22
|
+
mod.modResults.Voltra_AppGroupIdentifier = props.groupIdentifier;
|
|
23
|
+
}
|
|
24
|
+
// Store widget IDs in Info.plist for native module to access
|
|
25
|
+
if (props.widgetIds && props.widgetIds.length > 0) {
|
|
26
|
+
mod.modResults.Voltra_WidgetIds = props.widgetIds;
|
|
27
|
+
}
|
|
28
|
+
// Configure server update URLs and intervals for widgets
|
|
29
|
+
if (props.widgets && props.widgets.length > 0) {
|
|
30
|
+
const serverUrls = {};
|
|
31
|
+
const serverIntervals = {};
|
|
32
|
+
for (const widget of props.widgets) {
|
|
33
|
+
if (widget.serverUpdate) {
|
|
34
|
+
serverUrls[widget.id] = widget.serverUpdate.url;
|
|
35
|
+
serverIntervals[widget.id] = widget.serverUpdate.intervalMinutes ?? 15;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (Object.keys(serverUrls).length > 0) {
|
|
39
|
+
mod.modResults.Voltra_WidgetServerUrls = serverUrls;
|
|
40
|
+
mod.modResults.Voltra_WidgetServerIntervals = serverIntervals;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Store Keychain group identifier for shared credential access
|
|
44
|
+
if (props.keychainGroup) {
|
|
45
|
+
mod.modResults.Voltra_KeychainGroup = props.keychainGroup;
|
|
46
|
+
}
|
|
47
|
+
return mod;
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
exports.configureInfoPlist = configureInfoPlist;
|
|
51
|
+
//# sourceMappingURL=infoPlist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infoPlist.js","sourceRoot":"","sources":["../../../src/ios/infoPlist.ts"],"names":[],"mappings":";;;AAAA,yDAAkE;AAWlE;;;;;;;;;;GAUG;AACI,MAAM,kBAAkB,GAA0C,CAAC,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IAC9F,OAAO,IAAA,8BAAa,EAAC,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;YAC1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22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withPushNotifications = void 0;
|
|
4
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
|
+
/**
|
|
6
|
+
* Plugin that enables push notification support for Live Activities.
|
|
7
|
+
*
|
|
8
|
+
* This:
|
|
9
|
+
* - Adds the aps-environment entitlement for push notifications
|
|
10
|
+
* - Adds Voltra_EnablePushNotifications flag to Info.plist
|
|
11
|
+
*/
|
|
12
|
+
const withPushNotifications = (config) => (0, config_plugins_1.withInfoPlist)((0, config_plugins_1.withEntitlementsPlist)(config, (mod) => {
|
|
13
|
+
// NOTE: For App Store builds, provisioning profiles typically inject 'production'.
|
|
14
|
+
// This sets a default for debug/dev builds.
|
|
15
|
+
mod.modResults['aps-environment'] = 'development';
|
|
16
|
+
return mod;
|
|
17
|
+
}), (mod) => {
|
|
18
|
+
mod.modResults['Voltra_EnablePushNotifications'] = true;
|
|
19
|
+
return mod;
|
|
20
|
+
});
|
|
21
|
+
exports.withPushNotifications = withPushNotifications;
|
|
22
|
+
//# sourceMappingURL=pushNotifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pushNotifications.js","sourceRoot":"","sources":["../../../src/ios/pushNotifications.ts"],"names":[],"mappings":";;;AAAA,yDAAyF;AAEzF;;;;;;GAMG;AACI,MAAM,qBAAqB,GAAiB,CAAC,MAAM,EAAE,EAAE,CAC5D,IAAA,8BAAa,EACX,IAAA,sCAAqB,EAAC,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;AAZU,QAAA,qBAAqB,yBAY/B"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureEasBuild = void 0;
|
|
4
|
+
const expo_plugin_1 = require("@use-voltra/expo-plugin");
|
|
5
|
+
const entitlements_1 = require("./files/entitlements");
|
|
6
|
+
/**
|
|
7
|
+
* Plugin step that configures EAS build settings for the widget extension.
|
|
8
|
+
*
|
|
9
|
+
* This:
|
|
10
|
+
* - Adds the widget extension to the EAS build experimental iOS appExtensions
|
|
11
|
+
* - Configures entitlements for both the extension and main app
|
|
12
|
+
*/
|
|
13
|
+
const configureEasBuild = (config, { bundleIdentifier, targetName, groupIdentifier }) => {
|
|
14
|
+
let configIndex = null;
|
|
15
|
+
// Check if extension already exists
|
|
16
|
+
config.extra?.eas?.build?.experimental?.ios?.appExtensions?.forEach((ext, index) => {
|
|
17
|
+
if (ext.targetName === targetName) {
|
|
18
|
+
configIndex = index;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
// Add extension if not already present
|
|
22
|
+
if (configIndex === null) {
|
|
23
|
+
config.extra = {
|
|
24
|
+
...config.extra,
|
|
25
|
+
eas: {
|
|
26
|
+
...config.extra?.eas,
|
|
27
|
+
build: {
|
|
28
|
+
...config.extra?.eas?.build,
|
|
29
|
+
experimental: {
|
|
30
|
+
...config.extra?.eas?.build?.experimental,
|
|
31
|
+
ios: {
|
|
32
|
+
...config.extra?.eas?.build?.experimental?.ios,
|
|
33
|
+
appExtensions: [
|
|
34
|
+
...(config.extra?.eas?.build?.experimental?.ios?.appExtensions ?? []),
|
|
35
|
+
{
|
|
36
|
+
targetName,
|
|
37
|
+
bundleIdentifier,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
configIndex = (config.extra?.eas?.build?.experimental?.ios?.appExtensions?.length ?? 1) - 1;
|
|
46
|
+
}
|
|
47
|
+
// Configure entitlements (may be empty if no groupIdentifier)
|
|
48
|
+
if (configIndex != null && config.extra) {
|
|
49
|
+
const widgetsExtensionConfig = config.extra.eas.build.experimental.ios.appExtensions[configIndex];
|
|
50
|
+
widgetsExtensionConfig.entitlements = {
|
|
51
|
+
...widgetsExtensionConfig.entitlements,
|
|
52
|
+
...(0, entitlements_1.getWidgetExtensionEntitlements)(groupIdentifier),
|
|
53
|
+
};
|
|
54
|
+
if (groupIdentifier) {
|
|
55
|
+
config.ios = {
|
|
56
|
+
...config.ios,
|
|
57
|
+
entitlements: {
|
|
58
|
+
...(0, expo_plugin_1.addApplicationGroupsEntitlement)(config.ios?.entitlements ?? {}, groupIdentifier),
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return config;
|
|
64
|
+
};
|
|
65
|
+
exports.configureEasBuild = configureEasBuild;
|
|
66
|
+
//# sourceMappingURL=eas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eas.js","sourceRoot":"","sources":["../../../src/ios-widget/eas.ts"],"names":[],"mappings":";;;AAEA,yDAAyE;AACzE,uDAAqE;AAQrE;;;;;;GAMG;AACI,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,CA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AG;gBACb,YAAY,EAAE;oBACZ,GAAG,IAAA,6CAA+B,EAAC,MAAM,CAAC,GAAG,EAAE,YAAY,IAAI,EAAE,EAAE,eAAe,CAAC;iBACpF;aACF,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AA5DY,QAAA,iBAAiB,qBA4D7B"}
|
|
@@ -0,0 +1,199 @@
|
|
|
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.generateAssets = generateAssets;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const expo_plugin_1 = require("@use-voltra/expo-plugin");
|
|
40
|
+
const constants_1 = require("../../constants");
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// Main Function
|
|
43
|
+
// ============================================================================
|
|
44
|
+
/**
|
|
45
|
+
* Generates all asset files for the widget extension.
|
|
46
|
+
*
|
|
47
|
+
* This creates:
|
|
48
|
+
* - Assets.xcassets/ directory structure
|
|
49
|
+
* - Copies user images to the asset catalog
|
|
50
|
+
*/
|
|
51
|
+
function generateAssets(options) {
|
|
52
|
+
const { targetPath, userImagesPath = constants_1.DEFAULT_USER_IMAGES_PATH } = options;
|
|
53
|
+
// Generate Assets.xcassets structure
|
|
54
|
+
generateAssetsCatalog(targetPath);
|
|
55
|
+
expo_plugin_1.logger.info('Generated Assets.xcassets');
|
|
56
|
+
// Copy user images to asset catalog
|
|
57
|
+
const assetsPath = path.join(targetPath, 'Assets.xcassets');
|
|
58
|
+
copyUserImages(userImagesPath, assetsPath);
|
|
59
|
+
}
|
|
60
|
+
// ============================================================================
|
|
61
|
+
// Asset Catalog
|
|
62
|
+
// ============================================================================
|
|
63
|
+
/**
|
|
64
|
+
* Contents.json for the root of Assets.xcassets
|
|
65
|
+
*/
|
|
66
|
+
const ASSETS_CATALOG_CONTENTS = {
|
|
67
|
+
info: {
|
|
68
|
+
author: 'xcode',
|
|
69
|
+
version: 1,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Contents.json for an imageset
|
|
74
|
+
*/
|
|
75
|
+
function createImagesetContents(filename) {
|
|
76
|
+
return {
|
|
77
|
+
images: [
|
|
78
|
+
{
|
|
79
|
+
filename,
|
|
80
|
+
idiom: 'universal',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
info: {
|
|
84
|
+
author: 'xcode',
|
|
85
|
+
version: 1,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Generates the Assets.xcassets directory structure for a widget extension.
|
|
91
|
+
*
|
|
92
|
+
* Creates the minimal required asset catalog structure:
|
|
93
|
+
* - Assets.xcassets/
|
|
94
|
+
* - Contents.json (required root manifest)
|
|
95
|
+
*
|
|
96
|
+
* @param targetPath - Path to the widget extension target directory
|
|
97
|
+
*/
|
|
98
|
+
function generateAssetsCatalog(targetPath) {
|
|
99
|
+
const assetsPath = path.join(targetPath, 'Assets.xcassets');
|
|
100
|
+
// Create Assets.xcassets directory
|
|
101
|
+
if (!fs.existsSync(assetsPath)) {
|
|
102
|
+
fs.mkdirSync(assetsPath, { recursive: true });
|
|
103
|
+
}
|
|
104
|
+
// Write root Contents.json
|
|
105
|
+
fs.writeFileSync(path.join(assetsPath, 'Contents.json'), JSON.stringify(ASSETS_CATALOG_CONTENTS, null, 2));
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Adds an image to the Assets.xcassets catalog as an imageset.
|
|
109
|
+
*
|
|
110
|
+
* Creates:
|
|
111
|
+
* - {imageName}.imageset/
|
|
112
|
+
* - {originalFilename}
|
|
113
|
+
* - Contents.json
|
|
114
|
+
*
|
|
115
|
+
* @param assetsPath - Path to Assets.xcassets directory
|
|
116
|
+
* @param imagePath - Path to the source image file
|
|
117
|
+
*/
|
|
118
|
+
function addImageToAssetsCatalog(assetsPath, imagePath) {
|
|
119
|
+
const filename = path.basename(imagePath);
|
|
120
|
+
const imageName = path.basename(filename, path.extname(filename));
|
|
121
|
+
const imagesetPath = path.join(assetsPath, `${imageName}.imageset`);
|
|
122
|
+
// Create imageset directory
|
|
123
|
+
if (!fs.existsSync(imagesetPath)) {
|
|
124
|
+
fs.mkdirSync(imagesetPath, { recursive: true });
|
|
125
|
+
}
|
|
126
|
+
// Copy the image file
|
|
127
|
+
fs.copyFileSync(imagePath, path.join(imagesetPath, filename));
|
|
128
|
+
// Write Contents.json for the imageset
|
|
129
|
+
fs.writeFileSync(path.join(imagesetPath, 'Contents.json'), JSON.stringify(createImagesetContents(filename), null, 2));
|
|
130
|
+
}
|
|
131
|
+
// ============================================================================
|
|
132
|
+
// Image Handling
|
|
133
|
+
// ============================================================================
|
|
134
|
+
/**
|
|
135
|
+
* Checks if an image file exceeds the size limit for Live Activities.
|
|
136
|
+
* Logs a warning if the image is too large.
|
|
137
|
+
*
|
|
138
|
+
* @param imagePath - Path to the image file
|
|
139
|
+
* @returns true if the image is within the size limit, false otherwise
|
|
140
|
+
*/
|
|
141
|
+
function checkImageSize(imagePath) {
|
|
142
|
+
const stats = fs.statSync(imagePath);
|
|
143
|
+
const imageSizeInBytes = stats.size;
|
|
144
|
+
if (imageSizeInBytes >= expo_plugin_1.MAX_IMAGE_SIZE_BYTES) {
|
|
145
|
+
const fileName = path.basename(imagePath);
|
|
146
|
+
expo_plugin_1.logger.warnRed(`Image "${fileName}" is ${imageSizeInBytes} bytes (${(imageSizeInBytes / 1024).toFixed(2)}KB). ` +
|
|
147
|
+
`This image will not display correctly in Live Activities as images for Live Activities need to be lower than 4KB.`);
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Checks if a file is a supported image type.
|
|
154
|
+
*/
|
|
155
|
+
function isSupportedImage(filePath) {
|
|
156
|
+
return constants_1.SUPPORTED_IMAGE_EXTENSIONS.test(path.extname(filePath));
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Copies user images from the source directory to the widget's Assets.xcassets.
|
|
160
|
+
*
|
|
161
|
+
* Images are validated for size (must be < 4KB for Live Activities) and
|
|
162
|
+
* added as imagesets to the asset catalog.
|
|
163
|
+
*
|
|
164
|
+
* @param userImagesPath - Path to directory containing user images (relative to project root)
|
|
165
|
+
* @param targetAssetsPath - Path to the Assets.xcassets directory in the widget target
|
|
166
|
+
* @returns Array of image filenames that were copied
|
|
167
|
+
*/
|
|
168
|
+
function copyUserImages(userImagesPath, targetAssetsPath) {
|
|
169
|
+
const copiedImages = [];
|
|
170
|
+
if (!fs.existsSync(userImagesPath)) {
|
|
171
|
+
expo_plugin_1.logger.warn(`Skipping user images: directory does not exist at ${userImagesPath}`);
|
|
172
|
+
return copiedImages;
|
|
173
|
+
}
|
|
174
|
+
if (!fs.lstatSync(userImagesPath).isDirectory()) {
|
|
175
|
+
expo_plugin_1.logger.warn(`Skipping user images: ${userImagesPath} is not a directory`);
|
|
176
|
+
return copiedImages;
|
|
177
|
+
}
|
|
178
|
+
const files = fs.readdirSync(userImagesPath);
|
|
179
|
+
for (const file of files) {
|
|
180
|
+
const sourcePath = path.join(userImagesPath, file);
|
|
181
|
+
// Skip directories and non-image files
|
|
182
|
+
if (fs.lstatSync(sourcePath).isDirectory()) {
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (!isSupportedImage(file)) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
// Check image size for Live Activity compatibility (warns if too large)
|
|
189
|
+
checkImageSize(sourcePath);
|
|
190
|
+
// Add to asset catalog
|
|
191
|
+
addImageToAssetsCatalog(targetAssetsPath, sourcePath);
|
|
192
|
+
copiedImages.push(file);
|
|
193
|
+
}
|
|
194
|
+
if (copiedImages.length > 0) {
|
|
195
|
+
expo_plugin_1.logger.info(`Copied ${copiedImages.length} user image(s) to widget assets`);
|
|
196
|
+
}
|
|
197
|
+
return copiedImages;
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../../../src/ios-widget/files/assets.ts"],"names":[],"mappings":";;;;;;;;;;;;;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AAC;YAC3C,SAAQ;QACV,CAAC;QAED,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5B,SAAQ;QACV,CAAC;QAED,wEAAwE;QACxE,cAAc,CAAC,UAAU,CAAC,CAAA;QAE1B,uBAAuB;QACvB,uBAAuB,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;QACrD,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;IAED,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,oBAAM,CAAC,IAAI,CAAC,UAAU,YAAY,CAAC,MAAM,iCAAiC,CAAC,CAAA;IAC7E,CAAC;IAED,OAAO,YAAY,CAAA;AACrB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.getWidgetExtensionEntitlements = getWidgetExtensionEntitlements;
|
|
40
|
+
exports.generateEntitlements = generateEntitlements;
|
|
41
|
+
const plist_1 = __importDefault(require("@expo/plist"));
|
|
42
|
+
const fs = __importStar(require("fs"));
|
|
43
|
+
const path = __importStar(require("path"));
|
|
44
|
+
const expo_plugin_1 = require("@use-voltra/expo-plugin");
|
|
45
|
+
const expo_plugin_2 = require("@use-voltra/expo-plugin");
|
|
46
|
+
/**
|
|
47
|
+
* Gets the entitlements for the widget extension.
|
|
48
|
+
*/
|
|
49
|
+
function getWidgetExtensionEntitlements(groupIdentifier, keychainGroup) {
|
|
50
|
+
const entitlements = {};
|
|
51
|
+
if (groupIdentifier) {
|
|
52
|
+
(0, expo_plugin_1.addApplicationGroupsEntitlement)(entitlements, groupIdentifier);
|
|
53
|
+
}
|
|
54
|
+
if (keychainGroup) {
|
|
55
|
+
const existingGroups = (entitlements['keychain-access-groups'] ?? []).filter(Boolean);
|
|
56
|
+
const deduped = Array.from(new Set(existingGroups));
|
|
57
|
+
if (!deduped.includes(keychainGroup)) {
|
|
58
|
+
deduped.push(keychainGroup);
|
|
59
|
+
}
|
|
60
|
+
entitlements['keychain-access-groups'] = deduped;
|
|
61
|
+
}
|
|
62
|
+
return entitlements;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Generates the entitlements file for the widget extension.
|
|
66
|
+
*
|
|
67
|
+
* @param options - Generation options
|
|
68
|
+
*/
|
|
69
|
+
function generateEntitlements(options) {
|
|
70
|
+
const { targetPath, targetName, groupIdentifier, keychainGroup } = options;
|
|
71
|
+
const filePath = path.join(targetPath, `${targetName}.entitlements`);
|
|
72
|
+
const extensionEntitlements = getWidgetExtensionEntitlements(groupIdentifier, keychainGroup);
|
|
73
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
74
|
+
fs.writeFileSync(filePath, plist_1.default.build(extensionEntitlements));
|
|
75
|
+
expo_plugin_2.logger.info(`Generated ${targetName}.entitlements`);
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=entitlements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../../src/ios-widget/files/entitlements.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,wEAcC;AAcD,oDASC;AA/CD,wDAA+B;AAC/B,uCAAwB;AACxB,2CAA4B;AAE5B,yDAAyE;AACzE,yDAAgD;AAEhD;;GAEG;AACH,SAAgB,8BAA8B,CAAC,eAAwB,EAAE,aAAsB;IAC7F,MAAM,YAAY,GAAwB,EAAE,CAAA;IAC5C,IAAI,eAAe,EAAE,CAAC;QACpB,IAAA,6CAA+B,EAAC,YAAY,EAAE,eAAe,CAAC,CAAA;IAChE,CAAC;IACD,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,cAAc,GAAG,CAAE,YAAY,CAAC,wBAAwB,CAAc,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QACnG,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,CAAC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