@use-voltra/ios-client 1.4.0 → 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -0
- package/Voltra.podspec +28 -0
- package/build/commonjs/VoltraModule.js +13 -0
- package/build/commonjs/VoltraModule.js.map +1 -0
- package/build/commonjs/components/VoltraLiveActivityPreview.js +30 -0
- package/build/commonjs/components/VoltraLiveActivityPreview.js.map +1 -0
- package/build/commonjs/components/VoltraView.js +50 -0
- package/build/commonjs/components/VoltraView.js.map +1 -0
- package/build/commonjs/components/VoltraWidgetPreview.js +58 -0
- package/build/commonjs/components/VoltraWidgetPreview.js.map +1 -0
- package/build/commonjs/events.js +32 -0
- package/build/commonjs/events.js.map +1 -0
- package/build/commonjs/helpers.js +26 -0
- package/build/commonjs/helpers.js.map +1 -0
- package/build/commonjs/index.js +226 -0
- package/build/commonjs/index.js.map +1 -0
- package/build/commonjs/live-activity/api.js +168 -0
- package/build/commonjs/live-activity/api.js.map +1 -0
- package/build/commonjs/logger.js +39 -0
- package/build/commonjs/logger.js.map +1 -0
- package/build/commonjs/native/NativeVoltra.js +15 -0
- package/build/commonjs/native/NativeVoltra.js.map +1 -0
- package/build/commonjs/native/VoltraRNNativeComponent.ts +9 -0
- package/build/commonjs/package.json +1 -0
- package/build/commonjs/preload.js +54 -0
- package/build/commonjs/preload.js.map +1 -0
- package/build/commonjs/types.js +2 -0
- package/build/commonjs/types.js.map +1 -0
- package/build/commonjs/utils/assertRunningOnApple.js +16 -0
- package/build/commonjs/utils/assertRunningOnApple.js.map +1 -0
- package/build/commonjs/utils/helpers.js +19 -0
- package/build/commonjs/utils/helpers.js.map +1 -0
- package/build/commonjs/utils/index.js +28 -0
- package/build/commonjs/utils/index.js.map +1 -0
- package/build/commonjs/utils/useUpdateOnHMR.js +25 -0
- package/build/commonjs/utils/useUpdateOnHMR.js.map +1 -0
- package/build/commonjs/widgets/server-credentials.js +18 -0
- package/build/commonjs/widgets/server-credentials.js.map +1 -0
- package/build/commonjs/widgets/widget-api.js +55 -0
- package/build/commonjs/widgets/widget-api.js.map +1 -0
- package/build/module/VoltraModule.js +4 -0
- package/build/module/VoltraModule.js.map +1 -0
- package/build/module/components/VoltraLiveActivityPreview.js +25 -0
- package/build/module/components/VoltraLiveActivityPreview.js.map +1 -0
- package/build/module/components/VoltraView.js +44 -0
- package/build/module/components/VoltraView.js.map +1 -0
- package/build/module/components/VoltraWidgetPreview.js +53 -0
- package/build/module/components/VoltraWidgetPreview.js.map +1 -0
- package/build/module/events.js +28 -0
- package/build/module/events.js.map +1 -0
- package/build/module/helpers.js +21 -0
- package/build/module/helpers.js.map +1 -0
- package/build/module/index.js +17 -0
- package/build/module/index.js.map +1 -0
- package/build/module/live-activity/api.js +158 -0
- package/build/module/live-activity/api.js.map +1 -0
- package/build/module/logger.js +35 -0
- package/build/module/logger.js.map +1 -0
- package/build/module/native/NativeVoltra.js +11 -0
- package/build/module/native/NativeVoltra.js.map +1 -0
- package/build/module/native/VoltraRNNativeComponent.ts +9 -0
- package/build/module/package.json +1 -0
- package/build/module/preload.js +48 -0
- package/build/module/preload.js.map +1 -0
- package/build/module/types.js +2 -0
- package/build/module/types.js.map +1 -0
- package/build/module/utils/assertRunningOnApple.js +11 -0
- package/build/module/utils/assertRunningOnApple.js.map +1 -0
- package/build/module/utils/helpers.js +4 -0
- package/build/module/utils/helpers.js.map +1 -0
- package/build/module/utils/index.js +5 -0
- package/build/module/utils/index.js.map +1 -0
- package/build/module/utils/useUpdateOnHMR.js +20 -0
- package/build/module/utils/useUpdateOnHMR.js.map +1 -0
- package/build/module/widgets/server-credentials.js +13 -0
- package/build/module/widgets/server-credentials.js.map +1 -0
- package/build/module/widgets/widget-api.js +45 -0
- package/build/module/widgets/widget-api.js.map +1 -0
- package/build/typescript/commonjs/VoltraModule.d.ts +3 -0
- package/build/typescript/commonjs/VoltraModule.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraLiveActivityPreview.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraView.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraWidgetPreview.d.ts.map +1 -0
- package/build/typescript/commonjs/events.d.ts.map +1 -0
- package/build/typescript/commonjs/helpers.d.ts.map +1 -0
- package/build/{types → typescript/commonjs}/index.d.ts +5 -0
- package/build/typescript/commonjs/index.d.ts.map +1 -0
- package/build/typescript/commonjs/live-activity/api.d.ts.map +1 -0
- package/build/typescript/commonjs/logger.d.ts.map +1 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts +100 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts.map +1 -0
- package/build/typescript/commonjs/native/VoltraRNNativeComponent.d.ts +8 -0
- package/build/typescript/commonjs/native/VoltraRNNativeComponent.d.ts.map +1 -0
- package/build/typescript/commonjs/package.json +1 -0
- package/build/typescript/commonjs/preload.d.ts.map +1 -0
- package/build/typescript/commonjs/types.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/assertRunningOnApple.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/helpers.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/index.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/useUpdateOnHMR.d.ts.map +1 -0
- package/build/typescript/commonjs/widgets/server-credentials.d.ts.map +1 -0
- package/build/typescript/commonjs/widgets/widget-api.d.ts.map +1 -0
- package/build/typescript/module/VoltraModule.d.ts +3 -0
- package/build/typescript/module/VoltraModule.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraLiveActivityPreview.d.ts +7 -0
- package/build/typescript/module/components/VoltraLiveActivityPreview.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraView.d.ts +12 -0
- package/build/typescript/module/components/VoltraView.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraWidgetPreview.d.ts +9 -0
- package/build/typescript/module/components/VoltraWidgetPreview.d.ts.map +1 -0
- package/build/typescript/module/events.d.ts +33 -0
- package/build/typescript/module/events.d.ts.map +1 -0
- package/build/typescript/module/helpers.d.ts +3 -0
- package/build/typescript/module/helpers.d.ts.map +1 -0
- package/build/typescript/module/index.d.ts +18 -0
- package/build/typescript/module/index.d.ts.map +1 -0
- package/build/typescript/module/live-activity/api.d.ts +35 -0
- package/build/typescript/module/live-activity/api.d.ts.map +1 -0
- package/build/typescript/module/logger.d.ts +16 -0
- package/build/typescript/module/logger.d.ts.map +1 -0
- package/build/typescript/module/native/NativeVoltra.d.ts +100 -0
- package/build/typescript/module/native/NativeVoltra.d.ts.map +1 -0
- package/build/typescript/module/native/VoltraRNNativeComponent.d.ts +8 -0
- package/build/typescript/module/native/VoltraRNNativeComponent.d.ts.map +1 -0
- package/build/typescript/module/package.json +1 -0
- package/build/typescript/module/preload.d.ts +6 -0
- package/build/typescript/module/preload.d.ts.map +1 -0
- package/build/typescript/module/types.d.ts +2 -0
- package/build/typescript/module/types.d.ts.map +1 -0
- package/build/typescript/module/utils/assertRunningOnApple.d.ts +2 -0
- package/build/typescript/module/utils/assertRunningOnApple.d.ts.map +1 -0
- package/build/{esm/utils/helpers.js → typescript/module/utils/helpers.d.ts} +1 -1
- package/build/typescript/module/utils/helpers.d.ts.map +1 -0
- package/build/{esm/utils/index.js → typescript/module/utils/index.d.ts} +1 -1
- package/build/typescript/module/utils/index.d.ts.map +1 -0
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts +5 -0
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts.map +1 -0
- package/build/typescript/module/widgets/server-credentials.d.ts +5 -0
- package/build/typescript/module/widgets/server-credentials.d.ts.map +1 -0
- package/build/typescript/module/widgets/widget-api.d.ts +11 -0
- package/build/typescript/module/widgets/widget-api.d.ts.map +1 -0
- package/expo-plugin/app.plugin.js +3 -0
- package/expo-plugin/build/cjs/constants.js +23 -0
- package/expo-plugin/build/cjs/constants.js.map +1 -0
- package/expo-plugin/build/cjs/index.js +51 -0
- package/expo-plugin/build/cjs/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios/eas.js +28 -0
- package/expo-plugin/build/cjs/ios/eas.js.map +1 -0
- package/expo-plugin/build/cjs/ios/entitlements.js +46 -0
- package/expo-plugin/build/cjs/ios/entitlements.js.map +1 -0
- package/expo-plugin/build/cjs/ios/index.js +39 -0
- package/expo-plugin/build/cjs/ios/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios/infoPlist.js +51 -0
- package/expo-plugin/build/cjs/ios/infoPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios/pushNotifications.js +22 -0
- package/expo-plugin/build/cjs/ios/pushNotifications.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/eas.js +66 -0
- package/expo-plugin/build/cjs/ios-widget/eas.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/assets.js +199 -0
- package/expo-plugin/build/cjs/ios-widget/files/assets.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/entitlements.js +77 -0
- package/expo-plugin/build/cjs/ios-widget/files/entitlements.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/index.js +92 -0
- package/expo-plugin/build/cjs/ios-widget/files/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js +91 -0
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift.js +443 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/fonts.js +151 -0
- package/expo-plugin/build/cjs/ios-widget/fonts.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/index.js +46 -0
- package/expo-plugin/build/cjs/ios-widget/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/podfile.js +41 -0
- package/expo-plugin/build/cjs/ios-widget/podfile.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js +99 -0
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js +247 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js +91 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js +79 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js +155 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js +71 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js +74 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js +113 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js.map +1 -0
- package/expo-plugin/build/cjs/utils/fileDiscovery.js +120 -0
- package/expo-plugin/build/cjs/utils/fileDiscovery.js.map +1 -0
- package/expo-plugin/build/cjs/utils/urlScheme.js +40 -0
- package/expo-plugin/build/cjs/utils/urlScheme.js.map +1 -0
- package/expo-plugin/build/cjs/validation.js +55 -0
- package/expo-plugin/build/cjs/validation.js.map +1 -0
- package/expo-plugin/build/esm/constants.js +20 -0
- package/expo-plugin/build/esm/constants.js.map +1 -0
- package/expo-plugin/build/esm/index.js +49 -0
- package/expo-plugin/build/esm/index.js.map +1 -0
- package/expo-plugin/build/esm/ios/eas.js +24 -0
- package/expo-plugin/build/esm/ios/eas.js.map +1 -0
- package/expo-plugin/build/esm/ios/entitlements.js +42 -0
- package/expo-plugin/build/esm/ios/entitlements.js.map +1 -0
- package/expo-plugin/build/esm/ios/index.js +34 -0
- package/expo-plugin/build/esm/ios/index.js.map +1 -0
- package/expo-plugin/build/esm/ios/infoPlist.js +47 -0
- package/expo-plugin/build/esm/ios/infoPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios/pushNotifications.js +18 -0
- package/expo-plugin/build/esm/ios/pushNotifications.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/eas.js +62 -0
- package/expo-plugin/build/esm/ios-widget/eas.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/assets.js +163 -0
- package/expo-plugin/build/esm/ios-widget/files/assets.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/entitlements.js +37 -0
- package/expo-plugin/build/esm/ios-widget/files/entitlements.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/index.js +55 -0
- package/expo-plugin/build/esm/ios-widget/files/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js +55 -0
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/swift.js +403 -0
- package/expo-plugin/build/esm/ios-widget/files/swift.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/fonts.js +111 -0
- package/expo-plugin/build/esm/ios-widget/fonts.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/index.js +42 -0
- package/expo-plugin/build/esm/ios-widget/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/podfile.js +37 -0
- package/expo-plugin/build/esm/ios-widget/podfile.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js +92 -0
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js +210 -0
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js +87 -0
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js +75 -0
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/index.js +118 -0
- package/expo-plugin/build/esm/ios-widget/xcode/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js +68 -0
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js +70 -0
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/target.js +108 -0
- package/expo-plugin/build/esm/ios-widget/xcode/target.js.map +1 -0
- package/expo-plugin/build/esm/utils/fileDiscovery.js +83 -0
- package/expo-plugin/build/esm/utils/fileDiscovery.js.map +1 -0
- package/expo-plugin/build/esm/utils/urlScheme.js +37 -0
- package/expo-plugin/build/esm/utils/urlScheme.js.map +1 -0
- package/expo-plugin/build/esm/validation.js +51 -0
- package/expo-plugin/build/esm/validation.js.map +1 -0
- package/expo-plugin/build/types/constants.d.ts +13 -0
- package/expo-plugin/build/types/constants.d.ts.map +1 -0
- package/expo-plugin/build/types/index.d.ts +10 -0
- package/expo-plugin/build/types/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/eas.d.ts +12 -0
- package/expo-plugin/build/types/ios/eas.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/entitlements.d.ts +14 -0
- package/expo-plugin/build/types/ios/entitlements.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/index.d.ts +19 -0
- package/expo-plugin/build/types/ios/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/infoPlist.d.ts +21 -0
- package/expo-plugin/build/types/ios/infoPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/pushNotifications.d.ts +10 -0
- package/expo-plugin/build/types/ios/pushNotifications.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/eas.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/eas.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/assets.d.ts +13 -0
- package/expo-plugin/build/types/ios-widget/files/assets.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/entitlements.d.ts +17 -0
- package/expo-plugin/build/types/ios-widget/files/entitlements.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/index.d.ts +24 -0
- package/expo-plugin/build/types/ios-widget/files/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts +10 -0
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts +24 -0
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/fonts.d.ts +22 -0
- package/expo-plugin/build/types/ios-widget/fonts.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/index.d.ts +31 -0
- package/expo-plugin/build/types/ios-widget/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/podfile.d.ts +9 -0
- package/expo-plugin/build/types/ios-widget/podfile.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts +25 -0
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts +14 -0
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts +42 -0
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts.map +1 -0
- package/expo-plugin/build/types/types.d.ts +74 -0
- package/expo-plugin/build/types/types.d.ts.map +1 -0
- package/expo-plugin/build/types/utils/fileDiscovery.d.ts +15 -0
- package/expo-plugin/build/types/utils/fileDiscovery.d.ts.map +1 -0
- package/expo-plugin/build/types/utils/urlScheme.d.ts +10 -0
- package/expo-plugin/build/types/utils/urlScheme.d.ts.map +1 -0
- package/expo-plugin/build/types/validation.d.ts +4 -0
- package/expo-plugin/build/types/validation.d.ts.map +1 -0
- package/expo-plugin/jest.config.js +18 -0
- package/expo-plugin/src/constants.ts +25 -0
- package/expo-plugin/src/index.ts +72 -0
- package/expo-plugin/src/ios/eas.ts +33 -0
- package/expo-plugin/src/ios/entitlements.ts +59 -0
- package/expo-plugin/src/ios/index.ts +47 -0
- package/expo-plugin/src/ios/infoPlist.ts +63 -0
- package/expo-plugin/src/ios/pushNotifications.ts +22 -0
- package/expo-plugin/src/ios-widget/eas.ts +79 -0
- package/expo-plugin/src/ios-widget/files/assets.ts +201 -0
- package/expo-plugin/src/ios-widget/files/entitlements.ts +48 -0
- package/expo-plugin/src/ios-widget/files/index.ts +74 -0
- package/expo-plugin/src/ios-widget/files/infoPlist.ts +57 -0
- package/expo-plugin/src/ios-widget/files/swift.node.test.ts +22 -0
- package/expo-plugin/src/ios-widget/files/swift.ts +476 -0
- package/expo-plugin/src/ios-widget/fonts.ts +132 -0
- package/expo-plugin/src/ios-widget/index.ts +73 -0
- package/expo-plugin/src/ios-widget/podfile.ts +44 -0
- package/expo-plugin/src/ios-widget/widgetPlist.ts +115 -0
- package/expo-plugin/src/ios-widget/xcode/buildPhases.ts +301 -0
- package/expo-plugin/src/ios-widget/xcode/configurationList.ts +127 -0
- package/expo-plugin/src/ios-widget/xcode/groups.ts +101 -0
- package/expo-plugin/src/ios-widget/xcode/index.ts +149 -0
- package/expo-plugin/src/ios-widget/xcode/mainAppSettings.ts +95 -0
- package/expo-plugin/src/ios-widget/xcode/productFile.ts +91 -0
- package/expo-plugin/src/ios-widget/xcode/target.ts +148 -0
- package/expo-plugin/src/types.ts +89 -0
- package/expo-plugin/src/utils/fileDiscovery.ts +96 -0
- package/expo-plugin/src/utils/urlScheme.ts +45 -0
- package/expo-plugin/src/validation.node.test.ts +19 -0
- package/expo-plugin/src/validation.ts +63 -0
- package/expo-plugin/tsconfig.base.json +17 -0
- package/expo-plugin/tsconfig.cjs.json +9 -0
- package/expo-plugin/tsconfig.esm.json +9 -0
- package/expo-plugin/tsconfig.jest.json +8 -0
- package/expo-plugin/tsconfig.typecheck.json +12 -0
- package/expo-plugin/tsconfig.types.json +10 -0
- package/ios/Package.swift +68 -0
- package/ios/Tests/JSGradientParserTests.swift +201 -0
- package/ios/Tests/VoltraSharedTests/SmokeTests.swift +8 -0
- package/ios/VoltraWidget.podspec +30 -0
- package/ios/app/NativeVoltra.h +5 -0
- package/ios/app/NativeVoltra.mm +211 -0
- package/ios/app/VoltraActivity.swift +5 -0
- package/ios/app/VoltraImagePreload.swift +154 -0
- package/ios/app/VoltraLiveActivityManager.swift +228 -0
- package/ios/app/VoltraLiveActivityService.swift +306 -0
- package/ios/app/VoltraModule.swift +215 -0
- package/ios/app/VoltraModuleImpl.swift +331 -0
- package/ios/app/VoltraOptions.swift +27 -0
- package/ios/app/VoltraViewComponentView.h +10 -0
- package/ios/app/VoltraViewComponentView.mm +67 -0
- package/ios/app/VoltraViewRoot.swift +63 -0
- package/ios/app/VoltraWidgetService.swift +154 -0
- package/ios/shared/BrotliCompression.swift +81 -0
- package/ios/shared/ComponentTypeID.swift +117 -0
- package/ios/shared/Data+hexString.swift +8 -0
- package/ios/shared/Date+toTimerInterval.swift +25 -0
- package/ios/shared/JSONValue.swift +128 -0
- package/ios/shared/ShortNames.swift +180 -0
- package/ios/shared/VoltraAttributes.swift +58 -0
- package/ios/shared/VoltraConfig.swift +18 -0
- package/ios/shared/VoltraConstants.swift +45 -0
- package/ios/shared/VoltraElement.swift +153 -0
- package/ios/shared/VoltraEvent.swift +72 -0
- package/ios/shared/VoltraEventBus.swift +80 -0
- package/ios/shared/VoltraImageStore.swift +119 -0
- package/ios/shared/VoltraInitialStateLocale.swift +54 -0
- package/ios/shared/VoltraInteractionIntent.swift +39 -0
- package/ios/shared/VoltraKeychainHelper.swift +178 -0
- package/ios/shared/VoltraLiveActivityPayload.swift +113 -0
- package/ios/shared/VoltraLogger.swift +30 -0
- package/ios/shared/VoltraNode.swift +194 -0
- package/ios/shared/VoltraPayloadMigrator.swift +63 -0
- package/ios/shared/VoltraPersistentEventQueue.swift +67 -0
- package/ios/shared/VoltraRefreshIntent.swift +29 -0
- package/ios/shared/VoltraRegion.swift +37 -0
- package/ios/shared/VoltraWidgetDefaults.swift +114 -0
- package/ios/shared/VoltraWidgetServerFetcher.swift +166 -0
- package/ios/target/VoltraHomeWidget.swift +508 -0
- package/ios/target/VoltraWidget.swift +158 -0
- package/ios/ui/Extensions/View.modifiers.swift +28 -0
- package/ios/ui/Extensions/VoltraNode+Parameters.swift +18 -0
- package/ios/ui/Generated/Parameters/.generated +8 -0
- package/ios/ui/Generated/Parameters/ButtonParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/ChartParameters.swift +33 -0
- package/ios/ui/Generated/Parameters/CircularProgressViewParameters.swift +59 -0
- package/ios/ui/Generated/Parameters/ComponentParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/DividerParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/GaugeParameters.swift +54 -0
- package/ios/ui/Generated/Parameters/GlassContainerParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/GroupBoxParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/HStackParameters.swift +34 -0
- package/ios/ui/Generated/Parameters/ImageParameters.swift +29 -0
- package/ios/ui/Generated/Parameters/LabelParameters.swift +18 -0
- package/ios/ui/Generated/Parameters/LinearGradientParameters.swift +27 -0
- package/ios/ui/Generated/Parameters/LinearProgressViewParameters.swift +64 -0
- package/ios/ui/Generated/Parameters/LinkParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/MaskParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/SpacerParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/SymbolParameters.swift +59 -0
- package/ios/ui/Generated/Parameters/TextParameters.swift +18 -0
- package/ios/ui/Generated/Parameters/TimerParameters.swift +54 -0
- package/ios/ui/Generated/Parameters/ToggleParameters.swift +24 -0
- package/ios/ui/Generated/Parameters/VStackParameters.swift +34 -0
- package/ios/ui/Generated/Parameters/ViewParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/ZStackParameters.swift +15 -0
- package/ios/ui/Helpers/VoltraDeepLinkResolver.swift +43 -0
- package/ios/ui/Helpers/VoltraProgressDriver.swift +52 -0
- package/ios/ui/Layout/FlexContainerHelper.swift +114 -0
- package/ios/ui/Layout/VoltraFlexStackLayout.swift +417 -0
- package/ios/ui/Protocols/VoltraView.swift +29 -0
- package/ios/ui/Style/BackgroundValue.swift +27 -0
- package/ios/ui/Style/CompositeStyle.swift +81 -0
- package/ios/ui/Style/DecorationStyle.swift +207 -0
- package/ios/ui/Style/FlexEnvironment.swift +35 -0
- package/ios/ui/Style/FontVariant.swift +4 -0
- package/ios/ui/Style/GlassEffect.swift +6 -0
- package/ios/ui/Style/JSColorParser.swift +517 -0
- package/ios/ui/Style/JSGradientParser.swift +674 -0
- package/ios/ui/Style/JSStyleParser.swift +223 -0
- package/ios/ui/Style/LayoutStyle.swift +184 -0
- package/ios/ui/Style/Overflow.swift +4 -0
- package/ios/ui/Style/RenderingStyle.swift +33 -0
- package/ios/ui/Style/StyleConverter.swift +202 -0
- package/ios/ui/Style/TextDecoration.swift +6 -0
- package/ios/ui/Style/TextStyle.swift +50 -0
- package/ios/ui/Style/View+applyStyle.swift +38 -0
- package/ios/ui/Views/VoltraButton.swift +57 -0
- package/ios/ui/Views/VoltraChart.swift +840 -0
- package/ios/ui/Views/VoltraCircularProgressView.swift +103 -0
- package/ios/ui/Views/VoltraDivider.swift +16 -0
- package/ios/ui/Views/VoltraFlexView.swift +33 -0
- package/ios/ui/Views/VoltraGauge.swift +65 -0
- package/ios/ui/Views/VoltraGlassContainer.swift +29 -0
- package/ios/ui/Views/VoltraGroupBox.swift +26 -0
- package/ios/ui/Views/VoltraHStack.swift +70 -0
- package/ios/ui/Views/VoltraImage.swift +109 -0
- package/ios/ui/Views/VoltraLabel.swift +24 -0
- package/ios/ui/Views/VoltraLinearGradient.swift +115 -0
- package/ios/ui/Views/VoltraLinearProgressView.swift +118 -0
- package/ios/ui/Views/VoltraLink.swift +25 -0
- package/ios/ui/Views/VoltraMask.swift +23 -0
- package/ios/ui/Views/VoltraSpacer.swift +16 -0
- package/ios/ui/Views/VoltraSymbol.swift +160 -0
- package/ios/ui/Views/VoltraText.swift +87 -0
- package/ios/ui/Views/VoltraTimer.swift +131 -0
- package/ios/ui/Views/VoltraToggle.swift +39 -0
- package/ios/ui/Views/VoltraVStack.swift +68 -0
- package/ios/ui/Views/VoltraZStack.swift +33 -0
- package/ios/ui/Voltra.swift +86 -0
- package/package.json +91 -18
- package/build/cjs/VoltraModule.js +0 -6
- package/build/cjs/VoltraModule.js.map +0 -1
- package/build/cjs/components/VoltraLiveActivityPreview.js +0 -20
- package/build/cjs/components/VoltraLiveActivityPreview.js.map +0 -1
- package/build/cjs/components/VoltraView.js +0 -37
- package/build/cjs/components/VoltraView.js.map +0 -1
- package/build/cjs/components/VoltraWidgetPreview.js +0 -26
- package/build/cjs/components/VoltraWidgetPreview.js.map +0 -1
- package/build/cjs/events.js +0 -19
- package/build/cjs/events.js.map +0 -1
- package/build/cjs/helpers.js +0 -30
- package/build/cjs/helpers.js.map +0 -1
- package/build/cjs/index.js +0 -49
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/live-activity/api.js +0 -158
- package/build/cjs/live-activity/api.js.map +0 -1
- package/build/cjs/logger.js +0 -36
- package/build/cjs/logger.js.map +0 -1
- package/build/cjs/preload.js +0 -54
- package/build/cjs/preload.js.map +0 -1
- package/build/cjs/utils/assertRunningOnApple.js +0 -13
- package/build/cjs/utils/assertRunningOnApple.js.map +0 -1
- package/build/cjs/utils/helpers.js +0 -7
- package/build/cjs/utils/helpers.js.map +0 -1
- package/build/cjs/utils/index.js +0 -19
- package/build/cjs/utils/index.js.map +0 -1
- package/build/cjs/utils/useUpdateOnHMR.js +0 -22
- package/build/cjs/utils/useUpdateOnHMR.js.map +0 -1
- package/build/cjs/widgets/server-credentials.js +0 -18
- package/build/cjs/widgets/server-credentials.js.map +0 -1
- package/build/cjs/widgets/widget-api.js +0 -59
- package/build/cjs/widgets/widget-api.js.map +0 -1
- package/build/esm/VoltraModule.js +0 -4
- package/build/esm/VoltraModule.js.map +0 -1
- package/build/esm/components/VoltraLiveActivityPreview.js +0 -17
- package/build/esm/components/VoltraLiveActivityPreview.js.map +0 -1
- package/build/esm/components/VoltraView.js +0 -34
- package/build/esm/components/VoltraView.js.map +0 -1
- package/build/esm/components/VoltraWidgetPreview.js +0 -23
- package/build/esm/components/VoltraWidgetPreview.js.map +0 -1
- package/build/esm/events.js +0 -13
- package/build/esm/events.js.map +0 -1
- package/build/esm/helpers.js +0 -23
- package/build/esm/helpers.js.map +0 -1
- package/build/esm/index.js +0 -10
- package/build/esm/index.js.map +0 -1
- package/build/esm/live-activity/api.js +0 -146
- package/build/esm/live-activity/api.js.map +0 -1
- package/build/esm/logger.js +0 -33
- package/build/esm/logger.js.map +0 -1
- package/build/esm/preload.js +0 -46
- package/build/esm/preload.js.map +0 -1
- package/build/esm/utils/assertRunningOnApple.js +0 -9
- package/build/esm/utils/assertRunningOnApple.js.map +0 -1
- package/build/esm/utils/helpers.js.map +0 -1
- package/build/esm/utils/index.js.map +0 -1
- package/build/esm/utils/useUpdateOnHMR.js +0 -18
- package/build/esm/utils/useUpdateOnHMR.js.map +0 -1
- package/build/esm/widgets/server-credentials.js +0 -11
- package/build/esm/widgets/server-credentials.js.map +0 -1
- package/build/esm/widgets/widget-api.js +0 -47
- package/build/esm/widgets/widget-api.js.map +0 -1
- package/build/types/VoltraModule.d.ts +0 -44
- package/build/types/VoltraModule.d.ts.map +0 -1
- package/build/types/components/VoltraLiveActivityPreview.d.ts.map +0 -1
- package/build/types/components/VoltraView.d.ts.map +0 -1
- package/build/types/components/VoltraWidgetPreview.d.ts.map +0 -1
- package/build/types/events.d.ts.map +0 -1
- package/build/types/helpers.d.ts.map +0 -1
- package/build/types/index.d.ts.map +0 -1
- package/build/types/live-activity/api.d.ts.map +0 -1
- package/build/types/logger.d.ts.map +0 -1
- package/build/types/preload.d.ts.map +0 -1
- package/build/types/types.d.ts.map +0 -1
- package/build/types/utils/assertRunningOnApple.d.ts.map +0 -1
- package/build/types/utils/helpers.d.ts.map +0 -1
- package/build/types/utils/index.d.ts.map +0 -1
- package/build/types/utils/useUpdateOnHMR.d.ts.map +0 -1
- package/build/types/widgets/server-credentials.d.ts.map +0 -1
- package/build/types/widgets/widget-api.d.ts.map +0 -1
- /package/build/{types → typescript/commonjs}/components/VoltraLiveActivityPreview.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/components/VoltraView.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/components/VoltraWidgetPreview.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/events.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/helpers.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/live-activity/api.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/logger.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/preload.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/types.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/assertRunningOnApple.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/helpers.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/index.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/useUpdateOnHMR.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/widgets/server-credentials.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/widgets/widget-api.d.ts +0 -0
- /package/{build → expo-plugin/build}/cjs/package.json +0 -0
- /package/{build → expo-plugin/build}/cjs/types.js +0 -0
- /package/{build → expo-plugin/build}/cjs/types.js.map +0 -0
- /package/{build → expo-plugin/build}/esm/package.json +0 -0
- /package/{build → expo-plugin/build}/esm/types.js +0 -0
- /package/{build → expo-plugin/build}/esm/types.js.map +0 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addXCConfigurationList = addXCConfigurationList;
|
|
4
|
+
exports.ensureXCConfigurationList = ensureXCConfigurationList;
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
function createCommonBuildSettings(options) {
|
|
7
|
+
const { targetName, bundleIdentifier, deploymentTarget, codeSignStyle, developmentTeam, provisioningProfileSpecifier, } = options;
|
|
8
|
+
const commonBuildSettings = {
|
|
9
|
+
PRODUCT_NAME: `"$(TARGET_NAME)"`,
|
|
10
|
+
SWIFT_VERSION: constants_1.IOS.SWIFT_VERSION,
|
|
11
|
+
TARGETED_DEVICE_FAMILY: `"${constants_1.IOS.DEVICE_FAMILY}"`,
|
|
12
|
+
INFOPLIST_FILE: `${targetName}/Info.plist`,
|
|
13
|
+
INFOPLIST_OUTPUT_FORMAT: `"xml"`,
|
|
14
|
+
CURRENT_PROJECT_VERSION: `"1"`,
|
|
15
|
+
MARKETING_VERSION: `"1.0"`,
|
|
16
|
+
IPHONEOS_DEPLOYMENT_TARGET: `"${deploymentTarget}"`,
|
|
17
|
+
PRODUCT_BUNDLE_IDENTIFIER: `"${bundleIdentifier}"`,
|
|
18
|
+
SWIFT_OPTIMIZATION_LEVEL: `"-Onone"`,
|
|
19
|
+
CODE_SIGN_ENTITLEMENTS: `"${targetName}/${targetName}.entitlements"`,
|
|
20
|
+
APPLICATION_EXTENSION_API_ONLY: '"YES"',
|
|
21
|
+
ASSETCATALOG_COMPILER_APPICON_NAME: '""',
|
|
22
|
+
};
|
|
23
|
+
// Synchronize code signing settings from main app target
|
|
24
|
+
if (codeSignStyle) {
|
|
25
|
+
commonBuildSettings.CODE_SIGN_STYLE = `"${codeSignStyle}"`;
|
|
26
|
+
}
|
|
27
|
+
if (developmentTeam) {
|
|
28
|
+
commonBuildSettings.DEVELOPMENT_TEAM = `"${developmentTeam}"`;
|
|
29
|
+
}
|
|
30
|
+
if (provisioningProfileSpecifier) {
|
|
31
|
+
commonBuildSettings.PROVISIONING_PROFILE_SPECIFIER = `"${provisioningProfileSpecifier}"`;
|
|
32
|
+
}
|
|
33
|
+
return commonBuildSettings;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Adds the XCConfigurationList for the widget extension target.
|
|
37
|
+
*/
|
|
38
|
+
function addXCConfigurationList(xcodeProject, options) {
|
|
39
|
+
const { targetName } = options;
|
|
40
|
+
const commonBuildSettings = createCommonBuildSettings(options);
|
|
41
|
+
const buildConfigurationsList = [
|
|
42
|
+
{
|
|
43
|
+
name: 'Debug',
|
|
44
|
+
isa: 'XCBuildConfiguration',
|
|
45
|
+
buildSettings: {
|
|
46
|
+
...commonBuildSettings,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'Release',
|
|
51
|
+
isa: 'XCBuildConfiguration',
|
|
52
|
+
buildSettings: {
|
|
53
|
+
...commonBuildSettings,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
const xCConfigurationList = xcodeProject.addXCConfigurationList(buildConfigurationsList, 'Release', `Build configuration list for PBXNativeTarget "${targetName}"`);
|
|
58
|
+
return xCConfigurationList;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Ensures an existing XCConfigurationList is updated, or adds a new one if missing.
|
|
62
|
+
*/
|
|
63
|
+
function ensureXCConfigurationList(xcodeProject, options, existingConfigurationListId) {
|
|
64
|
+
const configurationListId = typeof existingConfigurationListId === 'string'
|
|
65
|
+
? existingConfigurationListId.split(' ')[0]
|
|
66
|
+
: existingConfigurationListId?.value?.split(' ')[0];
|
|
67
|
+
const configurationLists = xcodeProject.pbxXCConfigurationList();
|
|
68
|
+
const configurationList = configurationListId ? configurationLists?.[configurationListId] : null;
|
|
69
|
+
if (!configurationList || !configurationList.buildConfigurations) {
|
|
70
|
+
return addXCConfigurationList(xcodeProject, options);
|
|
71
|
+
}
|
|
72
|
+
const commonBuildSettings = createCommonBuildSettings(options);
|
|
73
|
+
const buildConfigurations = configurationList.buildConfigurations;
|
|
74
|
+
const buildConfigurationSection = xcodeProject.pbxXCBuildConfigurationSection();
|
|
75
|
+
for (const configRef of buildConfigurations) {
|
|
76
|
+
const configId = typeof configRef === 'string' ? configRef.split(' ')[0] : configRef.value?.split(' ')[0];
|
|
77
|
+
if (!configId) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const buildConfiguration = buildConfigurationSection[configId];
|
|
81
|
+
if (!buildConfiguration) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
buildConfiguration.buildSettings = {
|
|
85
|
+
...(buildConfiguration.buildSettings ?? {}),
|
|
86
|
+
...commonBuildSettings,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
return { uuid: configurationListId };
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=configurationList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurationList.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/configurationList.ts"],"names":[],"mappings":";;AAwDA,wDA4BC;AAKD,8DAqCC;AA5HD,+CAAqC;AAWrC,SAAS,yBAAyB,CAAC,OAAoC;IACrE,MAAM,EACJ,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,4BAA4B,GAC7B,GAAG,OAAO,CAAA;IAEX,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ACzG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,SAAQ;QACV,CAAC;QACD,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,QAAQ,CAAC,CAAA;QAC9D,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,SAAQ;QACV,CAAC;QAED,kBAAkB,CAAC,aAAa,GAAG;YACjC,GAAG,CAAC,kBAAkB,CAAC,aAAa,IAAI,EAAE,CAAC;YAC3C,GAAG,mBAAmB;SACvB,CAAA;IACH,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAA;AACtC,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addPbxGroup = addPbxGroup;
|
|
4
|
+
exports.ensurePbxGroup = ensurePbxGroup;
|
|
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;
|
|
11
|
+
const { swiftFiles, intentFiles, assetDirectories, entitlementFiles, plistFiles, localizedStringResources } = widgetFiles;
|
|
12
|
+
// Add PBX group with all widget files
|
|
13
|
+
const { uuid: pbxGroupUuid } = xcodeProject.addPbxGroup([
|
|
14
|
+
...swiftFiles,
|
|
15
|
+
...intentFiles,
|
|
16
|
+
...entitlementFiles,
|
|
17
|
+
...plistFiles,
|
|
18
|
+
...assetDirectories,
|
|
19
|
+
...localizedStringResources,
|
|
20
|
+
], targetName, targetName);
|
|
21
|
+
// Add PBXGroup to top level group
|
|
22
|
+
const groups = xcodeProject.hash.project.objects['PBXGroup'];
|
|
23
|
+
if (pbxGroupUuid) {
|
|
24
|
+
Object.keys(groups).forEach(function (key) {
|
|
25
|
+
if (groups[key].name === undefined && groups[key].path === undefined) {
|
|
26
|
+
xcodeProject.addToPbxGroup(pbxGroupUuid, key);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Ensures a PBXGroup exists for the widget extension files.
|
|
33
|
+
*/
|
|
34
|
+
function ensurePbxGroup(xcodeProject, options) {
|
|
35
|
+
const { targetName, widgetFiles } = options;
|
|
36
|
+
const { swiftFiles, intentFiles, assetDirectories, entitlementFiles, plistFiles, localizedStringResources } = widgetFiles;
|
|
37
|
+
const allFiles = [
|
|
38
|
+
...swiftFiles,
|
|
39
|
+
...intentFiles,
|
|
40
|
+
...entitlementFiles,
|
|
41
|
+
...plistFiles,
|
|
42
|
+
...assetDirectories,
|
|
43
|
+
...localizedStringResources,
|
|
44
|
+
];
|
|
45
|
+
const existingGroup = xcodeProject.pbxGroupByName(targetName);
|
|
46
|
+
if (!existingGroup) {
|
|
47
|
+
addPbxGroup(xcodeProject, options);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (!existingGroup.children) {
|
|
51
|
+
existingGroup.children = [];
|
|
52
|
+
}
|
|
53
|
+
for (const filePath of allFiles) {
|
|
54
|
+
const file = new pbxFile(filePath);
|
|
55
|
+
const fileRef = ensureFileReference(xcodeProject, filePath);
|
|
56
|
+
const alreadyInGroup = existingGroup.children.some((child) => child.value === fileRef || child.comment === file.basename);
|
|
57
|
+
if (!alreadyInGroup) {
|
|
58
|
+
existingGroup.children.push({ value: fileRef, comment: file.basename });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
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
|
+
//# sourceMappingURL=groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/groups.ts"],"names":[],"mappings":";;AAcA,kCA4BC;AAKD,wCAiCC;AA5ED,MAAM,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAO5C;;GAEG;AACH,SAAgB,WAAW,CAAC,YAA0B,EAAE,OAA2B;IACjF,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,OAAO,CAAA;IAC3C,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,wBAAwB,EAAE,GACzG,WAAW,CAAA;IAEb,sCAAsC;IACtC,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,YAAY,CAAC,WAAW,CACrD;QACE,GAAG,UAAU;QACb,GAAG,WAAW;QACd,GAAG,gBAAgB;QACnB,GAAG,UAAU;QACb,GAAG,gBAAgB;QACnB,GAAG,wBAAwB;KAC5B,EACD,UAAU,EACV,UAAU,CACX,CAAA;IAED,kCAAkC;IAClC,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IAC5D,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG;YACvC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,C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C;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;AAED,SAAS,mBAAmB,CAAC,YAA0B,EAAE,QAAgB;IACvE,MAAM,oBAAoB,GAAG,YAAY,CAAC,uBAAuB,EAAE,CAAA;IACnE,MAAM,IAAI,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAA;IAElC,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,SAAS,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;QACzF,IAAI,SAAS,KAAK,IAAI,CAAC,IAAI,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;YACtD,OAAO,GAAG,CAAA;QACZ,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"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.configureXcodeProject = void 0;
|
|
37
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const fileDiscovery_1 = require("../../utils/fileDiscovery");
|
|
40
|
+
const buildPhases_1 = require("./buildPhases");
|
|
41
|
+
const configurationList_1 = require("./configurationList");
|
|
42
|
+
const groups_1 = require("./groups");
|
|
43
|
+
const mainAppSettings_1 = require("./mainAppSettings");
|
|
44
|
+
const productFile_1 = require("./productFile");
|
|
45
|
+
const target_1 = require("./target");
|
|
46
|
+
/**
|
|
47
|
+
* Plugin step that configures the Xcode project for the widget extension.
|
|
48
|
+
*
|
|
49
|
+
* This:
|
|
50
|
+
* - Adds XCConfigurationList with Debug/Release configurations
|
|
51
|
+
* - Adds the product file (.appex)
|
|
52
|
+
* - Configures the native target
|
|
53
|
+
* - Adds build phases (Sources, CopyFiles, Frameworks, Resources)
|
|
54
|
+
* - Adds PBXGroup for widget files
|
|
55
|
+
*
|
|
56
|
+
* This should run after generateWidgetExtensionFiles so the files exist.
|
|
57
|
+
*/
|
|
58
|
+
const configureXcodeProject = (config, props) => {
|
|
59
|
+
const { targetName, bundleIdentifier, deploymentTarget } = props;
|
|
60
|
+
return (0, config_plugins_1.withXcodeProject)(config, (config) => {
|
|
61
|
+
if (config.modRequest.introspect) {
|
|
62
|
+
return config;
|
|
63
|
+
}
|
|
64
|
+
const xcodeProject = config.modResults;
|
|
65
|
+
const groupName = 'Embed Foundation Extensions';
|
|
66
|
+
// Check if target already exists
|
|
67
|
+
const nativeTargets = xcodeProject.pbxNativeTargetSection();
|
|
68
|
+
const existingTargetKey = xcodeProject.findTargetKey(targetName);
|
|
69
|
+
const existingTarget = existingTargetKey ? nativeTargets[existingTargetKey] : null;
|
|
70
|
+
const { platformProjectRoot } = config.modRequest;
|
|
71
|
+
const targetPath = path.join(platformProjectRoot, targetName);
|
|
72
|
+
const widgetFiles = (0, fileDiscovery_1.getIOSWidgetExtensionFiles)(targetPath, targetName);
|
|
73
|
+
// Read main app target settings to synchronize code signing
|
|
74
|
+
const mainAppSettings = (0, mainAppSettings_1.getMainAppTargetSettings)(xcodeProject);
|
|
75
|
+
// Use the deploymentTarget from plugin config (or default), ignore main app's deployment target
|
|
76
|
+
// This allows the widget extension to have its own deployment target independent of the main app
|
|
77
|
+
if (existingTarget && existingTargetKey) {
|
|
78
|
+
// Ensure configuration list is up to date
|
|
79
|
+
const xCConfigurationList = (0, configurationList_1.ensureXCConfigurationList)(xcodeProject, {
|
|
80
|
+
targetName,
|
|
81
|
+
bundleIdentifier,
|
|
82
|
+
deploymentTarget,
|
|
83
|
+
codeSignStyle: mainAppSettings?.codeSignStyle,
|
|
84
|
+
developmentTeam: mainAppSettings?.developmentTeam,
|
|
85
|
+
provisioningProfileSpecifier: mainAppSettings?.provisioningProfileSpecifier,
|
|
86
|
+
}, existingTarget.buildConfigurationList);
|
|
87
|
+
// Ensure product file exists
|
|
88
|
+
const productFile = (0, productFile_1.ensureProductFile)(xcodeProject, {
|
|
89
|
+
targetName,
|
|
90
|
+
groupName,
|
|
91
|
+
});
|
|
92
|
+
// Update target references
|
|
93
|
+
existingTarget.productReference = productFile.fileRef;
|
|
94
|
+
existingTarget.buildConfigurationList = xCConfigurationList.uuid;
|
|
95
|
+
existingTarget.productType = `"com.apple.product-type.app-extension"`;
|
|
96
|
+
existingTarget.name = targetName;
|
|
97
|
+
existingTarget.productName = targetName;
|
|
98
|
+
if (!existingTarget.buildPhases) {
|
|
99
|
+
existingTarget.buildPhases = [];
|
|
100
|
+
}
|
|
101
|
+
// Ensure build phases and groups
|
|
102
|
+
(0, buildPhases_1.ensureBuildPhases)(xcodeProject, {
|
|
103
|
+
targetUuid: existingTargetKey,
|
|
104
|
+
groupName,
|
|
105
|
+
productFile,
|
|
106
|
+
widgetFiles,
|
|
107
|
+
mainTargetUuid: xcodeProject.getFirstTarget().uuid,
|
|
108
|
+
});
|
|
109
|
+
(0, groups_1.ensurePbxGroup)(xcodeProject, {
|
|
110
|
+
targetName,
|
|
111
|
+
widgetFiles,
|
|
112
|
+
});
|
|
113
|
+
(0, target_1.ensureTargetAttributes)(xcodeProject, existingTargetKey);
|
|
114
|
+
(0, target_1.ensureTargetDependency)(xcodeProject, existingTargetKey);
|
|
115
|
+
return config;
|
|
116
|
+
}
|
|
117
|
+
// Add configuration list
|
|
118
|
+
const targetUuid = xcodeProject.generateUuid();
|
|
119
|
+
const xCConfigurationList = (0, configurationList_1.addXCConfigurationList)(xcodeProject, {
|
|
120
|
+
targetName,
|
|
121
|
+
bundleIdentifier,
|
|
122
|
+
deploymentTarget,
|
|
123
|
+
codeSignStyle: mainAppSettings?.codeSignStyle,
|
|
124
|
+
developmentTeam: mainAppSettings?.developmentTeam,
|
|
125
|
+
provisioningProfileSpecifier: mainAppSettings?.provisioningProfileSpecifier,
|
|
126
|
+
});
|
|
127
|
+
// Add product file
|
|
128
|
+
const productFile = (0, productFile_1.addProductFile)(xcodeProject, {
|
|
129
|
+
targetName,
|
|
130
|
+
groupName,
|
|
131
|
+
});
|
|
132
|
+
// Configure target (native target, project section, dependency)
|
|
133
|
+
(0, target_1.configureTarget)(xcodeProject, {
|
|
134
|
+
targetName,
|
|
135
|
+
targetUuid,
|
|
136
|
+
productFile,
|
|
137
|
+
xCConfigurationList,
|
|
138
|
+
});
|
|
139
|
+
// Add build phases
|
|
140
|
+
(0, buildPhases_1.addBuildPhases)(xcodeProject, {
|
|
141
|
+
targetUuid,
|
|
142
|
+
groupName,
|
|
143
|
+
productFile,
|
|
144
|
+
widgetFiles,
|
|
145
|
+
});
|
|
146
|
+
// Add PBX group
|
|
147
|
+
(0, groups_1.addPbxGroup)(xcodeProject, {
|
|
148
|
+
targetName,
|
|
149
|
+
widgetFiles,
|
|
150
|
+
});
|
|
151
|
+
return config;
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
exports.configureXcodeProject = configureXcodeProject;
|
|
155
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAqE;AACrE,2CAA4B;AAE5B,6DAAsE;AACtE,+CAAiE;AACjE,2DAAuF;AACvF,qCAAsD;AACtD,uDAA4D;AAC5D,+CAAiE;AACjE,qCAA0F;AAQ1F;;;;;;;;;;;GAWG;AACI,MAAM,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AC5E,CAAC,CAAA;QAEF,mBAAmB;QACnB,MAAM,WAAW,GAAG,IAAA,4BAAc,EAAC,YAAY,EAAE;YAC/C,UAAU;YACV,SAAS;SACV,CAAC,CAAA;QAEF,gEAAgE;QAChE,IAAA,wBAAe,EAAC,YAAY,EAAE;YAC5B,UAAU;YACV,UAAU;YACV,WAAW;YACX,mBAAmB;SACpB,CAAC,CAAA;QAEF,mBAAmB;QACnB,IAAA,4BAAc,EAAC,YAAY,EAAE;YAC3B,UAAU;YACV,SAAS;YACT,WAAW;YACX,WAAW;SACZ,CAAC,CAAA;QAEF,gBAAgB;QAChB,IAAA,oBAAW,EAAC,YAAY,EAAE;YACxB,UAAU;YACV,WAAW;SACZ,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAvHY,QAAA,qBAAqB,yBAuHjC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMainAppTargetSettings = getMainAppTargetSettings;
|
|
4
|
+
/**
|
|
5
|
+
* Reads build settings from the main app target to synchronize code signing with the widget extension.
|
|
6
|
+
*
|
|
7
|
+
* @param xcodeProject The Xcode project instance
|
|
8
|
+
* @returns The main app target's build settings, or null if not found
|
|
9
|
+
*/
|
|
10
|
+
function getMainAppTargetSettings(xcodeProject) {
|
|
11
|
+
try {
|
|
12
|
+
const mainAppTarget = xcodeProject.getFirstTarget()?.firstTarget;
|
|
13
|
+
if (!mainAppTarget) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
// Get the build configuration list for the main app target
|
|
17
|
+
const buildConfigurationListId = mainAppTarget.buildConfigurationList;
|
|
18
|
+
if (!buildConfigurationListId) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
// Extract UUID from buildConfigurationListId (it might include a comment like "UUID /* comment */")
|
|
22
|
+
const buildConfigurationListUuid = buildConfigurationListId.split(' ')[0];
|
|
23
|
+
const buildConfigurationList = xcodeProject.hash.project.objects['XCConfigurationList']?.[buildConfigurationListUuid];
|
|
24
|
+
if (!buildConfigurationList || !buildConfigurationList.buildConfigurations) {
|
|
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) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const buildConfiguration = xcodeProject.hash.project.objects['XCBuildConfiguration']?.[firstConfigUuid];
|
|
38
|
+
if (!buildConfiguration || !buildConfiguration.buildSettings) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const buildSettings = buildConfiguration.buildSettings;
|
|
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) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
deploymentTarget,
|
|
61
|
+
codeSignStyle: codeSignStyle || undefined,
|
|
62
|
+
developmentTeam: developmentTeam || undefined,
|
|
63
|
+
provisioningProfileSpecifier: provisioningProfileSpecifier || undefined,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
// If we can't read the settings, return null and use fallback values
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=mainAppSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mainAppSettings.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/mainAppSettings.ts"],"names":[],"mappings":";;AAeA,4DA+EC;AArFD;;;;;GAKG;AACH,SAAgB,wBAAwB,CAAC,YAA0B;IACjE,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,YAAY,CAAC,cAAc,EAAE,EAAE,WAAW,CAAA;QAEhE,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,2DAA2D;QAC3D,MAAM,wBAAwB,GAAG,aAAa,CAAC,sBAAsB,CAAA;QACrE,IAAI,CAAC,wBAAwB,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAA;QACb,CAAC;QAED,oGAAoG;QACpG,MAAM,0BAA0B,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAEzE,MAAM,sBAAsB,GAC1B,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE,CAAC,0BAA0B,CAAC,CAA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QAEN,MAAM,eAAe,GACnB,aAAa,CAAC,gBAAgB,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;YACrD,aAAa,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;YACxD,IAAI,CAAA;QAEN,MAAM,4BAA4B,GAChC,aAAa,CAAC,8BAA8B,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;YACnE,aAAa,CAAC,gCAAgC,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;YACtE,IAAI,CAAA;QAEN,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,OAAO;YACL,gBAAgB;YAChB,aAAa,EAAE,aAAa,IAAI,SAAS;YACzC,eAAe,EAAE,eAAe,IAAI,SAAS;YAC7C,4BAA4B,EAAE,4BAA4B,IAAI,SAAS;SACxE,CAAA;IACH,CAAC;IAAC,MAAM,CAAC;QACP,qEAAqE;QACrE,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addProductFile = addProductFile;
|
|
4
|
+
exports.ensureProductFile = ensureProductFile;
|
|
5
|
+
function findProductFileReference(xcodeProject, targetName) {
|
|
6
|
+
const fileReferenceSection = xcodeProject.pbxFileReferenceSection();
|
|
7
|
+
const targetProductName = `${targetName}.appex`;
|
|
8
|
+
for (const key of Object.keys(fileReferenceSection)) {
|
|
9
|
+
if (/_comment$/.test(key)) {
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
const entry = fileReferenceSection[key];
|
|
13
|
+
const path = typeof entry?.path === 'string' ? entry.path.replace(/^"|"$/g, '') : '';
|
|
14
|
+
const name = typeof entry?.name === 'string' ? entry.name.replace(/^"|"$/g, '') : '';
|
|
15
|
+
if (path === targetProductName || name === targetProductName) {
|
|
16
|
+
return { fileRef: key };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
function findBuildFileForFileRef(xcodeProject, fileRef) {
|
|
22
|
+
const buildFileSection = xcodeProject.pbxBuildFileSection();
|
|
23
|
+
for (const key of Object.keys(buildFileSection)) {
|
|
24
|
+
if (/_comment$/.test(key)) {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
const entry = buildFileSection[key];
|
|
28
|
+
if (entry?.fileRef === fileRef) {
|
|
29
|
+
return { uuid: key };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Adds the product file (.appex) for the widget extension.
|
|
36
|
+
*/
|
|
37
|
+
function addProductFile(xcodeProject, options) {
|
|
38
|
+
const { targetName, groupName } = options;
|
|
39
|
+
const productFileOptions = {
|
|
40
|
+
basename: `${targetName}.appex`,
|
|
41
|
+
group: groupName,
|
|
42
|
+
explicitFileType: 'wrapper.app-extension',
|
|
43
|
+
settings: {
|
|
44
|
+
ATTRIBUTES: ['RemoveHeadersOnCopy'],
|
|
45
|
+
},
|
|
46
|
+
includeInIndex: 0,
|
|
47
|
+
path: `${targetName}.appex`,
|
|
48
|
+
sourceTree: 'BUILT_PRODUCTS_DIR',
|
|
49
|
+
};
|
|
50
|
+
const productFile = xcodeProject.addProductFile(targetName, productFileOptions);
|
|
51
|
+
return productFile;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Ensures the product file (.appex) exists and returns it.
|
|
55
|
+
*/
|
|
56
|
+
function ensureProductFile(xcodeProject, options) {
|
|
57
|
+
const { targetName, groupName } = options;
|
|
58
|
+
const existingFile = findProductFileReference(xcodeProject, targetName);
|
|
59
|
+
if (!existingFile) {
|
|
60
|
+
return addProductFile(xcodeProject, options);
|
|
61
|
+
}
|
|
62
|
+
const buildFile = findBuildFileForFileRef(xcodeProject, existingFile.fileRef);
|
|
63
|
+
const productFile = {
|
|
64
|
+
uuid: buildFile?.uuid ?? xcodeProject.generateUuid(),
|
|
65
|
+
fileRef: existingFile.fileRef,
|
|
66
|
+
basename: `${targetName}.appex`,
|
|
67
|
+
group: groupName,
|
|
68
|
+
};
|
|
69
|
+
if (!buildFile) {
|
|
70
|
+
xcodeProject.addToPbxBuildFileSection(productFile);
|
|
71
|
+
}
|
|
72
|
+
return productFile;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=productFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productFile.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/productFile.ts"],"names":[],"mappings":";;AA8CA,wCAkBC;AAKD,8CAqBC;AAnFD,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,OAAO,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAEpF,IAAI,IAAI,KAAK,iBAA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AU,EAAE,SAAS,EAAE,GAAG,OAAO,CAAA;IACzC,MAAM,YAAY,GAAG,wBAAwB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IAEvE,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,cAAc,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;IAC9C,CAAC;IAED,MAAM,SAAS,GAAG,uBAAuB,CAAC,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,CAAA;IAC7E,MAAM,WAAW,GAAG;QAClB,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,YAAY,CAAC,YAAY,EAAE;QACpD,OAAO,EAAE,YAAY,CAAC,OAAO;QAC7B,QAAQ,EAAE,GAAG,UAAU,QAAQ;QAC/B,KAAK,EAAE,SAAS;KACjB,CAAA;IAED,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,YAAY,CAAC,wBAAwB,CAAC,WAAkB,CAAC,CAAA;IAC3D,CAAC;IAED,OAAO,WAAW,CAAA;AACpB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureTarget = configureTarget;
|
|
4
|
+
exports.ensureTargetAttributes = ensureTargetAttributes;
|
|
5
|
+
exports.ensureTargetDependency = ensureTargetDependency;
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Main Function
|
|
9
|
+
// ============================================================================
|
|
10
|
+
/**
|
|
11
|
+
* Configures the widget extension target in the Xcode project.
|
|
12
|
+
*
|
|
13
|
+
* This:
|
|
14
|
+
* - Adds the target to PBXNativeTarget section
|
|
15
|
+
* - Adds the target to PBXProject section
|
|
16
|
+
* - Adds a dependency from the main app to the widget extension
|
|
17
|
+
*/
|
|
18
|
+
function configureTarget(xcodeProject, options) {
|
|
19
|
+
const target = addToPbxNativeTargetSection(xcodeProject, options);
|
|
20
|
+
addToPbxProjectSection(xcodeProject, target);
|
|
21
|
+
addTargetDependency(xcodeProject, target);
|
|
22
|
+
return target;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Ensures target attributes (LastSwiftMigration) exist for the target.
|
|
26
|
+
*/
|
|
27
|
+
function ensureTargetAttributes(xcodeProject, targetUuid) {
|
|
28
|
+
const projectSection = xcodeProject.pbxProjectSection();
|
|
29
|
+
const firstProject = xcodeProject.getFirstProject();
|
|
30
|
+
if (!projectSection[firstProject.uuid].attributes.TargetAttributes) {
|
|
31
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes = {};
|
|
32
|
+
}
|
|
33
|
+
if (!projectSection[firstProject.uuid].attributes.TargetAttributes[targetUuid]) {
|
|
34
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes[targetUuid] = {
|
|
35
|
+
LastSwiftMigration: constants_1.IOS.LAST_SWIFT_MIGRATION,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Ensures a target dependency exists so the main app depends on the widget extension.
|
|
41
|
+
*/
|
|
42
|
+
function ensureTargetDependency(xcodeProject, targetUuid) {
|
|
43
|
+
if (!xcodeProject.hash.project.objects['PBXTargetDependency']) {
|
|
44
|
+
xcodeProject.hash.project.objects['PBXTargetDependency'] = {};
|
|
45
|
+
}
|
|
46
|
+
if (!xcodeProject.hash.project.objects['PBXContainerItemProxy']) {
|
|
47
|
+
xcodeProject.hash.project.objects['PBXContainerItemProxy'] = {};
|
|
48
|
+
}
|
|
49
|
+
const mainTargetUuid = xcodeProject.getFirstTarget().uuid;
|
|
50
|
+
const mainTarget = xcodeProject.pbxNativeTargetSection()[mainTargetUuid];
|
|
51
|
+
const existingDeps = mainTarget?.dependencies ?? [];
|
|
52
|
+
const targetDependencySection = xcodeProject.hash.project.objects['PBXTargetDependency'] || {};
|
|
53
|
+
const alreadyExists = existingDeps.some((dep) => {
|
|
54
|
+
const dependency = targetDependencySection[dep.value];
|
|
55
|
+
return dependency?.target === targetUuid;
|
|
56
|
+
});
|
|
57
|
+
if (!alreadyExists) {
|
|
58
|
+
xcodeProject.addTargetDependency(mainTargetUuid, [targetUuid]);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// ============================================================================
|
|
62
|
+
// Helper Functions
|
|
63
|
+
// ============================================================================
|
|
64
|
+
/**
|
|
65
|
+
* Adds the widget extension target to the PBXNativeTarget section.
|
|
66
|
+
*/
|
|
67
|
+
function addToPbxNativeTargetSection(xcodeProject, options) {
|
|
68
|
+
const { targetName, targetUuid, productFile, xCConfigurationList } = options;
|
|
69
|
+
const target = {
|
|
70
|
+
uuid: targetUuid,
|
|
71
|
+
pbxNativeTarget: {
|
|
72
|
+
isa: 'PBXNativeTarget',
|
|
73
|
+
name: targetName,
|
|
74
|
+
productName: targetName,
|
|
75
|
+
productReference: productFile.fileRef,
|
|
76
|
+
productType: `"com.apple.product-type.app-extension"`,
|
|
77
|
+
buildConfigurationList: xCConfigurationList.uuid,
|
|
78
|
+
buildPhases: [],
|
|
79
|
+
buildRules: [],
|
|
80
|
+
dependencies: [],
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
xcodeProject.addToPbxNativeTargetSection(target);
|
|
84
|
+
return target;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Adds the target to the PBXProject section.
|
|
88
|
+
*/
|
|
89
|
+
function addToPbxProjectSection(xcodeProject, target) {
|
|
90
|
+
xcodeProject.addToPbxProjectSection(target);
|
|
91
|
+
// Add target attributes to project section
|
|
92
|
+
const projectSection = xcodeProject.pbxProjectSection();
|
|
93
|
+
const firstProject = xcodeProject.getFirstProject();
|
|
94
|
+
if (!projectSection[firstProject.uuid].attributes.TargetAttributes) {
|
|
95
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes = {};
|
|
96
|
+
}
|
|
97
|
+
projectSection[firstProject.uuid].attributes.TargetAttributes[target.uuid] = {
|
|
98
|
+
LastSwiftMigration: constants_1.IOS.LAST_SWIFT_MIGRATION,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Adds a target dependency so the main app depends on the widget extension.
|
|
103
|
+
*/
|
|
104
|
+
function addTargetDependency(xcodeProject, target) {
|
|
105
|
+
if (!xcodeProject.hash.project.objects['PBXTargetDependency']) {
|
|
106
|
+
xcodeProject.hash.project.objects['PBXTargetDependency'] = {};
|
|
107
|
+
}
|
|
108
|
+
if (!xcodeProject.hash.project.objects['PBXContainerItemProxy']) {
|
|
109
|
+
xcodeProject.hash.project.objects['PBXContainerItemProxy'] = {};
|
|
110
|
+
}
|
|
111
|
+
xcodeProject.addTargetDependency(xcodeProject.getFirstTarget().uuid, [target.uuid]);
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/target.ts"],"names":[],"mappings":";;AAkCA,0CAMC;AAKD,wDAaC;AAKD,wDAqBC;AAlFD,+CAAqC;AAoBrC,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E;;;;;;;GAOG;AACH,SAAgB,eAAe,CAAC,YAA0B,EAAE,OAA+B;IACzF,MAAM,MAAM,GAAG,2BAA2B,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;IACjE,sBAAsB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;IAC5C,mBAAmB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;IAEzC,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;GAEG;AACH,SAAgB,sBAAsB,CAAC,YAA0B,EAAE,UAAkB;IACnF,MAAM,cAAc,GAAG,YAAY,CAAC,iBAAiB,EAAE,CAAA;IACvD,MAAM,YAAY,GAAG,YAAY,CAAC,eAAe,EAAE,CAAA;IAEnD,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,gBAAgB,EAAE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