Hi, I'm facing a very strange issue where all the calls to
stdStringForString returns an empty string
This only happens on macOS Monterey with Intel hardware in the archived version of the app (even if the archive was made with debug config)
Running the app with Xcode or on M1's runs flawlessly.
Here is the function:
+ (std::string)stdStringForString:(NSString *)nsString {
NSData *charData = [nsString dataUsingEncoding:NSUTF8StringEncoding];
return std::string(reinterpret_cast<const char *>(charData.bytes),
charData.length);
}
This function always comes back empty.
Thank you!