Procházet zdrojové kódy

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

Fixes: #2377 #2267 #2158
j8
Piérre Reimertz před 7 roky
rodič
revize
6f8f64ba48
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 6
    0
      ios/sdk/src/AppInfo.m

+ 6
- 0
ios/sdk/src/AppInfo.m Zobrazit soubor

@@ -32,6 +32,12 @@ RCT_EXPORT_MODULE();
32 32
     NSString *name = infoDictionary[@"CFBundleDisplayName"];
33 33
     NSString *version = infoDictionary[@"CFBundleShortVersionString"];
34 34
 
35
+    if (name == nil) {
36
+        name = infoDictionary[@"CFBundleName"];
37
+        if (name == nil) {
38
+            name = @"";
39
+        }
40
+    }
35 41
     if (version == nil) {
36 42
         version = infoDictionary[@"CFBundleVersion"];
37 43
         if (version == nil) {

Načítá se…
Zrušit
Uložit