xcode

Tracing memory leaks

My favorite candidate again. I am in the process of identifying memory leaks in my app (a puzzling challenge for a newbe like me). I am using the xCode leak analyzer, but what puzzles me is how to trace back a memory leak to its variable or value. Is there a pointer to the instances that have reserved a memory address where a leak is id...

Convert XML to .plist

Hey, I have an XML exported from Oracle DB, which will be downloaded into my application main bundle. i would like to convert this XML file into .plist file so i can assign the values into NSDictionary and NSArrays.. Is there a way to get this to work? or is there a better way to work with an external XML file? note that one of the f...

xCode for iPhone EXC_BAD_ACCESS error only occurs when stepping through the debugger?

I am working on a project in xCode for iPhone where I am receiving an EXC_BAD_ACCESS error, HOWEVER, I only receive the error when stepping through a function I am trying to debug. When I take my breakpoint off the function, but still run the project in Debug Mode, I never receive this error. Is there anyway to solve this or find out w...

Missing Project templates in XCode

I have installed xcode 3.2 with iphone SDK. (without Mac OS 10.4 SDK). WHen i create new project i only got these options for Mac OS -- Application -- Framework and Library -- Application plugin -- System plugin --Other But a book named: Programming Object C 2.0. From which i am learning object C. Its showing XCode with these template...

Debugger console is not opening

I have created a simple hello world application in xcode using the command line utility. When i click on Build and Run. program successfully builds. I can see a message at status bar "Debugging of HelloMac ended normally" But debugger console on which Hello World message should appear is not opening. ...

More than just EXC_BAD_ACCESS ??

Is there a more detailed error to be found other than the console's EXC_BAD_ACCESS? Where/how can I see it? When my app crashes, I see tHE ERROR in thE XCode status bar, but thE console shoWS nothing else. WheRE do I see more info about what causes the crash? ...

Optimization headers for UITableView?

I have an optimization problem for the headers of a table with plain style. If I use the standard view for the table (the classic gray with titles set by titleForHeaderInSection:) everything is ok and the scrolling is smooth and immediate. When, instead, use this code to set my personal view: - (UIView *)tableView:(UITableView *)tableV...

Creating an Objective-C++ Static Library in Xcode

So I've developed an engine for the iPhone with which I'd like to build a couple different games. Rather than copy and paste the files for the engine inside of each game's project directory, I'd a way to link to the engine from each game, so if I need to make a change to it I only have to do so once. After reeding around a little bit, ...

Back Bar button problem

I have a Modal View Controller. I would like to navigate to another page and then back. It is not a navigation controller. What should I do now?Should I place an UIButton Item or a Navigation Item on the navigation Bar? ...

Displaying timecode using NSTimer and NSDateFormatter

Hi. I am very close to completing my first iphone app and it has been a joy. I am trying to add running timecode using the current time via an NSTimer displaying the current time (NSDate) on a UILabel. NSDate is working fine for me, showing hour, minute, second, milliseconds. But instead of milliseconds, I need to show 24 frames per ...

xcode may not respond to warning

Hi all, Can't seem to get rid of a warning. The warning is: 'UIImage' may not respond to '-scaleToSize' above the @implmentation MyViewController I have this @implementation: @implementation UIImage (scale) -(UIImage*)scaleToSize:(CGSize)size { UIGraphicsBeginImageContext(size); [self drawInRect:CGRectMake(0, 0, size.width, size.h...

App Store Featured Summary View design

How has Apple designed the View that you get when you look at an app summary in the Featured section of the App Store ( http://i44.tinypic.com/20gfgjr.jpg ) ? There seem to be 2 ways of doing it: Using a UITableView and then creating custom UITableViewCell items for each row Using a UIScrollView and then adding UIView subviews Any r...

Maintaining property lists for xCode projects

My project currently contains two largish property lists. One is currently 20KB; the other is 8KB. So far, I have been maintaining them with xCode's property list editor. This is manageable but also a bit clunky. I am wondering if other people have better ways of doing this? So far, my lists consist of nested arrays of strings. The...

Write to XCode build transcript.

Is there any way to write to the XCode build transcript? What i want to do, is throw a warning if a device is not attached to the computer instead of an assertion failure in my unit test cases (some cases rely on an attached ipod). I thought of something like the standard compiler warnings (only with custom message). Thanks. ...

Core Data NSFetchedResultsController sorting in certain sequence

I'm writing iphone app that has UITableView and uses Core Data. Data in UITableView is shown using NSFetchedResultsController. I use NSPredicate operator "IN" to fetch only needed entries. NSArray *filterArray = [NSArray arrayWithObjects:@"789", @"963", @"445", @"198", nil]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"i...

XCode: Function argument indentation

I was unable to find any solution of my specific issue. I'm using Xcode 3.2. I'd like to indent the next line of function argument just one step in from the previous line: somevariable = pow( a, b); However, Xcode's syntax-aware indenting insists on converting the above into: somevariable = pow( a, ...

How do you export or release a Mac OS X program made in Xcode? Program does not load on other computers.

I made a program in Xcode, being a simple calculator that takes a first number, and a second number, and then either adds,subtracts,multiplies, or divides depending on the radio button. I build and run and the program comes up and works fine. When I went to show my friends on their macs, when you double click on the program the program p...

For the iPad or iPhone, how do you control the system Volume? For example, have a button that mutes all audio.

I would like to make a button in my iPad app (probably will be similar to iPhone apps) that when I push this button, all audio is muted, even when you exit the app. I don't see anyway that you can control the volume, although I'm sure other apps have that I have seen in the app store for the iPhone. I also read some places that doing t...

Suppressing line specific XCode compiler warnings

Similar to Ben Gottlieb's question, I have a handful of deprecated calls that are bugging me. Is there a way to suppress warnings by line? For instance: if([[UIApplication sharedApplication] respondsToSelector:@selector(setStatusBarHidden:withAnimation:)]) { [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:U...

Returning NSNull from actionForLayer:forKey

If I implement the CALayer delegate method actionForLayer:forKey I can return [NSNull null] to force the CALayer to not animate any changes. Unfortunately, [NSNull null] doesn't implement the CAAction delegate and XCode kicks out the following warning: warning: class 'NSNull' does not implement the 'CAAction' protocol Here is the m...