Justin Tullgren
01/27/2024, 3:40 PMJustin Tullgren
01/27/2024, 3:53 PM@ObjCName
doesn’t solve the problem. the libB doesn’t use the type from libA, it inherits from a completely different typeJustin Tullgren
01/27/2024, 4:02 PMJan Holešovský
01/29/2024, 8:22 AMJustin Tullgren
01/29/2024, 2:10 PMLibA and LibB
LibB depends on LibA
LibA Defines interface EventBusEvent (Protocol)
public interface EventBus {
public interface Event
}
__attribute__((swift_name("EventBusEvent")))
@protocol MEBEventBusEvent
@required
@end
LibB
Imports LibA
Defines class Event
sealed class Event : EventBus.Event {
data object Initialized : Event()
data class SessionStarted(val sessionUrl: String): DXAEvent()
}
__attribute__((swift_name("Event_busEventBusEvent")))
@protocol MyEventsEvent_busEventBusEvent
@required
@end
__attribute__((swift_name("Event")))
@interface MyEventsEvent : MyEventsBase <MyEventsEvent_busEventBusEvent>
@end
The resulting obj-c has pulled all of LibA into LibB but with different names, using the module name as a prefix.
So when passing an Event to a service defined in LibA the types do not match.
Justin Tullgren
01/29/2024, 2:10 PMJan Holešovský
01/29/2024, 6:55 PMJustin Tullgren
01/29/2024, 11:56 PMJustin Tullgren
01/29/2024, 11:56 PM