Generated .swiftinterface has wrong content?

I tested serval libraries and found it pretty common to get an error:

  • correct: lottie-ios, SnapKit
  • got errors: Alamofire, SwiftyJSON, RxSwift

Here's a detail description to reproduce the errors:

  1. generate a project with a framework target with cocoapods (you can use pod try XXX).
  2. set the build settings of framework target: build library for distribution to YES
  3. build the framework and got the framework file. Delete the the .swiftmodule files in the framework.
  4. make a new blank iOS demo project, and import the framework we modified last step, and add the import XXX in source files
  5. build and got errors

jira bug [SR-11422] Generated .swiftinterface got an error when imported · Issue #53823 · apple/swift · GitHub

2 Likes