@use-voltra/ios-client 2.1.1 → 2.3.0
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 +61 -8
- package/Voltra.podspec +1 -0
- package/build/commonjs/dynamic-widget/api.js +15 -0
- package/build/commonjs/dynamic-widget/api.js.map +1 -0
- package/build/commonjs/events.js +23 -0
- package/build/commonjs/events.js.map +1 -1
- package/build/commonjs/index.js +74 -7
- package/build/commonjs/index.js.map +1 -1
- package/build/commonjs/live-activity/api.js +3 -1
- package/build/commonjs/live-activity/api.js.map +1 -1
- package/build/commonjs/live-activity/dynamic-api.js +173 -0
- package/build/commonjs/live-activity/dynamic-api.js.map +1 -0
- package/build/commonjs/native/NativeVoltra.js.map +1 -1
- package/build/commonjs/utils/enableDynamicLiveActivityHotReload.js +47 -0
- package/build/commonjs/utils/enableDynamicLiveActivityHotReload.js.map +1 -0
- package/build/commonjs/utils/enableWidgetHotReload.js +8 -11
- package/build/commonjs/utils/enableWidgetHotReload.js.map +1 -1
- package/build/commonjs/utils/useUpdateOnHMR.js +3 -7
- package/build/commonjs/utils/useUpdateOnHMR.js.map +1 -1
- package/build/commonjs/widgets/server-credentials.js +9 -0
- package/build/commonjs/widgets/server-credentials.js.map +1 -1
- package/build/commonjs/widgets/server-update.js +78 -0
- package/build/commonjs/widgets/server-update.js.map +1 -0
- package/build/module/dynamic-widget/api.js +10 -0
- package/build/module/dynamic-widget/api.js.map +1 -0
- package/build/module/events.js +23 -0
- package/build/module/events.js.map +1 -1
- package/build/module/index.js +4 -0
- package/build/module/index.js.map +1 -1
- package/build/module/live-activity/api.js +2 -2
- package/build/module/live-activity/api.js.map +1 -1
- package/build/module/live-activity/dynamic-api.js +167 -0
- package/build/module/live-activity/dynamic-api.js.map +1 -0
- package/build/module/native/NativeVoltra.js.map +1 -1
- package/build/module/utils/enableDynamicLiveActivityHotReload.js +43 -0
- package/build/module/utils/enableDynamicLiveActivityHotReload.js.map +1 -0
- package/build/module/utils/enableWidgetHotReload.js +9 -11
- package/build/module/utils/enableWidgetHotReload.js.map +1 -1
- package/build/module/utils/useUpdateOnHMR.js +3 -7
- package/build/module/utils/useUpdateOnHMR.js.map +1 -1
- package/build/module/widgets/server-credentials.js +9 -0
- package/build/module/widgets/server-credentials.js.map +1 -1
- package/build/module/widgets/server-update.js +72 -0
- package/build/module/widgets/server-update.js.map +1 -0
- package/build/typescript/commonjs/dynamic-widget/api.d.ts +8 -0
- package/build/typescript/commonjs/dynamic-widget/api.d.ts.map +1 -0
- package/build/typescript/commonjs/events.d.ts +7 -0
- package/build/typescript/commonjs/events.d.ts.map +1 -1
- package/build/typescript/commonjs/index.d.ts +4 -0
- package/build/typescript/commonjs/index.d.ts.map +1 -1
- package/build/typescript/commonjs/live-activity/api.d.ts +7 -0
- package/build/typescript/commonjs/live-activity/api.d.ts.map +1 -1
- package/build/typescript/commonjs/live-activity/dynamic-api.d.ts +54 -0
- package/build/typescript/commonjs/live-activity/dynamic-api.d.ts.map +1 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts +21 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts.map +1 -1
- package/build/typescript/commonjs/types.d.ts +1 -1
- package/build/typescript/commonjs/types.d.ts.map +1 -1
- package/build/typescript/commonjs/utils/enableDynamicLiveActivityHotReload.d.ts +15 -0
- package/build/typescript/commonjs/utils/enableDynamicLiveActivityHotReload.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/enableWidgetHotReload.d.ts +5 -7
- package/build/typescript/commonjs/utils/enableWidgetHotReload.d.ts.map +1 -1
- package/build/typescript/commonjs/utils/useUpdateOnHMR.d.ts +0 -3
- package/build/typescript/commonjs/utils/useUpdateOnHMR.d.ts.map +1 -1
- package/build/typescript/commonjs/widgets/server-credentials.d.ts +8 -0
- package/build/typescript/commonjs/widgets/server-credentials.d.ts.map +1 -1
- package/build/typescript/commonjs/widgets/server-update.d.ts +64 -0
- package/build/typescript/commonjs/widgets/server-update.d.ts.map +1 -0
- package/build/typescript/module/dynamic-widget/api.d.ts +8 -0
- package/build/typescript/module/dynamic-widget/api.d.ts.map +1 -0
- package/build/typescript/module/events.d.ts +7 -0
- package/build/typescript/module/events.d.ts.map +1 -1
- package/build/typescript/module/index.d.ts +4 -0
- package/build/typescript/module/index.d.ts.map +1 -1
- package/build/typescript/module/live-activity/api.d.ts +7 -0
- package/build/typescript/module/live-activity/api.d.ts.map +1 -1
- package/build/typescript/module/live-activity/dynamic-api.d.ts +54 -0
- package/build/typescript/module/live-activity/dynamic-api.d.ts.map +1 -0
- package/build/typescript/module/native/NativeVoltra.d.ts +21 -0
- package/build/typescript/module/native/NativeVoltra.d.ts.map +1 -1
- package/build/typescript/module/types.d.ts +1 -1
- package/build/typescript/module/types.d.ts.map +1 -1
- package/build/typescript/module/utils/enableDynamicLiveActivityHotReload.d.ts +15 -0
- package/build/typescript/module/utils/enableDynamicLiveActivityHotReload.d.ts.map +1 -0
- package/build/typescript/module/utils/enableWidgetHotReload.d.ts +5 -7
- package/build/typescript/module/utils/enableWidgetHotReload.d.ts.map +1 -1
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts +0 -3
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts.map +1 -1
- package/build/typescript/module/widgets/server-credentials.d.ts +8 -0
- package/build/typescript/module/widgets/server-credentials.d.ts.map +1 -1
- package/build/typescript/module/widgets/server-update.d.ts +64 -0
- package/build/typescript/module/widgets/server-update.d.ts.map +1 -0
- package/expo-plugin/build/cjs/constants.js +20 -1
- package/expo-plugin/build/cjs/constants.js.map +1 -1
- package/expo-plugin/build/cjs/index.js +9 -1
- package/expo-plugin/build/cjs/index.js.map +1 -1
- package/expo-plugin/build/cjs/ios/index.js +1 -0
- package/expo-plugin/build/cjs/ios/index.js.map +1 -1
- package/expo-plugin/build/cjs/ios/infoPlist.js +28 -5
- package/expo-plugin/build/cjs/ios/infoPlist.js.map +1 -1
- package/expo-plugin/build/cjs/ios/serverUpdate.js +25 -0
- package/expo-plugin/build/cjs/ios/serverUpdate.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/clientRendered.js +4 -4
- package/expo-plugin/build/cjs/ios-widget/clientRendered.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/clientRenderedPrerender.js +5 -5
- package/expo-plugin/build/cjs/ios-widget/clientRenderedPrerender.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/dynamic-live-activity/swift.js +130 -0
- package/expo-plugin/build/cjs/ios-widget/dynamic-live-activity/swift.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/index.js +9 -2
- package/expo-plugin/build/cjs/ios-widget/files/index.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js +6 -3
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/files/manifest.js +24 -0
- package/expo-plugin/build/cjs/ios-widget/files/manifest.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/files/swift-utils.js +7 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift-utils.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift.js +56 -26
- package/expo-plugin/build/cjs/ios-widget/files/swift.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/index.js +9 -3
- package/expo-plugin/build/cjs/ios-widget/index.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/podfile.js +38 -12
- package/expo-plugin/build/cjs/ios-widget/podfile.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js +34 -22
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js +194 -118
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js +30 -22
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/fileReferences.js +50 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/fileReferences.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js +45 -43
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js +93 -91
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js +41 -39
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js +2 -2
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js +29 -63
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js.map +1 -1
- package/expo-plugin/build/cjs/utils/urlScheme.js +36 -14
- package/expo-plugin/build/cjs/utils/urlScheme.js.map +1 -1
- package/expo-plugin/build/cjs/validation.js +54 -0
- package/expo-plugin/build/cjs/validation.js.map +1 -1
- package/expo-plugin/build/esm/constants.js +17 -0
- package/expo-plugin/build/esm/constants.js.map +1 -1
- package/expo-plugin/build/esm/index.js +9 -1
- package/expo-plugin/build/esm/index.js.map +1 -1
- package/expo-plugin/build/esm/ios/index.js +1 -0
- package/expo-plugin/build/esm/ios/index.js.map +1 -1
- package/expo-plugin/build/esm/ios/infoPlist.js +28 -5
- package/expo-plugin/build/esm/ios/infoPlist.js.map +1 -1
- package/expo-plugin/build/esm/ios/serverUpdate.js +21 -0
- package/expo-plugin/build/esm/ios/serverUpdate.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/clientRendered.js +5 -5
- package/expo-plugin/build/esm/ios-widget/clientRendered.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/clientRenderedPrerender.js +6 -6
- package/expo-plugin/build/esm/ios-widget/clientRenderedPrerender.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/dynamic-live-activity/swift.js +122 -0
- package/expo-plugin/build/esm/ios-widget/dynamic-live-activity/swift.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/index.js +10 -3
- package/expo-plugin/build/esm/ios-widget/files/index.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js +6 -3
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/files/manifest.js +23 -1
- package/expo-plugin/build/esm/ios-widget/files/manifest.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/files/swift-utils.js +4 -0
- package/expo-plugin/build/esm/ios-widget/files/swift-utils.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/swift.js +50 -20
- package/expo-plugin/build/esm/ios-widget/files/swift.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/index.js +9 -3
- package/expo-plugin/build/esm/ios-widget/index.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/podfile.js +36 -11
- package/expo-plugin/build/esm/ios-widget/podfile.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js +34 -22
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js +194 -117
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js +31 -22
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/fileReferences.js +45 -0
- package/expo-plugin/build/esm/ios-widget/xcode/fileReferences.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js +45 -42
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/index.js +97 -96
- package/expo-plugin/build/esm/ios-widget/xcode/index.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js +41 -39
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js +3 -2
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/target.js +28 -62
- package/expo-plugin/build/esm/ios-widget/xcode/target.js.map +1 -1
- package/expo-plugin/build/esm/utils/urlScheme.js +34 -14
- package/expo-plugin/build/esm/utils/urlScheme.js.map +1 -1
- package/expo-plugin/build/esm/validation.js +54 -1
- package/expo-plugin/build/esm/validation.js.map +1 -1
- package/expo-plugin/build/types/constants.d.ts +10 -1
- package/expo-plugin/build/types/constants.d.ts.map +1 -1
- package/expo-plugin/build/types/index.d.ts +1 -1
- package/expo-plugin/build/types/index.d.ts.map +1 -1
- package/expo-plugin/build/types/ios/index.d.ts +2 -0
- package/expo-plugin/build/types/ios/index.d.ts.map +1 -1
- package/expo-plugin/build/types/ios/infoPlist.d.ts +2 -0
- package/expo-plugin/build/types/ios/infoPlist.d.ts.map +1 -1
- package/expo-plugin/build/types/ios/serverUpdate.d.ts +11 -0
- package/expo-plugin/build/types/ios/serverUpdate.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/clientRendered.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/clientRenderedPrerender.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/dynamic-live-activity/swift.d.ts +7 -0
- package/expo-plugin/build/types/ios-widget/dynamic-live-activity/swift.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/index.d.ts +3 -1
- package/expo-plugin/build/types/ios-widget/files/index.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts +2 -1
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/files/manifest.d.ts +9 -2
- package/expo-plugin/build/types/ios-widget/files/manifest.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/files/swift-utils.d.ts +2 -0
- package/expo-plugin/build/types/ios-widget/files/swift-utils.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts +6 -2
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/index.d.ts +3 -1
- package/expo-plugin/build/types/ios-widget/index.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/podfile.d.ts +19 -1
- package/expo-plugin/build/types/ios-widget/podfile.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts +6 -8
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts +15 -10
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/fileReferences.d.ts +16 -0
- package/expo-plugin/build/types/ios-widget/xcode/fileReferences.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts +0 -4
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts +23 -3
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts +16 -4
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts +0 -4
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts +11 -26
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts.map +1 -1
- package/expo-plugin/build/types/types.d.ts +23 -4
- package/expo-plugin/build/types/types.d.ts.map +1 -1
- package/expo-plugin/build/types/utils/urlScheme.d.ts +16 -0
- package/expo-plugin/build/types/utils/urlScheme.d.ts.map +1 -1
- package/expo-plugin/build/types/validation.d.ts +2 -1
- package/expo-plugin/build/types/validation.d.ts.map +1 -1
- package/expo-plugin/src/constants.ts +24 -1
- package/expo-plugin/src/index.ts +14 -1
- package/expo-plugin/src/ios/index.ts +3 -0
- package/expo-plugin/src/ios/infoPlist.ts +33 -5
- package/expo-plugin/src/ios/serverUpdate.ts +29 -0
- package/expo-plugin/src/ios-widget/clientRendered.ts +9 -5
- package/expo-plugin/src/ios-widget/clientRenderedPrerender.ts +11 -6
- package/expo-plugin/src/ios-widget/dynamic-live-activity/swift.ts +138 -0
- package/expo-plugin/src/ios-widget/files/index.ts +15 -4
- package/expo-plugin/src/ios-widget/files/infoPlist.ts +17 -3
- package/expo-plugin/src/ios-widget/files/manifest.ts +42 -2
- package/expo-plugin/src/ios-widget/files/swift-utils.ts +3 -0
- package/expo-plugin/src/ios-widget/files/swift.ts +69 -22
- package/expo-plugin/src/ios-widget/index.ts +13 -3
- package/expo-plugin/src/ios-widget/podfile.ts +46 -13
- package/expo-plugin/src/ios-widget/widgetPlist.ts +37 -23
- package/expo-plugin/src/ios-widget/xcode/__fixtures__/fresh.pbxproj +197 -0
- package/expo-plugin/src/ios-widget/xcode/__fixtures__/with-existing-extension.pbxproj +321 -0
- package/expo-plugin/src/ios-widget/xcode/__fixtures__/with-per-config-signing.pbxproj +203 -0
- package/expo-plugin/src/ios-widget/xcode/__snapshots__/applyXcodeChanges.node.test.ts.snap +363 -0
- package/expo-plugin/src/ios-widget/xcode/__tests__/pbxConsistency.ts +130 -0
- package/expo-plugin/src/ios-widget/xcode/buildPhases.ts +210 -164
- package/expo-plugin/src/ios-widget/xcode/configurationList.ts +52 -35
- package/expo-plugin/src/ios-widget/xcode/fileReferences.ts +51 -0
- package/expo-plugin/src/ios-widget/xcode/groups.ts +52 -54
- package/expo-plugin/src/ios-widget/xcode/index.ts +124 -119
- package/expo-plugin/src/ios-widget/xcode/mainAppSettings.ts +59 -54
- package/expo-plugin/src/ios-widget/xcode/productFile.ts +3 -2
- package/expo-plugin/src/ios-widget/xcode/target.ts +31 -83
- package/expo-plugin/src/types.ts +28 -4
- package/expo-plugin/src/utils/urlScheme.ts +47 -17
- package/expo-plugin/src/validation.ts +76 -1
- package/ios/Package.swift +39 -4
- package/ios/VoltraWidget.podspec +1 -0
- package/ios/app/NativeVoltra.mm +126 -7
- package/ios/app/VoltraLiveActivityManager.swift +30 -0
- package/ios/app/VoltraLiveActivityService.swift +77 -5
- package/ios/app/VoltraModule.swift +117 -1
- package/ios/app/VoltraModuleImpl.swift +116 -2
- package/ios/app/VoltraViewComponentView.mm +3 -3
- package/ios/app/VoltraWidgetService.swift +147 -12
- package/ios/app/dynamic-live-activity/VoltraDynamicLiveActivityService.swift +97 -0
- package/ios/app/dynamic-live-activity/VoltraLiveActivityChronology.swift +68 -0
- package/ios/shared/DynamicWidgetPropsCodec.swift +51 -0
- package/ios/shared/DynamicWidgetPropsStorage.swift +53 -0
- package/ios/shared/DynamicWidgetPropsStore.swift +117 -0
- package/ios/shared/DynamicWidgetRenderCoordinator.swift +31 -0
- package/ios/shared/DynamicWidgetServerUpdate/DynamicWidgetServerFetchResolver.swift +34 -0
- package/ios/shared/DynamicWidgetServerUpdate/DynamicWidgetServerProps.swift +55 -0
- package/ios/shared/DynamicWidgetServerUpdate/DynamicWidgetServerPropsStore.swift +146 -0
- package/ios/shared/DynamicWidgetServerUpdate/DynamicWidgetServerUpdateRunner.swift +193 -0
- package/ios/shared/DynamicWidgetUpdater.swift +30 -0
- package/ios/shared/ServerWidgetContentResolver.swift +60 -0
- package/ios/shared/ServerWidgetResponseStore.swift +25 -0
- package/ios/shared/ShortNames.swift +6 -0
- package/ios/shared/VoltraConfig.swift +41 -0
- package/ios/shared/VoltraConstants.swift +19 -0
- package/ios/shared/VoltraElement.swift +127 -43
- package/ios/shared/VoltraEventBus.swift +52 -7
- package/ios/shared/VoltraJSRenderer.swift +93 -23
- package/ios/shared/VoltraNode.swift +7 -111
- package/ios/shared/VoltraRefreshIntent.swift +1 -1
- package/ios/shared/VoltraWidgetDefaults.swift +9 -1
- package/ios/shared/VoltraWidgetKind.swift +41 -0
- package/ios/shared/VoltraWidgetServerFetcher.swift +52 -107
- package/ios/shared/WidgetServer/VoltraWidgetAppearance.swift +17 -0
- package/ios/shared/WidgetServer/VoltraWidgetServer.swift +138 -0
- package/ios/shared/WidgetServer/WidgetCanonicalConfiguration.swift +77 -0
- package/ios/shared/WidgetServer/WidgetScope.swift +55 -0
- package/ios/shared/WidgetServer/WidgetServerEtagStore.swift +55 -0
- package/ios/shared/WidgetServer/WidgetServerFetcher.swift +179 -0
- package/ios/shared/WidgetServer/WidgetServerRequestBuilder.swift +114 -0
- package/ios/shared/WidgetServer/WidgetServerSettingsCodec.swift +47 -0
- package/ios/shared/WidgetServer/WidgetServerSettingsResolver.swift +129 -0
- package/ios/shared/WidgetServer/WidgetServerSettingsStore.swift +170 -0
- package/ios/shared/WidgetServer/WidgetServerSettingsValidator.swift +73 -0
- package/ios/shared/WidgetServer/WidgetServerUpdateSettings.swift +123 -0
- package/ios/shared/WidgetServer/WidgetServerUpdateSettingsJson.swift +115 -0
- package/ios/shared/dynamic-live-activity/DynamicLiveActivityPropsCodec.swift +13 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityBundleSource.swift +156 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityObserver.swift +97 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityOperations.swift +105 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityPayloadValidator.swift +55 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityRegistry.swift +143 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityRenderFailureQueue.swift +158 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityRenderFailureReporter.swift +120 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityRenderer.swift +370 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityTypes.swift +87 -0
- package/ios/shared/dynamic-live-activity/VoltraLiveActivityOrder.swift +19 -0
- package/ios/target/VoltraClientWidgetRuntime.swift +60 -10
- package/ios/target/VoltraDynamicWidgetServerUpdateProvider.swift +204 -0
- package/ios/target/VoltraHomeWidget.swift +91 -92
- package/ios/target/VoltraWidget.swift +3 -1
- package/ios/ui/Extensions/VoltraNode+View.swift +113 -0
- package/ios/ui/Generated/Parameters/ChartParameters.swift +3 -0
- package/ios/ui/Helpers/VoltraDeepLinkResolver.swift +5 -3
- package/ios/ui/Helpers/VoltraProgressDriver.swift +6 -2
- package/ios/ui/Layout/VoltraFlexStackLayout.swift +9 -3
- package/ios/ui/Style/JSColorParser.swift +24 -8
- package/ios/ui/Style/JSGradientParser.swift +36 -12
- package/ios/ui/Style/JSStyleParser.swift +36 -12
- package/ios/ui/Style/LayoutStyle.swift +12 -4
- package/ios/ui/Views/VoltraChart.swift +160 -16
- package/ios/ui/Views/VoltraLinearGradient.swift +6 -2
- package/package.json +5 -5
- package/src/dynamic-widget/api.ts +25 -0
- package/src/events.ts +34 -0
- package/src/index.ts +23 -0
- package/src/live-activity/api.ts +2 -2
- package/src/live-activity/dynamic-api.ts +240 -0
- package/src/native/NativeVoltra.ts +22 -0
- package/src/types.ts +4 -0
- package/src/utils/enableDynamicLiveActivityHotReload.ts +50 -0
- package/src/utils/enableWidgetHotReload.ts +9 -16
- package/src/utils/useUpdateOnHMR.ts +3 -12
- package/src/widgets/server-credentials.ts +8 -0
- package/src/widgets/server-update.ts +84 -0
- /package/ios/shared/{VoltraKeychainHelper.swift → WidgetServer/VoltraKeychainHelper.swift} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizePath = normalizePath;
|
|
4
|
+
exports.normalizeRef = normalizeRef;
|
|
5
|
+
exports.ensureWidgetFileReference = ensureWidgetFileReference;
|
|
6
|
+
const pbxFile = require('xcode/lib/pbxFile');
|
|
7
|
+
/** Strips surrounding quotes from a pbx path/name value. */
|
|
8
|
+
function normalizePath(value) {
|
|
9
|
+
if (!value) {
|
|
10
|
+
return '';
|
|
11
|
+
}
|
|
12
|
+
return value.replace(/^"|"$/g, '');
|
|
13
|
+
}
|
|
14
|
+
/** Strips a trailing `/* comment *\/` and whitespace, yielding the bare UUID of a pbx reference. */
|
|
15
|
+
function normalizeRef(value) {
|
|
16
|
+
return String(value)
|
|
17
|
+
.replace(/\/\*.*?\*\//g, '')
|
|
18
|
+
.trim();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Resolves the PBXFileReference UUID for a widget file, scoped to the widget's own PBXGroup.
|
|
22
|
+
*
|
|
23
|
+
* pbxproj paths are group-relative, so a bare path like `Assets.xcassets` collides with any other
|
|
24
|
+
* extension's identically named file. Scoping the lookup to the children of the widget group
|
|
25
|
+
* (identified by `targetName`) keeps the widget's references distinct from those, which is what
|
|
26
|
+
* prevents the shared-fileRef corruption behind issues #87/#32. When the widget group does not
|
|
27
|
+
* exist yet, a fresh reference is created.
|
|
28
|
+
*/
|
|
29
|
+
function ensureWidgetFileReference(xcodeProject, filePath, targetName) {
|
|
30
|
+
const file = new pbxFile(filePath);
|
|
31
|
+
const fileReferenceSection = xcodeProject.pbxFileReferenceSection();
|
|
32
|
+
const group = xcodeProject.pbxGroupByName(targetName);
|
|
33
|
+
if (group?.children) {
|
|
34
|
+
for (const child of group.children) {
|
|
35
|
+
const refKey = normalizeRef(child.value);
|
|
36
|
+
const entry = fileReferenceSection[refKey];
|
|
37
|
+
if (!entry) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const entryPath = normalizePath(entry.path);
|
|
41
|
+
if (entryPath === file.path || entryPath === normalizePath(filePath)) {
|
|
42
|
+
return refKey;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
file.fileRef = xcodeProject.generateUuid();
|
|
47
|
+
xcodeProject.addToPbxFileReferenceSection(file);
|
|
48
|
+
return file.fileRef;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=fileReferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileReferences.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/fileReferences.ts"],"names":[],"mappings":";;AAKA,sCAKC;AAGD,oCAIC;AAWD,8DAsBC;AAhDD,MAAM,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAE5C,4DAA4D;AAC5D,SAAgB,aAAa,CAAC,KAAyB;IACrD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,CAAA;IACX,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;AACpC,CAAC;AAED,oGAAoG;AACpG,SAAgB,YAAY,CAAC,KAAc;IACzC,OAAO,MAAM,CAAC,KAAK,CAAC;SACjB,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;SAC3B,IAAI,EAAE,CAAA;AACX,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,yBAAyB,CAAC,YAA0B,EAAE,QAAgB,EAAE,UAAkB;IACxG,MAAM,IAAI,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAA;IAClC,MAAM,oBAAoB,GAAG,YAAY,CAAC,uBAAuB,EAAE,CAAA;IACnE,MAAM,KAAK,GAAG,YAAY,CAAC,cAAc,CAAC,UAAU,CAAC,CAAA;IAErD,IAAI,KAAK,EAAE,QAAQ,EAAE,CAAC;QACpB,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnC,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YACxC,MAAM,KAAK,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;YAC1C,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,SAAQ;YACV,CAAC;YACD,MAAM,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YAC3C,IAAI,SAAS,KAAK,IAAI,CAAC,IAAI,IAAI,SAAS,KAAK,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACrE,OAAO,MAAM,CAAA;YACf,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC,YAAY,EAAE,CAAA;IAC1C,YAAY,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAA;IAC/C,OAAO,IAAI,CAAC,OAAO,CAAA;AACrB,CAAC"}
|
|
@@ -1,47 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addPbxGroup = addPbxGroup;
|
|
4
3
|
exports.ensurePbxGroup = ensurePbxGroup;
|
|
4
|
+
const fileReferences_1 = require("./fileReferences");
|
|
5
5
|
const pbxFile = require('xcode/lib/pbxFile');
|
|
6
|
-
|
|
7
|
-
* Adds a PBXGroup for the widget extension files.
|
|
8
|
-
*/
|
|
9
|
-
function addPbxGroup(xcodeProject, options) {
|
|
10
|
-
const { targetName, widgetFiles } = options;
|
|
6
|
+
function collectGroupFiles(widgetFiles) {
|
|
11
7
|
const { swiftFiles, intentFiles, assetDirectories, entitlementFiles, plistFiles, localizedStringResources } = widgetFiles;
|
|
12
|
-
|
|
13
|
-
const { uuid: pbxGroupUuid } = xcodeProject.addPbxGroup([
|
|
8
|
+
return [
|
|
14
9
|
...swiftFiles,
|
|
15
10
|
...intentFiles,
|
|
16
11
|
...entitlementFiles,
|
|
17
12
|
...plistFiles,
|
|
18
13
|
...assetDirectories,
|
|
19
14
|
...localizedStringResources,
|
|
20
|
-
]
|
|
21
|
-
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Adds a PBXGroup for the widget extension files.
|
|
19
|
+
*
|
|
20
|
+
* Constructs the PBXGroup and its PBXFileReference children by hand rather than delegating to
|
|
21
|
+
* `xcodeProject.addPbxGroup`, because that helper also creates a PBXBuildFile per file as a side
|
|
22
|
+
* effect. Those extra build files collide with the ones managed by the build-phase functions and
|
|
23
|
+
* produce the "no parent for object" consistency errors from issues #87/#32. File references are
|
|
24
|
+
* resolved through the widget-scoped {@link ensureWidgetFileReference} so they are shared with the
|
|
25
|
+
* build phases instead of duplicated.
|
|
26
|
+
*
|
|
27
|
+
* Internal create-only fallback for {@link ensurePbxGroup}; not part of the public pipeline.
|
|
28
|
+
*/
|
|
29
|
+
function addPbxGroup(xcodeProject, options) {
|
|
30
|
+
const { targetName, widgetFiles } = options;
|
|
31
|
+
const allFiles = collectGroupFiles(widgetFiles);
|
|
32
|
+
const pbxGroupUuid = xcodeProject.generateUuid();
|
|
33
|
+
const pbxGroup = {
|
|
34
|
+
isa: 'PBXGroup',
|
|
35
|
+
children: [],
|
|
36
|
+
name: targetName,
|
|
37
|
+
path: targetName,
|
|
38
|
+
sourceTree: '"<group>"',
|
|
39
|
+
};
|
|
22
40
|
const groups = xcodeProject.hash.project.objects['PBXGroup'];
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
41
|
+
groups[pbxGroupUuid] = pbxGroup;
|
|
42
|
+
groups[`${pbxGroupUuid}_comment`] = targetName;
|
|
43
|
+
for (const filePath of allFiles) {
|
|
44
|
+
const file = new pbxFile(filePath);
|
|
45
|
+
const fileRef = (0, fileReferences_1.ensureWidgetFileReference)(xcodeProject, filePath, targetName);
|
|
46
|
+
pbxGroup.children.push({ value: fileRef, comment: file.basename });
|
|
29
47
|
}
|
|
48
|
+
// Attach the new group to the top-level (unnamed, path-less) group.
|
|
49
|
+
Object.keys(groups).forEach(function (key) {
|
|
50
|
+
if (/_comment$/.test(key)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (groups[key].name === undefined && groups[key].path === undefined) {
|
|
54
|
+
xcodeProject.addToPbxGroup(pbxGroupUuid, key);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
30
57
|
}
|
|
31
58
|
/**
|
|
32
59
|
* Ensures a PBXGroup exists for the widget extension files.
|
|
33
60
|
*/
|
|
34
61
|
function ensurePbxGroup(xcodeProject, options) {
|
|
35
62
|
const { targetName, widgetFiles } = options;
|
|
36
|
-
const
|
|
37
|
-
const allFiles = [
|
|
38
|
-
...swiftFiles,
|
|
39
|
-
...intentFiles,
|
|
40
|
-
...entitlementFiles,
|
|
41
|
-
...plistFiles,
|
|
42
|
-
...assetDirectories,
|
|
43
|
-
...localizedStringResources,
|
|
44
|
-
];
|
|
63
|
+
const allFiles = collectGroupFiles(widgetFiles);
|
|
45
64
|
const existingGroup = xcodeProject.pbxGroupByName(targetName);
|
|
46
65
|
if (!existingGroup) {
|
|
47
66
|
addPbxGroup(xcodeProject, options);
|
|
@@ -52,28 +71,11 @@ function ensurePbxGroup(xcodeProject, options) {
|
|
|
52
71
|
}
|
|
53
72
|
for (const filePath of allFiles) {
|
|
54
73
|
const file = new pbxFile(filePath);
|
|
55
|
-
const fileRef =
|
|
74
|
+
const fileRef = (0, fileReferences_1.ensureWidgetFileReference)(xcodeProject, filePath, targetName);
|
|
56
75
|
const alreadyInGroup = existingGroup.children.some((child) => child.value === fileRef || child.comment === file.basename);
|
|
57
76
|
if (!alreadyInGroup) {
|
|
58
77
|
existingGroup.children.push({ value: fileRef, comment: file.basename });
|
|
59
78
|
}
|
|
60
79
|
}
|
|
61
80
|
}
|
|
62
|
-
function ensureFileReference(xcodeProject, filePath) {
|
|
63
|
-
const fileReferenceSection = xcodeProject.pbxFileReferenceSection();
|
|
64
|
-
const file = new pbxFile(filePath);
|
|
65
|
-
for (const key of Object.keys(fileReferenceSection)) {
|
|
66
|
-
if (/_comment$/.test(key)) {
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
const entry = fileReferenceSection[key];
|
|
70
|
-
const entryPath = typeof entry?.path === 'string' ? entry.path.replace(/^"|"$/g, '') : '';
|
|
71
|
-
if (entryPath === file.path || entryPath === filePath) {
|
|
72
|
-
return key;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
file.fileRef = xcodeProject.generateUuid();
|
|
76
|
-
xcodeProject.addToPbxFileReferenceSection(file);
|
|
77
|
-
return file.fileRef;
|
|
78
|
-
}
|
|
79
81
|
//# sourceMappingURL=groups.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/groups.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/groups.ts"],"names":[],"mappings":";;AA0EA,wCAwBC;AA/FD,qDAA4D;AAE5D,MAAM,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAO5C,SAAS,iBAAiB,CAAC,WAAoC;IAC7D,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,wBAAwB,EAAE,GACzG,WAAW,CAAA;IACb,OAAO;QACL,GAAG,UAAU;QACb,GAAG,WAAW;QACd,GAAG,gBAAgB;QACnB,GAAG,UAAU;QACb,GAAG,gBAAgB;QACnB,GAAG,wBAAwB;KAC5B,CAAA;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAS,WAAW,CAAC,YAA0B,EAAE,OAA2B;IAC1E,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,OAAO,CAAA;IAC3C,MAAM,QAAQ,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAE/C,MAAM,YAAY,GAAG,YAAY,CAAC,YAAY,EAAE,CAAA;IAChD,MAAM,QAAQ,GAAG;QACf,GAAG,EAAE,UAAU;QACf,QAAQ,EAAE,EAA0C;QACpD,IAAI,EAAE,UAAU;QAChB,IAAI,EA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AC7D,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,WAAW,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;QAClC,OAAM;IACR,CAAC;IAED,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;QAC5B,aAAa,CAAC,QAAQ,GAAG,EAAE,CAAA;IAC7B,CAAC;IAED,KAAK,MAAM,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAA;QAClC,MAAM,OAAO,GAAG,IAAA,0CAAyB,EAAC,YAAY,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAA;QAC7E,MAAM,cAAc,GAAG,aAAa,CAAC,QAAQ,CAAC,IAAI,CAChD,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,OAAO,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,QAAQ,CAC3E,CAAA;QACD,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAA;QACzE,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.configureXcodeProject = void 0;
|
|
37
|
+
exports.applyXcodeChanges = applyXcodeChanges;
|
|
37
38
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
38
39
|
const path = __importStar(require("path"));
|
|
39
40
|
const fileDiscovery_1 = require("../../utils/fileDiscovery");
|
|
@@ -44,6 +45,93 @@ const groups_1 = require("./groups");
|
|
|
44
45
|
const mainAppSettings_1 = require("./mainAppSettings");
|
|
45
46
|
const productFile_1 = require("./productFile");
|
|
46
47
|
const target_1 = require("./target");
|
|
48
|
+
/**
|
|
49
|
+
* Applies all widget-extension changes to an already-parsed Xcode project.
|
|
50
|
+
*
|
|
51
|
+
* This is the pure core of {@link configureXcodeProject}: it takes the parsed project, the plugin
|
|
52
|
+
* props, the discovered widget files, and whether any widget is client-rendered, then mutates the
|
|
53
|
+
* project in place. It performs no filesystem or `modRequest` access, which makes it directly
|
|
54
|
+
* testable against pbxproj fixtures.
|
|
55
|
+
*
|
|
56
|
+
* When the widget target does not exist yet, the minimal native-target skeleton is created first
|
|
57
|
+
* (targets cannot be "ensured" into existence); every other object is then reconciled by the same
|
|
58
|
+
* idempotent ensure pipeline that runs for an already-existing target.
|
|
59
|
+
*/
|
|
60
|
+
function applyXcodeChanges(xcodeProject, props, widgetFiles, hasClientRenderedWidgets = false) {
|
|
61
|
+
const { targetName, bundleIdentifier, deploymentTarget, version, buildNumber } = props;
|
|
62
|
+
const groupName = 'Embed Foundation Extensions';
|
|
63
|
+
const mainTargetUuid = xcodeProject.getFirstTarget().uuid;
|
|
64
|
+
// The catalog is compiled into the app even for a legacy-only configuration.
|
|
65
|
+
// Keep it in the extension group too so both targets share one PBX file reference.
|
|
66
|
+
const effectiveWidgetFiles = {
|
|
67
|
+
...widgetFiles,
|
|
68
|
+
swiftFiles: Array.from(new Set([...widgetFiles.swiftFiles, 'VoltraDynamicLiveActivityTypes.swift'])),
|
|
69
|
+
};
|
|
70
|
+
// Read main app target settings to synchronize code signing (per configuration).
|
|
71
|
+
const mainAppSettings = (0, mainAppSettings_1.getMainAppTargetSettings)(xcodeProject);
|
|
72
|
+
// Use the deploymentTarget from plugin config (or default), ignore main app's deployment target.
|
|
73
|
+
// This allows the widget extension to have its own deployment target independent of the main app.
|
|
74
|
+
// Resolve (or create) the widget target. A target cannot be reconciled into existence, so the
|
|
75
|
+
// absent case creates the minimal skeleton; from here on both paths share one pipeline.
|
|
76
|
+
let targetUuid = xcodeProject.findTargetKey(targetName);
|
|
77
|
+
if (!targetUuid) {
|
|
78
|
+
targetUuid = xcodeProject.generateUuid();
|
|
79
|
+
(0, target_1.createTargetSkeleton)(xcodeProject, { targetName, targetUuid });
|
|
80
|
+
}
|
|
81
|
+
const target = xcodeProject.pbxNativeTargetSection()[targetUuid];
|
|
82
|
+
// Ensure the configuration list is present and its settings are in sync.
|
|
83
|
+
const xCConfigurationList = (0, configurationList_1.ensureXCConfigurationList)(xcodeProject, {
|
|
84
|
+
targetName,
|
|
85
|
+
bundleIdentifier,
|
|
86
|
+
deploymentTarget,
|
|
87
|
+
version,
|
|
88
|
+
buildNumber,
|
|
89
|
+
mainAppSettings,
|
|
90
|
+
}, target.buildConfigurationList);
|
|
91
|
+
// Ensure the product file (.appex) exists.
|
|
92
|
+
const productFile = (0, productFile_1.ensureProductFile)(xcodeProject, {
|
|
93
|
+
targetName,
|
|
94
|
+
groupName,
|
|
95
|
+
});
|
|
96
|
+
// Point the target at the reconciled configuration list and product file.
|
|
97
|
+
target.productReference = productFile.fileRef;
|
|
98
|
+
target.buildConfigurationList = xCConfigurationList.uuid;
|
|
99
|
+
target.productType = `"com.apple.product-type.app-extension"`;
|
|
100
|
+
target.name = targetName;
|
|
101
|
+
target.productName = targetName;
|
|
102
|
+
if (!target.buildPhases) {
|
|
103
|
+
target.buildPhases = [];
|
|
104
|
+
}
|
|
105
|
+
// Ensure the group first so the widget's file references exist before the build phases
|
|
106
|
+
// reference them (the phases resolve files through the widget-scoped group).
|
|
107
|
+
(0, groups_1.ensurePbxGroup)(xcodeProject, {
|
|
108
|
+
targetName,
|
|
109
|
+
widgetFiles: effectiveWidgetFiles,
|
|
110
|
+
});
|
|
111
|
+
// Ensure build phases and their files.
|
|
112
|
+
(0, buildPhases_1.ensureBuildPhases)(xcodeProject, {
|
|
113
|
+
targetUuid,
|
|
114
|
+
targetName,
|
|
115
|
+
groupName,
|
|
116
|
+
productFile,
|
|
117
|
+
widgetFiles: effectiveWidgetFiles,
|
|
118
|
+
mainTargetUuid: xcodeProject.getFirstTarget().uuid,
|
|
119
|
+
// The app-side lifecycle service always compiles against the generated catalog.
|
|
120
|
+
// An empty catalog keeps legacy-only apps source-compatible.
|
|
121
|
+
mainSwiftFiles: ['VoltraDynamicLiveActivityTypes.swift'],
|
|
122
|
+
});
|
|
123
|
+
if (hasClientRenderedWidgets || (props.liveActivities?.length ?? 0) > 0) {
|
|
124
|
+
(0, buildPhases_1.ensureWidgetBundleScriptPhase)(xcodeProject, targetUuid);
|
|
125
|
+
}
|
|
126
|
+
if ((props.liveActivities?.length ?? 0) > 0) {
|
|
127
|
+
// Local Dynamic Live Activity starts preflight the baked definition from
|
|
128
|
+
// the app process, while WidgetKit renders from the extension process.
|
|
129
|
+
// Bake the same manifest into both products.
|
|
130
|
+
(0, buildPhases_1.ensureWidgetBundleScriptPhase)(xcodeProject, mainTargetUuid, 'live-activities');
|
|
131
|
+
}
|
|
132
|
+
(0, target_1.ensureTargetAttributes)(xcodeProject, targetUuid);
|
|
133
|
+
(0, target_1.ensureTargetDependency)(xcodeProject, targetUuid);
|
|
134
|
+
}
|
|
47
135
|
/**
|
|
48
136
|
* Plugin step that configures the Xcode project for the widget extension.
|
|
49
137
|
*
|
|
@@ -54,111 +142,25 @@ const target_1 = require("./target");
|
|
|
54
142
|
* - Adds build phases (Sources, CopyFiles, Frameworks, Resources)
|
|
55
143
|
* - Adds PBXGroup for widget files
|
|
56
144
|
*
|
|
57
|
-
* This should run after generateWidgetExtensionFiles so the files exist.
|
|
145
|
+
* This should run after generateWidgetExtensionFiles so the files exist. The wrapper is kept thin:
|
|
146
|
+
* it discovers widget files and detects client-rendered widgets, then delegates the actual pbxproj
|
|
147
|
+
* mutation to {@link applyXcodeChanges}.
|
|
58
148
|
*/
|
|
59
149
|
const configureXcodeProject = (config, props) => {
|
|
60
|
-
const { targetName,
|
|
150
|
+
const { targetName, widgets, liveActivities } = props;
|
|
61
151
|
return (0, config_plugins_1.withXcodeProject)(config, (config) => {
|
|
62
152
|
if (config.modRequest.introspect) {
|
|
63
153
|
return config;
|
|
64
154
|
}
|
|
65
155
|
const xcodeProject = config.modResults;
|
|
66
|
-
const groupName = 'Embed Foundation Extensions';
|
|
67
156
|
// The release widget-bundling phase is only needed when a widget is a Dynamic Widget (server
|
|
68
157
|
// widgets carry no JS bundle). Detect once so both the create and update paths agree.
|
|
69
158
|
const hasClientRenderedWidgets = !!widgets &&
|
|
70
159
|
(0, clientRendered_1.detectClientRenderedWidgets)(widgets, config.modRequest.projectRoot).some((widget) => widget.clientRendered);
|
|
71
|
-
// Check if target already exists
|
|
72
|
-
const nativeTargets = xcodeProject.pbxNativeTargetSection();
|
|
73
|
-
const existingTargetKey = xcodeProject.findTargetKey(targetName);
|
|
74
|
-
const existingTarget = existingTargetKey ? nativeTargets[existingTargetKey] : null;
|
|
75
160
|
const { platformProjectRoot } = config.modRequest;
|
|
76
161
|
const targetPath = path.join(platformProjectRoot, targetName);
|
|
77
162
|
const widgetFiles = (0, fileDiscovery_1.getIOSWidgetExtensionFiles)(targetPath, targetName);
|
|
78
|
-
|
|
79
|
-
const mainAppSettings = (0, mainAppSettings_1.getMainAppTargetSettings)(xcodeProject);
|
|
80
|
-
// Use the deploymentTarget from plugin config (or default), ignore main app's deployment target
|
|
81
|
-
// This allows the widget extension to have its own deployment target independent of the main app
|
|
82
|
-
if (existingTarget && existingTargetKey) {
|
|
83
|
-
// Ensure configuration list is up to date
|
|
84
|
-
const xCConfigurationList = (0, configurationList_1.ensureXCConfigurationList)(xcodeProject, {
|
|
85
|
-
targetName,
|
|
86
|
-
bundleIdentifier,
|
|
87
|
-
deploymentTarget,
|
|
88
|
-
codeSignStyle: mainAppSettings?.codeSignStyle,
|
|
89
|
-
developmentTeam: mainAppSettings?.developmentTeam,
|
|
90
|
-
provisioningProfileSpecifier: mainAppSettings?.provisioningProfileSpecifier,
|
|
91
|
-
}, existingTarget.buildConfigurationList);
|
|
92
|
-
// Ensure product file exists
|
|
93
|
-
const productFile = (0, productFile_1.ensureProductFile)(xcodeProject, {
|
|
94
|
-
targetName,
|
|
95
|
-
groupName,
|
|
96
|
-
});
|
|
97
|
-
// Update target references
|
|
98
|
-
existingTarget.productReference = productFile.fileRef;
|
|
99
|
-
existingTarget.buildConfigurationList = xCConfigurationList.uuid;
|
|
100
|
-
existingTarget.productType = `"com.apple.product-type.app-extension"`;
|
|
101
|
-
existingTarget.name = targetName;
|
|
102
|
-
existingTarget.productName = targetName;
|
|
103
|
-
if (!existingTarget.buildPhases) {
|
|
104
|
-
existingTarget.buildPhases = [];
|
|
105
|
-
}
|
|
106
|
-
// Ensure build phases and groups
|
|
107
|
-
(0, buildPhases_1.ensureBuildPhases)(xcodeProject, {
|
|
108
|
-
targetUuid: existingTargetKey,
|
|
109
|
-
groupName,
|
|
110
|
-
productFile,
|
|
111
|
-
widgetFiles,
|
|
112
|
-
mainTargetUuid: xcodeProject.getFirstTarget().uuid,
|
|
113
|
-
});
|
|
114
|
-
if (hasClientRenderedWidgets) {
|
|
115
|
-
(0, buildPhases_1.ensureWidgetBundleScriptPhase)(xcodeProject, existingTargetKey);
|
|
116
|
-
}
|
|
117
|
-
(0, groups_1.ensurePbxGroup)(xcodeProject, {
|
|
118
|
-
targetName,
|
|
119
|
-
widgetFiles,
|
|
120
|
-
});
|
|
121
|
-
(0, target_1.ensureTargetAttributes)(xcodeProject, existingTargetKey);
|
|
122
|
-
(0, target_1.ensureTargetDependency)(xcodeProject, existingTargetKey);
|
|
123
|
-
return config;
|
|
124
|
-
}
|
|
125
|
-
// Add configuration list
|
|
126
|
-
const targetUuid = xcodeProject.generateUuid();
|
|
127
|
-
const xCConfigurationList = (0, configurationList_1.addXCConfigurationList)(xcodeProject, {
|
|
128
|
-
targetName,
|
|
129
|
-
bundleIdentifier,
|
|
130
|
-
deploymentTarget,
|
|
131
|
-
codeSignStyle: mainAppSettings?.codeSignStyle,
|
|
132
|
-
developmentTeam: mainAppSettings?.developmentTeam,
|
|
133
|
-
provisioningProfileSpecifier: mainAppSettings?.provisioningProfileSpecifier,
|
|
134
|
-
});
|
|
135
|
-
// Add product file
|
|
136
|
-
const productFile = (0, productFile_1.addProductFile)(xcodeProject, {
|
|
137
|
-
targetName,
|
|
138
|
-
groupName,
|
|
139
|
-
});
|
|
140
|
-
// Configure target (native target, project section, dependency)
|
|
141
|
-
(0, target_1.configureTarget)(xcodeProject, {
|
|
142
|
-
targetName,
|
|
143
|
-
targetUuid,
|
|
144
|
-
productFile,
|
|
145
|
-
xCConfigurationList,
|
|
146
|
-
});
|
|
147
|
-
// Add build phases
|
|
148
|
-
(0, buildPhases_1.addBuildPhases)(xcodeProject, {
|
|
149
|
-
targetUuid,
|
|
150
|
-
groupName,
|
|
151
|
-
productFile,
|
|
152
|
-
widgetFiles,
|
|
153
|
-
});
|
|
154
|
-
if (hasClientRenderedWidgets) {
|
|
155
|
-
(0, buildPhases_1.ensureWidgetBundleScriptPhase)(xcodeProject, targetUuid);
|
|
156
|
-
}
|
|
157
|
-
// Add PBX group
|
|
158
|
-
(0, groups_1.addPbxGroup)(xcodeProject, {
|
|
159
|
-
targetName,
|
|
160
|
-
widgetFiles,
|
|
161
|
-
});
|
|
163
|
+
applyXcodeChanges(xcodeProject, props, widgetFiles, hasClientRenderedWidgets || (liveActivities?.length ?? 0) > 0);
|
|
162
164
|
return config;
|
|
163
165
|
});
|
|
164
166
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,8CA6FC;AAlID,yDAAmF;AACnF,2CAA4B;AAG5B,6DAAsE;AACtE,sDAA+D;AAC/D,+CAAgF;AAChF,2DAA+D;AAC/D,qCAAyC;AACzC,uDAA4D;AAC5D,+CAAiD;AACjD,qCAA+F;AA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
3
|
exports.getMainAppTargetSettings = getMainAppTargetSettings;
|
|
4
|
+
/** Strips surrounding quotes from a raw build-setting value. */
|
|
5
|
+
function unquote(value) {
|
|
6
|
+
if (typeof value !== 'string') {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
return value.replace(/^"|"$/g, '');
|
|
10
|
+
}
|
|
11
|
+
/** Reads the signing-related build settings from a single XCBuildConfiguration. */
|
|
12
|
+
function readSigningSettings(buildSettings) {
|
|
13
|
+
return {
|
|
14
|
+
codeSignStyle: unquote(buildSettings.CODE_SIGN_STYLE),
|
|
15
|
+
developmentTeam: unquote(buildSettings.DEVELOPMENT_TEAM),
|
|
16
|
+
provisioningProfileSpecifier: unquote(buildSettings.PROVISIONING_PROFILE_SPECIFIER),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
4
19
|
/**
|
|
5
|
-
* Reads build settings from the main app target
|
|
20
|
+
* Reads code-signing build settings from every build configuration of the main app target, so the
|
|
21
|
+
* widget extension can synchronize signing per configuration (Debug→Debug, Release→Release).
|
|
6
22
|
*
|
|
7
23
|
* @param xcodeProject The Xcode project instance
|
|
8
|
-
* @returns
|
|
24
|
+
* @returns Signing settings keyed by configuration name plus a first-configuration fallback, or
|
|
25
|
+
* null when the main app target or its configurations cannot be resolved
|
|
9
26
|
*/
|
|
10
27
|
function getMainAppTargetSettings(xcodeProject) {
|
|
11
28
|
try {
|
|
@@ -13,7 +30,6 @@ function getMainAppTargetSettings(xcodeProject) {
|
|
|
13
30
|
if (!mainAppTarget) {
|
|
14
31
|
return null;
|
|
15
32
|
}
|
|
16
|
-
// Get the build configuration list for the main app target
|
|
17
33
|
const buildConfigurationListId = mainAppTarget.buildConfigurationList;
|
|
18
34
|
if (!buildConfigurationListId) {
|
|
19
35
|
return null;
|
|
@@ -21,47 +37,33 @@ function getMainAppTargetSettings(xcodeProject) {
|
|
|
21
37
|
// Extract UUID from buildConfigurationListId (it might include a comment like "UUID /* comment */")
|
|
22
38
|
const buildConfigurationListUuid = buildConfigurationListId.split(' ')[0];
|
|
23
39
|
const buildConfigurationList = xcodeProject.hash.project.objects['XCConfigurationList']?.[buildConfigurationListUuid];
|
|
24
|
-
if (!buildConfigurationList
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
// Get the first build configuration (usually Debug) to read settings
|
|
28
|
-
const firstConfigRef = buildConfigurationList.buildConfigurations[0];
|
|
29
|
-
if (!firstConfigRef) {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
// Extract UUID from config reference (it might include a comment)
|
|
33
|
-
const firstConfigUuid = typeof firstConfigRef === 'string' ? firstConfigRef.split(' ')[0] : firstConfigRef.value?.split(' ')[0];
|
|
34
|
-
if (!firstConfigUuid) {
|
|
40
|
+
if (!buildConfigurationList?.buildConfigurations) {
|
|
35
41
|
return null;
|
|
36
42
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
const buildConfigurationSection = xcodeProject.hash.project.objects['XCBuildConfiguration'] ?? {};
|
|
44
|
+
const byConfigurationName = {};
|
|
45
|
+
let fallback = null;
|
|
46
|
+
for (const configRef of buildConfigurationList.buildConfigurations) {
|
|
47
|
+
// Extract UUID from the config reference (it might include a comment)
|
|
48
|
+
const configUuid = typeof configRef === 'string' ? configRef.split(' ')[0] : configRef.value?.split(' ')[0];
|
|
49
|
+
if (!configUuid) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const buildConfiguration = buildConfigurationSection[configUuid];
|
|
53
|
+
if (!buildConfiguration?.buildSettings) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const settings = readSigningSettings(buildConfiguration.buildSettings);
|
|
57
|
+
const configName = unquote(buildConfiguration.name);
|
|
58
|
+
if (configName && !(configName in byConfigurationName)) {
|
|
59
|
+
byConfigurationName[configName] = settings;
|
|
60
|
+
}
|
|
61
|
+
fallback = fallback ?? settings;
|
|
40
62
|
}
|
|
41
|
-
|
|
42
|
-
// Extract deployment target (remove quotes if present)
|
|
43
|
-
const deploymentTarget = buildSettings.IPHONEOS_DEPLOYMENT_TARGET?.replace(/^"|"$/g, '') ||
|
|
44
|
-
buildSettings['IPHONEOS_DEPLOYMENT_TARGET']?.replace(/^"|"$/g, '') ||
|
|
45
|
-
null;
|
|
46
|
-
// Extract code signing settings
|
|
47
|
-
const codeSignStyle = buildSettings.CODE_SIGN_STYLE?.replace(/^"|"$/g, '') ||
|
|
48
|
-
buildSettings['CODE_SIGN_STYLE']?.replace(/^"|"$/g, '') ||
|
|
49
|
-
null;
|
|
50
|
-
const developmentTeam = buildSettings.DEVELOPMENT_TEAM?.replace(/^"|"$/g, '') ||
|
|
51
|
-
buildSettings['DEVELOPMENT_TEAM']?.replace(/^"|"$/g, '') ||
|
|
52
|
-
null;
|
|
53
|
-
const provisioningProfileSpecifier = buildSettings.PROVISIONING_PROFILE_SPECIFIER?.replace(/^"|"$/g, '') ||
|
|
54
|
-
buildSettings['PROVISIONING_PROFILE_SPECIFIER']?.replace(/^"|"$/g, '') ||
|
|
55
|
-
null;
|
|
56
|
-
if (!deploymentTarget) {
|
|
63
|
+
if (!fallback) {
|
|
57
64
|
return null;
|
|
58
65
|
}
|
|
59
|
-
return {
|
|
60
|
-
deploymentTarget,
|
|
61
|
-
codeSignStyle: codeSignStyle || undefined,
|
|
62
|
-
developmentTeam: developmentTeam || undefined,
|
|
63
|
-
provisioningProfileSpecifier: provisioningProfileSpecifier || undefined,
|
|
64
|
-
};
|
|
66
|
+
return { byConfigurationName, fallback };
|
|
65
67
|
}
|
|
66
68
|
catch {
|
|
67
69
|
// If we can't read the settings, return null and use fallback values
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mainAppSettings.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/mainAppSettings.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"mainAppSettings.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/mainAppSettings.ts"],"names":[],"mappings":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
|
|
4
3
|
exports.ensureProductFile = ensureProductFile;
|
|
5
4
|
function findProductFileReference(xcodeProject, targetName) {
|
|
6
5
|
const fileReferenceSection = xcodeProject.pbxFileReferenceSection();
|
|
@@ -32,7 +31,8 @@ function findBuildFileForFileRef(xcodeProject, fileRef) {
|
|
|
32
31
|
return null;
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
35
|
-
* Adds the product file (.appex) for the widget extension.
|
|
34
|
+
* Adds the product file (.appex) for the widget extension. Internal create-only fallback for
|
|
35
|
+
* {@link ensureProductFile}; not part of the public pipeline.
|
|
36
36
|
*/
|
|
37
37
|
function addProductFile(xcodeProject, options) {
|
|
38
38
|
const { targetName, groupName } = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productFile.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/productFile.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"productFile.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/productFile.ts"],"names":[],"mappings":";;AAsEA,8CAqBC;AApFD,SAAS,wBAAwB,CAAC,YAA0B,EAAE,UAAkB;IAC9E,MAAM,oBAAoB,GAAG,YAAY,CAAC,uBAAuB,EAAE,CAAA;IACnE,MAAM,iBAAiB,GAAG,GAAG,UAAU,QAAQ,CAAA;IAE/C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACpD,IAAI,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1B,SAAQ;QACV,CAAC;QACD,MAAM,KAAK,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAA;QACvC,MAAM,IAAI,GAAG,OAAO,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QACpF,MAAM,IAAI,GAAG,OAA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