21

I am getting the below error when I build my iOS project in Xcode 13.0 for Simulator 15 with Swift 5.5

Screenshot

fatihyildizhan
  • 8,614
  • 7
  • 64
  • 88
umar farooq
  • 350
  • 1
  • 2
  • 8
  • How did you resolve this? – Pravalika Nov 04 '21 at 02:54
  • i have resolved the issue by manually changing the ios target of every pod to higher level and i'm using Adjust and that have to solve the issue which is in Adjust.h replacing + (nullable id)getInstance; with + (nullable instancetype)getInstance; – umar farooq Nov 11 '21 at 07:38

6 Answers6

10

For Example:

The following build commands failed:
    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')

The outdated pod here seems to be ExpoModulesCore

and if it does not work, like it did not for me lol:

follow this: https://stackoverflow.com/a/69384358/15421728

For anyone looking for an answer.

run

cd ios
pod update ExpoModulesCore

and repeat the previous step for every outdated pod, if there are more outdated.

Abhishek Sah
  • 384
  • 5
  • 12
9

Issue related to your's dependencies: You must have to wait for those dependencies to update to Swift 5.5, otherwise, you have to stay on Xcode 12. In my case, I updated to 13 during development.

Shahroz Ijaz
  • 137
  • 8
4

I am working with react native and had a very similar error.

This worked for me:

cd ios && rm -rf Pods && pod cache clean --all && pod install && cd ..
1

For me it helped to downgrade XCode. I got back from 13.3 to 13.2.
You can get previous versions this way:
https://stackoverflow.com/a/7047804/7405518

Getting back to version 13.3 caused same problems again.

Laufwunder
  • 773
  • 10
  • 21
1

I had a dependency that was using a newer version of Swift that my version of Xcode did not support.

I had a similar stacktrace

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

You can fix the issue by updating MacOS and Xcode

Vinit S
  • 256
  • 3
  • 9
-2

I got this as well, but I just had to add my package again yarn add ... so it autolinked correctly with react-native

Conor Lamb
  • 307
  • 2
  • 5