Remove OS check in RCTMultiPartDataTask.m #1600 (#1633)

This was already removed from facebook/react-native early 2019:
06c6c7c673 (diff-02c60e5ee54665cfda52b1e88843db83a725867cd8404959fd328adaa6391c7b)

It is not linked anywhere in the code at this time
This commit is contained in:
Christoph Purrer 2023-01-12 21:56:52 +01:00 коммит произвёл GitHub
Родитель 005ef5ceab
Коммит 4299a85106
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 0 добавлений и 18 удалений

Просмотреть файл

@ -11,24 +11,6 @@
@end
// We need this ugly runtime check because [streamTask captureStreams] below fails on iOS version
// earlier than 9.0. Unfortunately none of the proper ways of checking worked:
//
// - NSURLSessionStreamTask class is available and is not Null on iOS 8
// - [[NSURLSessionStreamTask new] respondsToSelector:@selector(captureStreams)] is always NO
// - The instance we get in URLSession:dataTask:didBecomeStreamTask: is of __NSCFURLLocalStreamTaskFromDataTask
// and it responds to captureStreams on iOS 9+ but doesn't on iOS 8. Which means we can't get direct access
// to the streams on iOS 8 and at that point it's too late to change the behavior back to dataTask
// - The compile-time #ifdef's can't be used because an app compiled for iOS8 can still run on iOS9
static BOOL isStreamTaskSupported() {
#if !TARGET_OS_OSX // [macOS]
return [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){9,0,0}];
#else // [macOS
return [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10,11,0}];
#endif // macOS]
}
@implementation RCTMultipartDataTask {
NSURL *_url;
RCTMultipartDataTaskCallback _partHandler;