Error 'compile swift source files (arm64)' when building project with Xcode 13
Asked Answered
M

4

8

I am developing an app with Xcode 13.0 (13A233) on Macbook with an M1 chip. After updating pods to the latest version, the pods are complaining about error

CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Alamofire' from project 'Pods')

and not building for either real devices or simulators.

I'm including the following pods in the project:

  • Alamofire
  • IQKeyboardManager
  • NVActivityIndicatorView
  • FillableLoaders
  • SQlite.Swift
  • SDWebImage
  • SwiftDataTables

I've already applied the following solutions for the main project and all pods projects:

  • Upon updating pods, clean build folder (using Shift + Command + K)
  • Excluding arm64 architecture for 'Any iOS Simulator SDK' from Excluded architectures
  • Set 'YES' to 'Build Active Architecture Only'
  • There is no field called 'VALID_ARCHS' in the User-Defined section
  • Solution provided over Medium

You can see Error details on this screenshot.

Note

I know that there are many answers related to these questions, but I've tried each of them, and when I am not able to resolve it with those, I am posting question here.

Mangle answered 11/10, 2021 at 6:6 Comment(0)
M
2

Finally, I was able to figure out the issue, and it was related to the version of the pod that was being used in code.

So, If you're still experiencing the same, I recommend to:

  • Check the compatibility of the pod which is causing issue
  • Uninstall and install pods again
Mangle answered 9/1, 2022 at 22:23 Comment(0)
Y
2

Personally solved it by doing all you mentioned and also switching to new build system. Xcode => File => Workspace settings...

There change the build system to "New Build System".

Workspace settings screenshot

Yeast answered 9/11, 2021 at 11:5 Comment(0)
M
2

Finally, I was able to figure out the issue, and it was related to the version of the pod that was being used in code.

So, If you're still experiencing the same, I recommend to:

  • Check the compatibility of the pod which is causing issue
  • Uninstall and install pods again
Mangle answered 9/1, 2022 at 22:23 Comment(0)
M
1

Remaining solution

1.Remove any architecture related run script from your project of Project target

2.Uninstall and install pods

Mccormack answered 11/10, 2021 at 7:31 Comment(0)
C
0

Here's what I did to make it work.

  1. Delete derived data.
  2. Quit Xcode.
  3. Re-Open Xcode
  4. Clean Build
  5. Build
Catchall answered 11/4, 2023 at 22:11 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.