Attempt to fix missing class on iOS 9.0.x

This commit is contained in:
Ali 2019-12-06 10:41:33 +04:00
parent 14b59eba63
commit 04bc74b0e7

View File

@ -735,7 +735,16 @@
{ {
PHImageRequestID token = PHInvalidImageRequestID; PHImageRequestID token = PHInvalidImageRequestID;
if (asset.subtypes & TGMediaAssetSubtypePhotoLive) bool processLive = false;
if (asset.subtypes & TGMediaAssetSubtypePhotoLive) {
if (iosMajorVersion() < 9 || (iosMajorVersion() == 9 && iosMinorVersion() < 1)) {
processLive = false;
} else {
processLive = true;
}
}
if (processLive)
{ {
PHLivePhotoRequestOptions *requestOptions = [[PHLivePhotoRequestOptions alloc] init]; PHLivePhotoRequestOptions *requestOptions = [[PHLivePhotoRequestOptions alloc] init];
requestOptions.networkAccessAllowed = true; requestOptions.networkAccessAllowed = true;
@ -830,7 +839,16 @@
{ {
PHImageRequestID token = PHInvalidImageRequestID; PHImageRequestID token = PHInvalidImageRequestID;
if (asset.subtypes & TGMediaAssetSubtypePhotoLive) bool processLive = false;
if (asset.subtypes & TGMediaAssetSubtypePhotoLive) {
if (iosMajorVersion() < 9 || (iosMajorVersion() == 9 && iosMinorVersion() < 1)) {
processLive = false;
} else {
processLive = true;
}
}
if (processLive)
{ {
NSString *filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.mov", asset.identifier]]; NSString *filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.mov", asset.identifier]];
NSURL *fileUrl = [NSURL fileURLWithPath:filePath]; NSURL *fileUrl = [NSURL fileURLWithPath:filePath];