ribesg
07/09/2021, 1:58 PMMpp
, which compiles into a Framework.
I have this data class in the Mpp
project:
data class Event(
// …
val publicName: String?,
// …
) {
// …
val hasPublicName: Boolean
get() = !publicName.isNullOrBlank()
}
Somewhere in Swift, I have this:
func configure(_ event: Event) {
if event.hasPublicName {
eventTypeLabel.isHidden = true
locationView.isHidden = true
publicNameLabel.isHidden = false
publicNameLabel.text = event.publicName
// …
I didn’t change any of these files, but I now get this error (worked in 1.4.10):
2021-07-09 15:46:41.834833+0200 MyApp[25797:9497146] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MppEvent hasPublicName]: unrecognized selector sent to instance 0x600001ae5650'
Maybe I broke something in the way the project is built, but I don’t know what. I don’t know what could cause this. I also tried to replace event.hasPublicName
in Swift with event.publicName != nil
but then it crashes the same way but on publicName
.
I’m tweaking the XCode project a lot, and now I don’t know what could cause this?ribesg
07/09/2021, 2:00 PMhasPublicName
when browsing inside XCode:
@property (readonly) BOOL hasPublicName __attribute__((swift_name("hasPublicName")));
ribesg
07/09/2021, 2:46 PM