@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,363 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`applyXcodeChanges — fresh Expo project (fixture a) matches the committed snapshot 1`] = `
|
|
4
|
+
"// !$*UTF8*$!
|
|
5
|
+
{
|
|
6
|
+
archiveVersion = 1;
|
|
7
|
+
classes = {
|
|
8
|
+
};
|
|
9
|
+
objectVersion = 54;
|
|
10
|
+
objects = {
|
|
11
|
+
|
|
12
|
+
/* Begin PBXBuildFile section */
|
|
13
|
+
13B07FBF1A68108700A75B9A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.swift */; };
|
|
14
|
+
13B07FC11A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
|
15
|
+
13B07FC21A68108700A75B9A /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB61A68108700A75B9A /* Info.plist */; };
|
|
16
|
+
F1D000000000000000000010 /* VoltraWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1D000000000000000000008 /* VoltraWidget.swift */; };
|
|
17
|
+
F1D000000000000000000011 /* VoltraWidgetInitialStates.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1D000000000000000000009 /* VoltraWidgetInitialStates.swift */; };
|
|
18
|
+
F1D000000000000000000012 /* VoltraDynamicLiveActivityTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1D00000000000000000000A /* VoltraDynamicLiveActivityTypes.swift */; };
|
|
19
|
+
F1D000000000000000000013 /* VoltraDynamicLiveActivityTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1D00000000000000000000A /* VoltraDynamicLiveActivityTypes.swift */; };
|
|
20
|
+
F1D000000000000000000006 /* VoltraWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = F1D000000000000000000005 /* VoltraWidgetExtension.appex */; };
|
|
21
|
+
F1D000000000000000000017 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F1D00000000000000000000D /* Assets.xcassets */; };
|
|
22
|
+
F1D000000000000000000018 /* VoltraWidgets.strings in Resources */ = {isa = PBXBuildFile; fileRef = F1D00000000000000000000E /* VoltraWidgets.strings */; };
|
|
23
|
+
/* End PBXBuildFile section */
|
|
24
|
+
|
|
25
|
+
/* Begin PBXFileReference section */
|
|
26
|
+
13B07F961A680F5B00A75B9A /* voltraexample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = voltraexample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
27
|
+
13B07FB01A68108700A75B9A /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = voltraexample/AppDelegate.swift; sourceTree = "<group>"; };
|
|
28
|
+
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = voltraexample/Images.xcassets; sourceTree = "<group>"; };
|
|
29
|
+
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = voltraexample/Info.plist; sourceTree = "<group>"; };
|
|
30
|
+
F1D000000000000000000005 /* VoltraWidgetExtension.appex */ = {isa = PBXFileReference; name = "VoltraWidgetExtension.appex"; path = "VoltraWidgetExtension.appex"; sourceTree = BUILT_PRODUCTS_DIR; fileEncoding = undefined; lastKnownFileType = undefined; explicitFileType = wrapper.app-extension; includeInIndex = 0; };
|
|
31
|
+
F1D000000000000000000008 /* VoltraWidget.swift */ = {isa = PBXFileReference; name = "VoltraWidget.swift"; path = "VoltraWidget.swift"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.swift; explicitFileType = undefined; includeInIndex = 0; };
|
|
32
|
+
F1D000000000000000000009 /* VoltraWidgetInitialStates.swift */ = {isa = PBXFileReference; name = "VoltraWidgetInitialStates.swift"; path = "VoltraWidgetInitialStates.swift"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.swift; explicitFileType = undefined; includeInIndex = 0; };
|
|
33
|
+
F1D00000000000000000000A /* VoltraDynamicLiveActivityTypes.swift */ = {isa = PBXFileReference; name = "VoltraDynamicLiveActivityTypes.swift"; path = "VoltraDynamicLiveActivityTypes.swift"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.swift; explicitFileType = undefined; includeInIndex = 0; };
|
|
34
|
+
F1D00000000000000000000B /* VoltraWidgetExtension.entitlements */ = {isa = PBXFileReference; name = "VoltraWidgetExtension.entitlements"; path = "VoltraWidgetExtension.entitlements"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
|
35
|
+
F1D00000000000000000000C /* VoltraWidgetExtension-Info.plist */ = {isa = PBXFileReference; name = "VoltraWidgetExtension-Info.plist"; path = "VoltraWidgetExtension-Info.plist"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex = 0; };
|
|
36
|
+
F1D00000000000000000000D /* Assets.xcassets */ = {isa = PBXFileReference; name = "Assets.xcassets"; path = "Assets.xcassets"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = folder.assetcatalog; explicitFileType = undefined; includeInIndex = 0; };
|
|
37
|
+
F1D00000000000000000000E /* VoltraWidgets.strings */ = {isa = PBXFileReference; name = "VoltraWidgets.strings"; path = "en.lproj/VoltraWidgets.strings"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = text.plist.strings; explicitFileType = undefined; includeInIndex = 0; };
|
|
38
|
+
/* End PBXFileReference section */
|
|
39
|
+
|
|
40
|
+
/* Begin PBXFrameworksBuildPhase section */
|
|
41
|
+
13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
|
|
42
|
+
isa = PBXFrameworksBuildPhase;
|
|
43
|
+
buildActionMask = 2147483647;
|
|
44
|
+
files = (
|
|
45
|
+
);
|
|
46
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
47
|
+
};
|
|
48
|
+
F1D000000000000000000015 /* Frameworks */ = {
|
|
49
|
+
isa = PBXFrameworksBuildPhase;
|
|
50
|
+
buildActionMask = 2147483647;
|
|
51
|
+
files = (
|
|
52
|
+
);
|
|
53
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
54
|
+
};
|
|
55
|
+
/* End PBXFrameworksBuildPhase section */
|
|
56
|
+
|
|
57
|
+
/* Begin PBXGroup section */
|
|
58
|
+
83CBB9F61A601CBA00E9B192 = {
|
|
59
|
+
isa = PBXGroup;
|
|
60
|
+
children = (
|
|
61
|
+
13B07FAE1A68108700A75B9A /* voltraexample */,
|
|
62
|
+
83CBBA001A601CBA00E9B192 /* Products */,
|
|
63
|
+
F1D000000000000000000007 /* VoltraWidgetExtension */,
|
|
64
|
+
);
|
|
65
|
+
indentWidth = 2;
|
|
66
|
+
sourceTree = "<group>";
|
|
67
|
+
tabWidth = 2;
|
|
68
|
+
usesTabs = 0;
|
|
69
|
+
};
|
|
70
|
+
13B07FAE1A68108700A75B9A /* voltraexample */ = {
|
|
71
|
+
isa = PBXGroup;
|
|
72
|
+
children = (
|
|
73
|
+
13B07FB01A68108700A75B9A /* AppDelegate.swift */,
|
|
74
|
+
13B07FB51A68108700A75B9A /* Images.xcassets */,
|
|
75
|
+
13B07FB61A68108700A75B9A /* Info.plist */,
|
|
76
|
+
);
|
|
77
|
+
name = voltraexample;
|
|
78
|
+
sourceTree = "<group>";
|
|
79
|
+
};
|
|
80
|
+
83CBBA001A601CBA00E9B192 /* Products */ = {
|
|
81
|
+
isa = PBXGroup;
|
|
82
|
+
children = (
|
|
83
|
+
13B07F961A680F5B00A75B9A /* voltraexample.app */,
|
|
84
|
+
F1D000000000000000000005 /* VoltraWidgetExtension.appex */,
|
|
85
|
+
);
|
|
86
|
+
name = Products;
|
|
87
|
+
sourceTree = "<group>";
|
|
88
|
+
};
|
|
89
|
+
F1D000000000000000000007 /* VoltraWidgetExtension */ = {
|
|
90
|
+
isa = PBXGroup;
|
|
91
|
+
children = (
|
|
92
|
+
F1D000000000000000000008 /* VoltraWidget.swift */,
|
|
93
|
+
F1D000000000000000000009 /* VoltraWidgetInitialStates.swift */,
|
|
94
|
+
F1D00000000000000000000A /* VoltraDynamicLiveActivityTypes.swift */,
|
|
95
|
+
F1D00000000000000000000B /* VoltraWidgetExtension.entitlements */,
|
|
96
|
+
F1D00000000000000000000C /* VoltraWidgetExtension-Info.plist */,
|
|
97
|
+
F1D00000000000000000000D /* Assets.xcassets */,
|
|
98
|
+
F1D00000000000000000000E /* VoltraWidgets.strings */,
|
|
99
|
+
);
|
|
100
|
+
name = VoltraWidgetExtension;
|
|
101
|
+
path = VoltraWidgetExtension;
|
|
102
|
+
sourceTree = "<group>";
|
|
103
|
+
};
|
|
104
|
+
/* End PBXGroup section */
|
|
105
|
+
|
|
106
|
+
/* Begin PBXNativeTarget section */
|
|
107
|
+
13B07F861A680F5B00A75B9A /* voltraexample */ = {
|
|
108
|
+
isa = PBXNativeTarget;
|
|
109
|
+
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "voltraexample" */;
|
|
110
|
+
buildPhases = (
|
|
111
|
+
13B07F871A680F5B00A75B9A /* Sources */,
|
|
112
|
+
13B07F8C1A680F5B00A75B9A /* Frameworks */,
|
|
113
|
+
13B07F8E1A680F5B00A75B9A /* Resources */,
|
|
114
|
+
F1D000000000000000000014 /* Embed Foundation Extensions */,
|
|
115
|
+
);
|
|
116
|
+
buildRules = (
|
|
117
|
+
);
|
|
118
|
+
dependencies = (
|
|
119
|
+
F1D000000000000000000019 /* PBXTargetDependency */,
|
|
120
|
+
);
|
|
121
|
+
name = voltraexample;
|
|
122
|
+
productName = voltraexample;
|
|
123
|
+
productReference = 13B07F961A680F5B00A75B9A /* voltraexample.app */;
|
|
124
|
+
productType = "com.apple.product-type.application";
|
|
125
|
+
};
|
|
126
|
+
F1D000000000000000000001 /* VoltraWidgetExtension */ = {
|
|
127
|
+
isa = PBXNativeTarget;
|
|
128
|
+
name = VoltraWidgetExtension;
|
|
129
|
+
productName = VoltraWidgetExtension;
|
|
130
|
+
productType = "com.apple.product-type.app-extension";
|
|
131
|
+
buildConfigurationList = F1D000000000000000000002;
|
|
132
|
+
productReference = F1D000000000000000000005;
|
|
133
|
+
buildPhases = (
|
|
134
|
+
F1D00000000000000000000F /* Sources */,
|
|
135
|
+
F1D000000000000000000015 /* Frameworks */,
|
|
136
|
+
F1D000000000000000000016 /* Resources */,
|
|
137
|
+
);
|
|
138
|
+
buildRules = (
|
|
139
|
+
);
|
|
140
|
+
dependencies = (
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
/* End PBXNativeTarget section */
|
|
144
|
+
|
|
145
|
+
/* Begin PBXProject section */
|
|
146
|
+
83CBB9F71A601CBA00E9B192 /* Project object */ = {
|
|
147
|
+
isa = PBXProject;
|
|
148
|
+
attributes = {
|
|
149
|
+
LastUpgradeCheck = 1210;
|
|
150
|
+
TargetAttributes = {
|
|
151
|
+
13B07F861A680F5B00A75B9A = {
|
|
152
|
+
LastSwiftMigration = 1250;
|
|
153
|
+
};
|
|
154
|
+
F1D000000000000000000001 = {
|
|
155
|
+
LastSwiftMigration = 1250;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "voltraexample" */;
|
|
160
|
+
compatibilityVersion = "Xcode 12.0";
|
|
161
|
+
developmentRegion = en;
|
|
162
|
+
hasScannedForEncodings = 0;
|
|
163
|
+
knownRegions = (
|
|
164
|
+
en,
|
|
165
|
+
Base,
|
|
166
|
+
);
|
|
167
|
+
mainGroup = 83CBB9F61A601CBA00E9B192;
|
|
168
|
+
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
|
|
169
|
+
projectDirPath = "";
|
|
170
|
+
projectRoot = "";
|
|
171
|
+
targets = (
|
|
172
|
+
13B07F861A680F5B00A75B9A /* voltraexample */,
|
|
173
|
+
F1D000000000000000000001 /* VoltraWidgetExtension */,
|
|
174
|
+
);
|
|
175
|
+
};
|
|
176
|
+
/* End PBXProject section */
|
|
177
|
+
|
|
178
|
+
/* Begin PBXResourcesBuildPhase section */
|
|
179
|
+
13B07F8E1A680F5B00A75B9A /* Resources */ = {
|
|
180
|
+
isa = PBXResourcesBuildPhase;
|
|
181
|
+
buildActionMask = 2147483647;
|
|
182
|
+
files = (
|
|
183
|
+
13B07FC11A68108700A75B9A /* Images.xcassets in Resources */,
|
|
184
|
+
13B07FC21A68108700A75B9A /* Info.plist in Resources */,
|
|
185
|
+
);
|
|
186
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
187
|
+
};
|
|
188
|
+
F1D000000000000000000016 /* Resources */ = {
|
|
189
|
+
isa = PBXResourcesBuildPhase;
|
|
190
|
+
buildActionMask = 2147483647;
|
|
191
|
+
files = (
|
|
192
|
+
F1D000000000000000000017 /* Assets.xcassets in Resources */,
|
|
193
|
+
F1D000000000000000000018 /* VoltraWidgets.strings in Resources */,
|
|
194
|
+
);
|
|
195
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
196
|
+
};
|
|
197
|
+
/* End PBXResourcesBuildPhase section */
|
|
198
|
+
|
|
199
|
+
/* Begin PBXSourcesBuildPhase section */
|
|
200
|
+
13B07F871A680F5B00A75B9A /* Sources */ = {
|
|
201
|
+
isa = PBXSourcesBuildPhase;
|
|
202
|
+
buildActionMask = 2147483647;
|
|
203
|
+
files = (
|
|
204
|
+
13B07FBF1A68108700A75B9A /* AppDelegate.swift in Sources */,
|
|
205
|
+
F1D000000000000000000013 /* VoltraDynamicLiveActivityTypes.swift in Sources */,
|
|
206
|
+
);
|
|
207
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
208
|
+
};
|
|
209
|
+
F1D00000000000000000000F /* Sources */ = {
|
|
210
|
+
isa = PBXSourcesBuildPhase;
|
|
211
|
+
buildActionMask = 2147483647;
|
|
212
|
+
files = (
|
|
213
|
+
F1D000000000000000000010 /* VoltraWidget.swift in Sources */,
|
|
214
|
+
F1D000000000000000000011 /* VoltraWidgetInitialStates.swift in Sources */,
|
|
215
|
+
F1D000000000000000000012 /* VoltraDynamicLiveActivityTypes.swift in Sources */,
|
|
216
|
+
);
|
|
217
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
218
|
+
};
|
|
219
|
+
/* End PBXSourcesBuildPhase section */
|
|
220
|
+
|
|
221
|
+
/* Begin XCBuildConfiguration section */
|
|
222
|
+
13B07F941A680F5B00A75B9A /* Debug */ = {
|
|
223
|
+
isa = XCBuildConfiguration;
|
|
224
|
+
buildSettings = {
|
|
225
|
+
INFOPLIST_FILE = voltraexample/Info.plist;
|
|
226
|
+
PRODUCT_BUNDLE_IDENTIFIER = com.voltra.example;
|
|
227
|
+
PRODUCT_NAME = voltraexample;
|
|
228
|
+
SWIFT_VERSION = 5.0;
|
|
229
|
+
};
|
|
230
|
+
name = Debug;
|
|
231
|
+
};
|
|
232
|
+
13B07F951A680F5B00A75B9A /* Release */ = {
|
|
233
|
+
isa = XCBuildConfiguration;
|
|
234
|
+
buildSettings = {
|
|
235
|
+
INFOPLIST_FILE = voltraexample/Info.plist;
|
|
236
|
+
PRODUCT_BUNDLE_IDENTIFIER = com.voltra.example;
|
|
237
|
+
PRODUCT_NAME = voltraexample;
|
|
238
|
+
SWIFT_VERSION = 5.0;
|
|
239
|
+
};
|
|
240
|
+
name = Release;
|
|
241
|
+
};
|
|
242
|
+
83CBBA201A601CBA00E9B192 /* Debug */ = {
|
|
243
|
+
isa = XCBuildConfiguration;
|
|
244
|
+
buildSettings = {
|
|
245
|
+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
|
|
246
|
+
SDKROOT = iphoneos;
|
|
247
|
+
};
|
|
248
|
+
name = Debug;
|
|
249
|
+
};
|
|
250
|
+
83CBBA211A601CBA00E9B192 /* Release */ = {
|
|
251
|
+
isa = XCBuildConfiguration;
|
|
252
|
+
buildSettings = {
|
|
253
|
+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
|
|
254
|
+
SDKROOT = iphoneos;
|
|
255
|
+
};
|
|
256
|
+
name = Release;
|
|
257
|
+
};
|
|
258
|
+
F1D000000000000000000003 /* Debug */ = {
|
|
259
|
+
name = Debug;
|
|
260
|
+
isa = XCBuildConfiguration;
|
|
261
|
+
buildSettings = {
|
|
262
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
263
|
+
SWIFT_VERSION = 5.0;
|
|
264
|
+
TARGETED_DEVICE_FAMILY = "1,2";
|
|
265
|
+
INFOPLIST_FILE = VoltraWidgetExtension/Info.plist;
|
|
266
|
+
INFOPLIST_OUTPUT_FORMAT = "xml";
|
|
267
|
+
CURRENT_PROJECT_VERSION = "1";
|
|
268
|
+
MARKETING_VERSION = "1.0";
|
|
269
|
+
IPHONEOS_DEPLOYMENT_TARGET = "16.2";
|
|
270
|
+
PRODUCT_BUNDLE_IDENTIFIER = "com.voltra.example.VoltraWidgetExtension";
|
|
271
|
+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
272
|
+
CODE_SIGN_ENTITLEMENTS = "VoltraWidgetExtension/VoltraWidgetExtension.entitlements";
|
|
273
|
+
APPLICATION_EXTENSION_API_ONLY = "YES";
|
|
274
|
+
ASSETCATALOG_COMPILER_APPICON_NAME = "";
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
F1D000000000000000000004 /* Release */ = {
|
|
278
|
+
name = Release;
|
|
279
|
+
isa = XCBuildConfiguration;
|
|
280
|
+
buildSettings = {
|
|
281
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
282
|
+
SWIFT_VERSION = 5.0;
|
|
283
|
+
TARGETED_DEVICE_FAMILY = "1,2";
|
|
284
|
+
INFOPLIST_FILE = VoltraWidgetExtension/Info.plist;
|
|
285
|
+
INFOPLIST_OUTPUT_FORMAT = "xml";
|
|
286
|
+
CURRENT_PROJECT_VERSION = "1";
|
|
287
|
+
MARKETING_VERSION = "1.0";
|
|
288
|
+
IPHONEOS_DEPLOYMENT_TARGET = "16.2";
|
|
289
|
+
PRODUCT_BUNDLE_IDENTIFIER = "com.voltra.example.VoltraWidgetExtension";
|
|
290
|
+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
291
|
+
CODE_SIGN_ENTITLEMENTS = "VoltraWidgetExtension/VoltraWidgetExtension.entitlements";
|
|
292
|
+
APPLICATION_EXTENSION_API_ONLY = "YES";
|
|
293
|
+
ASSETCATALOG_COMPILER_APPICON_NAME = "";
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
/* End XCBuildConfiguration section */
|
|
297
|
+
|
|
298
|
+
/* Begin XCConfigurationList section */
|
|
299
|
+
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "voltraexample" */ = {
|
|
300
|
+
isa = XCConfigurationList;
|
|
301
|
+
buildConfigurations = (
|
|
302
|
+
13B07F941A680F5B00A75B9A /* Debug */,
|
|
303
|
+
13B07F951A680F5B00A75B9A /* Release */,
|
|
304
|
+
);
|
|
305
|
+
defaultConfigurationIsVisible = 0;
|
|
306
|
+
defaultConfigurationName = Release;
|
|
307
|
+
};
|
|
308
|
+
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "voltraexample" */ = {
|
|
309
|
+
isa = XCConfigurationList;
|
|
310
|
+
buildConfigurations = (
|
|
311
|
+
83CBBA201A601CBA00E9B192 /* Debug */,
|
|
312
|
+
83CBBA211A601CBA00E9B192 /* Release */,
|
|
313
|
+
);
|
|
314
|
+
defaultConfigurationIsVisible = 0;
|
|
315
|
+
defaultConfigurationName = Release;
|
|
316
|
+
};
|
|
317
|
+
F1D000000000000000000002 /* Build configuration list for PBXNativeTarget "VoltraWidgetExtension" */ = {
|
|
318
|
+
isa = XCConfigurationList;
|
|
319
|
+
buildConfigurations = (
|
|
320
|
+
F1D000000000000000000003 /* Debug */,
|
|
321
|
+
F1D000000000000000000004 /* Release */,
|
|
322
|
+
);
|
|
323
|
+
defaultConfigurationIsVisible = 0;
|
|
324
|
+
defaultConfigurationName = Release;
|
|
325
|
+
};
|
|
326
|
+
/* End XCConfigurationList section */
|
|
327
|
+
|
|
328
|
+
/* Begin PBXCopyFilesBuildPhase section */
|
|
329
|
+
F1D000000000000000000014 /* Embed Foundation Extensions */ = {
|
|
330
|
+
isa = PBXCopyFilesBuildPhase;
|
|
331
|
+
buildActionMask = 2147483647;
|
|
332
|
+
files = (
|
|
333
|
+
F1D000000000000000000006 /* VoltraWidgetExtension.appex in Embed Foundation Extensions */,
|
|
334
|
+
);
|
|
335
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
336
|
+
name = "Embed Foundation Extensions";
|
|
337
|
+
dstPath = "";
|
|
338
|
+
dstSubfolderSpec = 13;
|
|
339
|
+
};
|
|
340
|
+
/* End PBXCopyFilesBuildPhase section */
|
|
341
|
+
|
|
342
|
+
/* Begin PBXTargetDependency section */
|
|
343
|
+
F1D000000000000000000019 /* PBXTargetDependency */ = {
|
|
344
|
+
isa = PBXTargetDependency;
|
|
345
|
+
target = F1D000000000000000000001 /* VoltraWidgetExtension */;
|
|
346
|
+
targetProxy = F1D00000000000000000001A /* PBXContainerItemProxy */;
|
|
347
|
+
};
|
|
348
|
+
/* End PBXTargetDependency section */
|
|
349
|
+
|
|
350
|
+
/* Begin PBXContainerItemProxy section */
|
|
351
|
+
F1D00000000000000000001A /* PBXContainerItemProxy */ = {
|
|
352
|
+
isa = PBXContainerItemProxy;
|
|
353
|
+
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
|
354
|
+
proxyType = 1;
|
|
355
|
+
remoteGlobalIDString = F1D000000000000000000001;
|
|
356
|
+
remoteInfo = VoltraWidgetExtension;
|
|
357
|
+
};
|
|
358
|
+
/* End PBXContainerItemProxy section */
|
|
359
|
+
};
|
|
360
|
+
rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
|
361
|
+
}
|
|
362
|
+
"
|
|
363
|
+
`;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as fs from 'fs'
|
|
2
|
+
import * as os from 'os'
|
|
3
|
+
import * as path from 'path'
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
6
|
+
const xcode = require('xcode')
|
|
7
|
+
|
|
8
|
+
/** pbxproj build-phase sections whose `files` entries point at PBXBuildFile objects. */
|
|
9
|
+
const BUILD_PHASE_SECTIONS = [
|
|
10
|
+
'PBXSourcesBuildPhase',
|
|
11
|
+
'PBXFrameworksBuildPhase',
|
|
12
|
+
'PBXResourcesBuildPhase',
|
|
13
|
+
'PBXCopyFilesBuildPhase',
|
|
14
|
+
'PBXHeadersBuildPhase',
|
|
15
|
+
'PBXShellScriptBuildPhase',
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
const COMMENT_KEY = /_comment$/
|
|
19
|
+
|
|
20
|
+
function nonCommentKeys(section: Record<string, any> | undefined): string[] {
|
|
21
|
+
if (!section) {
|
|
22
|
+
return []
|
|
23
|
+
}
|
|
24
|
+
return Object.keys(section).filter((key) => !COMMENT_KEY.test(key))
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Strips a trailing `/* comment *\/` and surrounding whitespace from a raw pbx reference value. */
|
|
28
|
+
function normalizeRef(value: unknown): string {
|
|
29
|
+
return String(value)
|
|
30
|
+
.replace(/\/\*.*?\*\//g, '')
|
|
31
|
+
.trim()
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Loads a checked-in pbxproj fixture and returns a freshly parsed xcode project.
|
|
36
|
+
*/
|
|
37
|
+
export function loadFixtureProject(fixtureName: string): any {
|
|
38
|
+
const fixturePath = path.join(__dirname, '..', '__fixtures__', fixtureName)
|
|
39
|
+
const project = xcode.project(fixturePath)
|
|
40
|
+
project.parseSync()
|
|
41
|
+
return project
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Serializes the project and parses the result back, asserting the pbxproj survives a
|
|
46
|
+
* `writeSync()` round-trip. Returns the re-parsed project.
|
|
47
|
+
*/
|
|
48
|
+
export function roundTripProject(project: any): any {
|
|
49
|
+
const contents = project.writeSync()
|
|
50
|
+
const tmpFile = path.join(fs.mkdtempSync(path.join(os.tmpdir(), 'pbx-')), 'project.pbxproj')
|
|
51
|
+
fs.writeFileSync(tmpFile, contents)
|
|
52
|
+
const reparsed = xcode.project(tmpFile)
|
|
53
|
+
reparsed.parseSync()
|
|
54
|
+
return reparsed
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Asserts the structural consistency of a parsed Xcode project, mirroring the invariants CocoaPods'
|
|
59
|
+
* `[Xcodeproj]` consistency checker enforces. Throws on the first violation.
|
|
60
|
+
*
|
|
61
|
+
* Checks:
|
|
62
|
+
* - every phase `files` entry resolves to an existing PBXBuildFile
|
|
63
|
+
* - every PBXBuildFile is referenced by exactly one build phase across the whole project
|
|
64
|
+
* - the main app target has exactly one `dstSubfolderSpec == 13` copy-files phase
|
|
65
|
+
* - no orphan phase objects (every phase object is referenced by some native target)
|
|
66
|
+
* - the project survives a `writeSync()` -> re-parse round-trip
|
|
67
|
+
*/
|
|
68
|
+
export function assertPbxConsistency(project: any): void {
|
|
69
|
+
const objects = project.hash.project.objects
|
|
70
|
+
const buildFileSection = objects.PBXBuildFile || {}
|
|
71
|
+
|
|
72
|
+
// Collect every phase object referenced by a native target.
|
|
73
|
+
const nativeTargets = objects.PBXNativeTarget || {}
|
|
74
|
+
const referencedPhaseUuids = new Set<string>()
|
|
75
|
+
for (const targetKey of nonCommentKeys(nativeTargets)) {
|
|
76
|
+
const target = nativeTargets[targetKey]
|
|
77
|
+
for (const entry of target.buildPhases || []) {
|
|
78
|
+
referencedPhaseUuids.add(normalizeRef(entry.value))
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Walk every build phase, resolving each files entry and counting build-file references.
|
|
83
|
+
const buildFileRefCount = new Map<string, number>()
|
|
84
|
+
for (const sectionName of BUILD_PHASE_SECTIONS) {
|
|
85
|
+
const section = objects[sectionName]
|
|
86
|
+
for (const phaseKey of nonCommentKeys(section)) {
|
|
87
|
+
// Orphan phase: exists in the object graph but no target references it.
|
|
88
|
+
if (!referencedPhaseUuids.has(phaseKey)) {
|
|
89
|
+
throw new Error(`Orphan ${sectionName} object '${phaseKey}' is not referenced by any target`)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const phase = section[phaseKey]
|
|
93
|
+
for (const entry of phase.files || []) {
|
|
94
|
+
const buildFileUuid = normalizeRef(entry.value)
|
|
95
|
+
if (!buildFileSection[buildFileUuid]) {
|
|
96
|
+
throw new Error(
|
|
97
|
+
`${sectionName} '${phaseKey}' references build file '${buildFileUuid}' that has no PBXBuildFile object`
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
buildFileRefCount.set(buildFileUuid, (buildFileRefCount.get(buildFileUuid) ?? 0) + 1)
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Every PBXBuildFile must be referenced by exactly one phase.
|
|
106
|
+
for (const buildFileUuid of nonCommentKeys(buildFileSection)) {
|
|
107
|
+
const count = buildFileRefCount.get(buildFileUuid) ?? 0
|
|
108
|
+
if (count !== 1) {
|
|
109
|
+
const comment = buildFileSection[`${buildFileUuid}_comment`] ?? buildFileUuid
|
|
110
|
+
throw new Error(
|
|
111
|
+
`PBXBuildFile '${comment}' (${buildFileUuid}) is referenced by ${count} build phases, expected exactly 1`
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Exactly one embed-app-extensions (dstSubfolderSpec == 13) phase on the main target.
|
|
117
|
+
const mainTargetUuid = project.getFirstTarget().uuid
|
|
118
|
+
const mainTarget = nativeTargets[mainTargetUuid]
|
|
119
|
+
const copyFilesSection = objects.PBXCopyFilesBuildPhase || {}
|
|
120
|
+
const embedPhases = (mainTarget.buildPhases || []).filter((entry: any) => {
|
|
121
|
+
const phase = copyFilesSection[normalizeRef(entry.value)]
|
|
122
|
+
return phase && String(phase.dstSubfolderSpec) === '13'
|
|
123
|
+
})
|
|
124
|
+
if (embedPhases.length !== 1) {
|
|
125
|
+
throw new Error(`Main target has ${embedPhases.length} embed-app-extensions phases, expected exactly 1`)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// The project must survive serialization + re-parse.
|
|
129
|
+
roundTripProject(project)
|
|
130
|
+
}
|