ios4

Build an iOS4 app that will also deploy on iPhone OS 3.x devices

Hey, I've got a couple of applications in the App Store at the moment which I've had ready after the release of iOS4. If I try and download one of these in the App store on a 3.x device, it will tell me I need to upgrade. Is there a way to make my application not do this, as I don't think I am using any API calls specific to iOS4. I or...

Switching to another View with UITabBar

Hello, I just started developing with the iPhone SDK and I have a problem with switching to another tab with the UITabBar. This is my current code, and it works so far: myAppAppDelegate *appDel = (myAppAppDelegate *)[[UIApplication sharedApplication] delegate] [appDel.tabBar setSelectedViewController:[appDel.tabBar.viewControllers obj...

Push notification during call - iPhone

What happens if I send a push notification to the iPhone and it's during a call, or during incoming call? would it popup on the screen and show the notification to the user? ...

consuming a .net web service and nsoperation

I am writing an ipad app that's going to list data, including images, from a WS. I am going to consume a web service written in .net (.asmx). I looked at 2 examples, the seismicxml that uses NSOperation and uses an xml feed. another awesome example from Wei-Meng Lee that does not use NSOperation but shows how to make the soap envelop...

Supporting both high-res and low-res images

What is the best pattern for displaying images both on iOS3 and iOS4? For example, here's code for a custom activity animation: activityImageView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"s01"], [UIImage imageNamed:@"s02"], [UIImage imageNamed:@"s03"], [UIImage imageNamed:@"s04"], [UIImage imageNamed:...

Odd errors when testing on iphone, after device is disconnected

I've noticed that when I upload my code to my test device, it works fine... right up to the point that I unplug it from the computer. I assume this is because it needs to connect to the debugger or something, but I'd very much like to ensure that the program will work once it's distributed. How should I go about setting up the program so...

Handling applicationDidBecomeActive

I have the UIApplicationDelegate protocol in my main AppDelegate.m class, with the applicationDidBecomeActive method defined. I want to call a method when the application returns from the background, but the method is in another view controller. How can I check which view controller is currently showing in the applicationDidBecomeActiv...

Integrating Google Checkout in iOS App

Am I correct in assuming using a UIWebView is the only/best way to integrate Google Checkout into an iOS App? A fully native solution would be the best fit as I only require the user to purchase a limited number of items that will never change. Does any one know of existing Apps that have successfully integrated Google Checkout? ...

Risk of using Airplay and MobiOne Studio?

Hello everybody, I would like to know if using Airplay or MobiOne Studio to develop iPhone apps on a PC is actually a viable idea in terms of actual deployment into Apple's App Market. Will my app face the horror that is rejection from the app store or something like that? Didn't Steve Jobs say they will reject apps that are not made us...

UILocalNotification repeat sound

Hi, I have used the code from apples example from this page: Link, but I can't seem to get the sound to repeat. I have checked other applications, such as skype (for VOIP) and Alarm Clock Pro (audio?) but I cannot get the sound file to be repeated. This is my code: - (void)applicationDidEnterBackground:(UIApplication *)application { ...

What UIViewController method is called when opening app from background?

Hi, Is there any conventient way of determining if a view is being loaded from the app being in background mode? In 3.X I would rely on viewDidLoad to do some initalization etc., this however is not the case for 4.X, as you cannot rely for the viewDidLoad method to be called. I would like to avoid putting in extra flags to detect this...

Core Telephony framework partially public in 4.0 BUT

Since I don't want to jailbreak my iPhone i'm developing a personal application that needs to access the Core Telephony framework. In 4.x Core Telephony framework has gone partially public but most of its futures are still hidden and kept private. I've joust downloaded the header files form seriot.ch I've found a list of all the know...

Mapkit showing annotation region

Hi, I have a MKMapView with several annotations. These annotations differ from varios location all over Sweden. What I want to do is to zoom the map so all annotations show. I do not want to position the map to my position (although I do want to show it), but want all annotations to show and center the map according those locations. I...

UIWebView is crashing at the end of loading a page that contains embedded YouTube clips in iOS 4.0x

When I load a page that contains embedded YouTube clips in a UIWebView managed by a modal UIViewController then I crash out with this stack trace: OS Version: iPhone OS 4.0.2 (8A400) Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000 Crashed Thread: 0 Thread 0 Cr...

GKSession alloc / release / alloc = leaks and crashes

I've got an app that throws out the GKSession and makes a new one under various conditions (connection timeout, session fails, etc.). I'm getting memory leaks, though, and it sometimes crashes after a few loops through the reconnect. Here's my code: - (void) netConnect:(id) sender { NSLog(@"allocating GKSession"); currentSes...

ViewController displaced vertically by 20px after modal is dismissed: iOS4 Only. Example code included.

Hello - I hope someone can help... This issue has been discussed here and I have tried the solutions suggested but to no avail. My problem is best illustrated using the example project which can be downloaded from this URL: http://www.hitsalive.com/tmp/VCTest.zip In the example project I have a main viewcontroller with two buttons use...

load iPhone background app in the same state as the first time

In ios4, when you quit your iphone application with the homebutton, it goes to the background. the second time you enter your app (foreground) I wanna be able to load the app like the first time (ViewDidAppear) and not in the state that I left it. ...

What's the best way for a ViewController to communicate to his model?

I'm currently relying on the fact that UIApplication is a singleton and I access the models as delegate's properties, but that seems a long chain to me. Controller->UIApplication->delegate->Model (->particular property to be set) ...

UITextField does not show any input text when added in UIAlertView

Hi, This seems to only occur with the new iOS 4 SDK. When I add a UITextField inside an UIAlertView, whenever I input any text inside the resulting popup, no text will show inside the TextField, even though I will be able to get the inputted text from the textField afterwards. This behavior does not happen when compiling against the old...

How to get audio volume level, and volume changed notifications on iOS 4?

I'm writing a very simple application that plays a sound when pressing a button. Since that button does not make a lot of sense when the device is set to silence I want to disable it when the device's audio volume is zero. (And subsequently reenable it when the volume is cranked up again.) I am seeking a working (and AppStore safe) way ...