We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
具体的讨论在这里:https://forums.developer.apple.com/thread/11867 查了下最新的官方文档,貌似还没有更新。
The text was updated successfully, but these errors were encountered:
这个问题应该是修复Xcode6的一个鲜为人知的bug引出的,文档为什么没更新,我想很有可能是目前的解决方案不是最优的。
比如在Xcode7 beta4以前,将@objc(ClassName)用在类SwiftClass上,在Xcode中使用Objective-C调用时,无法使用ClassName,只能使用SwiftClass,但运行时显示的类名又是ClassName。 具体可以参考下:http://scottberrevoets.com/2015/07/23/at-objc-class-prefixes-fixed-in-xcode-7-beta-4/
@objc(ClassName)
SwiftClass
ClassName
虽然在b4中修复了这个问题,但是使用非ASCII字符命名的Swift类使用@objc(ClassName)后,编译会报如下错误:
ASCII
Parameter of 'swift_name' attribute must be an ASCII identifier string
还没用Xcode7 beta6测过这个问题。
Sorry, something went wrong.
Thanks。我会查证一下相关内容,然后做一些必要的修改。谢谢!
应该是 Xcode 7 的一个退化。为了解决上面说的问题,Swift 2 中 Apple 引入了 SWIFT_CLASS_NAMED 宏来对 Swift 类型做限制。这个宏里面用了一个 LLVM 的 attribute 导致了非 ascii 码不能通过的问题。
SWIFT_CLASS_NAMED
已经提交 rdar://22737851。Apple 应该会有修正这个问题的考虑,所以暂时保留相关内容。
添加了相关说明。issue 保持 open,如果 radar 有反馈的话我也会进一步跟进。
No branches or pull requests
具体的讨论在这里:https://forums.developer.apple.com/thread/11867
查了下最新的官方文档,貌似还没有更新。
The text was updated successfully, but these errors were encountered: