Max Miranda
Max Miranda

Reputation: 311

What is missing in this Swift name macro for a bridged Objective-C method?

Xcode reports this warning:

parameter of 'swift_name' attribute must be a Swift function name string"

For the following function. I do not know what I wrote incorrectly.

+ (CGFloat *)feedDetailWithUpdate:(PostUpdate *)update
                     trackingInfo:(nullable TrackingInfo *)trackingInfo
              highlightedComments:(NSArray<FeedComment *> *)highlightedComments
NS_SWIFT_NAME(feedDetailWithUpdate(update:trackingInfo:highlightedComments));

Upvotes: 5

Views: 1091

Answers (1)

Max Miranda
Max Miranda

Reputation: 311

I figured it out, there was a colon missing at the end of the argument list:

NS_SWIFT_NAME(feedDetailWithUpdate(update:trackingInfo:highlightedComments:));

Upvotes: 9

Related Questions