fix(ios): need to callback when url loading error

This commit is contained in:
luomy
2022-11-04 11:08:12 +08:00
parent 147dd7a13e
commit 61a7366dc0
@@ -95,6 +95,8 @@ static bool defaultDynamicLoadAction(const unicode_string_view& uri, std::functi
[[[NSURLSession sharedSession] dataTaskWithRequest:req completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
if (error) {
HippyLogInfo(@"[Hippy_OC_Log][Dynamic_Load], error:%@", [error description]);
u8string content(reinterpret_cast<const unicode_string_view::char8_t_*>(""));
cb(content);
}
else {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];