TAGS :Viewed: 5 - Published at: a few seconds ago

[ Why Swift bridging header gives syntax error sometimes after build with Xcode 7.3? ]

MyApp-Swift.h header class gives me this error sometimes after rebuild, it does not happen always. I fix it by adding "//" but i do not know why it has this error.

this is the error:

error code

original code:

original code

Answer 1


The Obj-C header generated from Swift modules has some issues with documentation comments like /// - Note: ... etc. I would suggest removing /// Recommended from your Swift code, because Xcode seems to be getting confused by this, treating it like /// - Recommended: ... (you can see details about this specific one in the latest Xcode release notes).

You can also file a bug against Xcode.