peachsim 0.1.1811 → 0.1.1812

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.
Files changed (102) hide show
  1. package/cli/cloud-client.ts +53 -23
  2. package/cli/commands/control.ts +9 -0
  3. package/cli/commands/platform.ts +11 -18
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +447 -371
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +1 -1
  27. package/dist-lib/detox/index.cjs +1 -1
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +122 -46
  30. package/dist-lib/expo-swift-metadata.cjs +1 -1
  31. package/dist-lib/expo-swift-metadata.mjs +1 -1
  32. package/dist-lib/home-paths.cjs +1 -1
  33. package/dist-lib/host/bridge-host.cjs +438 -362
  34. package/dist-lib/host/fetch-proxy-handler.cjs +1 -2
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  38. package/dist-lib/host/websocket-proxy.cjs +1 -1
  39. package/dist-lib/index.cjs +35 -12
  40. package/dist-lib/jump-to-source-babel.cjs +1 -1
  41. package/dist-lib/jump-to-source-native.cjs +1 -1
  42. package/dist-lib/kotlin-host.cjs +1 -1
  43. package/dist-lib/menu.cjs +1 -1
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +1 -1
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +35 -12
  50. package/dist-lib/native-app-identity-project.cjs +35 -11
  51. package/dist-lib/native-app-identity-project.mjs +35 -11
  52. package/dist-lib/native-app-identity.cjs +1 -1
  53. package/dist-lib/native-app-identity.mjs +1 -1
  54. package/dist-lib/native-firebase-metadata.cjs +1 -1
  55. package/dist-lib/native-firebase-metadata.mjs +1 -1
  56. package/dist-lib/pdfium-raster.cjs +1 -1
  57. package/dist-lib/pdfium-raster.mjs +1 -1
  58. package/dist-lib/plist.cjs +1 -1
  59. package/dist-lib/plist.mjs +1 -1
  60. package/dist-lib/profiles.cjs +1 -1
  61. package/dist-lib/public-brand.cjs +1 -1
  62. package/dist-lib/public-origins-lib-esm.json +24 -24
  63. package/dist-lib/public-origins-lib.json +53 -53
  64. package/dist-lib/react-native-host-modules.cjs +1 -1
  65. package/dist-lib/react-native-host-modules.mjs +1 -1
  66. package/dist-lib/reap-browser.cjs +1 -1
  67. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  68. package/dist-lib/sdk.cjs +1 -1
  69. package/dist-lib/sdk.mjs +1 -1
  70. package/dist-lib/skills.cjs +492 -389
  71. package/dist-lib/swift-compile.cjs +46 -11
  72. package/dist-lib/swift-compile.mjs +46 -11
  73. package/dist-lib/swift-package.cjs +12 -4
  74. package/dist-lib/swift-package.mjs +9 -3
  75. package/dist-lib/swift-submit.cjs +1 -1
  76. package/dist-lib/swift-submit.mjs +1 -1
  77. package/dist-lib/swift-toolchain.cjs +18 -1
  78. package/dist-lib/swift.cjs +1 -1
  79. package/dist-lib/vite-swift.cjs +75 -30
  80. package/dist-lib/vite.cjs +1 -2
  81. package/dist-lib/worklet-executable.cjs +1 -1
  82. package/dist-lib/worklet-executable.mjs +1 -1
  83. package/package.json +1 -1
  84. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISlider.h +1 -1
  85. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISplitViewController.h +12 -50
  86. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISplitViewControllerLayoutEnvironment.h +2 -8
  87. package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +62 -0
  88. package/sdk/ios/usr/include/module.modulemap +8 -3
  89. package/src/expo-native-workspace.ts +56 -27
  90. package/src/nitro-adapter.lock.json +265 -265
  91. package/src/nitro-superset.lock.json +14 -14
  92. package/src/nitroContract.ts +1 -0
  93. package/src/swift-compile.ts +20 -6
  94. package/src/swift-distribution.lock.json +9 -9
  95. package/src/swift-link-roots.ts +13 -2
  96. package/src/swift-objc-compile.ts +12 -0
  97. package/src/swift-objc-standin.ts +5 -2
  98. package/src/swift-package.ts +21 -1
  99. package/src/swift-toolchain.ts +17 -0
  100. package/src/turbo-bundle.ts +3 -4
  101. package/src/turbo-runtime.lock.json +20 -20
  102. package/src/xcode-project.ts +29 -12
