Are the Swift language headers available online?

微笑、不失礼 提交于 2019-12-24 12:34:41

问题


Are the Swift headers available anywhere? I'd like to dig a bit deeper into some of the classes, but I don't have my Mac with me at the moment. Is there another option to view the Swift language source files?


回答1:


At the moment, in the Xcode6 beta, the swift "header files" aren't really header files. (i.e. they don't exist on disk in plain text format.) They appear to be getting generated on the fly by Xcode from the *.swiftmodule and *.swiftdoc files in the Xcode bundle.

Similarly, the swift declarations for Objective-C libraries appear to be being auto-generated on the fly. To the commenter: I've seen no indication that any of the pre-existing Apple-provided Objective-C libraries have been re-written in swift. Their header files are just being rewritten by Xcode on the fly as swift declarations.

Someone could trivially generate these files and copy and paste them and put them on the web somewhere, but I haven't seen it, and Apple doesn't appear to be publishing them in that way. (NB: This would almost certainly be a violation of their NDA.)

I'd say "keep an eye out"... it's probably only a matter of time.



来源:https://stackoverflow.com/questions/24038409/are-the-swift-language-headers-available-online

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