ios - Project-Swift.h file failed to compile due to "Elaborated type refers to a typedef" error -
summary: have added streamdelegate method public func stream(_ astream: stream, handle eventcode: stream.event)
swift class , compiled project. while generating project-swift.h
, complier failed compile , show error elaborated type refers typedef
.
steps reproduce: 1. add streamdelegate
swift class. 2. add public func stream(_ astream: stream, handle eventcode: stream.event)
class. 3. compile project.
expected results: project-swift.h
file should compiled properly.
actual results: error on project-swift.h file @ line : - (void)stream:(nsstream * _nonnull)astream handleevent:(enum nsstreamevent)eventcode;
temporary fix: if remove enum
keyword on project-swift.h
@ of - (void)stream:(nsstream * _nonnull)astream handleevent:(enum nsstreamevent)eventcode;
, project compiled , build succeeded.
ios version: ios 10 beta 1
xcode version: xcode 8 beta
swift version: 2.3 or 3.0
i found work around avoid above error adding @nonobjc
keyword in front of func stream(_ astream: stream, handle eventcode: stream.event)
in swift class. compiler doesn't included method in project-swift.h
file , there no error in project-swift.h
while compiling.
@nonobjc public func stream(_ astream: stream, handle eventcode: stream.event) { //other stuffs }
i don't think proper solution above issue. me don't want call above delegate method objective-c class.
thanks!
Comments
Post a Comment