`
❌ ld: building for 'iOS-simulator', but linking in object file (/Users/neo/Developer/ProjectBackup/asd-as/node_modules/.pnpm/@uiw+react-native-alipay@https+++codeload.github.com+uiwjs+react-native-alipay+tar.gz_ea11c8adb1431f542b4aa3affde4a59d/node_modules/@uiw/react-native-alipay/ios/AlipaySDK.framework/AlipaySDK) built for 'iOS'
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run script build phase '[CP-User] [Hermes] Replace Hermes for the right configuration, if needed' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'hermes-engine' from project 'Pods')
› 2 error(s), and 2 warning(s)
CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.
`
问题剖析
-
@uiw/react-native-alipay 内置的 AlipaySDK.framework 只有真机(iOS device arm64)切片,完全不含模拟器(iOS-simulator)切片,导致链接器报错。
-
AlipaySDK.framework 是一个只有 arm64-apple-ios(真机)架构的旧式 fat binary,它既没有 x86_64-iphonesimulator 切片,也没有 arm64-iphonesimulator 切片,无论在 Intel Mac 还是 Apple Silicon Mac 上跑模拟器都会失败。
`
❌ ld: building for 'iOS-simulator', but linking in object file (/Users/neo/Developer/ProjectBackup/asd-as/node_modules/.pnpm/@uiw+react-native-alipay@https+++codeload.github.com+uiwjs+react-native-alipay+tar.gz_ea11c8adb1431f542b4aa3affde4a59d/node_modules/@uiw/react-native-alipay/ios/AlipaySDK.framework/AlipaySDK) built for 'iOS'
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
› 2 error(s), and 2 warning(s)
CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.
`
问题剖析
@uiw/react-native-alipay 内置的 AlipaySDK.framework 只有真机(iOS device arm64)切片,完全不含模拟器(iOS-simulator)切片,导致链接器报错。
AlipaySDK.framework 是一个只有 arm64-apple-ios(真机)架构的旧式 fat binary,它既没有 x86_64-iphonesimulator 切片,也没有 arm64-iphonesimulator 切片,无论在 Intel Mac 还是 Apple Silicon Mac 上跑模拟器都会失败。