0

I'm trying to create the following class:

@objc(GameFacade)
class GameFaçade: NSObject {
   ...
}

However when I try to compile I get the following error:

Parameter of 'swift_name' attribute must be an ASCII identifier string

This error is on my -Swift.h header, the generated code is

SWIFT_CLASS_NAMED("GameFaçade")
@interface GameFacade : NSObject
...
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

It seems to be the bug reported in rdar://22737851.

Is there any way around this using non-ASCII characters?

fpg1503
  • 7,492
  • 6
  • 29
  • 49
  • `Is there any way around this?` Don't use non-ASCII characters. – nhgrif Mar 18 '16 at 20:53
  • I've clarified my question – fpg1503 Mar 18 '16 at 20:55
  • If you can't deal with using non-ASCII characters, seems you'll have to wait for the bug to be resolved. Or... can't you just not generate the `-Swift.h` header? The real problem is that *Objective-C* (and other languages) don't know how to deal with non-ASCII characters. – nhgrif Mar 18 '16 at 20:56
  • 2
    Looks like the issue (and solution) are pretty much knowns, it's been reported to Apple and the answer to "it hurts when I do this" is, "don't do that" Either don't use non-ASCII characters, or don't generate the bridging header. – David Berry Mar 18 '16 at 21:21

0 Answers0