0

I have a swift module managed by CocoaPods, the spec file looks like this:

 s.source_files="#{root}/xxx-umbrella.h","#{root}/Classes/**/*.{h,m,swift}"
 s.swift_version = '5.0'
 s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" }

It's not a pure swift module, contains both Oc and swift. I was trying to print orderID, which's a property of my class: private let orderID: String. When I print it in my class, everything works fine:

print("======" + orderID) //======orderID

But when I use LLDB debug in XCode, I got an error below.

(lldb) po orderID
Cannot create Swift scratch context (couldn't load the Swift stdlib)Cannot create Swift scratch context (couldn't load the Swift stdlib)Shared Swift state for xxx_Example could not be initialized.
The REPL and expressions are unavailable.

(lldb) po NSLog(@"%@", orderID)
Shared Swift state for xxx_Example could not be initialized.
The REPL and expressions are unavailable.

Did I miss something, any idea?

boog
  • 1,813
  • 3
  • 18
  • 21
  • First thing to check is that every time you update your tools you rebuild everything in your process. You also can't use binary downloads of swift CocoaPods, you have to build everything locally. – Jim Ingham May 27 '20 at 17:36
  • If you are still having a problem after checking that, it's probably best to file a bug either with the Apple bug reporter of bugs.swift.org, as figuring this sort of problem out requires a bunch of back & forth which those formats are better at. – Jim Ingham May 27 '20 at 17:37

0 Answers0