Any suggestions for someone trying to use the Obj-C RAC API with Swift structs?
Conversation
Does that actually work? Can you bridge an Box which contains a non bridgeable struct?
1
Ugh, I dunno. I haven’t tried to do anything like that.
1
Also uh Box is generic… :/
1
Generic classes should still be usable as id from ObjC at least.
1
Structs, I'm afraid. :/
1
Oh, but wait: can I make a generic class containing a Swift-only struct and pass it around in Obj-C land? Oooh…
1
3
Yeah, that's what I was getting at—store it to a Box<T> and pass it around as an id in ObjC
2
6
Replying to
Yessssssss. Didn't realize that you could even use Box<T> as an id in Obj-C land. You are my hero. ♥️
Replying to
It looks like all classes even implement the NSObject protocol!
1
3
I find it charming that these kinds of things come as a surprise even to you. :D
1
1



