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:
Родитель
005ef5ceab
Коммит
4299a85106
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче