Unable to see public protocol from framework after converting to Swift 4.1

左心房为你撑大大i 提交于 2019-12-11 05:07:21

问题


I have framework in Swift 2.3 which I have successfully converted to Swift 3.3 and it works as expected on Xcode 8.3.3. I can even see the public protocols in it.

After I converted the project to Swift 4.1 and built it, I am unable to see the public protocols in the header file

eg:

public class CommunicationManager: NSObject {
       public static var sharedInstance = CommunicationManager()
}

Communication manager is not visible in Swift4 framework header files. I tried clearing derived data too and that did not help as well.

I have checked and tried the following links, but none of them helped

Link1 Link2 Link3

Why are the public protocols not visible?

Update:

If I change Swift language version to Swift3.3 in Xcode 9.3, then the public protocols are visible in the headers and the first line of the .h files says this

// Generated by Apple Swift version 4.1 effective-3.3 (swiftlang-902.0.48 clang-902.0.37.1)

Does this mean that it will work fine for an app written in Swift4?

来源:https://stackoverflow.com/questions/49914538/unable-to-see-public-protocol-from-framework-after-converting-to-swift-4-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!