[英]Archiving vs Build
I'm wondering if Archive is actually doing a build by itself? 我想知道Archive是否实际上是在自行构建? My usual steps are "Build -> Archive -> validate -> publish" but I'm wondering if the first step "Build" is actually redundant?
我通常的步骤是“构建->存档->验证->发布”,但我想知道第一步“构建”是否实际上是多余的?
Reason for this question is today noticed that my app actually passed the build, but failed at archive? 今天引起这个问题的原因是我的应用程序实际上通过了构建,但是在存档时失败了?
Yes you are right, you dont required 'Build' before archiving. 是的,您是对的,存档之前不需要“生成”。 So, you can directly archive it(it automatically going to build it).
因此,您可以直接对其进行存档(它将自动进行构建)。
As per your comment - you are getting this error - while archiving = Linker command failed library not found
根据您的评论-您遇到此错误-归档=
Linker command failed library not found
This error comes when compiler unable to find required library. 当编译器无法找到所需的库时,将出现此错误。 So, check your
Runpath search paths
( Library search paths
in xcode version older than iOS 12) in build settings. 因此,请在构建设置中检查您的
Runpath search paths
(xcode版本中早于iOS 12的Library search paths
)。
As per you - You get success while building but failure while archiving - it happens only if you have kept different Runpath search paths
for Debug
and Release
. 按照您的
Runpath search paths
-构建时会成功,而归档时会失败-仅当您为Debug
和Release
保留了不同的Runpath search paths
,这种情况才会发生。 See below image. 见下图。
One more thing. 还有一件事。 If you wanted to reproduce samething while
Building
app, then follow this 如果您想在
Building
应用程序时重现相同内容,请按照以下步骤操作
Press Command
+ Shift
+ <
(this will open edit scheme) 按
Command
+ Shift
+ <
(这将打开编辑方案)
You will be on below screen : 您将在以下屏幕上:
Debug
to Release
. Debug
更改为Release
。 After making above change, when you run the app, it will build exactly same as archive
case, so if you are build getting failed while archiving, then it must be failing now, otherwise will work fine. 完成上述更改后,在运行应用程序时,它将与
archive
案例完全相同,因此,如果在存档时构建失败,则它现在一定会失败,否则可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.