7

In Xcode 10.1 whenever I build my app I get the warning

Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "My Appp" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'My App')

How can I suppress the warning?

I tried to convert but conversion fails and besides that my app depends on some Pods / libraries that I can not convert any way.

Is there a way to stop seeing the warning?

Bobrovsky
  • 13,789
  • 19
  • 80
  • 130

2 Answers2

5

Unfortunately, there's no way to remove this. You'll need to manually update your Pods / libraries to Swift 4.x or wait until someone does the job for you. Otherwise, you won't be able to build your project with a newer Xcode version at some point in the future.

From https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes:

Xcode 10 is the last release that will support Swift 3. Migrate your projects from Swift 3 code to Swift 4.2 syntax by opening the project and choosing Edit > Convert > To Current Swift Syntax… (43101816)

Cristian Ortega
  • 153
  • 1
  • 3
  • Thank you. Can I ask you where did you get this knowledge from? – Bobrovsky Nov 06 '18 at 12:08
  • 1
    It is stated in https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes. Xcode 10 is the latest major version to support Swift 3. Xcode 11 won't even let you build with warnings, so you must update your Pods/libraries to newer versions. – Cristian Ortega Nov 06 '18 at 17:05
  • Thank you, but I was asking about "there's no way to remove this" part of your statement. I understand that migration is needed just don't want to see the warning every day. – Bobrovsky Nov 07 '18 at 06:15
  • That warning comes from the project configuration itself, you can't remove it unless you want to silent all warnings. It'd be more productive for you to start migrating your dependencies. Good luck – Cristian Ortega Nov 07 '18 at 10:43
  • That's all fine and good, but I've done that and the warning still doesn't go away. I'm talking about a Cocoapod dependency. – horseshoe7 May 28 '19 at 20:57
0

Download Xcode 10.1 to be able to compile your code with Swift 3 or Pod decencies:

https://developer.apple.com/download/more/?name=Xcode
Mike Zriel
  • 1,575
  • 1
  • 17
  • 28