iphone-sdk-4.0

iPhone SDK 3/4 App will not run on a iPhone 2.x device even with deployment target set to 2.0!

Ok... I know about the difference between the base/active SDKs and the deployment target. I have my base SDK set at 4.0 and the deployment target set at 2.0. I am not using any APIs post 2.x, conditional or otherwise. Since I can't debug on a 2.x device, after building it, I use the iPhone Configuration Utility to install the app on t...

How to show button ‘Done’ on number pad on iPhone OS 4?

I'd like to add a Done button to the iPhone number pad keyboard. There's even a handy space at the bottom left for just such a button. Previously, I was using a similar trick to those described in Question 584538 and Luzian Scherrer's excellent blog post, but that stopped working in iOS 4. I can do it by creating a custom inputView, but...

iPhone UIWebview video playback 4.0

Now that 4.0 is public, I can edit this question and ask it again. This code works in 3.2 and any prior versions, but in 4.0 I get an alertView saying "This movie could not be played". ivar webView //in viewDidLoad self.webView = [[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; webView.scalesPageToFit = YES...

Setting end date for repeating local notification in iPhone OS4 SDK

In the iPhone OS4 SDK, does anyone have a suggestion for how I would implement a repeating local notification that ends on a particular date? Looking at the API documentation, there doesn't appear to be a built-in property of UILocalNotification to allow you to set an end date on a repeat. Any suggestions would be much appreciated. Th...

iPhone 4.0 SDK UIWebView crashes with DOMHTMLElement error..

My app have an UIWebView and I open a twitter oauth page with it. when I open oauth page , it works well. after I sign-in, it redirects to another page which have PIN code. and It crashes down with logs below. Is it a bug in 4.0 SDK? 2010-06-14 22:55:11.159 AllFx[1435:2003] -[DOMHTMLElement setHref:]: unrecognized selector sent to i...

Why does CLLocationManager returns null locations on the iphone SDK 4 beta in the Simulator?

Hi everyone, I have this piece of code: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { NSLog(@"Manager did update location!!"); self.currentLocation = newLocation.description; } I have this code inside a class that conforms to the CLLo...

UINavigationController crashes in 4.0 - not <-4.0.

I'm trying to push a UIViewController with UINavigationController. It's working perfectly in any SDK prior to 4.0, but it just won't work in 4.0. I'm getting the OBJC_MSG_SEND (EXC_BAD_ACCESS) error. The UIViewController isn't nil, neither is self.navigationController. I've tried NSZombieEnabled, but nothing shows up. The UINavigation...

iPhone 4, High-Resolution Screen Support.

Hello all. It became High-Resolution Screen Support from iOS4. I make the custom button with UIButton. It is prolonged in 640x960 and it is displayed. With this, it is not significant. Isn't there method that makes 640x960 a standard and displays? ...

Iphone sdk 4 home button minimizes the app

Hi, i have created a small app using the sdk 4, app works perfectly fine, but when the user hits the home button to exit and when he comes back, the app doesn't go to the home screen, it continues from the state (screen) which the user hit the home button. How can I reset it? ...

How to make iPhone universal binary for iOS4 and iOS3?

It is possible to make universal binary for os 2.x and 3.x, you can see sample code for MFMailComposer But how to make it for iOS4 and iOS3 and XCode 3.2.3? ...

iPhone app icon messes up on simulator 4.0

Greetings! I've been developing this app for the iPhone using sdk 3.1.2 the customized icon looks fine when using the 3.1.2 simulator (and earlier) however, it shows differently using the 4.0 simulator. is this a problem with the simulator? or does making customized icons work differently for iOS4? thank you and have a nice day :D ...

NSURLConnection hangs on recieving not too big amount od data

I have some code here: (...) NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if( theConnection ) { webData = [[NSMutableData data] retain]; } and delegate methods: -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { ...

Support legacy iPhone users

Now that iPhone SDK 4.0 is available for download, and iOS 4.0 will be available for consumers shortly, does it make sense to start using the new features available in the 4.0 OS? My primary concern is that using the 4.0 features mandates that end users also update their phones/ipods to 4.0. While this process is pretty painless, is it...

Is it possible to set inputView for UITextView in iPhone SDK 4.0

setInputView: is still presented in the both UItextField and UITextView classes. But the below code shows different results for 3.2 and 4.0 SDKs. I have installed latest (GM) SDK version. About xCode -> More info shows Xcode: 3.2.3 (1688), SDKs: iPhone OS: 3.2: (7B367), 4.0: (8A293) iPhone Simulator: 3.2: (7W367a), 4.0: (8A293) There...

How to get UIImagePickerController zoom level value in iPhone OS 4

Hi. I am playing with the iPhone iOS 4 for the UIImagePickerController. BUT, I am having difficulties find out the zoom level with user touch the camera view zoom in/out. Does anybody know how to deal with this issue? ...

iOS 4 Build SDK

Hi, I installed the iOS 4 SDK yesterday. I previously had the 3.1.2, 3.1.3 and 3.2 SDKs installed. Since installing the iOS 4 SDK, I only have 3.2 and 4.0 available in Xcode. When I load an Xcode project that was targeting an older version (say 3.1.2), it says "Base SDK Missing" in the toolbar. I've been able to reset the project to ta...

NSDateFormatter returning nil in OS 4.0

I had the following code working on on OS 3.x NSString *stringDate = @"2010-06-21T20:06:36+00:00"; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"]; NSDate *theDate = [dateFormatter dateFromString:stringDate]; NSLog(@"%@",[dateFormatter stringFromDate:theDate]); b...

[XCode 3.2.3] iPhone simulator doesn't see my NSString category

Hi, I've an application with the following category for NSString: @interface NSDate(ISO8601Parsing) //This method is the one that does all the work. All the others are convenience methods. + (NSDate *)dateWithString:(NSString *)str strictly:(BOOL)strict getRange:(out NSRange *)outRange; + (NSDate *)dateWithString:(NSString *)str st...

Bad Access Error in Cocos2D Game in SKD 4, but not 3

Yeah, so this one through me or a loop for a while until I figured out what was going on. With Apple releasing the final version of Xcode today, and iOS 4 coming out yesterday, I finally started to look into porting my apps to iOS 4. So I downloaded the new SDK, and got to work. After working on my app a bit, imagine my surprise when ...

Exit application in iOS 4.0

Before iOS4.0 clicking the home button on iPhone exits the application, and Apple had in their guide that programmatically exiting the application was not accepted. now everything changed in iOS4.0, clicking the home button puts your app in a suspended mode (multitasking).. and I think there should be a clear way for the user to exit th...