Tool: Xcode12-beta2 & Simulator
The same problem I met!!!!
How to get access to old projects?
Post
Replies
Boosts
Views
Activity
Thank u @zhangkk!If Apple technicians can fix this issue soon, please tell us, we all eager to know!
@mgoemmel Hi, Markus, If I create a new OC project, and then i create a new widgetKit in it, the project will run nicely, widgetKit will run nicely too, thats very strange.
I saw it at the bottom of "Build Settings" in 'User-Defined', but it parameter is not changed, and my project still cannot run.
I also saw a new option in 'Architectures', it's 'Excluded Architectures', up to now I donnot know what it does.
Finished by https 206 code
NSString *oldRange = urlSchemeTask.request.allHTTPHeaderFields[@"Range"];
oldRange = [oldRange substringFromIndex:6];
NSArray *array = [oldRange componentsSeparatedByString:@"-"];
NSInteger first = [[array firstObject] intValue];
NSInteger last = [[array lastObject] intValue];
NSLog(@"====> startURLSchemeTask2 response oldRange %@", oldRange);
NSRange newVideoRange = NSMakeRange(first, last - first + 1);
NSData *newVideoData = [videoData subdataWithRange:newVideoRange];
// 构造响应
NSError *error = nil;
NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:requestURL
statusCode:206
HTTPVersion:nil
headerFields:@{
@"Content-Range": [NSString stringWithFormat:@"bytes %lu-%lu/%lu", (unsigned long)first, (unsigned long)last, (unsigned long)videoData.length],
@"Content-Type": @"video/mp4",
@"Content-Length": [NSString stringWithFormat:@"%@", @(last - first + 1)],
@"Access-Control-Allow-Origin": @"*"
}];