10

There were a lot of issues when trying to run the app after upgrading Xcode to the latest, 14.3 version.

The one I am facing now is:
failed to verify module interface of 'projectName' due to the errors above; the textual interface may be broken by project issues or a compiler bug
along with No such module Firebase

Edit: Seems like it is not up to Firebase nor any other pod since people are having the same issue for different pods. I have tried these things but no success:

  • updating all pods to the latest version
  • updating Cocoapods to the latest version 1.12.0
  • cleaning build folder and derived data, as always
  • updating CommandLineTools to the newest version(14E222 > 14E222b)
  • downgrading CommandLineTools to the previous Xcode 14.3's version 14C18


1

stackich
  • 3,607
  • 3
  • 17
  • 41
  • 1
    I have the same issue, maybe do you find solution? – Алексей Смольский Apr 04 '23 at 15:12
  • Two things, please include errors as text, not screen shots. Then, did you clean your build folder? Did you update your podfile and install a newer version of Firebase to match the updated XCode? – Jay Apr 04 '23 at 17:23
  • Having the same issue with Xcode 14.3. Not with Firebase but with Airship. – user3861282 Apr 04 '23 at 17:26
  • Same here in one of my targets. – Darren Apr 04 '23 at 21:04
  • @АлексейСмольский Unfortunately I did not. So it is definitely not up to any pod since we are getting the same error for different pods. I have also tried updating all the pods but still having the same issue. – stackich Apr 04 '23 at 21:21
  • I found reason https://github.com/CocoaPods/CocoaPods/issues/11808 We need to waiting for 1.12.1 version – Алексей Смольский Apr 05 '23 at 22:13
  • 2
    Temporary fix is to download `Xcode 14.2`. – stackich Apr 11 '23 at 15:12
  • 1
    same behavior inside my project. same thread here https://stackoverflow.com/questions/75955074/swiftverifyemittedmoduleinterface-normal-arm64-issue-building-release-with-crypt/76003381#76003381 @stackich is right, compiling und Xcode14.2 all is working – LittleBoat Apr 13 '23 at 09:12
  • The problem is this new feature in xCode 14.3. The Xcode 14.3 includes a new module verifier that generates diagnostics for issues in a framework’s modules. (97345247). If we know how to disable it, then we have a solution for this issue. – Crepkey Apr 17 '23 at 12:35
  • I am also having the same issue – Tsering Norbu Apr 17 '23 at 21:23
  • @stackich that didn't fix for me – Tsering Norbu Apr 17 '23 at 21:23
  • @TseringNorbu you meant 14.2 installation did not help you? please write in one comment. You may confirm that Command Line Tools is using Xcode 14.2 version , too. – stackich Apr 17 '23 at 23:36

4 Answers4

6

Add -no-verify-emitted-module-interface to Other Swift Flags to your Build Settings if you are using SPM.

lukaskasa
  • 498
  • 1
  • 8
  • 12
  • 4
    verify modules was added in Xcode 14.3 I’m not sure disabling stuff is always the answer. – Darren Apr 15 '23 at 10:03
3

If you use cocoapods
you can insert this code at Podfile file end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['OTHER_SWIFT_FLAGS'] = '-no-verify-emitted-module-interface'
    end
  end
end

This is an easy way to add '-no-verify-emitted-module-interface' then run pod install again

is work for me at xcode v14.3.1

0

In my case, I added @_implementationOnly when importing the library and it stopped happening.

0

I did this in two steps:

  1. I created Release.xcconfig

  2. added one line: OTHER_SWIFT_FLAGS = -no-verify-emitted-module-interface

How it looks in Xcode:

enter image description here

Additionally, I added this flag:

BUILD_LIBRARY_FOR_DISTRIBUTION=YES 

enter image description here

I found this solution here.

stackich
  • 3,607
  • 3
  • 17
  • 41