@@ -77,6 +77,8 @@ import {
77
77
  clangImportNames,
78
78
  clangMacroSetting,
79
79
  clangSettingEntries,
80
+ fmtConstantInterpreterFlags,
81
+ withoutGlogModuleMap,
80
82
  SWIFT_NATIVE_SOURCE_EXTENSIONS,
81
83
  type SwiftPackageTarget,
82
84
  } from './swift-package'
@@ -1454,6 +1456,18 @@ export function swiftArtifactHash(
1454
1456
  return hash.digest('hex')
1455
1457
  }
1456
1458
 
1459
+ const nativeCxxCompilerFlags = ['-fno-cxx-modules']
1460
+
1461
+ // swiftpm gives every clang unit, c++ included, the target's cSettings flags.
1462
+ const cFlagArray = (flags: readonly string[]): string =>
1463
+ JSON.stringify(withoutGlogModuleMap(flags))
1464
+ const cxxFlagArray = (flags: readonly string[]): string =>
1465
+ JSON.stringify([
1466
+ ...nativeCxxCompilerFlags,
1467
+ ...fmtConstantInterpreterFlags(flags),
1468
+ ...withoutGlogModuleMap(flags),
1469
+ ])
1470
+
1457
1471
  interface SwiftNativeTargetPlan {
1458
1472
  path: string
1459
1473
  includeDirectory: string
@@ -1910,16 +1924,16 @@ export function emitSwiftPackageManifest(args: {
1910
1924
  )
1911
1925
  const nativeSettings = native?.clang
1912
1926
  ? [
1913
- `cSettings: [${cDefines} .unsafeFlags(${flagArray(JSON.stringify([...nativeFlags, ...native.clang.flags]))})]`,
1927
+ `cSettings: [${cDefines} .unsafeFlags(${flagArray(cFlagArray([...nativeFlags, ...native.clang.flags]))})]`,
1914
1928
  ...(nativeCxx
1915
1929
  ? [
1916
- `cxxSettings: [${cxxDefines} .unsafeFlags(${flagArray(JSON.stringify(['-fno-cxx-modules', ...cxxFlagsFor(nativeFlags), ...native.clang.cxxFlags]))})]`,
1930
+ `cxxSettings: [${cxxDefines} .unsafeFlags(${flagArray(cxxFlagArray([...cxxFlagsFor(nativeFlags), ...native.clang.cxxFlags]))})]`,
1917
1931
  ]
1918
1932
  : []),
1919
1933
  ].join(', ')
1920
1934
  : [
1921
- `cSettings: [${cDefines}${declaredClangSettings(target, 'c')} .unsafeFlags(${flagArray(JSON.stringify([...nativeFlags, ...(native?.flags ?? [])]))})]`,
1922
- `cxxSettings: [${cxxDefines}${declaredClangSettings(target, 'cxx')} .unsafeFlags(${flagArray(JSON.stringify(['-fno-cxx-modules', ...cxxFlagsFor(nativeFlags), ...(native?.cxxFlags ?? [])]))})]`,
1935
+ `cSettings: [${cDefines}${declaredClangSettings(target, 'c')} .unsafeFlags(${flagArray(cFlagArray([...nativeFlags, ...(native?.flags ?? [])]))})]`,
1936
+ `cxxSettings: [${cxxDefines}${declaredClangSettings(target, 'cxx')} .unsafeFlags(${flagArray(cxxFlagArray([...cxxFlagsFor(nativeFlags), ...(native?.cxxFlags ?? [])]))})]`,
1923
1937
  ].join(', ')
1924
1938
  const exclusions = native?.clang
1925
1939
  ? []
@@ -2006,10 +2020,10 @@ export function emitSwiftPackageManifest(args: {
2006
2020
  ` path: ${JSON.stringify(group.path)},`,
2007
2021
  ` sources: ${JSON.stringify(group.sources)},`,
2008
2022
  ' publicHeadersPath: "include",',
2009
- ` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, 'c')} .unsafeFlags(${flagArray(JSON.stringify([...nativeFlags, '-I', native.includeDirectory, '-I', args.headerDirectory, ...group.flags]))})],`,
2023
+ ` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, 'c')} .unsafeFlags(${flagArray(cFlagArray([...nativeFlags, '-I', native.includeDirectory, ...(args.headerDirectory ? ['-I', args.headerDirectory] : []), ...group.flags]))})],`,
2010
2024
  ...(group.sources.some((source) => /\.(?:cc|cpp|cxx|mm)$/.test(source))
2011
2025
  ? [
2012
- ` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, 'cxx')} .unsafeFlags(${flagArray(JSON.stringify(['-fno-cxx-modules', ...cxxFlagsFor(nativeFlags), ...group.cxxFlags]))})]),`,
2026
+ ` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, 'cxx')} .unsafeFlags(${flagArray(cxxFlagArray([...cxxFlagsFor(nativeFlags), ...group.cxxFlags]))})]),`,
2013
2027
  ]
2014
2028
  : [' ),']),
2015
2029
  ])
@@ -1,10 +1,10 @@
1
1
  {
2
- "id": "02d639ad58915e23",
3
- "release": "swift-6.4.0-RELEASE-custom-f6868fa6054e83d6",
2
+ "id": "af69e0877dcfc948",
3
+ "release": "swift-6.4.0-RELEASE-custom-a560ff35bf882b5c",
4
4
  "wasmSdkId": "swift-6.4.0-RELEASE_wasm-peach-5d385b68",
5
5
  "wasmSdkUrl": "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-5d385b68.artifactbundle.tar.gz",
6
6
  "wasmSdkChecksum": "d91882af99821a296c3db4459896b46ceaef37e9a30caad14e5f24cf6b964ae9",
7
- "source": "f02ffbc1528ffd01668f4070775e17be3276bf8f",
7
+ "source": "85e7a5155755f4400d2bd7010abdd09f62dd6f34",
8
8
  "targets": [
9
9
  "ImagePlayground",
10
10
  "QuickLookThumbnailing",
@@ -230,16 +230,16 @@
230
230
  },
231
231
  "hosts": {
232
232
  "darwin-arm64": {
233
- "sha256": "ebc19bfd827f24646f407e3f03229bb6abf4b25196630b08ecd47aa0e93124ce",
234
- "size": 99046695
233
+ "sha256": "dd96208b7ea40e1d8e93d61a716e30191a5e57800074e65837222c042617b96e",
234
+ "size": 99097618
235
235
  },
236
236
  "linux-x64": {
237
- "sha256": "3dfec8229ec882e90ff60b8ef3db267f2f405bb1bf36c1a7e61a3b0f09e02f67",
238
- "size": 101763946
237
+ "sha256": "bd0ef2a7d0fab414a415a9c2619c0c8c890b792856b1cbdb158a6f74b8d75502",
238
+ "size": 101817050
239
239
  },
240
240
  "linux-arm64": {
241
- "sha256": "4a272ebeed698230c8ade27e5f8e30282f1ff58c37eaaf08f9ed8bc82185c449",
242
- "size": 101257308
241
+ "sha256": "37006a7363e6af15a31c65afaa3d6e0480bdd59c5d835f923e44e69dcae81e53",
242
+ "size": 101308927
243
243
  }
244
244
  }
245
245
  }
@@ -21,14 +21,17 @@ const leb = (bytes: Uint8Array, at: { offset: number }): number => {
21
21
  }
22
22
  }
23
23
 
24
- // data segment name to its summed size in one wasm object, plus a sentinel when
25
- // the object defines a wasm-exported symbol. the linking section names each
24
+ // data segment name to its summed size in one wasm object, plus sentinels when
25
+ // the object defines a wasm-exported symbol or a named ObjC category. a Swift
26
+ // extension's category fills its segment's empty-terminator size exactly, so
27
+ // only its symbol shows it. the linking section names each
26
28
  // segment and the data section sizes them in the same order.
27
29
  function objcSegmentSizes(bytes: Uint8Array): Map<string, number> {
28
30
  const at = { offset: 8 }
29
31
  const names: string[] = []
30
32
  const sizes: number[] = []
31
33
  let hasExportedSymbol = false
34
+ let definesCategory = false
32
35
  while (at.offset < bytes.length) {
33
36
  const id = bytes[at.offset++]!
34
37
  const size = leb(bytes, at)
@@ -68,6 +71,13 @@ function objcSegmentSizes(bytes: Uint8Array): Map<string, number> {
68
71
  }
69
72
  } else if (symKind === 1) {
70
73
  const sLen = leb(bytes, at)
74
+ if (
75
+ !isUndef &&
76
+ Buffer.from(bytes.subarray(at.offset, at.offset + sLen))
77
+ .toString()
78
+ .startsWith('.objc_category_')
79
+ )
80
+ definesCategory = true
71
81
  at.offset += sLen
72
82
  if (!isUndef) {
73
83
  leb(bytes, at)
@@ -105,6 +115,7 @@ function objcSegmentSizes(bytes: Uint8Array): Map<string, number> {
105
115
  result.set(name, (result.get(name) ?? 0) + (sizes[index] ?? 0))
106
116
  })
107
117
  result.set('__wasm_exported', hasExportedSymbol ? 1 : 0)
118
+ result.set('__objc_category', definesCategory ? 1 : 0)
108
119
  return result
109
120
  }
110
121
 
@@ -12,6 +12,8 @@ import {
12
12
  swiftModuleSdk,
13
13
  swiftModuleDigest,
14
14
  swiftPeachModules,
15
+ swiftDistributionAt,
16
+ FOUNDATION_IMPLICIT_MODULES,
15
17
  } from './swift-compile'
16
18
  import { swiftModuleToolchain } from './swift-distribution'
17
19
  import { swiftClangImporterFlags } from './swift-objc-import'
@@ -22,6 +24,7 @@ import {
22
24
  SWIFT_NATIVE_SOURCE_EXTENSIONS,
23
25
  swiftTargetModuleName,
24
26
  } from './swift-package'
27
+ import { fmtConstantInterpreterFlags } from './swift-package'
25
28
  import { swiftPackageManifest, swiftTargetFiles } from './swift-package-manifest'
26
29
  import { remoteSwiftCheckouts, type SwiftPackageBinary } from './swift-packages'
27
30
  import { readPackageFile, relativeInside } from './swift-source-file'
@@ -808,6 +811,11 @@ export function prepareXcodeSwiftProducts(
808
811
  const sdk = swiftSdkPaths(moduleRoot, toolchain.toolchainBin)
809
812
  const frontend = path.join(toolchain.toolchainBin, 'swift-frontend')
810
813
  const supplied = new Set(swiftPeachModules(moduleRoot))
814
+ // every iOS source sees what darwin's Foundation re-exports, String: CVarArg
815
+ // included. a source checkout builds none of these modules.
816
+ const implicitImports = swiftDistributionAt(moduleRoot)
817
+ ? FOUNDATION_IMPLICIT_MODULES.flatMap((module) => ['-import-module', module])
818
+ : []
811
819
  const modules = path.join(moduleRoot, 'modules')
812
820
  const {
813
821
  sources,
@@ -1100,6 +1108,7 @@ export function prepareXcodeSwiftProducts(
1100
1108
  ...target.swift!.includePaths.flatMap((file) => ['-I', remap(file)]),
1101
1109
  ...clangFlags.flatMap((flag) => ['-Xcc', flag]),
1102
1110
  ...target.defines.flatMap((flag) => ['-D', flag]),
1111
+ ...implicitImports,
1103
1112
  ...(target.mainActorIsolation ? ['-default-isolation', 'MainActor'] : []),
1104
1113
  ...(target.swift!.cxxInterop ? ['-cxx-interoperability-mode=default'] : []),
1105
1114
  ...swiftFlags,
@@ -1520,6 +1529,9 @@ export async function prepareXcodeObjCImplementations(
1520
1529
  ...(objc ? [...swiftObjCRuntimeFlags, '-fobjc-exceptions'] : []),
1521
1530
  ...objcSdkIntakeFlags(headers, toolchain.toolchainBin, minimum),
1522
1531
  ...headerSearch.flags[index]!,
1532
+ ...(cxx
1533
+ ? fmtConstantInterpreterFlags([...flags, ...headerSearch.flags[index]!])
1534
+ : []),
1523
1535
  ...target.includes.flatMap((include) => ['-I', staged(include)]),
1524
1536
  ...target.frameworks.flatMap((framework) => ['-F', staged(framework)]),
1525
1537
  ...moduleMaps[index]!,
@@ -281,9 +281,12 @@ export function objcSdkIntakeFlags(
281
281
  ): string[] {
282
282
  return [
283
283
  ...swiftObjCPlatformFlags(toolchainBin, minimum),
284
- // AvailabilityInternal.h derives this through __is_target_os(ios), which
285
- // is false for wasm32.
284
+ // AvailabilityInternal.h derives these through __is_target_os(ios), which
285
+ // is false for wasm32. the maximum is the sdk the headers come from, as
286
+ // xcode defines it, so `#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_26_0`
287
+ // sources see the members the sdk declares instead of a 17.0 default.
286
288
  `-D__IPHONE_OS_VERSION_MIN_REQUIRED=${minimum}`,
289
+ `-D__IPHONE_OS_VERSION_MAX_ALLOWED=__IPHONE_${NATIVE_GRAPH_SDK_VERSION.replace('.', '_')}`,
287
290
  // apple's build setting for a 32-bit target to keep NSInteger and
288
291
  // NSUInteger long, the nominal types they have on arm64.
289
292
  '-DNS_BUILD_32_LIKE_64=1',
@@ -350,6 +350,26 @@ export type SwiftClangSetting = { tool: 'c' | 'cxx' } & (
350
350
  | { flags: string[] }
351
351
  )
352
352
 
353
+ // glog 0.3.5 includes glog/log_severity.h inside namespace google; this clang
354
+ // imports the cocoapods glog module map into c++ units despite
355
+ // -fno-cxx-modules and fails with "import of module appears within namespace".
356
+ // apple clang leaves the map inert there, and swiftpm hands c settings to c++
357
+ // units too, so no clang settings carry it.
358
+ // this clang's default constant evaluator rejects fmt 11's checked format
359
+ // strings at c++20 ("consteval ... not a constant expression"); the new
360
+ // interpreter accepts them as apple clang does, but it crashes clang on other
361
+ // sources (jsi.cpp), so only units that see fmt headers take it.
362
+ export const fmtConstantInterpreterFlags = (flags: readonly string[]): string[] =>
363
+ flags.some((flag) => flag.includes('/fmt/'))
364
+ ? ['-fexperimental-new-constant-interpreter']
365
+ : []
366
+
367
+ export const withoutGlogModuleMap = (flags: readonly string[]): string[] =>
368
+ flags.filter(
369
+ (flag) =>
370
+ !(flag.startsWith('-fmodule-map-file=') && flag.endsWith('/glog.modulemap')),
371
+ )
372
+
353
373
  /** the PackageDescription entries of a target's declared c or c++ settings. */
354
374
  export function clangSettingEntries(
355
375
  settings: readonly SwiftClangSetting[] | undefined,
@@ -360,7 +380,7 @@ export function clangSettingEntries(
360
380
  ? []
361
381
  : 'headerSearchPath' in setting
362
382
  ? [`.headerSearchPath(${JSON.stringify(setting.headerSearchPath)})`]
363
- : [`.unsafeFlags(${JSON.stringify(setting.flags)})`],
383
+ : [`.unsafeFlags(${JSON.stringify(withoutGlogModuleMap(setting.flags))})`],
364
384
  )
365
385
  }
366
386
 
@@ -193,6 +193,23 @@ const compilerArchives: Record<
193
193
  },
194
194
  },
195
195
  },
196
+ 'swift-6.4.0-RELEASE-custom-a560ff35bf882b5c': {
197
+ identity: 'a560ff35bf882b5c',
198
+ hosts: {
199
+ 'darwin-arm64': {
200
+ checksum: 'ec20a41851ac558fe663d78def6b93d0d47c5a0cb69688ee270fd85de637a522',
201
+ manifest: '253e891527d2213f54eace768b902de89de5e9495a3c5f4018de1985516bd553',
202
+ },
203
+ 'linux-x64': {
204
+ checksum: 'f0126a2e63d275895036d02d75a901070da0343dbf03bf17342e10cb6f893dee',
205
+ manifest: '6f951cc4071dd0d6054d85711a7c5fe272273658847831b477a8b24be7254ca0',
206
+ },
207
+ 'linux-arm64': {
208
+ checksum: '315fa766559a6e69bfd10dcddf40e04c91155f0db3047d210d74ac87652fb7e6',
209
+ manifest: 'b6f62fca2ec37593e274ee5bac474f21ffc5db14cd82f492ccbc774f8e9b75d8',
210
+ },
211
+ },
212
+ },
196
213
  [SWIFT_HOST_COMPILER_RELEASE]: {
197
214
  identity: SWIFT_HOST_COMPILER_ID,
198
215
  hosts: {
@@ -1,7 +1,6 @@
1
1
  import { createRequire } from 'node:module'
2
2
  import path from 'node:path'
3
3
  import { prepareNativeAppRoot } from './expo-native-workspace'
4
- import { readIosAppTarget } from './native-app-identity-project'
5
4
  import {
6
5
  compiledModuleAssets,
7
6
  compiledModuleRequestHandler,
@@ -36,9 +35,9 @@ export async function compileTurboApp(
36
35
  // the runtime archive is built against the published distribution, as the
37
36
  // Nitro adapter is
38
37
  const module = moduleRoot ?? (await swiftDistributionRoot())
39
- const projectRoot = readIosAppTarget(appRoot, iosTarget)
40
- ? appRoot
41
- : await prepareNativeAppRoot(appRoot)
38
+ // the app's own committed ios directory has no installed pods: the compile
39
+ // reads the prepared workspace, as the Nitro compile does
40
+ const projectRoot = await prepareNativeAppRoot(appRoot)
42
41
  const { artifact, collection } = await compileTurboModule({
43
42
  appRoot,
44
43
  reactNativeRoot: path.dirname(
@@ -6,13 +6,13 @@
6
6
  "adapter": {
7
7
  "sha256": "0d31912293226deb3354b3b32f2944e9c61c68590e3020d8b5af0c12a6677893"
8
8
  },
9
- "compiler": "swift-6.4.0-RELEASE-custom-f6868fa6054e83d6",
9
+ "compiler": "swift-6.4.0-RELEASE-custom-a560ff35bf882b5c",
10
10
  "sdk": {
11
11
  "id": "swift-6.4.0-RELEASE_wasm-peach-5d385b68",
12
12
  "checksum": "d91882af99821a296c3db4459896b46ceaef37e9a30caad14e5f24cf6b964ae9"
13
13
  },
14
14
  "framework": {
15
- "distribution": "02d639ad58915e23",
15
+ "distribution": "af69e0877dcfc948",
16
16
  "wireAbi": "246b8412514b644113e6a26252c8ebd6de49ab4156ac5f5c98bb9e4c2ff2568b"
17
17
  },
18
18
  "archives": [
@@ -20,64 +20,64 @@
20
20
  "headers": {
21
21
  "reactNativeJsi": "0f8c2defbca69a27a848a81ae72363073bf9602fd316e57a75811be1a0528358"
22
22
  },
23
- "sha256": "9aa1c59037845d8d8daf8f351d5834cc1c45638ed0d76e3ef928b31ba745e364",
24
- "size": 25411
23
+ "sha256": "42f42eaba0cbbc305c26bc45b64b19a9c22a1782550873707cc2a94d5226450e",
24
+ "size": 25406
25
25
  },
26
26
  {
27
27
  "headers": {
28
28
  "reactNativeJsi": "21a624ea24fd17d56bf26832d496fc1177067f89640414c20e6486c7984dfb0a"
29
29
  },
30
- "sha256": "5ff8255689666c84987d6ebf3b400ae29f3b7085ff15d685c03825318201bb32",
31
- "size": 26144
30
+ "sha256": "5de281f851fc5bcc41103be001ac54fd3380fdbe508a306a80ef50065a828d4f",
31
+ "size": 26142
32
32
  },
33
33
  {
34
34
  "headers": {
35
35
  "reactNativeJsi": "324aefd8591d9ce688bce7589c4c2b516cd33ecb95d35c47239a87a8fcf6a8da"
36
36
  },
37
- "sha256": "a541c09ae99282fc7a8fbcf94d55f0fa69a354858043c34021aa6845b391c6a2",
38
- "size": 25397
37
+ "sha256": "a15c6b4b615e997e449bbc26c237d7b01c17518e290ec2d25290dd1afe5d8fec",
38
+ "size": 25398
39
39
  },
40
40
  {
41
41
  "headers": {
42
42
  "reactNativeJsi": "33596664ee7d7a6623f0796a6feb429543316c3a41b211150acda6e1d835286c"
43
43
  },
44
- "sha256": "68649aacd65a4a06dd295b431d299985b1737f86fcf39838cfcd007f8a8f2958",
45
- "size": 25176
44
+ "sha256": "d7e2c1bb4ae3f9e7ae7d72123b9ad32e2c0662607b124cbf42c47aa229e252c0",
45
+ "size": 25175
46
46
  },
47
47
  {
48
48
  "headers": {
49
49
  "reactNativeJsi": "66b2cd5a38511195207f6c8a76aba735f9b9cc66a52a0d00780ffe5d331623f7"
50
50
  },
51
- "sha256": "a97cb879af0327c2dad0b0e50d86f721ac8b42b3f22c53c1b24a92a705631b0d",
52
- "size": 25410
51
+ "sha256": "ad4a1e580e01af0f0af9d4f60c4cff765e8208297148674d0904c5a4bbb9bb0f",
52
+ "size": 25407
53
53
  },
54
54
  {
55
55
  "headers": {
56
56
  "reactNativeJsi": "96db4e758dd53e9320cef7cad485e00aa06e7a982cefd920f17007de8a5bd9f9"
57
57
  },
58
- "sha256": "c0a9d8a2606aa84367d0764f2650b21bb43a007a69705e46ca40c49f86233979",
59
- "size": 26144
58
+ "sha256": "59746bf6932eb3ac91e52a1117c7a03f3b7c2eedf4747dd9aa3cbfd2edc23daa",
59
+ "size": 26142
60
60
  },
61
61
  {
62
62
  "headers": {
63
63
  "reactNativeJsi": "aeab590ddd1218df963462242d3954ce467b0fa88f70e91429e4ffc74d230893"
64
64
  },
65
- "sha256": "4cc20f534c39fee1bf10c93207f36fe0d086481eb3ca67cf3f4bd650be6227f7",
66
- "size": 26145
65
+ "sha256": "6c9e3167ca6aa79c95ba785803d07548dc2f5f437f071128888ee7cca695b630",
66
+ "size": 26143
67
67
  },
68
68
  {
69
69
  "headers": {
70
70
  "reactNativeJsi": "b5fb260522384dd7ab07d740cdc534b529922446fcec798341c7817d9eaa49f4"
71
71
  },
72
- "sha256": "4819b11b500ee1ebe96c6109166e08826d1c0cfbb863f1f9b96d451baf819cf5",
73
- "size": 25272
72
+ "sha256": "a19e57ff608a43a42d5832eda613cde0bd23c17de5580237681e92d891f8f90d",
73
+ "size": 25273
74
74
  },
75
75
  {
76
76
  "headers": {
77
77
  "reactNativeJsi": "c6b391a1e870ccf7cdd534be63582862840f8245b99ebd253317deece1e6ffd5"
78
78
  },
79
- "sha256": "67718034f3d4036761cfe1981b2dde739c43f88326924433d005b7d6d85e8eb9",
80
- "size": 26149
79
+ "sha256": "8df00d552caf87b6ca0119a827ed3ac63a1b2852f14541ec0edb63dc79d35df7",
80
+ "size": 26147
81
81
  }
82
82
  ]
83
83
  }
@@ -631,7 +631,8 @@ function defaultConfiguration(project: LoadedProject): string {
631
631
  // the build settings of one target in `configuration`, evaluated as xcode
632
632
  // does: project then target level, each an xcconfig under its own settings;
633
633
  // `$(inherited)` reads the level below and an undefined setting is empty. a
634
- // list without that configuration builds its default one. overrides outrank
634
+ // list without that configuration builds its default one, and names it in
635
+ // $(CONFIGURATION). overrides outrank
635
636
  // every level, as the build location xcode chooses for a workspace does.
636
637
  function targetSettings(
637
638
  ref: TargetRef,
@@ -642,12 +643,15 @@ function targetSettings(
642
643
  ): { get: (key: string) => string; keys: Set<string>; xcconfigs: string[] } {
643
644
  const { project, target } = ref
644
645
  const xcconfigs: string[] = []
645
- const level = (listId: string | undefined): Record<string, string>[] => {
646
+ const selected = (listId: string | undefined): PlistDict | undefined => {
646
647
  const configList = project.object(listId)
647
648
  const configs = list(configList?.buildConfigurations).map(project.object)
648
- const config =
649
+ return (
649
650
  configs.find((entry) => entry?.name === configuration) ??
650
651
  configs.find((entry) => entry?.name === str(configList?.defaultConfigurationName))
652
+ )
653
+ }
654
+ const level = (config: PlistDict | undefined): Record<string, string>[] => {
651
655
  if (!config) return []
652
656
  const name = str(config.name) ?? configuration
653
657
  const base = str(config.baseConfigurationReference)
@@ -687,10 +691,11 @@ function targetSettings(
687
691
  ),
688
692
  ]
689
693
  }
694
+ const targetConfig = selected(str(target.buildConfigurationList))
690
695
  const levels = [
691
- { ...builtins, CONFIGURATION: configuration },
692
- ...level(str(project.project.buildConfigurationList)),
693
- ...level(str(target.buildConfigurationList)),
696
+ { ...builtins, CONFIGURATION: str(targetConfig?.name) ?? configuration },
697
+ ...level(selected(str(project.project.buildConfigurationList))),
698
+ ...level(targetConfig),
694
699
  overrides,
695
700
  ]
696
701
  const resolving = new Set<string>()
@@ -1695,7 +1700,19 @@ export function readXcodeAppTarget(
1695
1700
  )
1696
1701
  }
1697
1702
  const app = named[0]!
1698
- const configuration = configurationName ?? defaultConfiguration(app.project)
1703
+ // an application without the requested configuration builds its list's
1704
+ // default, and the workspace builds that one too: cocoapods mirrors the
1705
+ // application's configurations and names a default it may not define
1706
+ const appConfigs = app.project.object(str(app.target.buildConfigurationList))
1707
+ const appConfigNames = list(appConfigs?.buildConfigurations).flatMap(
1708
+ (id) => str(app.project.object(id)?.name) ?? [],
1709
+ )
1710
+ const configuration =
1711
+ configurationName === undefined
1712
+ ? defaultConfiguration(app.project)
1713
+ : appConfigNames.includes(configurationName)
1714
+ ? configurationName
1715
+ : (str(appConfigs?.defaultConfigurationName) ?? configurationName)
1699
1716
 
1700
1717
  // dependencies: explicit target dependencies, in this project or another
1701
1718
  // through a container proxy, and products linked by file name, which xcode
@@ -1877,10 +1894,10 @@ export function readXcodeAppTarget(
1877
1894
  const xcconfigs = new Set<string>()
1878
1895
  const buildDir = (project: LoadedProject) =>
1879
1896
  path.join(project.projectDir, '.build/peach-xcode/Build')
1880
- // a workspace build writes every pod into the app's build directory, where
1881
- // the pods' xcconfigs and the app's find each other's frameworks, whatever
1882
- // SYMROOT the generated project names.
1883
- const podsBuild = {
1897
+ // a workspace build writes every project's products into the app's build
1898
+ // directory, where pods' xcconfigs and every project's find each other's
1899
+ // frameworks and resource bundles, whatever SYMROOT a generated project names.
1900
+ const workspaceBuild = {
1884
1901
  SYMROOT: path.join(buildDir(app.project), 'Products'),
1885
1902
  OBJROOT: path.join(buildDir(app.project), 'Intermediates.noindex'),
1886
1903
  }
@@ -1938,7 +1955,7 @@ export function readXcodeAppTarget(
1938
1955
  DEVELOPMENT_LANGUAGE: str(ref.project.project.developmentRegion) ?? 'en',
1939
1956
  },
1940
1957
  options,
1941
- isPodsProject(ref.project.xcodeproj) ? podsBuild : {},
1958
+ workspaceBuild,
1942
1959
  )
1943
1960
  for (const file of read) xcconfigs.add(file)
1944
1961
  const swiftVersion = Number.parseFloat(settings('SWIFT_VERSION') || '5')