What's new
Apple iPad Forum 🍎

Welcome to the Apple iPad Forum, your one stop source for all things iPad. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Reading through "Beginning iPhone games development"

dextius

iPF Noob
Joined
Mar 15, 2011
Messages
3
Reaction score
0
Location
chicago
An example program from this book is causing Xcode to go haywire, spewing thousands of errors over the icon in the dock, before consuming all resources on my system.

First of all, I'm blown away that a compiler error can nearly take my system out. I was able to get a terminal up and kill -9 everything, since finder totally stopped responding, and the button to "stop the build" didn't do anything. Look guys, it's really not that hard to spawn off a process to kill gcc. I managed to do it, why can't Xcode?

Do developers for the iPad find this is normal? Save everything, and when you compile, hope for the best, because if you're wrong, you gotta hard kill everything or your system locks up? What kind of crap is this? I'm running Xcode 3.26 / iPhone SDK 4.3. I read that Xcode 4 is out, but it has issues of it's own (according to the Arstechnica article).

I have been able to recreate the issue with a three line test program. I'd love some assistance to understand what is going on here.

Anyway, here's the program. Create a new "view based application" Open up the ViewController header. Add these three lines. When you're done, your header should look like this:

Code:
#import <UIKit/UIKit.h>

@interface defineTestViewController : UIViewController {
    #define BRICKS_WIDTH  5;
    #define BRICKS_HEIGHT 4;
    UIImageView *bricks[BRICKS_WIDTH][BRICKS_HEIGHT];
}
@end

If I compile this, Xcode blows up, all ram is eaten, and my system grinds to a halt. I keep a terminal open that lets me nuke everything to regain control. Insane. I wish I could just do all of this from the command line, where I feel I have more control. I can't even find a log file to figure out what the heck is going on here. I'd like to think you can do a #define and use it when defining an array of objects.

Help?
 

bigchicken

iPF Noob
Joined
Jan 15, 2011
Messages
31
Reaction score
0
Location
Vancouver, Canada
I think the fundamental problem here is Xcode. That book is probably out of date (if the example ever worked). Prepare for much hair pulling if you want to continue down that path OR check out this post for some alternatives. If you really want to use Xcode you will probably get better help in the Apple developer forum.

mike
:8^]
 
OP
D

dextius

iPF Noob
Joined
Mar 15, 2011
Messages
3
Reaction score
0
Location
chicago
I think the fundamental problem here is Xcode. That book is probably out of date (if the example ever worked). Prepare for much hair pulling if you want to continue down that path OR for some alternatives. If you really want to use Xcode you will probably get better help in the Apple developer forum.

mike


Thanks! What is the best alternative to using xcode? I thrive in a vim/make/screen environment all at the command line. But that means losing Interface Builder, right?
 

NumbLock

iPF Novice
Joined
May 2, 2010
Messages
2,008
Reaction score
32
Location
Switzerland
Using Xcode 4 or 3. Big changes, I guess. Actually I was so disappointed in the Xcode 3 UI that I decided to wait for Xcode 4 to restart the learning process.

I've been programming windows and X86 for many years, and I was severely disappointed by Xcode 3's UI.
 

bigchicken

iPF Noob
Joined
Jan 15, 2011
Messages
31
Reaction score
0
Location
Vancouver, Canada
I think the fundamental problem here is Xcode. That book is probably out of date (if the example ever worked). Prepare for much hair pulling if you want to continue down that path OR for some alternatives. If you really want to use Xcode you will probably get better help in the Apple developer forum.

mike
Thanks! What is the best alternative to using xcode? I thrive in a vim/make/screen environment all at the command line. But that means losing Interface Builder, right?

Take a look at the Airplay SDK. It might be more up your alley. Interface builder is good for UI heavy apps but you will probably need to bypass it anyway and use core animation if you are doing any animation or rendering in your app.

mike
:8^]
 
OP
D

dextius

iPF Noob
Joined
Mar 15, 2011
Messages
3
Reaction score
0
Location
chicago
Thanks

Just wanted to say thanks for both of your replies. I'm going to give xCode 4 a chance, and then try AirPlay. Thanks again.
 

Most reactions

Latest posts

Top