UIKit/UIKit.h is not found.

284 views
Skip to first unread message

MHorbul

unread,
May 19, 2009, 4:11:02 AM5/19/09
to Ruby-based iPhone Testing
Hello,

I have created the fresh View Based iPhone app, run "rpiphonetest ."
inside the app folder and then "rake test". I've got the following
problem:

[max Homes]$ rake test
(in /Users/max/Projetcs/iphone/Homes)
gcc -c Classes/Homes.m -o build/Homes.o -IClasses
gcc -c Classes/HomesAppDelegate.m -o build/HomesAppDelegate.o -
IClasses
In file included from Classes/HomesAppDelegate.m:9:
Classes/HomesAppDelegate.h:9:24: error: UIKit/UIKit.h: No such file or
directory
In file included from Classes/HomesAppDelegate.m:9:
Classes/HomesAppDelegate.h:13: error: cannot find interface
declaration for ‘NSObject’, superclass of ‘HomesAppDelegate’
Classes/HomesAppDelegate.h:13: error: cannot find protocol declaration
for ‘UIApplicationDelegate’
Classes/HomesAppDelegate.h:14: error: syntax error before ‘UIWindow’
Classes/HomesAppDelegate.h:18: error: syntax error before ‘IBOutlet’
Classes/HomesAppDelegate.h:19: error: syntax error before ‘IBOutlet’
In file included from Classes/HomesAppDelegate.m:10:
Classes/HomesViewController.h:11: error: cannot find interface
declaration for ‘UIViewController’, superclass of
‘HomesViewController’
Classes/HomesAppDelegate.m:14: error: no declaration of property
‘window’ found in the interface
Classes/HomesAppDelegate.m:15: error: no declaration of property
‘viewController’ found in the interface
Classes/HomesAppDelegate.m:18: error: syntax error before
‘UIApplication’
Classes/HomesAppDelegate.m: In function ‘-[HomesAppDelegate dealloc]’:
Classes/HomesAppDelegate.m:27: warning: ‘HomesViewController’ may not
respond to ‘-release’
Classes/HomesAppDelegate.m:27: warning: (Messages without a matching
method signature
Classes/HomesAppDelegate.m:27: warning: will be assumed to return ‘id’
and accept
Classes/HomesAppDelegate.m:27: warning: ‘...’ as arguments.)
Classes/HomesAppDelegate.m:28: error: ‘window’ undeclared (first use
in this function)
Classes/HomesAppDelegate.m:28: error: (Each undeclared identifier is
reported only once
Classes/HomesAppDelegate.m:28: error: for each function it appears
in.)
Classes/HomesAppDelegate.m:29: error: no super class declared in
@interface for ‘HomesAppDelegate’
rake aborted!
Command failed with status (1): [gcc -c Classes/HomesAppDelegate.m -o
build...]
/Users/max/Projetcs/big-dog-exo/Homes/Rakefile:30
(See full trace by running task with --trace)

Does anybody knows where is that header file and why it has not been
loaded/founded.

Thank you,
Max

Paul Barry

unread,
Jun 16, 2009, 11:47:47 AM6/16/09
to Ruby-based iPhone Testing
Same problem for me

Code2K

unread,
Jun 16, 2009, 12:02:16 PM6/16/09
to Ruby-based iPhone Testing
Try adding the UIKit framework to the req_frameworks list in the
Rakefile. But be aware that it is not a good idea to try to test the
iPhone UIKit classes with the Mac version of the toolkit. It is better
to ignore those files from the tests.

Paul Barry

unread,
Jun 16, 2009, 12:04:56 PM6/16/09
to rbipho...@googlegroups.com
All I did was create a blank app called Calc with X-Code, and then from in the project directory:

$ rbiphonetest .
$ script/generate model Calculator
$ rake test

I'm not trying to test the UIKit classes, just the Calculator model.

Code2K

unread,
Jun 16, 2009, 1:43:39 PM6/16/09
to Ruby-based iPhone Testing
I do something like this in my Rakefile to get rid of all classes
containing UI references:

src_files = FileList.new('src/**/*.m') do |fl|
fl.exclude('**/*Delegate.m')
fl.exclude('**/*Controller.m')
fl.exclude('**/main.m')
end

Maybe you have to adjust the ignore settings to your needs.

On Jun 16, 6:04 pm, Paul Barry <pauljbar...@gmail.com> wrote:
> All I did was create a blank app called Calc with X-Code, and then from in
> the project directory:
>
> $ rbiphonetest .
> $ script/generate model Calculator
> $ rake test
>
> I'm not trying to test the UIKit classes, just the Calculator model.
>
Reply all
Reply to author
Forward
0 new messages