fix:1、接入外部sdk

This commit is contained in:
2026-05-20 14:29:11 +08:00
parent aca0e4d1af
commit d8b41f25ba
890 changed files with 45707 additions and 1095 deletions
+16 -8
View File
@@ -34,14 +34,22 @@ static const char* stringFromdictionary(NSDictionary* dictionary) {
static NSDictionary* dictionaryFromNSError(NSError* error) {
if(error){
NSInteger code = [error code];
NSString *localizedDescription = [error localizedDescription];
NSDictionary *errorDictionary = @{
@"code" : @(code) ?: @(-1),
@"localizedDescription" : localizedDescription,
};
return errorDictionary;
NSMutableDictionary *errorDictionary = [NSMutableDictionary dictionary];
errorDictionary[@"code"] = @(error.code);
errorDictionary[@"localizedDescription"] = error.localizedDescription ?: @"";
// Include userInfo fields for enhanced error reporting (iOS SDK 6.17.8+)
if (error.userInfo[@"error_code"]) {
errorDictionary[@"error_code"] = error.userInfo[@"error_code"];
}
if (error.userInfo[@"error_message"]) {
errorDictionary[@"error_message"] = error.userInfo[@"error_message"];
}
if (error.userInfo[@"invalid_fields"]) {
errorDictionary[@"invalid_fields"] = error.userInfo[@"invalid_fields"];
}
return errorDictionary;
}
return nil;