Skip to content

Commit 344c205

Browse files
fattahmuhyiddeenfacebook-github-bot
authored andcommittedMay 14, 2018
Fix crash during Archiving project in IOS
Summary: Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. To fix issue that crash on XCode 9.3 Archive the project in XCode 9.3 This does not change any documentation To fix issue that crash on XCode 9.3 [IOS] [BREAKING] [RCTImageCache.m] - Crash during archiving in XCode 9.3 Closes #18682 Differential Revision: D7992071 Pulled By: hramos fbshipit-source-id: 1089e469712b1eb2fcdd3ad59766c187e932f46c
1 parent 07df365 commit 344c205

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎Libraries/Image/RCTImageCache.m

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#import <React/RCTConvert.h>
1515
#import <React/RCTNetworking.h>
1616
#import <React/RCTUtils.h>
17+
#import <React/RCTResizeMode.h>
1718

1819
#import "RCTImageUtils.h"
1920

@@ -22,8 +23,8 @@
2223
static NSString *RCTCacheKeyForImage(NSString *imageTag, CGSize size, CGFloat scale,
2324
RCTResizeMode resizeMode, NSString *responseDate)
2425
{
25-
return [NSString stringWithFormat:@"%@|%g|%g|%g|%lld|%@",
26-
imageTag, size.width, size.height, scale, (long long)resizeMode, responseDate];
26+
return [NSString stringWithFormat:@"%@|%g|%g|%g|%lld|%@",
27+
imageTag, size.width, size.height, scale, (long long)resizeMode, responseDate];
2728
}
2829

2930
@implementation RCTImageCache
@@ -36,7 +37,7 @@ - (instancetype)init
3637
{
3738
_decodedImageCache = [NSCache new];
3839
_decodedImageCache.totalCostLimit = 5 * 1024 * 1024; // 5MB
39-
40+
4041
[[NSNotificationCenter defaultCenter] addObserver:self
4142
selector:@selector(clearCache)
4243
name:UIApplicationDidReceiveMemoryWarningNotification
@@ -45,7 +46,7 @@ - (instancetype)init
4546
selector:@selector(clearCache)
4647
name:UIApplicationWillResignActiveNotification
4748
object:nil];
48-
49+
4950
return self;
5051
}
5152

0 commit comments

Comments
 (0)
Please sign in to comment.