iOS: compat API with iOS 16

This commit is contained in:
pengfei.zhou 2022-09-26 12:02:30 +08:00 committed by osborn
parent d9c376f772
commit d8615b2f9a

View File

@ -58,7 +58,10 @@ - (void)addJSLoader:(id <DoricLoaderProtocol>)loader {
ret = [DoricAsyncResult new];
__block NSString *contextId = nil;
__block NSString *className = nil;
NSURLComponents *components = [NSURLComponents componentsWithString:source];
NSURLComponents *components = [NSURLComponents componentsWithString:
[source stringByReplacingOccurrencesOfString:@"_internal_://"
withString:@"internal://"]];
[components.queryItems forEach:^(NSURLQueryItem *obj) {
if ([obj.name isEqualToString:@"class"]) {
className = obj.value;