representation error in swift generated header

I have a public swift function with the below declaration :

 public func InternalMain (_ pNumOfArgs : Int32, _ pCmdlineArgs : UnsafeMutablePointer<UnsafeMutablePointer<Int8>?>) -> Int32 {..}

I need this function as public because I need to invoke in from a different library. But the above declaration produces an error in my generated swift header i.e '<module>-swift.h' file because 'UnsafeMutablePointer<UnsafeMutablePointer<Int8>?>' type cannot be represented in the swift generated header.

Can someone help how do I get past this. This is a class independent function and I tried using the '@nonobj' to prevent this from getting in the generated header but it still gives an error.

I need this function as public because I need to invoke in from a different library.

Is that different library written in Swift? Or Objective-C?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I'm a little confused about what's happening here. Can you show us:

  • The attributes, if any, on InternalMain
  • The type it's a member of (or tell us if this is a global function, not a member)
  • The specific error you're getting

Thanks!

representation error in swift generated header
 
 
Q