peachsim 0.1.1674 → 0.1.1692
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/cli/commands/control.ts +13 -1
- package/cli/commands/coverage-swift.ts +150 -27
- package/cli/commands/coverage.ts +219 -20
- package/cli/commands/detect.ts +10 -6
- package/cli/commands/inspect/actions.ts +1 -0
- package/cli/commands/inspect/core.ts +2 -0
- package/cli/commands/inspect/wait-ready.ts +7 -0
- package/cli/commands/screenshot.ts +12 -0
- package/cli/outbound-endpoints.ts +12 -0
- package/detox/index.ts +11 -1
- package/detox/jest-environment.cjs +14 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +4833 -2432
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +6 -4
- package/dist-lib/detox/jest-environment.cjs +14 -0
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +3785 -1737
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +4253 -2205
- package/dist-lib/host/fetch-proxy-handler.cjs +20 -7
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +2065 -796
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +6325 -4287
- package/dist-lib/native-app-identity-project.cjs +192 -55
- package/dist-lib/native-app-identity-project.mjs +235 -86
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +27 -23
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +156 -87
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +3 -2
- package/dist-lib/sdk.mjs +3 -2
- package/dist-lib/skills.cjs +5036 -2833
- package/dist-lib/swift-compile.cjs +2937 -437
- package/dist-lib/swift-compile.mjs +2932 -435
- package/dist-lib/swift-package.cjs +137 -49
- package/dist-lib/swift-package.mjs +132 -49
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +26 -11
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +6005 -1725
- package/dist-lib/vite.cjs +1911 -776
- package/dist-lib/worklet-executable.cjs +7 -4
- package/dist-lib/worklet-executable.mjs +7 -4
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +24 -2
- package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +11 -3
- package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +6 -0
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +8 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -2
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +60 -2
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLAvailability.h +22 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBackgroundActivitySession.h +145 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityCondition.h +113 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +225 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBody.h +26 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularGeographicCondition.h +59 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +64 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCondition.h +48 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h +24 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +117 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocation.h +9 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +45 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +877 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +225 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceError.h +33 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceExtension.h +28 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationUpdater.h +250 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitor.h +140 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitorConfiguration.h +77 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringEvent.h +184 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringRecord.h +57 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLServiceSession.h +211 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +66 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h +46 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Modules/module.modulemap +7 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +117 -2
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h +52 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +240 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h +474 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h +66 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap +10 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFComposeAssistantViewController.h +29 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeControllerDeferredAction.h +14 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +162 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailDraft.h +24 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController+UPI.h +31 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +169 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MessageUI.h +13 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Modules/module.modulemap +11 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4AccelerationStructure.h +9 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Archive.h +16 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ArgumentTable.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h +14 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandAllocator.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h +16 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CompilerTask.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4FunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkingDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MeshRenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPass.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4SpecializedFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4StitchedFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4TileRenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h +1212 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h +322 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h +224 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h +279 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h +199 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h +142 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h +266 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h +82 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h +113 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h +43 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h +449 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h +148 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h +102 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h +350 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h +90 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h +274 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h +225 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h +232 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h +39 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h +93 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h +1122 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h +36 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h +81 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLEvent.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h +30 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h +95 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h +131 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLGPUAddress.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h +284 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h +11 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h +157 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h +110 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h +549 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h +57 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h +65 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h +57 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h +342 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h +323 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +1068 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h +411 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h +788 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h +141 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h +307 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h +125 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h +85 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceViewPool.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h +252 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h +158 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h +460 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTextureViewPool.h +18 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h +125 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h +153 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h +45 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/Metal.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +10 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTDefines.h +35 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h +33 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTType.h +504 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLEssentialsAvailability.h +14 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +444 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/LocationEssentials.h +14 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Modules/module.modulemap +14 -0
- package/sdk/ios/usr/include/arm/param.h +151 -0
- package/sdk/ios/usr/include/complex.h +167 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +8 -0
- package/sdk/ios/usr/include/dlfcn.h +1 -2
- package/sdk/ios/usr/include/mach/mach_types.h +1 -0
- package/sdk/ios/usr/include/machine/param.h +42 -0
- package/sdk/ios/usr/include/math.h +835 -2
- package/sdk/ios/usr/include/net/if.h +1 -2
- package/sdk/ios/usr/include/peach/pthread.h +4 -4
- package/sdk/ios/usr/include/pthread/qos.h +304 -0
- package/sdk/ios/usr/include/sys/_types/_fd_clr.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_copy.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_def.h +121 -0
- package/sdk/ios/usr/include/sys/_types/_fd_isset.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_set.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_setsize.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_zero.h +31 -0
- package/sdk/ios/usr/include/sys/cdefs.h +3 -1
- package/sdk/ios/usr/include/sys/param.h +235 -0
- package/sdk/ios/usr/include/sys/proc.h +1 -0
- package/sdk/ios/usr/include/sys/qos.h +151 -12
- package/sdk/ios/wasm/include/__typedef_sigset_t.h +7 -0
- package/sdk/ios/wasm/include/fcntl.h +11 -0
- package/sdk/ios/wasm/include/mach/machine/boolean.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/exception.h +5 -0
- package/sdk/ios/wasm/include/mach/machine/kern_return.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/processor_info.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/rpc.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/thread_state.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/thread_status.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_param.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_types.h +18 -0
- package/sdk/ios/wasm/include/machine/_types.h +153 -0
- package/sdk/ios/wasm/include/machine/endian.h +2 -0
- package/sdk/ios/wasm/include/machine/limits.h +2 -0
- package/sdk/ios/wasm/include/machine/types.h +30 -0
- package/sdk/ios/wasm/include/poll.h +8 -0
- package/sdk/ios/wasm/include/pthread.h +50 -0
- package/sdk/ios/wasm/include/signal.h +72 -0
- package/sdk/ios/wasm/include/stdlib.h +3 -0
- package/sdk/ios/wasm/include/string.h +10 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_attr_t.h +7 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_t.h +7 -0
- package/sdk/ios/wasm/include/sys/mman.h +122 -0
- package/sdk/ios/wasm/include/sys/select.h +37 -0
- package/sdk/ios/wasm/include/sys/signal.h +259 -0
- package/sdk/ios/wasm/include/sys/socket.h +8 -0
- package/sdk/ios/wasm/include/sys/types.h +14 -0
- package/sdk/ios/wasm/include/sys/ucontext.h +1 -0
- package/sdk/ios/wasm/include/sys/uio.h +11 -0
- package/sdk/ios/wasm/include/sys/wait.h +89 -0
- package/sdk/ios/wasm/include/time.h +8 -0
- package/sdk/ios/wasm/include/unistd.h +17 -0
- package/src/bridge-contract.ts +2 -0
- package/src/chromium-admission.ts +10 -5
- package/src/device-catalog.ts +4 -4
- package/src/generated/swift-c-predefines.json +1988 -0
- package/src/host/fetch-proxy-handler.ts +20 -0
- package/src/metro-plugin.ts +5 -2
- package/src/nitro-adapter.lock.json +6 -6
- package/src/nitro-bundle.ts +1 -0
- package/src/nitro-compile.ts +67 -2
- package/src/nitroContract.ts +18 -2
- package/src/numbered-lock.ts +72 -0
- package/src/react-native-coverage/capability-reference-resolution.ts +62 -5
- package/src/react-native-coverage/capability-source-references.ts +50 -13
- package/src/react-native-coverage/native-source-credit.ts +126 -0
- package/src/react-native-coverage/native-source-ranges-file.ts +38 -0
- package/src/react-native-coverage/native-surface.ts +49 -0
- package/src/react-native-coverage/verified-reach.ts +22 -2
- package/src/runtime-assets.ts +17 -0
- package/src/swift-compile.ts +530 -97
- package/src/swift-coverage/indexing.ts +17 -1
- package/src/swift-coverage/package.ts +3 -1
- package/src/swift-coverage/sdk.ts +71 -0
- package/src/swift-coverage/source.ts +74 -2
- package/src/swift-coverage/types.ts +6 -0
- package/src/swift-coverage/xcode-assets.ts +62 -2
- package/src/swift-coverage/xcode-packages.ts +11 -6
- package/src/swift-distribution.lock.json +12 -12
- package/src/swift-host.ts +457 -62
- package/src/swift-objc-compile.ts +26 -26
- package/src/swift-objc-metadata.ts +2 -8
- package/src/swift-objc-platform.ts +53 -0
- package/src/swift-objc-standin.ts +66 -12
- package/src/swift-package-manifest.ts +196 -28
- package/src/swift-package.ts +186 -60
- package/src/swift-packages.ts +298 -88
- package/src/swift-source-file.ts +10 -15
- package/src/swift-source-pods.ts +288 -0
- package/src/swift-standins.ts +87 -13
- package/src/swift-submit.ts +5 -0
- package/src/swift-toolchain.ts +32 -10
- package/src/swiftContract.ts +160 -75
- package/src/target-matcher.ts +15 -2
- package/src/vite-plugin-one.ts +5 -4
- package/src/worker-system-chunks.ts +7 -1
- package/src/worklet-executable.ts +7 -3
- package/src/xcode-json-project.ts +14 -2
- package/src/xcode-project.ts +193 -69
package/src/xcode-project.ts
CHANGED
|
@@ -12,6 +12,8 @@ import { createHash } from 'node:crypto'
|
|
|
12
12
|
import fs from 'node:fs'
|
|
13
13
|
import path from 'node:path'
|
|
14
14
|
import plist from 'plist'
|
|
15
|
+
import { assetSymbolSettingKeys } from './swift-coverage/xcode-assets'
|
|
16
|
+
import { isSwiftNativeTranslationUnit, moduleMapName } from './swift-package'
|
|
15
17
|
import { readXcodeJsonProject } from './xcode-json-project'
|
|
16
18
|
import { visitXcodeTargetMembers, xcodePathResolver } from './xcode-target-members'
|
|
17
19
|
import type { SwiftLinkedProduct } from './swift-packages'
|
|
@@ -35,6 +37,11 @@ import {
|
|
|
35
37
|
} from './openstep-plist'
|
|
36
38
|
|
|
37
39
|
/** a target whose swift compiles as one module: the app, or a framework it builds. */
|
|
40
|
+
// the deployment target xcode resolves for a project that sets none (RAN:
|
|
41
|
+
// xcodebuild -showBuildSettings -sdk iphonesimulator, Xcode 27.1 27A9269, on a
|
|
42
|
+
// project without IPHONEOS_DEPLOYMENT_TARGET, printed 27.0 beside SDK_VERSION 27.1).
|
|
43
|
+
const XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET = '27.0'
|
|
44
|
+
|
|
38
45
|
export interface XcodeModuleTarget {
|
|
39
46
|
name: string
|
|
40
47
|
/** the module name the target's sources compile as. */
|
|
@@ -51,6 +58,8 @@ export interface XcodeModuleTarget {
|
|
|
51
58
|
defines: string[]
|
|
52
59
|
/** the resolved source iOS minimum, including for native package dependencies. */
|
|
53
60
|
iosDeploymentTarget: string | null
|
|
61
|
+
/** the build settings xcode's asset catalog compile reads, by name, empty ones omitted. */
|
|
62
|
+
assetSettings: Record<string, string>
|
|
54
63
|
/** original implementation inputs and clang settings, before any declaration import. */
|
|
55
64
|
objc?: {
|
|
56
65
|
headers: string[]
|
|
@@ -84,6 +93,8 @@ export interface XcodeAppTarget extends XcodeModuleTarget {
|
|
|
84
93
|
rootDir: string
|
|
85
94
|
/** every project file (project.pbxproj or project.xcproj) and xcconfig the app's build reads. */
|
|
86
95
|
projectFiles: string[]
|
|
96
|
+
/** the source root of every project the app builds, which owns its build directory. */
|
|
97
|
+
projectDirs: string[]
|
|
87
98
|
/** the target's processed launch plist, including generated build settings. */
|
|
88
99
|
infoPlist: string
|
|
89
100
|
infoPlistFile: string | null
|
|
@@ -98,7 +109,7 @@ export interface XcodeAppTarget extends XcodeModuleTarget {
|
|
|
98
109
|
linkedProducts: SwiftLinkedProduct[]
|
|
99
110
|
/** local package directories the workspace or a project references. */
|
|
100
111
|
localPackageDirs: string[]
|
|
101
|
-
/** prebuilt frameworks and
|
|
112
|
+
/** prebuilt frameworks and library module-map directories, at their declared paths. */
|
|
102
113
|
binaryFrameworks: { name: string; path: string | null }[]
|
|
103
114
|
/** workspace pins, or local package locks when the workspace has no lock. */
|
|
104
115
|
packageResolved: string[]
|
|
@@ -480,36 +491,42 @@ function targetSettings(
|
|
|
480
491
|
throw new Error(`${str(target.name)} has a cyclic build setting ${key}`)
|
|
481
492
|
resolving.add(marker)
|
|
482
493
|
const value = expand(levels[at]![key]!, (name) =>
|
|
483
|
-
name === 'inherited'
|
|
494
|
+
name === 'inherited' || name === key
|
|
495
|
+
? valueAt(key, at - 1)
|
|
496
|
+
: valueAt(name, levels.length - 1),
|
|
484
497
|
)
|
|
485
498
|
resolving.delete(marker)
|
|
486
499
|
return value
|
|
487
500
|
}
|
|
488
|
-
//
|
|
501
|
+
// export derived settings too, just as explicit project settings are exported.
|
|
502
|
+
const derivedSettings: Record<string, () => string> = {
|
|
503
|
+
PRODUCT_NAME: () => get('TARGET_NAME'),
|
|
504
|
+
PRODUCT_MODULE_NAME: () => applyOperator(get('PRODUCT_NAME'), 'c99extidentifier'),
|
|
505
|
+
EXECUTABLE_NAME: () => get('PRODUCT_NAME'),
|
|
506
|
+
// the native default of CoreBuildSystem.xcspec
|
|
507
|
+
EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES: () =>
|
|
508
|
+
'*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj',
|
|
509
|
+
}
|
|
510
|
+
const get = (key: string) => valueAt(key, levels.length - 1)
|
|
511
|
+
// signing prefixes expand in settings but are not default phase exports.
|
|
512
|
+
const teamPrefix = () => {
|
|
513
|
+
const team = get('DEVELOPMENT_TEAM')
|
|
514
|
+
return get('CODE_SIGNING_ALLOWED') !== 'NO' && team ? `${team}.` : ''
|
|
515
|
+
}
|
|
516
|
+
// xcode inherits environment values for settings its project does not define.
|
|
489
517
|
const derived = (key: string): string => {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
return applyOperator(get('PRODUCT_NAME'), 'c99extidentifier')
|
|
496
|
-
case 'EXECUTABLE_NAME':
|
|
497
|
-
return get('PRODUCT_NAME')
|
|
498
|
-
// the native default of CoreBuildSystem.xcspec
|
|
499
|
-
case 'EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES':
|
|
500
|
-
return '*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj'
|
|
501
|
-
case 'AppIdentifierPrefix':
|
|
502
|
-
case 'TeamIdentifierPrefix': {
|
|
503
|
-
// only a signed build has a team prefix
|
|
504
|
-
const team = get('DEVELOPMENT_TEAM')
|
|
505
|
-
return get('CODE_SIGNING_ALLOWED') !== 'NO' && team ? `${team}.` : ''
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
return ''
|
|
518
|
+
if (key === 'AppIdentifierPrefix' || key === 'TeamIdentifierPrefix')
|
|
519
|
+
return teamPrefix()
|
|
520
|
+
return Object.hasOwn(derivedSettings, key)
|
|
521
|
+
? derivedSettings[key]!()
|
|
522
|
+
: (process.env[key] ?? '')
|
|
509
523
|
}
|
|
510
524
|
return {
|
|
511
|
-
get
|
|
512
|
-
keys: new Set(
|
|
525
|
+
get,
|
|
526
|
+
keys: new Set([
|
|
527
|
+
...Object.keys(derivedSettings),
|
|
528
|
+
...levels.flatMap((values) => Object.keys(values)),
|
|
529
|
+
]),
|
|
513
530
|
xcconfigs,
|
|
514
531
|
}
|
|
515
532
|
}
|
|
@@ -615,6 +632,16 @@ function expand(value: string, lookup: (name: string) => string): string {
|
|
|
615
632
|
|
|
616
633
|
const preparedSourcePhases = new Map<string, string>()
|
|
617
634
|
|
|
635
|
+
// an xcfilelist names one path per line; blank lines and comments are skipped.
|
|
636
|
+
function fileListEntries(file: string, absolute: (raw: string) => string): string[] {
|
|
637
|
+
return fs
|
|
638
|
+
.readFileSync(file, 'utf8')
|
|
639
|
+
.split(/\r?\n/)
|
|
640
|
+
.map((line) => line.trim())
|
|
641
|
+
.filter((line) => line !== '' && !line.startsWith('#'))
|
|
642
|
+
.map(absolute)
|
|
643
|
+
}
|
|
644
|
+
|
|
618
645
|
// the swift sources and resources that are members of a target.
|
|
619
646
|
// metadata-only reads never execute scripts. opening a project prepares the
|
|
620
647
|
// declared swift outputs with the project's own shell and build settings.
|
|
@@ -654,13 +681,7 @@ function targetMembers(
|
|
|
654
681
|
if (!fs.existsSync(file)) {
|
|
655
682
|
return { file, entries: [] }
|
|
656
683
|
}
|
|
657
|
-
|
|
658
|
-
.readFileSync(file, 'utf8')
|
|
659
|
-
.split(/\r?\n/)
|
|
660
|
-
.map((line) => line.trim())
|
|
661
|
-
.filter((line) => line !== '' && !line.startsWith('#'))
|
|
662
|
-
.map(absolute)
|
|
663
|
-
return { file, entries }
|
|
684
|
+
return { file, entries: fileListEntries(file, absolute) }
|
|
664
685
|
})
|
|
665
686
|
fileLists.set(kind, lists)
|
|
666
687
|
}
|
|
@@ -733,6 +754,9 @@ function targetMembers(
|
|
|
733
754
|
fs.mkdirSync(phaseDir, { recursive: true })
|
|
734
755
|
fs.mkdirSync(settings('BUILT_PRODUCTS_DIR'), { recursive: true })
|
|
735
756
|
fs.mkdirSync(settings('DERIVED_FILE_DIR'), { recursive: true })
|
|
757
|
+
// xcode creates declared output directories before executing the script.
|
|
758
|
+
for (const output of allOutputs)
|
|
759
|
+
fs.mkdirSync(path.dirname(output), { recursive: true })
|
|
736
760
|
for (const [kind, lists] of fileLists)
|
|
737
761
|
lists.forEach((item, index) => {
|
|
738
762
|
fs.writeFileSync(
|
|
@@ -929,12 +953,14 @@ function workspaceProjects(
|
|
|
929
953
|
|
|
930
954
|
// one ref per target, so a target reached by a dependency and a link is visited once
|
|
931
955
|
const targetRefs = new WeakMap<LoadedProject, TargetRef[]>()
|
|
932
|
-
function
|
|
956
|
+
function projectTargets(project: LoadedProject): TargetRef[] {
|
|
933
957
|
let refs = targetRefs.get(project)
|
|
934
958
|
if (!refs) {
|
|
935
959
|
refs = list(project.project.targets).flatMap((id) => {
|
|
936
960
|
const target = project.object(id)
|
|
937
|
-
return target?.isa === 'PBXNativeTarget'
|
|
961
|
+
return target?.isa === 'PBXNativeTarget' || target?.isa === 'PBXAggregateTarget'
|
|
962
|
+
? [{ project, id, target }]
|
|
963
|
+
: []
|
|
938
964
|
})
|
|
939
965
|
targetRefs.set(project, refs)
|
|
940
966
|
}
|
|
@@ -974,7 +1000,7 @@ export function listXcodeAppTargets(
|
|
|
974
1000
|
options: { requireSources?: boolean } = {},
|
|
975
1001
|
): string[] {
|
|
976
1002
|
return workspaceProjects(xcodeprojOrWorkspace)
|
|
977
|
-
.projects.flatMap(
|
|
1003
|
+
.projects.flatMap(projectTargets)
|
|
978
1004
|
.filter((ref) => isIosAppTarget(ref, options))
|
|
979
1005
|
.map((ref) => str(ref.target.name) ?? ref.id)
|
|
980
1006
|
}
|
|
@@ -1048,7 +1074,7 @@ export function readXcodeScheme(
|
|
|
1048
1074
|
(candidate) =>
|
|
1049
1075
|
fs.existsSync(projectPath) && candidate.xcodeproj === fs.realpathSync(projectPath),
|
|
1050
1076
|
)
|
|
1051
|
-
const target = project &&
|
|
1077
|
+
const target = project && projectTargets(project).find((ref) => ref.id === blueprint)
|
|
1052
1078
|
const name = target && str(target.target.name)
|
|
1053
1079
|
if (!name) throw new Error(`scheme ${scheme} runs a target no project here declares`)
|
|
1054
1080
|
return { target: name, configuration }
|
|
@@ -1080,7 +1106,7 @@ export function readXcodeAppTarget(
|
|
|
1080
1106
|
xcodeprojOrWorkspace,
|
|
1081
1107
|
options.installedPods,
|
|
1082
1108
|
)
|
|
1083
|
-
const allTargets = projects.flatMap(
|
|
1109
|
+
const allTargets = projects.flatMap(projectTargets)
|
|
1084
1110
|
const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options))
|
|
1085
1111
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id)
|
|
1086
1112
|
const container = path.basename(xcodeprojOrWorkspace)
|
|
@@ -1125,7 +1151,7 @@ export function readXcodeAppTarget(
|
|
|
1125
1151
|
: undefined
|
|
1126
1152
|
const remote = str(proxy.remoteGlobalIDString)
|
|
1127
1153
|
if (!owner || !remote) return undefined
|
|
1128
|
-
return
|
|
1154
|
+
return projectTargets(owner).find(
|
|
1129
1155
|
(ref) => ref.id === remote || str(ref.target.productReference) === remote,
|
|
1130
1156
|
)
|
|
1131
1157
|
}
|
|
@@ -1136,7 +1162,7 @@ export function readXcodeAppTarget(
|
|
|
1136
1162
|
const dependency = project.object(dependencyId)
|
|
1137
1163
|
const direct = str(dependency?.target)
|
|
1138
1164
|
const resolved = direct
|
|
1139
|
-
?
|
|
1165
|
+
? projectTargets(project).find((candidate) => candidate.id === direct)
|
|
1140
1166
|
: proxied(project, str(dependency?.targetProxy))
|
|
1141
1167
|
if (resolved) found.push(resolved)
|
|
1142
1168
|
}
|
|
@@ -1154,8 +1180,10 @@ export function readXcodeAppTarget(
|
|
|
1154
1180
|
if (resolved) found.push(resolved)
|
|
1155
1181
|
}
|
|
1156
1182
|
}
|
|
1157
|
-
return found.filter(
|
|
1158
|
-
|
|
1183
|
+
return found.filter(
|
|
1184
|
+
(candidate) =>
|
|
1185
|
+
candidate.target.isa === 'PBXAggregateTarget' ||
|
|
1186
|
+
MODULE_PRODUCTS.has(str(candidate.target.productType) ?? ''),
|
|
1159
1187
|
)
|
|
1160
1188
|
}
|
|
1161
1189
|
const order: TargetRef[] = []
|
|
@@ -1207,7 +1235,7 @@ export function readXcodeAppTarget(
|
|
|
1207
1235
|
const cached = projectHeaderMaps.get(project)
|
|
1208
1236
|
if (cached) return cached
|
|
1209
1237
|
const entries = new Map<string, string>()
|
|
1210
|
-
for (const ref of
|
|
1238
|
+
for (const ref of projectTargets(project)) {
|
|
1211
1239
|
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? '')
|
|
1212
1240
|
const product = framework ? productName(ref) : ''
|
|
1213
1241
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
@@ -1250,12 +1278,16 @@ export function readXcodeAppTarget(
|
|
|
1250
1278
|
configuration,
|
|
1251
1279
|
{
|
|
1252
1280
|
TARGET_NAME: name,
|
|
1281
|
+
TARGETNAME: '$(TARGET_NAME)',
|
|
1282
|
+
PROJECT: '$(PROJECT_NAME)',
|
|
1253
1283
|
PROJECT_NAME: path.basename(ref.project.xcodeproj, '.xcodeproj'),
|
|
1284
|
+
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
1254
1285
|
SRCROOT: ref.project.projectDir,
|
|
1255
1286
|
SOURCE_ROOT: ref.project.projectDir,
|
|
1256
1287
|
PROJECT_DIR: ref.project.projectDir,
|
|
1257
1288
|
SYMROOT: path.join(buildDir(ref.project), 'Products'),
|
|
1258
1289
|
BUILD_DIR: '$(SYMROOT)',
|
|
1290
|
+
BUILD_ROOT: '$(SYMROOT)',
|
|
1259
1291
|
OBJROOT: path.join(buildDir(ref.project), 'Intermediates.noindex'),
|
|
1260
1292
|
CONFIGURATION_BUILD_DIR:
|
|
1261
1293
|
'$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)',
|
|
@@ -1265,6 +1297,10 @@ export function readXcodeAppTarget(
|
|
|
1265
1297
|
CONFIGURATION_TEMP_DIR:
|
|
1266
1298
|
'$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)',
|
|
1267
1299
|
TARGET_TEMP_DIR: '$(CONFIGURATION_TEMP_DIR)/$(TARGET_NAME).build',
|
|
1300
|
+
TEMP_DIR: '$(TARGET_TEMP_DIR)',
|
|
1301
|
+
TEMP_FILES_DIR: '$(TEMP_DIR)',
|
|
1302
|
+
TEMP_FILE_DIR: '$(TEMP_DIR)',
|
|
1303
|
+
TEMP_ROOT: '$(OBJROOT)',
|
|
1268
1304
|
DERIVED_FILE_DIR: '$(TARGET_TEMP_DIR)/DerivedSources',
|
|
1269
1305
|
DERIVED_FILES_DIR: '$(DERIVED_FILE_DIR)',
|
|
1270
1306
|
PLATFORM_NAME: 'iphonesimulator',
|
|
@@ -1310,16 +1346,27 @@ export function readXcodeAppTarget(
|
|
|
1310
1346
|
'VERSION_INFO_PREFIX',
|
|
1311
1347
|
'VERSION_INFO_SUFFIX',
|
|
1312
1348
|
].filter((key) => settings(key))
|
|
1313
|
-
if (
|
|
1349
|
+
if (custom.length)
|
|
1314
1350
|
throw new Error(
|
|
1315
|
-
`${name}: Xcode generates ${path.basename(versioning)}
|
|
1351
|
+
`${name}: Xcode generates ${path.basename(versioning)} with ${custom.join(', ')}; peach does not model VERSION_INFO_* overrides`,
|
|
1316
1352
|
)
|
|
1353
|
+
// xcode's apple-generic unit, measured against xcodebuild: the symbol
|
|
1354
|
+
// base substitutes a leading character outside [A-Za-z_] with one `_`
|
|
1355
|
+
// ("2Fast" -> "_Fast") and every remaining character outside
|
|
1356
|
+
// [A-Za-z0-9_] with one `_`; the version number is the major component
|
|
1357
|
+
// verbatim ("0" when empty) with the all-digit minor component
|
|
1358
|
+
// stripped of leading zeros, later components dropped. whatever
|
|
1359
|
+
// results compiles or fails downstream exactly where xcode's own unit
|
|
1360
|
+
// would.
|
|
1361
|
+
const symbol = product.replace(/^[^A-Za-z_]/, '_').replace(/[^A-Za-z0-9_]/g, '_')
|
|
1362
|
+
const [major, minor] = version.split('.')
|
|
1363
|
+
const number = `${major === '' ? '0' : major}.${minor !== undefined && /^\d+$/.test(minor) ? minor.replace(/^0+(?=\d)/, '') : ''}`
|
|
1317
1364
|
const unit = [
|
|
1318
|
-
` extern const unsigned char ${
|
|
1319
|
-
` extern const double ${
|
|
1365
|
+
` extern const unsigned char ${symbol}VersionString[];`,
|
|
1366
|
+
` extern const double ${symbol}VersionNumber;`,
|
|
1320
1367
|
'',
|
|
1321
|
-
` const unsigned char ${
|
|
1322
|
-
` const double ${
|
|
1368
|
+
` const unsigned char ${symbol}VersionString[] __attribute__ ((used)) = "@(#)PROGRAM:${product} PROJECT:${settings('PROJECT_NAME')}-${version}" "\\n";`,
|
|
1369
|
+
` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
|
|
1323
1370
|
'',
|
|
1324
1371
|
].join('\n')
|
|
1325
1372
|
if (!fs.existsSync(versioning) || fs.readFileSync(versioning, 'utf8') !== unit) {
|
|
@@ -1330,9 +1377,7 @@ export function readXcodeAppTarget(
|
|
|
1330
1377
|
}
|
|
1331
1378
|
// any c-family unit, the versioning unit included, takes the objective-c
|
|
1332
1379
|
// implementation route.
|
|
1333
|
-
const implementations = allSources.filter(
|
|
1334
|
-
/\.(c|cc|cpp|cxx|m|mm)$/.test(file),
|
|
1335
|
-
)
|
|
1380
|
+
const implementations = allSources.filter(isSwiftNativeTranslationUnit)
|
|
1336
1381
|
const native = implementations.length > 0
|
|
1337
1382
|
// the header search xcode generates that peach does not model refuses
|
|
1338
1383
|
// here, before any unit compiles without it.
|
|
@@ -1347,7 +1392,7 @@ export function readXcodeAppTarget(
|
|
|
1347
1392
|
throw new Error(
|
|
1348
1393
|
`${name}: Xcode's generated-files header map, which lists headers its build rules and Run Script phases generate (${generatedHeaders.join(', ') || 'build rules'}), is not modeled`,
|
|
1349
1394
|
)
|
|
1350
|
-
const nonFramework =
|
|
1395
|
+
const nonFramework = projectTargets(ref.project).find(
|
|
1351
1396
|
(other) =>
|
|
1352
1397
|
!FRAMEWORK_PRODUCTS.has(str(other.target.productType) ?? '') &&
|
|
1353
1398
|
headerPhase(other).length > 0,
|
|
@@ -1410,6 +1455,14 @@ export function readXcodeAppTarget(
|
|
|
1410
1455
|
mainActorIsolation: settings('SWIFT_DEFAULT_ACTOR_ISOLATION') === 'MainActor',
|
|
1411
1456
|
defines: compilationConditions(settings),
|
|
1412
1457
|
iosDeploymentTarget: settings('IPHONEOS_DEPLOYMENT_TARGET') || null,
|
|
1458
|
+
assetSettings: {
|
|
1459
|
+
IPHONEOS_DEPLOYMENT_TARGET: XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET,
|
|
1460
|
+
...Object.fromEntries(
|
|
1461
|
+
['IPHONEOS_DEPLOYMENT_TARGET', ...assetSymbolSettingKeys].flatMap((key) =>
|
|
1462
|
+
settings(key) ? [[key, settings(key)]] : [],
|
|
1463
|
+
),
|
|
1464
|
+
),
|
|
1465
|
+
},
|
|
1413
1466
|
...(native
|
|
1414
1467
|
? {
|
|
1415
1468
|
objc: {
|
|
@@ -1517,10 +1570,14 @@ export function readXcodeAppTarget(
|
|
|
1517
1570
|
} satisfies XcodeModuleTarget,
|
|
1518
1571
|
}
|
|
1519
1572
|
}
|
|
1520
|
-
|
|
1521
|
-
|
|
1573
|
+
// dependencies prepare their generated sources before a consumer reads them.
|
|
1574
|
+
// aggregate targets run phases but do not contribute a compiled module.
|
|
1575
|
+
const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }))
|
|
1576
|
+
const { settings, keys: settingKeys, module } = builtTargets.at(-1)!
|
|
1577
|
+
const frameworkTargets = builtTargets
|
|
1522
1578
|
.slice(0, -1)
|
|
1523
|
-
.
|
|
1579
|
+
.filter(({ ref }) => ref.target.isa === 'PBXNativeTarget')
|
|
1580
|
+
.map(({ ref, module }) => ({ ref, framework: module }))
|
|
1524
1581
|
const frameworks = frameworkTargets.map(({ framework }) => framework)
|
|
1525
1582
|
// a development pod's sources sit outside the sandbox, where its podspec is
|
|
1526
1583
|
const podSourceDirs = frameworkTargets.flatMap(({ ref, framework }) =>
|
|
@@ -1588,8 +1645,8 @@ export function readXcodeAppTarget(
|
|
|
1588
1645
|
}
|
|
1589
1646
|
}
|
|
1590
1647
|
|
|
1591
|
-
// linked products
|
|
1592
|
-
//
|
|
1648
|
+
// linked products retain their package identity. an unqualified product
|
|
1649
|
+
// searches the packages the workspace's projects reference.
|
|
1593
1650
|
const localPackageDirs = [
|
|
1594
1651
|
...listed.filter((reference) => fs.existsSync(path.join(reference, 'Package.swift'))),
|
|
1595
1652
|
...projects.flatMap((project) =>
|
|
@@ -1624,27 +1681,76 @@ export function readXcodeAppTarget(
|
|
|
1624
1681
|
}),
|
|
1625
1682
|
),
|
|
1626
1683
|
]
|
|
1684
|
+
const remotePackageUrls = [
|
|
1685
|
+
...new Set(
|
|
1686
|
+
projects.flatMap((project) =>
|
|
1687
|
+
list(project.project.packageReferences).flatMap((id) => {
|
|
1688
|
+
const reference = project.object(id)
|
|
1689
|
+
const url = str(reference?.repositoryURL)
|
|
1690
|
+
return reference?.isa === 'XCRemoteSwiftPackageReference' && url ? [url] : []
|
|
1691
|
+
}),
|
|
1692
|
+
),
|
|
1693
|
+
),
|
|
1694
|
+
]
|
|
1627
1695
|
const linkedProducts: SwiftLinkedProduct[] = []
|
|
1696
|
+
const productReferences: { project: string; linked: SwiftLinkedProduct }[] = []
|
|
1697
|
+
const qualifiedProductKeys = new Set<string>()
|
|
1698
|
+
const linkedProductKeys = new Set<string>()
|
|
1628
1699
|
const binaryFrameworks = new Map<string, string | null>()
|
|
1700
|
+
for (const { ref, settings } of builtTargets) {
|
|
1701
|
+
const absolute = (raw: string) =>
|
|
1702
|
+
path.resolve(ref.project.projectDir, expand(raw, settings))
|
|
1703
|
+
// standalone clang modules are imported through swift's -I paths, even
|
|
1704
|
+
// when the native library is downloaded by a linker build phase.
|
|
1705
|
+
for (const raw of settingList(settings('SWIFT_INCLUDE_PATHS'))) {
|
|
1706
|
+
const dir = absolute(raw)
|
|
1707
|
+
const modulemap = path.join(dir, 'module.modulemap')
|
|
1708
|
+
if (!fs.existsSync(modulemap)) continue
|
|
1709
|
+
const name = moduleMapName(fs.readFileSync(modulemap, 'utf8'))
|
|
1710
|
+
if (name && !binaryFrameworks.has(name)) binaryFrameworks.set(name, dir)
|
|
1711
|
+
}
|
|
1712
|
+
// cocoapods copies vendored xcframeworks from script inputs rather than
|
|
1713
|
+
// listing them in the target's frameworks build phase.
|
|
1714
|
+
for (const phaseId of list(ref.target.buildPhases)) {
|
|
1715
|
+
const phase = ref.project.object(phaseId)
|
|
1716
|
+
if (phase?.isa !== 'PBXShellScriptBuildPhase') continue
|
|
1717
|
+
const inputs = list(phase.inputPaths).map(absolute)
|
|
1718
|
+
for (const raw of list(phase.inputFileListPaths)) {
|
|
1719
|
+
const file = absolute(raw)
|
|
1720
|
+
if (!fs.existsSync(file)) continue
|
|
1721
|
+
xcconfigs.add(file)
|
|
1722
|
+
inputs.push(...fileListEntries(file, absolute))
|
|
1723
|
+
}
|
|
1724
|
+
for (const file of inputs) {
|
|
1725
|
+
const name = /([^/]+)\.xcframework$/.exec(file)?.[1]
|
|
1726
|
+
if (name && !binaryFrameworks.has(name)) binaryFrameworks.set(name, file)
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1629
1730
|
for (const { project, target } of order) {
|
|
1731
|
+
const productRef = (id: string) => {
|
|
1732
|
+
const ref = str(project.object(id)?.productRef)
|
|
1733
|
+
return ref ? [ref] : []
|
|
1734
|
+
}
|
|
1630
1735
|
const productDependencies = [
|
|
1631
1736
|
...list(target.packageProductDependencies),
|
|
1632
|
-
...list(target.dependencies).flatMap(
|
|
1633
|
-
|
|
1634
|
-
|
|
1737
|
+
...list(target.dependencies).flatMap(productRef),
|
|
1738
|
+
...list(target.buildPhases).flatMap((id) => {
|
|
1739
|
+
const phase = project.object(id)
|
|
1740
|
+
return phase?.isa === 'PBXFrameworksBuildPhase'
|
|
1741
|
+
? list(phase.files).flatMap(productRef)
|
|
1742
|
+
: []
|
|
1635
1743
|
}),
|
|
1636
1744
|
]
|
|
1637
|
-
for (const dependencyId of productDependencies) {
|
|
1745
|
+
for (const dependencyId of new Set(productDependencies)) {
|
|
1638
1746
|
const dependency = project.object(dependencyId)
|
|
1639
1747
|
const product = str(dependency?.productName)?.replace(/^plugin:/, '')
|
|
1640
|
-
if (
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
)
|
|
1645
|
-
continue
|
|
1748
|
+
if (!dependency || !product)
|
|
1749
|
+
throw new Error(
|
|
1750
|
+
`${str(target.name) ?? 'target'}: package product dependency ${dependencyId} has no productName in ${project.projectFile}`,
|
|
1751
|
+
)
|
|
1646
1752
|
const reference = project.object(str(dependency.package))
|
|
1647
|
-
|
|
1753
|
+
const linked: SwiftLinkedProduct = {
|
|
1648
1754
|
product,
|
|
1649
1755
|
source:
|
|
1650
1756
|
reference?.isa === 'XCRemoteSwiftPackageReference'
|
|
@@ -1657,8 +1763,11 @@ export function readXcodeAppTarget(
|
|
|
1657
1763
|
str(reference.relativePath) ?? '',
|
|
1658
1764
|
),
|
|
1659
1765
|
}
|
|
1660
|
-
: { kind: 'unnamed' },
|
|
1661
|
-
}
|
|
1766
|
+
: { kind: 'unnamed', remoteUrls: remotePackageUrls },
|
|
1767
|
+
}
|
|
1768
|
+
productReferences.push({ project: project.projectFile, linked })
|
|
1769
|
+
if (linked.source.kind !== 'unnamed')
|
|
1770
|
+
qualifiedProductKeys.add(`${project.projectFile}\0${product}`)
|
|
1662
1771
|
}
|
|
1663
1772
|
// prebuilt frameworks the project vendors, as opposed to built products
|
|
1664
1773
|
// and the sdk's own
|
|
@@ -1683,6 +1792,20 @@ export function readXcodeAppTarget(
|
|
|
1683
1792
|
}
|
|
1684
1793
|
}
|
|
1685
1794
|
|
|
1795
|
+
for (const { project, linked } of productReferences) {
|
|
1796
|
+
// unqualified framework members share the project's qualified product
|
|
1797
|
+
// dependency, even when that dependency appears later in the file.
|
|
1798
|
+
if (
|
|
1799
|
+
linked.source.kind === 'unnamed' &&
|
|
1800
|
+
qualifiedProductKeys.has(`${project}\0${linked.product}`)
|
|
1801
|
+
)
|
|
1802
|
+
continue
|
|
1803
|
+
const key = JSON.stringify(linked)
|
|
1804
|
+
if (linkedProductKeys.has(key)) continue
|
|
1805
|
+
linkedProductKeys.add(key)
|
|
1806
|
+
linkedProducts.push(linked)
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1686
1809
|
// xcode keeps the pins in the workspace it opened: the named one, or the project's own
|
|
1687
1810
|
const resolvedFile = path.join(
|
|
1688
1811
|
workspace ?? path.join(xcodeprojOrWorkspace, 'project.xcworkspace'),
|
|
@@ -1722,6 +1845,7 @@ export function readXcodeAppTarget(
|
|
|
1722
1845
|
: []),
|
|
1723
1846
|
]),
|
|
1724
1847
|
].sort(),
|
|
1848
|
+
projectDirs: [...new Set(used.map((project) => project.projectDir))].sort(),
|
|
1725
1849
|
appIconName: settings('ASSETCATALOG_COMPILER_APPICON_NAME'),
|
|
1726
1850
|
infoPlist: plist.build(info),
|
|
1727
1851
|
infoPlistFile,
|