app works well in simulator,But crash in iphone - ios

I had developering an audioQueue Program. It's works well either simulator or iphone with xcode.
But if i lanch the app in my iphone independently,the app wil crash after 20s.
I can't get any debug information! Can anyone lead me a way to solve the problem?

You should be able to retrieve crash logs by connecting your phone to iTunes on a mac and syncing it. Then in Finder choose Go > Go to folder and type /Library/Logs/CrashReporter/MobileDevice/<your phone name>/
There should be a list of files named after your apps

Related

App crash on iPhone 7 but not on simulator

My Objective-c app is working well so far from iPhone 5 to iPhone 6s plus. But 2 days before I got some complaints from some iPhone 7 users, the app is crashing on their phone as soon as they installed the app. And when they tap the app icon also the app is crashing. But when I run it on iPhone 7 simulator I don't get any issue. I don't even have an iPhone 7 device to check this issue. Is there any way that I can catch this issue even using an online tool? Please suggest me a solution. Thanks.
Here’s what you’ll need to do to stop the apps from crashing or hanging immediately on open: Install any waiting software update, found in Settings > General > Software Update (it is likely versioned as 10.0.1 and the iPhone 7 may ship with iOS 10.0)
Install and let the iPhone reboot as usual
Open the App Store
Download any new app at all, literally any app, whether it is free or paid does not matter
You’ll see a pop-up message saying Terms and Conditions have changed, accept the new terms by tapping on the numerous “Agree” screens
Exit the App Store
Return to the Home Screen and launch the app(s) that were crashing initially
Source : http://osxdaily.com/2016/09/16/fix-apps-crashing-immediately-new-iphone/
I had the same issue with my old app, then added the permission in Info.plist. like
For Camera:
<key>NSCameraUsageDescription</key>
<string>You can take photos to document your job.</string>
Photo Library
<key>NSPhotoLibraryUsageDescription</key>
<string>You can select photos to attach to reports.</string>
Please check you app for other permission like microphone or other. I hope this will fix your problem.
If you are not satisfied from above answer then try Instuments to check any memory issue or other issue with iPhone 7

App Keeps Respringing When Launched

For some reason, whenever I try to run any app created in Xcode (even brand new ones), something happened (?) and now Springboard takes up a ridiculous amount of CPU until it launches. Once it's launched it's fine, but until then it will often respring if there's not enough memory. It runs fine in the Sim, just not on the physical phone. No clue why. I can provide logs or info, I'm just not sure what to put here; I've looked at most logs etc.
Where do you want to run the app? On a real device or in the Simulator? If you're using a real device, unplug it, open /Library/Developer/Xcode/iOS DeviceSupport and delete the folder with the iOS version of your device. After that, reconnect it. Does that help?
Also, please provide any logs you get and information about your system versions, devices and the Xcode version.

Device logs not appearing in Xcode

I have some crash logs which I am able to see in the iPad when I go to Settings->About->Diagnostics & Usage ->Diagnostics & Usage Data. But when I connect my iPad to the my computer and click Xcode->Window->Organizer->My Device Name, I am not able to see the logs at all. What might have been the issue? Any idea.
Better Method to take device logs:
~/Library/Logs/CrashReporter/MobileDevice/<your iPhone’s name>/
The device logs are now contained in SQLite databases in this folder:
~/Library/Developer/Xcode/iOS Device Logs
Clear that out and take control of your CPU from Xcode again! Once its cleared out then maybe you'll get it to show the one you want if to perform the crash again.

Is it possible to test ready ipa file by instruments

I have an application built in IPA file by Adobe Flashbuilder (with AIR) the app works smoothly on iPad. Well.. worked smoothly until I had encountered some memory leaks. Is it possible to monitor this application's memory usage with Apple's Instruments?
For now I am deploying this app by dragging IPA file into iTunes and synchronize then.
I need to monitor this app. Is it possible? What should be eventually done to make it working?
Yes. you can analyse using instruments.
Install your app in your device.
Connect your device to your Mac.
Open Instruments and select Leaks (you can select any option infact, like Allocations etc.,) in the dialog that appears.
In the Top Left corner, you will see "Choose Target". the first two options are your device and your Mac. Select your device.
In the same menu, the 5th option is again "Choose Target". There you will see all the installed applications in your device. Select the app you want to analyse.
Finally, Press Record, and you will see your app running in the device and Leaks/Allocations (whatever you have selected) being shown in the instruments.
Hope this helps you.
Try running Instruments and select an installed app on your device, if you get this message, you know what's happening
Target failed to run: Permission to debug com.fantageek.MyApp was
denied. The app must be signed with a development identity (e.g. iOS
Developer).
I believe it's possible through the Xcode organiser. It outputs events happening on the device to a log. Don't quote me on that though

How can we print the contents of GDB or log statements on the device(iPad)

This question might be a bit strange and i apologize for that... i have rather a strange problem with my iPad app. My app is running absolutely fine when i connect the device to my system and run the app. But,it is getting crashed repeatedly once i try to use the app after disconnecting it from my system. This is very strange to me. I am unable to even debug this because of this strange issue. i need at least GDB log to debug my code.So, is there any way in which i can print my GDB log on my device(iPad)... At least is there any other way in which i can solve this strange issue...
Is it crashing while you are debugging and then disconnect the device. If you disconnect your device while debugging, the app will stop on your device and you need to reopen it to continue using it on the device.
If you want the Logs stored on your device, connect your device to your Mac and in Xcode go to Window -> Organiser. Select the Devices Tab and on the left should be your Device and an option to view the Device Logs which should get you the same Crash Logs you get in the Debugger Output window. Xcode will Symbolise them if it can so you should be able to debug the issue. It will also show Crash Logs for Applications you do not develop but those will not be Symbolised so won't make much sense.
Alternatively, if you choose the Console option you'll be able to see the Console output which will show all your NSLog outputs. It will also have some Device Specific output which you can ignore.
Use NSLog(), you can read the resulting console entries in the Xcode organiser after connecting the device via USB:

Resources