This error occurs if Swift class declares some of the AdressBook properties and this class is part of the mixed Swift / ObjC project. Xcode then generate Swift bridging header, where this property becomes (nonatomic, strong), which is applicable to objects only, not structures.
I have encountered similar issue when I needed to pass ABRecordRef from Objective-C class to Swift class: Xcode didn't like my ABRecordRef property in Swift. So I've ended up making that property private, so that it is not exported to the bridging header, and adding new method in Swift class to receive ABRecordRef:
class: PersonDetails {
private var selectedPerson: ABRecorfRef?
func setPerson(person: ABRecordRef) {
selectedPerson = person
}
}
And then you can call
[personDetails setPerson: person];
from Objective-C class.
let
orprivate var
, any difference? – Sebaceousprivate var
worked! Thanks! – Floydflss