iphone

iPad - dataWithContentsOfURL throws NSRangeException when I load a URL that has data

Hi all... my corporate overlords want me to display image ads for our upcoming iPad application. I'm currently trying to show the image by using the following code: - (UIImage *)getAdImage:(NSString *)adName { NSString *adID = [self getPrivateConfigSettings:adName]; NSString *adUrl = [NSString stringWithFormat:[self getPrivateConf...

viewDidAppear called twice, but viewWillAppear called once

I have discovered that when my program starts, in one of my viewcontrollers the order of calling is viewDidAppear, viewWillAppear, viewDidAppear. I was not expecting the first viewDidAppear to be called. What could be causing this and how do I fix it? ATM I have a flag in viewDiDAppear to check if viewWillAppear was called, but it's a h...

Facebook iPhone SDK Authorization question

I want users to be able to log on to my iPhone app, with their facebook credentials, WITHOUT displaying Facebook's login screen. How do I do this? ...

MPMoviePlayerController vs. MPMoviePlayerViewController

I'm new to iPhone development. Just wondering what the difference is between the MPMoviePlayerController and the MPMoviePlayerViewController. Also, more generally, what is the difference between a controller and a view controller? I know that you use a controller to construct a view (as with MPMoviePlayerController.view), so what does a ...

Why doesn't NSHTTPCookieStorage save cookies correctly?

I'm having some weird problems with NSHTTPCookieStorage in my iPhone app. When I invoke the login action on my web service, the service sends back an auth cookie named "auth" as well as some other cookies. When I log the user out, I call a logout action on the server which removes the cookies. If I print the result of [NSHTTPCookieSto...

Anyone know how do i get the real time feeds on gas station price in US via webservice version?

Hi, Anyone has pointers on how to get real time US gas station feeds via webservice ? I'm trying to develop an iphone app that give users real time gas station price near their location. Currently i was wondering is there a legit government service that produce real time gas station price in the US on a daily basis? I heard about ...

Accelerometer to relative position

Before I reinvent the wheel I wanted to see if anyone can share code or tips for the following: In order to get relative position of the iPhone, one needs to Set the accelerometer read rate Noise filter the accelerometer response Convert it to a vector Low pass filter the vector to find gravity Subtract gravity from the raw reading to...

objective-c preprocessor directives

how do i write the following in the preprocessor directive language? if (isfullversion and isproduction) else if (isliteversion) end if ...

how i can build app in 2g phone using 3gs frameworks

I am developing one application which need scanning component, I have application ready but when I build it in 2g phone with os version 3.1.3, application gives me error. I have weak linked those framework which are not in 2g. ERROR: Not Enough Frames In Stack Do advice thanks in advance. ...

Animating Row Deletion in UITableView with CoreData gives Assertion failure

Hi all. I have a UITableView that shows a list of objects stored with CoreData. I can delete an object using the following code: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { ...

IPhone: What the heck is a WWDR intermediate certificate?

In the iOS Provision Portal, in Certificates, Developer (or Distribution) it says: "*If you do not have the WWDR intermediate certificate installed, click here to download now." I don't even know what that means. Do I need to download and run that? or do I need to only download the current certificate only? ...

Adding a UIView subclass with xib to UIViewController

What am I doing wrong here? Created: CustomTab.h #import <UIKit/UIKit.h> @interface CustomTab : UIView { IBOutlet UIView *view; } @property (nonatomic, retain) IBOutlet UIView *view; @end CustomTab.m #import "CustomTab.h" @implementation CustomTab @synthesize view; - (id)initWithFrame:(CGRect)frame { if ((self = [supe...

Getting level values from PCM raw data using Core Audio

I am trying to extract level data from a PCM audio file using core audio. I have gotten as far as (I believe) getting the raw data into a byte array (UInt8) but it is 16 bit PCM data and I am having trouble reading the data out. The input is from the iPhone microphone, which I have set as: [recordSetting setValue:[NSNumber numberWithInt...

Live Streaming With iPhone

Hi i am trying to develop an Live Streaming IPhone App , i also read about HTTP Live Streaming in iphone but i am not getting an way that how the process will work , how a live stramming will play in iphone , i am able to play a movie in iphone using MPMoviePlayerController but not able to play live stram . if any body has done this and ...

IPhone & IPad: Universal App, Which OS version do my users need?

Hi, I have a universal app for ipad and iphone. What I'm trying to determine is what OS version do my users need to have in order for my app to work? In Xcode, in the top left hand corner I see: "Device - 4.0 | Release | MyAppName" Does this mean they need to have ios 4.0? Also, the weird thing is that my ipad is running ios version 3....

iTunes Connect: do I need to complete 'iOS Paid App' contract before I try to submit my app?

It seems like they want my bank info, tax info, etc in the 'iOS Paid App' contract... must I do all this before myapp has even been approved? ...

How to create shadow effect of UIScrollView, UITableView when scrolling?

Hi, I have a UITableView and I would like it ho have the same effect when scrolling as the picture. (Shadow below UINavigationBar and above of UITableView) How can I do this?: ...

App crashing when trying to create a TBXML object with this xml

I am trying to parse following xml using tbxml library - <?xml version="1.0" encoding="UTF-8"?> <REPLY replyCode="Success" > <TRACK track_id="1302234" track_mp3="74-Ruff_Ryders_feat_Sheek_Louch_and_Big_Pun_-_Piña_Colada.mp3"></TRACK> </REPLY> But when I tried to create TBXML object the app is crashing I think this is because of s...

Levenshtein Distance Algorithm better than O(n*m)?

I have been looking for an advanced levenshtein distance algorithm, and the best I have found so far is O(n*m) where n and m are the lengths of the two strings. The reason why the algorithm is at this scale is because of space, not time, with the creation of a matrix of the two strings such as this one: Is there a publicly-available l...

problem with Switch Case

I am creating a UIView dynamically and adding a scrollview in it. What I want is to create mutiple scrollviews and add them by using SWITCH Case. I am passing an integer value called num on IBAction of a button on UIView. and calling the function to create a scrollview. -(IBAction) button1pressed{ num = 1; NSLog(@"value %d",num...