When archiving app Xcode complains about missing files

风格不统一 提交于 2019-12-23 12:57:08

问题


I'm using an external library (RHAddressBook) when I run the app in the simulator or in device there is no issue. But when I choose to archive the app I run into the issue where it's saying 'RHAddressBook/AddressBook.h' file not found at the line #import <RHAddressBook/AddressBook.h>

I have checked that the header search paths are the same for debug and release.

Not really sure what to check else.


回答1:


When you setup the use of the external library for your development builds, you may have needed to update a build setting to specify an additional include search path.

When you do an Archive build, this isn't a development build. You probably didn't update the include search path for your Release (or possibly Distribution) build.

Go back to the build settings and make sure the "Header Search Paths" is updated for the build configuration used by Archive.




回答2:


(I adapted this answer from here however given that I ran into the same problem with RHAddressBook also I figured some paraphrasing was in order. I hope this doesn't upset anyone).

  • Open Build Settings for your app target and under Header Search Paths add:

    "$(PROJECT_DIR)/.." recursive enabled

This worked for me for RHAddressBook




回答3:


Open Build Settings for your app target and under Header Search Paths add:

"$(SOURCE_ROOT)/ThirdParty/RHAddressBook"

This path is RHAddressBook folder under your project folder.



来源:https://stackoverflow.com/questions/15528133/when-archiving-app-xcode-complains-about-missing-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!