iOS App works fine when deployed from xcode, but more crash prone on MKMapView when installed from iTunes - iphone

I have a tab based app that uses four tabs. The home tab is an MKMapView. When I load the app onto my iPhone and run from "Xcode" or "Instruments" there are no problems with crashing. However when I load the app onto my iPhone from iTunes or testflight.com it crashes whenever the MKMapView pans or zooms. Everything else in the app seems to work fine.

can you check the iOS version of simulator and device both? this might be happening due to some method or something else which might be not exist in the running version of iOS and your code might be calling that particular method.
You should debug your code while running on device and track the specific action as your were saying crashed happens when only the pan or zooming of mapview performed.

Related

iOS7 - App causes device (not app) to crash

Our company has an app which is basically an eBook reader.
We use the RMSDK to perform book downloads & read.
Now, something very strange is happening in iOS7 devices (not in the simulator):
I download a book using the fulfillment method in the RMSDK
I wait for the book to finish downloading. The book is saved in the NSCachesDirectory (for App Store guidelines reasons) - so far, everything works fine
I hit the home button, the app moves to the background
I hit the app button to bring the app back, that's when the problem happens:
The app gets completely stuck. Hitting the home button does nothing, hitting the power button shuts down the screen, but then hitting the power button again does nothing.
The device itself has effectively crashed.
After a few minutes, the Apple logo appears on the device and the device comes back to life after a reboot.
I have no idea what in my code could be causing the device to act this way. Shouldn't the iOS7 sandbox prevent me from being able to crash the whole device?
Any ideas on why this could be happening and what I can do to prevent it would be greatly appreciated.
EDIT:
I placed a breakpoint on the -(void)applicationDidBecomeAcvive: method in the AppDelegate, and it's not being called when clicking on the app icon in the last phase before the crash.
EDIT:
The RMSDK is using libcurl to download the books. Could this be a cause for this behavior?
EDIT:
The problem is happening if I click on ANY app after I click on the home button, not just on the same app. So for example, I click on the home button, then I try to open Fruit Ninja, and the device crashes.
We managed to solve this issue by disabling functions in RMSDK, which call mkfifo(). I'm not sure how much I can say here due to NDA but they're all located in one file and can be cleanly converted to no-ops with a nice preprocessor #if defined()
Its an OS level bug. iOS 7 is still unstable in areas, for example my Apps report crashes in places that are part of iOS 7 itself and couldn't be caused by my app.

iOS5 app running on XCode w/ iOS6 freezes if the app after it goes to the background

Hi I have an app that is working fine on iOS5, now running the app using iOS6 it freezes after it goes to the background and it goes back to the foreground, it no longer responds to touch events.
If I built it for 5.1 simulator works perfect, this only happend while running on iPhone 6.0 Simulator.
Any ideas?
EDIT WITH ANSWER:
It turns out the culprit was the TWTweetComposeViewController, which I use in my application.
I initialized TWTweetComposeViewController in my viewDidLoad function. Apparently, if you initialize but do not show the TWTweetComposeViewController, it will prevent your application from resuming. Check to see if you use this view controller and try removing it or not initializing it until you are going to show it.
Mario, I am having a similar, if not the same, problem. In my case, my app hits applicationWillEnterForeground correctly as it resumes from the background. However, the app seems to hang at this point and never reaches applicationDidBecomeActive. I am at a loss for why the app would never reach applicationDidBecomeActive. Like you, the app runs fine on iOS5 and below, but has this problem with iOS6.
Can you confirm that your app reaches applicationWillEnterForeground and doesn't hit applicationDidBecomeActive?
(I would write this as a comment to your question but I cannot seem to figure out how to do that.

App crashes when closed

When I close my app (double tap home button and touch the X) on my iPhone, it crashes and I get this error:
objc[9337]: class `ADManager' not linked into application
objc[9337]: class `ADSessionManager' not linked into application
objc[9337]: class `ADSession' not linked into application
(lldb)
-Deployment target: iOS 5.1
-Iphone iOS 5.1.1
-Testing with Xcode on iPhone
How can I fix it?
This is the default behavior of all iOS apps in iOS4 and later.
Um, it's not a good idea to be running the app connected to Xcode debugger and then terminate it in the middle of the process. It can very easily lead to the bootstrap error.
The debugger is constantly monitoring your app when you run it in iTunes, terminating it would obviously cause a crash =/
You can see a spinning icon in the "debug" tab in Xcode 4 (the tab with the icon that looks like a speech button and some lines in it in your project navigator) when you're in the middle of debugging.
Not sure what you're trying to achieve by terminating your app, a registered background process such as location service?

What could cause my app to show a blank screen on startup after upgrading to iOS 4.2.1?

My app works fine on iOS 3.3, but after I upgraded my iPhone to iOS 4.2.1, I started to see some weird behaviour.
When I start my app on the upgraded iPhone, it goes blank. I have to tap the Home button to close the app.
The problem is, the app did not crash. It just showed me a blank screen. So I don't have any crash report to track this issue down.
Has anyone seen this before? Is it an iOS 4.2-specific issue? What steps can I take to determine the cause so that I can fix my code?
The behaviour of iOS did change between iOS3 and iOS4. As a first step, try walking through your code with the debugger. Also check your application:didFinishLaunchingWithOptions: method in your main App Delegate class.
A quick search also turned up some useful info about a similar issue: App shows white screen on startup after upgrading to iOS 4.2
The link also has info on how they managed to find out what was happening.

iPhone - fast-app switching and iOS 4

I'm trying to get the following functionality in my iPhone app:
When backgrounded, stays running (doesn't have to do any background work)
When resumed, app picks up where it was left off
I'm mainly wanting the same screen on my app still up, as there are several UINavigationControllers within a UITabBarController.
I have done all of the following:
Made sure I'm compiling with 4.1 SDK
Set UIApplicationExitsOnSuspend to false
Handle DidEnterBackground and WillEnterForeground in my AppDelegate
Call BeginBackgroundTask in DidEnterBackground, to attempt to keep my app open
I'm using MonoTouch, but that it probably beside the point. I can take answers in Obj-C, for sure.
I've tested my app on a jailbroken phone with Backgrounder, and I see the "app in background" badge disappear immediately after pushing the home button. I also tried setting UIBackgroundModes in my Info.plist, but to no avail.
Is there anything I'm missing?
Or is this something I would have to implement on my own to resume the previous state of my app? Everywhere I've read talks like it should just work automatically.
If you don't want to be doing work in background, don't call beginBackgroundTask. That call is for situations where you want to do some kind of work in the background. And if you don't finish that work fast enough, iOS will terminate your app.
When I upgraded to iOS 4.x, my MT application started exhibiting this behavior without me having to do anything. iOS should take care of it for you.
I finally got in touch with someone on MonoTouch's irc.
In MonoDevelop there is an option to make a dual iPad/iPhone project, which I used. This is causing my app to behave as if it's running with the 3.2 SDK when deployed to the device.
I think my solution is to install the iOS 4.2 SDK that just came out, since this ads the new multi-tasking feature on iPad.
Not only do you need to support going into the background, you also need to support cases where your app has been terminated. In your app’s initialization code, you should resume the state that it was in. For instance, when you push a view controller, use NSUserDefaults to store a value for the currently-displayed screen, and then when you start read that value and display the associated screen.