App crashed on app store, not in local version - iphone

I ran into a horrifying bug when my app went live. It crashes in a spot where it had been fine.
download from app store using complimentary review code
start app
press start button
CRASH
NOTE: crash reoccurs at every app startup until phone is rebooted - then it disappears
When I try to replicate without the app store
start app
press start button
everything is good.
....
I immediately pulled the app from sale. Right now, I can't replicate at all because I can't download the app.
How to debug?

Download the app from the store onto your device.
Gather the crash reports off of the device manually (
Run them through symbolicatecrash (you did keep the dsym's right?)
Find error, rinse and repeat.

Related

iPhone app crashing after launch

I have a iPhone app that was working till a few days ago. I could run it from Xcode on my phone but today it crashes with the error:
error: failed to launch '/private/var/mobile/Applications/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyAppName.app' -- failed to get the task for process 275
Where xxxx are a set of characters. This is the only warning I get in the Output window.
Closing Xcode and starting again will give different process number on next crash
The app only crashes at random views e.g. the app launches and I can navigate through it up to a certain point, at which it crashes with the error. The next time it may crash on the first views button click.
I have tried a hard reset on my phone but still I get the same problem. I have also deleted the derived data by clicking Options Key -> Product -> Clean build folder... (as I could not find the Developer folder on Lion). I have tried closing Xcode and starting again.
I am using Lion and Xcode 5.0.2.
I am really stuck on this as I have to demo it to a client on Friday and can't figure out what I did wrong?
I have recently added another developer account (working on 2 separate projects, each with its own developer account) and have sent AdHoc demo's through TestFlight to new client.
Could this be what is causing the problem? I have looked in the crashing apps Build Settings -> Code Signing and it appears that i am using the correct account.
This was as per this thread suggestions.
Any help would be appreciated.

Accessing data from core data when in location background mode

I have a app that get launched in the background mode by location region service , I would like to then display a local notification but I need to access core-data to get info for the notification and to query weather it should show the notification. every thing works but the query wont return any data when in the background , If it is not possible to access core-data at that time is there any other way I can store my data so I can read it while running in the background.
I did get this sort of working I think it is more of a issue with xcode 4.2 which is giving me issues I could access the core data file from the background mode only if I run the app from xcode then after I quit running I must open the app on the phone or simulator by clicking the app icon not the run button in xcode then close the app then the next time a run the app on the phone or sim by clicking the app icon not the run button in xcode then the application will access the core-data database. but local notification now wont work on the simulator unless I run form xcode which will then stop core-data access. I guess Im stuck with not being able to build this app till xcode 4.2 is at standard of xcode 3 where I could just get things to work.
Thanks for the comments I think Ive sorted it out , I did not have icloud on my iphone as its older one and I've been testing on simulator and thats is why Ive had this issue so if any one else has this problem the way to fix it is to start and stop your app in the simulator first as when you stop the app by clicking stop in xcode after running it kill the app the wrong way here is the log "9/02/12 12:46:52 PM Application '*App Name**' exited abnormally with signal 9: Killed SpringBoard[5273]" which then stops the app from accessing core data while in background , Ill send apple a bug report but I dont know if its something they want to fix . PS grate Site helpful thanks to anyone who answers Questions :)

App seems to quit after a while when locking screen, normal behaviour?

A bit of an odd thing here. Normally with any app, if open it and then lock the phone, after an hour or so, I'll unlock the phone, the app will re-launch (having quit). But oddly with my app, when I lock the screen with the app in the foreground, about an hour or so later, when I unlock the phone, the springboard appears rather than the app re-launching.
I've run this in Instruments and there are no memory leaks from the point of opening the app, locking and then re-opening. There's nothing wrong with the app, everything works, but I do find it a little odd, sometimes annoying that once I unlock the phone, I have to relaunch the app from the springboard.
Any ideas on why this is happening? Possibly I need to restore my iPhone?
Your app may be failing to resume in time. Try looking at any crash logs left on the device by your app. Here's how to look at the crash logs with XCode 4:
Connect your device
Open XCode
Go to the Organizer (Window > Organizer)
Expand your device listing in the sidebar and select Device Logs
Look for any crash logs left behind by your app

Application crashes after installing iOS 4.2

I recently installed iOS 4.2 for my iPod after then my application started to crash.
The scenario is: I launch my application wait until it's up and running then hit the iPod home button then launch my application again, my application starts again for seconds then crashes.
my application is a job search engine, so in all of its navigation pages it's communicating with internet server.
I think the problem has to do with applicationDidEnterBackground, applicationWillEnterForeground, or applicationDidBecomeActive methods. I do not have an code in these methods and I do not know if I need to, to prevent the crash.
I do not understand what happens after I hit the home button and my application goes to the background:
will it still be running in the background (because of the multithreading thing in iOS4.2).
Sometimes when I relaunch my application it goes to last page I left in before hitting the home button and sometime it starts from the home page.
I do not understand what's going on, I just want it every time it starts to start in the home page.
I was just about to submit my application to the Apple Store just before I updated to iOS4.2 and the crash starts to happen. I'd really appreciate if someone can help me with this issue that I'm not even able/or know how to debug.
Thanks a lot in advance.
Regards,
You can set the Info.plist key ApplicationDoesNotRunOnBackground to make sure the app is completely terminated.
Xcode / Organizer will show your device crash logs.
Xcode -> COMMAND+CONTROL+O -> Device Logs or you (making sure the device is connected) can select the iPod from the list of devices, then choose Device Logs.
You don't need to have any code in the applicationDidEnterBackground, applicationWillEnterForeground, or applicationDidBecomeActive delegates, so that's not making your app crash.
I would definitely check out some of those logs in Organizer. Maybe post some of them here, or pastie.org

iPhone app was working, suddenly starts crashing on startup, reinstall fixes, but why?

Here's the situation:
-Had a development build of the app we just submitted on my phone, working fine for days (and previous builds worked fine for weeks).
-Yesterday, I touched the app icon, the app launches then crashes out (I wasn't connected to my computer at the time, but if I had to guess, it was around or before when applicationDidFinishLaunching runs). Basically, I briefly see my Default.png, then the app closes. This happens every time I try to run it.
-I restart my phone. No difference, the app is still failing to launch. All other iphone apps I have appear to be working fine.
-This morning I reinstall the app from my development computer and all is well, it's working fine again. No problems. This is the SAME EXACT CODE with the same build parameters.
This has me really worried, does anyone have any idea at all what might have happened? It's like the app permanently broke itself, before it even hits any of my code no less :(. I had a theory it might have had to do with an expired provisioning profile, but I didn't get any message then or when I reinstalled.
I'd appreciate any advice/pointers/ideas people have!
Connect your iPhone to the computer, launch XCode, go to the Window menu, and select Organizer. Click on your device in the left hand bar, and check your crash logs.
That should tell you when it is crashing, and why.
Actually, the crash logs should still be there from when your app WAS crashing, so even if you have reinstalled, you may be able to figure out what WAS going wrong.
Are you using core data?
Did you change your schema? That would cause a crash on startup and a reinstall would then fix it.
If it was the exact same code it seems to point to a data issue.