iphone

iphone Xcode settings problems

I am going through the Apple provisioning profile walkthrough documentation to create the binary to submit to the app store but came across a very visible problem. The documentation shows that when the user clicks on the "Overview" tab in Xcode they should have a list of options such as: Device - iPhone OS 2.0, Device - iPhone OS 2.1, ...

Loading an Array Image item using the formatted NSString

I want to load an image from an array and set the view to display this image. The current code isnt loading anything, just a gray image full screen. myView.image = [UIImage imageNamed:[names objectAtIndex:r]] If I have a counter r, which I use to access the index. How could it be done to load an image as such myView.image = [UIImage...

how do I catch all exceptions in iphone?

I need to catch ALL exceptions and errors in an iphone app. Obviously, this is only for really strange cases where the exception or error is totally unexpected. In those cases, it would be nice to log the error or something, so as to get knowledge of the issue and fix it in the future. Do you know a way to catching ALL exceptions or err...

Core Data background sync conflict issue

I'm running into a crash issue while developing an iPhone app with Core Data. The app syncs data with a webservice on a background thread. When the app first launches, the existing data in the Core Data DB will be displayed to the user in a UITableView, while a background thread is kicked off the grab the latest data from the web ser...

Unable to disable animation of CALayer>>removeFromSuperlayer

I wish to remove a CALayer from its superlayer without animating. What happens here is the layer animates to a position, works great, when however the animation stopped, this code is executed, which returns the layer to its start position, and fades out; presumably then gets removed from the superlayer. How may it be stopped from animati...

iPhone SDK 4 "Half curl page transition"

In Steve Jobs' keynote announcement of the iPhone SDK 4 earlier this year, one of the slides showed that a "Half curl page transition" was part of the new SDK: I've looked through the iOS API docs and I can't seem to find this transition. Does anyone know where it is? ...

spotlight search in the application

Hi, Is that possible for spotlight search of iphone to take the contents of my application and show as search results ? If yes how to accomplish ? ...

Expected Declaration Specifiers "NSRangeException"

I had this in my try-catch-finally and it compiles ok. @catch (NSException *e) { ..... } ...but when I tried to catch NSRangeException: I got error. @catch (NSRangeException *ne) { ..... } The error is: Expected declaration specifiers: NSRangeExpection (TechZen says -- this presumably a typo for:) Expected declaration specifi...

Instruments Living Count and/or Retain Count Issue

I'm running into a retain count issue that I do not understand. (I've added what I believe to be the retain count of vertex in [] at the end of each line of code). CBVertex *vertex = nil; for(int i=0; i<10; i++) { vertex = [[CBVertex alloc] initWithFrame:CGRectMake(minX, y, 10.0, 10.0)]; // retain count [1] [vertex setTag:i]; ...

iphone: date formatter on 4.0

Hello, until now I used date formatter the following way with string like '2010-06-10T11:50:01+02:00': NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"]; NSDate *from = [dateFormatter dateFromString:[NSString stringWithString:fromStr]]; That wa...

UISlider thumb image issue..!

Hi all, How can we set the thumb image of UISlider to stop once it reaches the max value .i.e once the thumb image reaches the max value(at the end) user should not be able to move the thumb image. ...

iPhone 4 SDK "Ad Hoc" install error

I recently upgraded my iPhone SDK to 4. But now when I create an "Ad Hoc" build for my customer and send him the zipped app and "ad hoc" mobile provisioning file he gets the following dialogue when attempting to install the app using iTunes 9. "A provisioning profile named 'embedded.mobileprovision" already exists on this computer. Do...

Problem with copying main application

OK , the eXercice is about to get the path to the running application i have done this by : NSFileManager *FManager = [ NSFileManager defaultManager ] ; NSString *CurrentPath = [ FManager currentDirectoryPath ] ; NSDictionary *infoPList = [[NSBundle mainBundle] infoDictionary]; NSString *appName = [infoPList objectForKey:@"CFBu...

Possible to cancel an autorotation once a shake gesture is recognized?

Does anyone know if it is possible to stop an autorotation once a shake gesture is recognized (i.e. don't autorotate during an aggressive shake)? ...

having trouble upload image from iphone Photo Picker to a server using ASIFormDataRequest

Basically I am trying to upload an image using ASIFormDataRequest. This is my following code ASIFormDataRequest *request = [ASIHTTPRequest requestWithURL:urlImg]; [request setRequestMethod:@"POST"]; [request addRequestHeader:@"Content-Type" value:@"application/xml"]; [request setDelegate:self]; [request setTimeOutSeconds:500]; NSData...

Session Based Webservice

I am trying to call a session based webservice from my Iphone application. However, I can't get it to work since an Iphone App doesn't allow having a cookie which is necessary for storing the session information. I have read the following article and there seems to be a way to deal with session based webservices however, I can't find o...

Why doesn't this NSPredicate work?

I have a very simple NSPredicate as such: NSPredicate *sPredicate = [NSPredicate predicateWithFormat:@"name beginswith '%@'", theString]; [matchingTags filterUsingPredicate:sPredicate]; This causes the array to have 0 results when theString == "p" However, when I do this: NSPredicate *sPredicate = [NSPredicate predicateWithFormat:@"...

Parsing `<media:content>` RSS feed tags using touchXML

Hi, I have the following RSS feed that I'm trying to parse using touchXML for an iphone application. <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:ext="http://ooyala.com/syndication/ext/" xmlns:mediasl="http://www.slide.com/funspace/developer/" xmlns:itunes="http://www.it...

iPad simulator broken

iPad simulator won't run my app! It loads and animates in and then crashes halfway through the loading animation. Xcode reports: Debugging Terminated. Why? I just had this on my iPod touch (8GB) and I rebooted them both. EDIT: This code in the delegate seems to be causing an issue: NSLog(@"Device: %@", [[UIDevice currentDevice] u...

Using lock screen for my app?

I'd like to make my app use the audio buttons on the lock screen while multitasking. (Yes, like Pandora.) What API am I looking to use? ...