xcode

Codesign error: Provisioning profile cannot be found after deleting expired profile

Tried to rebuild an app that was just working yesterday. Got a message that a profile had expired, so I removed it from the iPod and from Itunes. When I chose a new profile (one with an * in the identifier), I now get an error: Code Sign Error: Provisioning Profile (long string) can't be found. What am I missing? I looked through rel...

How to release or nil a type-casted object?

I am a bit confused about the objects which are initialized by type-casting. Like UITextField *txtFld = (UITextField *)[self.view viewWithTag:someTag]; // // //some code here for this text field usage // // now when I am finished using this text field should I set it to nil or leave it as it is for the system to take care of it. Now ...

Why should we release ?

Hi all, I often see when we release ab object we immediately set it to nil. I know that release and nil both free the old value associated with object but in case of release it leaves the object as a dangling pointer so we have to set it to nil. So my question is if nil frees the old value of the object and set the object to nil why sh...

GCC memory leak detection equivalent to Microsoft crtdbg.h?

After many years of working on a general-purpose C++ library using the Microsoft MSVC compiler in Visual Studio, we are now porting it to Linux/Mac OS X (pray for us). I have become accustomed and quite fond of the simple memory leak detection mechanism in MSVC: #ifdef DEBUG #define _CRTDBG_MAP_ALLOC #define NEW new( _NORMAL_B...

error: There is no SDK with the name or path 'iphoneos2.2.1' - after Xcode upgrade.

I upgraded my Xcode to the Latest version today, my iPhoneSDK OS was 2.2.1 previously. I was alerted during installation I can upgrade Xcode but iPhoneSDK cannot be upgraded. Because my Mac OS was 10.5.4. My iPod Touch runs on version 3.0. After Xcode upgrade, when I launched old projects, it says error: There is no SDK with the name or...

Will this hack make apple furious? (Will the reject my app ?)

Hi, I have taken this code from http://stackoverflow.com/questions/883208/how-to-change-background-color-of-uialertview UIAlertView *theAlert = [[[UIAlertView alloc] initWithTitle:@"Atention" message: @"YOUR MESSAGE HERE", nil) delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease]; [theAlert show]; UI...

XCode missing inline test results

Everywhere there are pretty pictures of failing tests shown inline in the code editor, like in Peepcodes Objective-C for Rubyist screencast and in apples own technical documentation: When I build my test-target, all I get is a little red icon down in the right corner, stating something went wrong. When clicking on it, I get the Build...

Creating an Array of Arrays in XCode

I am trying to build an array that contains arrays of dictionary objects in Xcode. I can create a working array that has one or more dictionaries in it and then use the addObject: method to add this array as an object in my main array. I cycle around this several times, rebuilding the working array and adding objects to the main array....

XCode 3.2.1 and Instruments: Useless Stack Trace

I've reached the stage where it's time to start tracking down memory leaks and, to my dismay, Instruments is giving me very little to go on (other than the fact that I definitely have leaks). My stack trace contains no information other than memory addresses. Since I'm working on a new project and I've transitioned to version 3.2.1...

How to find the NIBs in a project that use a specific class?

Suppose I have a view derived class named MyView. In the same Xcode project MyView is defined, I have many NIBs. Some of the NIBs have a Custom View with the class set to MyView. Now suppose I want to change the name MyView to something else or rename an outlet. I need to find all NIBs using MyView so I can update them. My question is:...

What's causing this error in a subclass of MKAnnotationView?

I'm trying to create a subclass of MKAnnotationView for an iPhone Mapkit app, but for some reason I am suddenly encountering this error: Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 These are my header and main files for the code that seems to be causing the error. Though the error d...

Possible to hide method implementation in library?

I'd like to know if it is possible to hide library implementation from consumers of a static library. This great thread spawned a few questions in regards to a licensing system for static libraries: http://stackoverflow.com/questions/1739373/licensing-system-for-static-library. The scheme I'd like to use is: Give consumer a license ...

A simple send and receive program in xcode

Hiyee...doing any one knows where to find a simple send and receive program so that can communicate with each other in MAC...And it's in cocoa language ...

how to make web application?

I want to implement web application using xcode?is it possible?if yes then then please advicse me? example:http://pinoypay.com/iphone/ ...

How to cycle through xcode windows (or open 'help' within the bottom pane)?

Hi. I'm using a MBP... In Xcode 3.2 the help/reference pops up in a new window when I ALT, CMD, DOUBLECLICK on a class name**. In previous versions it looks like it used to open up in the bottom pane of the main Xcode window. Can I replicate that in 3.2+? The problem I'm having is that if either one of the Xcode windows (help or main) ...

Registering an icon for my application's document type.

I'm trying to register an icon for my app's document type. After reading Declaring New Uniform Type Identifiers and looking at /Developer/Examples/Sketch I came up with something like this in my Info.plist: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSItemConten...

How to create a NSMatrix of NSImageCell in Interface Builder in 10.6

How can I create a matrix (NSMatrix object) of NSImageCell cells (usually located in an NSImageView) in Interface Builder 3.2.1 (i.e. the one made for Snow Leopard?) In the "old days", you would drag an NSImageView, and then option-drag the corner of the control. It seemed to have stopped working in 3.2.1... Is there another way? Am I d...

Suppress Xcode warning? 'weak_import' attribute ignored

Hi, I've got quite a large Xcode project that since an Xcode upgrade is giving me loads of "'weak_import' attribute ignored" warnings, they are coming from WebKit, and a bit of research suggests it's a compiler bug. Is there anyway to suppress them, I'm getting thousands, making the 'real' warnings impossible to find. Cheers MT ...

Creating an NSMatrix programmatically, Snow Leopard

I'm trying to create an NSMatrix of an NSImageCell prototype programmatically (if you can help me doing it via Interface Builder, be my guest at answering me here) I created a new, empty project. In it, a normal object (subclassing NSObject) has this code (and only this code): - (void) awakeFromNib { NSRect f = view.bounds; NSM...

XCode user scripts - getting the filename

Hi, I'd like to write a XCode user script which, let say, open the current file in another editor. But it seems that the only things which can be passed as argument (actually, as stream input) are: the current election the whole content of the current document Is there any way to access other information like: current filename cur...