Sfoglia il codice sorgente

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

Fixes: #2377 #2267 #2158
j8
Piérre Reimertz 7 anni fa
parent
commit
6f8f64ba48
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6
    0
      ios/sdk/src/AppInfo.m

+ 6
- 0
ios/sdk/src/AppInfo.m Vedi File

@@ -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) {

Loading…
Annulla
Salva