I have developed an application on iPhone.
If i run it from XCode, no problem : XCode installs the app on the device, then the app is running, OK.
But then, I unplug the device from Mac, and i run the app : crash happens, OK.
I would like to know if there is a way to attach XCode as debugger when I run an app from the device, and not from XCode. Such like Windbg and dump of application crashed.
If you re-attach your device to XCode, you can access the crash log.
Go to the Organizer, select Devices, select your device, and then under your device name, you will see "Device Logs". You will be able to select and examine any of them in the next window to the right.
You will also be able to see the Console.
These should help in determining what caused the crash.
I think this is mostly due to memory issue. Check in instruments that your application consumes more memory. If so try to reduce memory conception by releasing unnecessary view controllers and mostly UIImageViews
Related
I have an app in ad-hoc mode and it crash right after starts. I have access to Xcode and i try to find crash log like here: iPhone crash log?
But i have no crash log from this app. Why?
Right after app starts i can see Default.png and few second later it crash, i've never even see the mainViewController. How do get a crashlog? How to detect this error? I don't have an access to source code. I have only ad-hoc distribution.
Problem not occurs on every devices. AFAIK this is only 3GS problem. Strange.
Instead of looking for the crash log, try connecting your phone to xcode but look at the Console screen instead, run the app and you should see output on the console, see if you get an error message there.
For users who don't have access to Xcode or are running on a PC you can download Apple's iPhone Configuration Utility which also gives you access to the device console.
My application crashes when freely running it on a real device or in the simulator. When I'm running it with XCode attached, the app works fine.
The app doesn't give me any errors and since I'm not running it with XCode attached, there is no message sent to the logger.
Any idea of what could be wrong or how I could find out what causes this crash?
Thanks!
You can read about CFRelease in detail in the following thread
Cheers
If you just want to test in a device why don't you try through iTunes. Find the Target of your project in the Finder, then drag it to iTunes. You can then sync the applications. This is not a solution but an alternative to run the app on your device.
Thanks Aditya,
The crash logs in the Organizer are actually very well detailed and they even include the line of code in the implementation file where the app crashed. When going to that line of code it seemed that I was CFRelease -ing a ABRecordRef, which is an integer of some kind...therefore I shouldn't release it
The weird thing is that it didn't crash or complain while debugging, but when running it on the device it did.
This is my first try in moving my app to a device. I was able to launch the app by clicking on the start button on XCode to launch it on my iPhone. I stopped the app and see if I want to try whether I am able to run it without being plugged. I can still see the app icon on my iPhone but when I launch it.. it immediately closes. What am I doing wrong?
I fixed the error, it was a stupid %# where I need %f.
First delete your application from the device and run again your application from the XCode on the device and run it thoroughly while the device is connected and then try to run the application. It should then work.
It is not related to provisioning. Environment is different when the program is being debugged. Plug the iPhone back to computer and check the crash log in XCode > Organizer > Device > Device Log.
When I run my app with simulator every thing is ok.also when i run it on device (ipod touch 3G) for the first time,i have no problem but if i close my app and run it again,it hangs(no button working & just i can uninstall it) and if i try to minimize it ios seems out of action(every thing is being black)
how can i solve this problem ?
Run your application in the simulator with the profiling tools, making sure you check for allocations / releases and if there are any network resources left open.
You haven't said anything about what your app does to give any more help than that, but the development tools will tell you what is going on.
Also when you connect to the iPod, check the crash reports to see what happened
have u release any object in appWillTerminate. may be u trying to release object that is already released before the application quit. or u can see the application quit status in nslog if status is not 0 means application is not quitting properly.
When I try to debug my app on the iphone device, the splash screen shows and then the app crashes immediately. If I run the app in the simulator or on the device (not from XCode) it runs fine. I tried putting a breakpoint in the main method and it doesn't seem to hit it. There are no logs generated. ideas? suggestions?
Are you using a Apple Developer account or have you hacked the phone to develop on it? If its hacked, that is probably the problem. There is extra data being passed to the device because of the hack causing it to crash. Not sure if there is an easy work around except paying for a developer account.