Jelajahi Sumber

Fall back to "CFBundleName" in GCDWebUploader footer if "CFBundleDisplayName" is not defined

Pierre-Olivier Latour 6 tahun lalu
induk
melakukan
0001648879
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      GCDWebUploader/GCDWebUploader.m

+ 3 - 0
GCDWebUploader/GCDWebUploader.m

@@ -118,6 +118,9 @@ NS_ASSUME_NONNULL_END
                    NSString* footer = server.footer;
                    if (footer == nil) {
                      NSString* name = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
+                     if (name == nil) {
+                       name = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
+                     }
                      NSString* version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
 #if !TARGET_OS_IPHONE
                      if (!name && !version) {