技术咨询、项目合作、广告投放、简历咨询、技术文档下载 点击这里 联系博主

# Xcode 所遇问题汇总

# Xcode 升级到 12.0 所遇问题

升级到Xcode12.0之后,可能会存在如下问题,有兴趣的同学可以尝试一下!

# 1: objc_msgsend too many arguments to function call expected 0 have 3

解决办法:

  • Project -> Clear Builder Folder
  • 然后 设置 Enable Strict Checking of objc_msgSend CallsNO
  • 关闭XCode 重新打开

# 2: missing one or more architectures required by this target: arm64

Xcode12 build error. The linked framework 'Pods_projectA.framework'is missing one or more architectures required by this target: arm64

解决办法: Project -> Build Settings -> Excluded Architecture -> Debug -> Any iOS Simulator SDK 添加arm64

# 3:xxx.h 文件 找不到

解决办法: 在Header Search Path -> Debug 中添加对应搜索目录

# 4: No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64 armv7 armv7s).

解决办法: Project -> Build Settings -> Build Active Architecture Only -> Debug 设置为NO

# 5: Command PhaseScriptExecution failed with a nonzero exit code

问题原因: 请见这里 (opens new window)

解决办法 1: 删除 User-Defined 下面的 VALID_ARCHS设置 ,设置 Excluded Architecture 下 [Any iOS Simjulator]为 arm64

解决办法 2: 在 User-Defined 下面的 VALID_ARCHS设置,Debug 为 arm64 armv7 armv7s x86_64新增 x86_64机型。

【未经作者允许禁止转载】 Last Updated: 2/4/2024, 6:06:40 AM