Xcode 构建和运行成功,但存档失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39217527/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode Build and Run Succeeds, but Archive Fails
提问by Justin Sato
My app builds and runs successfully, but archives fails, therefore I can't make an ipa file. Error log is following:
我的应用程序构建并成功运行,但存档失败,因此我无法制作 ipa 文件。错误日志如下:
ld: library not found for -lAAMFeedback
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: library not found for -lAAMFeedback
clang: error: linker command failed with exit code 1 (use -v to see invocation)
the library is this: pod 'AAMFeedback', :git => 'https://github.com/PlusR/AAMFeedback.git'
该库是这样的:pod 'AAMFeedback', :git => ' https://github.com/PlusR/AAMFeedback.git'
Anyone encountered the same situation before? Please share the experience to help me. Thanks,
以前有人遇到过同样的情况吗?请分享经验以帮助我。谢谢,
version info:
Xcode version: 7.3.1
target ios version: 8.0
版本信息:
Xcode 版本:7.3.1
目标 ios 版本:8.0
回答by Edouard Barbier
Xcode 9.0
Xcode 9.0
For me what works was to go Product > Scheme > Manage Schemeand tick all the checkboxes, then Build againand then Archive.
对我来说,有效的是去Product > Scheme > Manage Scheme并勾选所有复选框,然后再次 Build然后Archive。
Hopefully, this can help someone else.
希望这可以帮助其他人。
回答by Rakshith Nandish
Try adding the AAMFeedback in your Link Binary with Libraries under the Build Phases, try adding your Library's framework there
尝试在您的链接二进制文件中添加 AAMFeedback 与构建阶段下的库,尝试在那里添加您的库框架
回答by Justin Sato
I finally managed to Archive. It was the reason why archive didn't succeed to set Product > Edit Scheme > Build setting. I unchecked 'Find implicit Dependencies' during development, which fasten the building process. However it is needed to check that setting when archiving.
我终于设法存档。这就是存档无法成功设置产品 > 编辑方案 > 构建设置的原因。我在开发期间取消选中“查找隐式依赖项”,这加快了构建过程。但是,在归档时需要检查该设置。