mirror of
https://github.com/Tencent/Hippy.git
synced 2026-10-29 14:10:47 +08:00
fix(ios): need to callback when url loading error
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user