Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode - why do I get a file not found?

I've added the Airship (from UrbanAirship) directory into my xcode project for my iPhone/iPad app. In my "build settings>search paths>header search paths" and "build settings>search paths>library search paths", I'm pointing to those directories recursively. I've also included the libuairship-1.2.1.a file3 into the required frameowrks/libraries.

When I go into my appdelegate.m and appdelegate.h, as soon as I type #import "UA", it autocompletes for me #import "UAirship.h". So i assume this is great ,because i guess it means it knows the file exists!

but when I do a build, it Xcode complains that the file UAirship.h can not be foudn. I tried typing #import "directoryname/UAirship.h", but it still can't find it.

How do i fix this problem?

Screenshot depicting error message

like image 220
John Avatar asked Dec 09 '22 00:12

John


2 Answers

I am sure it is the path under - header search paths.

I just had it set to ../Airship/** and had the same problem you did.

Now that I changed it to ./Airship/** and it works fine.

I also had to import

#import "UAirship.h"
#import "UAPush.h"
#import "UAInbox.h"
#import "UAInboxUI.h"

in the application delegate.

Hope this helps.

like image 83
user1006117 Avatar answered Feb 01 '23 09:02

user1006117


For XCode 5.1 I had to set this to ./Airship (recursive)

like image 40
Mads Mobæk Avatar answered Feb 01 '23 09:02

Mads Mobæk