[swift-users] How to use non-ASCII identifier string as 'swift_name' attribute's parameter?

Zhao Xin owenzx at gmail.com
Thu Jul 21 04:29:35 CDT 2016


I just created a new Swift 3.0 Cocoa project in Xcode 8 beta3. Put the code
in ViewController.swift, and created a new Objective-C file and let Xcode
create the bridge file. Then I ran the project, everything worked fine.

Can you create a sample project and shared it?

Zhaoxin

On Thu, Jul 21, 2016 at 5:13 PM, 孙博弘 via swift-users <swift-users at swift.org>
wrote:

> When i use follow enumeration in a mixed-language app.Xcode will show me
> there is a error ```Parameter of 'swift_name' attribute must be an ASCII
> identifier string```.So can we add support for it?
>
>
> @objc(Order)
>
> public enum 顺序: Int {
>
> @objc(Start)
>
> case 开头
>
> @objc(End)
>
> case 结尾
>
> }
>
>
>
> And the demo which is come from
>
>
> https://developer.apple.com/library/mac/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithObjective-CAPIs.html
> will show the same error.
>
>
> @objc(Color)
>
> enum Цвет: Int {
>
>    @objc(Red)
>
>    case Красный
>
>
>
>    @objc(Black)
>
>    case Черный
>
> }
>
>
> ------------------
> ---------------------------------------------
> *孙博弘 *
>
> *TEL :      15932691211 <15932691211>*
> *MAIL:    sunbohong at gmail.com <sunbohong at gmail.com>*
> ---------------------------------------------
>
>
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160721/f85fee11/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2E07F900 at C679AA5D.52929057
Type: application/octet-stream
Size: 106282 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160721/f85fee11/attachment.obj>


More information about the swift-users mailing list