IOS: go to link in ios5 crash app - ios5

In my app I use this instruction in an ibaction to open safari and go to the link:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://www.example.com"]];
but the problem is that in IOS 5 it don't work fine because it open safari and go to the link but when I return in the app I have only a black screen and the app don't run. why?

Where did you test your app? simulator or a real iPhone? The way you did is right. I have a similar app offer the browser open up thing, and it worked fine both on simulator 5.0 and iphone 4 running iOS 5.0

ok the problem is that that when I go to background I close a view with view.parentViewController dismissModalViewController ad in ios5 it don't work, now it work

Related

iPhone app - initial unresponsiveness on iOS 6 on iPad

I have an iPhone app that runs fine on iPhones (tested on iOS 6 and iOS 5), and iPads running iOS 5. However, on an iOS 6 iPad, the app is initially unresponsive until resized from 1x to 2x mode (or vice versa), or an orientation change.
This appears to be a bug in the Operating System, since an app isn't supposed to be able to react to changes to the 1x or 2x mode, but it's still baffling. Any ideas?
I also see this issue on my apps. I found a solution: In the Xcode project -> Targets -> Summary, scroll down to 'Status Bar', check the box for 'Visibility' 'Hide during application launch'. After doing this, the iPhone app works again on iPad iOS 6.
You may notice that after the change the status bar is hidden. You can re-enable it in code with:
[application setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
PaiGow's fix worked for me, but in the iPad Retina sim with iOS 6, views pinned to the top edge of my (Landscape-only) screen moved up into status bar space and were cropped by the dummy status bar than the iPhone "display" on iPad uses.
Instead, I left "Hide during application launch" UNchecked, but still used the line:
[application setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
in my app delegate's applicationDidBecomeActive call.
Just making this call to setStatusBarHidden:withAnimation: is enough to make the app responsive again, in both the sim and on an actual device, and it has no visual side effects that I can see.
I've also tried putting the call in application:didFinishLaunchingWithOptions: and it works in the sim; haven't heard back from my beta tester with the iPad yet as to whether it works just as well in hardware.

notifications doesn't show/ doesn't scheduled in Simulator but works in device Problem on Simulator 4.3?

I have Implemented a reminder application.
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
int count = [[[UIApplication sharedApplication] scheduledLocalNotifications] count];
NSLog(#"count is %d",count);
All are works fine notification alert raises when it's scheduled time arives.
Suddenly today notifications are not showing . and they didn't scheduled
notifications count also remains same even i set the notification,
But when i exicuted the application in my device, it works perfectly, notificaton count increases, Notification alert raises perfectly
But not work in simulator...
Why Notifications doesn't work on simulator..?
I have used Xcode 4.1
iPhone 4.3 simulator
What happen?
Trash your /Users/{Your name}/Library/Application Support/iPhone Simulator/ directory and rebuild the projects you are having trouble with.
Solved by follow question iPhone: iOS 4.3 SDK Simulators stuck up and crashing:
Thank u #Kiby Todd...
Make Sure we put a copy of "User's" folder existed in iPhone Simulator folder
Re paste User Folder in iPhone Simulator

Launching the iPhone maps application from your own code

How to Launch the iPhone maps application from our own code
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://maps.google.com/maps"]];
I tried this code,but its coming in browser.Its not opening in the iPhones Default map app...
I want my code to display the iPhone default map app to come up after existing the application which is being run.
use MKmapView to show map in Application instead of launching the Browser.

iPhone simulator only shows a black screen after launching the app

I am moving my 3.x app to use iOS4 features like background processing, fast-app switching. I have been able to get the app running fine. But now whenever I launch the app on the simulator, it just shows a black screen. The app launches, status in XCode changes to running but nothing shows up other than the black screen.
The app runs fine on a device so I know there's nothing wrong with the code. Any idea what could be happening? I have tried reinstalling the SDK but it did not make a difference.
And yes, I have the [window makeKeyAndVisible]; line in the code. So that is not the issue. I am using application:didFinishLaunchingWithOptions: to handle the app launch.
Thanks.
I'm moving my app from 3.x to 4.x and have the same issue. Sound system is launched (music and sounds play well), but entire screen is black. It happens on 4.x simulator and device, but on 3.1.3 device everything seems well.
UPDATE: Recently i have added some window manipulations after application init:
[window center];
[window makeKeyAndVisible];
[window becomeFirstResponder];
and now it's alive =)
Some features do not work in the simulator, I know that when you try to access the iPod library in your app the simulator will just hang like this (it was this way back in 3.1 at least). Make sure you aren't using a feature that the simulator doesn't support.

iPhone app runs on iPad simulator, but the background is inverted!

i've installed new sdk 3.2 pre-release wich have iPad simulator, i have tried to launch an iPhone app created by me in iPad simulator; the main view of this app has an image as background; when launch it on iPad simulator this background(self.background = [[UImage..... ) it comes inverted, from top to bottom.
Any idea??
thanks in advance....:)
This was an early bug in the SDK, which was fixed somewhere around Beta 3.