4

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.

Peter Warbo
  • 11,136
  • 14
  • 98
  • 193

3 Answers3

3

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.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • "Header Search Paths" are exactly the same for both Debug and Release. – Peter Warbo Mar 20 '13 at 16:55
  • Are there any other build settings you setup for the `RHAddressBook` library that you may have missed for the Release configuration? – rmaddy Mar 20 '13 at 16:57
  • 1
    Nope, I've made sure that all settings are identical between Debug and Release configuration. – Peter Warbo Mar 20 '13 at 18:03
  • 1
    @maddy I have also tried to edit the schemes and for my run configuration I have set the configuration to use my Release configuration and it also compiles and runs without any issue. So my Release configuration seems to be intact. It's only when I try to archive that it will not work. – Peter Warbo Mar 21 '13 at 09:50
  • any clue on what I can do to remedy this situation? – Peter Warbo Mar 22 '13 at 08:08
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

Community
  • 1
  • 1
NSTJ
  • 3,858
  • 2
  • 27
  • 34
  • Yes, this worked out for me. I have had same trouble with works fine with device and simulator debug and release, but not the archive. Your answer resolves me and saves time! – Yoon Lee Jul 25 '13 at 02:47
1

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.

dadachi
  • 639
  • 8
  • 11