浏览代码

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

Pierre-Olivier Latour 6 年之前
父节点
当前提交
0001648879
共有 1 个文件被更改,包括 3 次插入0 次删除
  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) {