While following Creating XPC Services guide in Swift and trying to pass custom Foo class I found that in order for this to work it must be in a dynamic library. When it's embedded into both targets the connection to service fails with 4097 code. Same happens if Foo is in a static lib.
I can't seem any references to this requirement and guessing this is due to the fact that security identifies them as different objects while decoding. Is this true? Any more concrete info on this?