iOS应用程序无法在Xcode中创建存档,但构建正常

时间:2015-11-04 16:10:13

标签: ios xcode

这完全让我困惑。我有一个用于存档的项目很好,但在我更新Xcode之后,它现在无法为它创建存档。失败来自包含的项目源文件,但未找到标题。同样,这是一个在之前建立并且现在失败的建议。此外,它构建和运行正常,只是失败的存档。这是我正在使用的Xcode版本:版本7.1(7B91b)。

有没有人遇到过类似的问题?

错误基本上是:

structure(list( Time=c("09:30:01"  ,"09:30:29"  ,"09:35:56",  "09:37:17"  ,"09:37:21"  ,"09:37:28"  ,"09:37:35"  ,"09:37:51"  ,"09:42:11"  ,"10:00:31"),
                Price=c(1,2,3,4,5,6,7,8,9,10),
                Volume=c(100,200,300,100,200,300,100,200,600,100)),
          .Names = c("Time", "Price", "Volume"),
          row.names = c(NA,10L),
          class = "data.frame") -> dt

library(dplyr)

dt %>%
  group_by(Time, Price) %>%                     ## for each Time and Price
  do(data.frame(Volume = rep(1,.$Volume))) %>%  ## create as many rows, with Volume = 1, as the value of Volume
  ungroup() %>%                                 ## forget about the grouping
  mutate(CumSum = cumsum(Volume),               ## cumulative sums 
         flag_500 = ifelse(CumSum %in% seq(501,sum(dt$Volume),by=500),1,0),  ## flag 500 batches (at 501, 1001, etc.)
         Bin = cumsum(flag_500)+1) %>%          ## create Bin values 
  group_by(Bin, Time, Price) %>%                ## for each Bin, Time and Price
  summarise(Volume = sum(Volume)) %>%           ## get new Volume values
  select(Time, Price, Volume, Bin) %>%          ## use only if you want to re-arrange column order
  ungroup()                                     ## use if you want to forget the grouping

#        Time Price Volume   Bin
#       (chr) (dbl)  (dbl) (dbl)
# 1  09:30:01     1    100     1
# 2  09:30:29     2    200     1
# 3  09:35:56     3    200     1
# 4  09:35:56     3    100     2
# 5  09:37:17     4    100     2
# 6  09:37:21     5    200     2
# 7  09:37:28     6    100     2
# 8  09:37:28     6    200     3
# 9  09:37:35     7    100     3
# 10 09:37:51     8    200     3
# 11 09:42:11     9    500     4
# 12 09:42:11     9    100     5
# 13 10:00:31    10    100     5

同样,该文件存在。在那。该项目运行并建立得很好。它只是在“归档”期间找不到它。

5 个答案:

答案 0 :(得分:2)

你说失败来自一个包含的源文件。我在导入Cordova库时看到一些人遇到类似问题。其中一些人使用here给出的解决方案解决了这个问题。

  

将此行添加到您的构建设置 - >标题搜索路径:

     

“$(OBJROOT)/ UninstalledProducts / $(PLATFORM_NAME)/ include”

     

不要替换看起来相似的现有行,仍然需要向后兼容Xcode 7和Xcode 6.4。

祝你好运!

答案 1 :(得分:1)

将此添加到我的“标题搜索路径”可解决此问题。

"$(BUILD_ROOT)/../IntermediateBuildFilesPath/Headers"

显然,在“存档”过程中,不会构建标题所在的某些文件夹。

答案 2 :(得分:0)

也许清理和构建项目可以解决问题?

答案 3 :(得分:0)

您需要选择一个真实的设备作为目标,否则归档不起作用。但是你可以构建发布版本吗? (例如,"构建用于分析"工作?)

答案 4 :(得分:0)

您需要选择一个真实的设备作为目标,否则归档不起作用。但是你可以构建发布版本吗? (例如,"构建用于分析"工作吗?)例如,您可能有一行

#ifdef DEBUG
#include "MyHeader.h"
#endif

并且标题不会包含在发布版本中。轻松完成。