[iOS] Fix crash if the app display name is not set

Fixes: #2377 #2267 #2158
This commit is contained in:
Piérre Reimertz 2018-01-26 14:24:57 +01:00 committed by Saúl Ibarra Corretgé
parent 1c3cef1eed
commit 6f8f64ba48
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,12 @@ RCT_EXPORT_MODULE();
NSString *name = infoDictionary[@"CFBundleDisplayName"];
NSString *version = infoDictionary[@"CFBundleShortVersionString"];
if (name == nil) {
name = infoDictionary[@"CFBundleName"];
if (name == nil) {
name = @"";
}
}
if (version == nil) {
version = infoDictionary[@"CFBundleVersion"];
if (version == nil) {