UPDATE: This question does not duplicate the question mentioned above. It was verified (see comment below) that the method definition IS properly added to the
The bad boy in your parameter list is the Int?
param. Int
's are represented as NSInteger
in Objective-C. Thus they don't have a pointer and can't have a null
value. Consider removing the optional qualifier or changing it to NSNumber?
,
like: func getSearchResults(searchText: String?, searchType: String?, zoom: Int) -> NSDictionary
Lou Franco's explanation is correct. Your function has an Int?
parameter, and there is no equivalent of that in Objective-C. Therefore the entire function cannot be exposed to Objective-C. Use Int
or, if it really can be nil
, use NSNumber?
.