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
Related
I developed an app and already tested it in Xcode and on my physical iPhone device.
After a lot of testing on my iPhone the app quits after starting.
I guess this is because of an empty array, but I am not sure.
Is there a possibility to read the console of my already built app on my iPhone? Because when I am testing the app on Xcode everything works fine - I guess the error occurs in only very specific cases...
I don't want to build the app again on my physical device, because I am pretty sure everything works fine then and I won't be able to recreate the exact situation.
So I would like to connect the phone to my macbook and run the app on my phone in Xcode without rebuilding it first.
Any ideas?
Connect your phone to your system and open Xcode.
The Window menu in Xcode Select Device and Simulators from the
Window menu.
Select your device from the left panel.
The toggle logs button Make sure that the logs are expanded. If they
are not, press the small up arrow in the bottom left corner of the
main pane.
Click the Save Console button (at the bottom right) to save the log
information within the console.
If you use a free Apple Developer account it is normal, it has not crashed.. it simply refuse to run.
Apple has imposed 'new' limitations on the 'free' provisioning profiles, whit this limitations you can run the app on a physical device for 7 days, then you must recreate a new profile with a new deploy on the device.
Even without XCode you can get the logs by using iOS Console which is free and works exactly as XCode's console.
As for starting the app again without rebuilding from XCode, you can use ⌃⌘R to speed up your tests.
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
When launching an app from a URL, there is a distinction between whether the URL is freshly launching an app, or if it's resuming an app that has been put into a suspended state.
My question is, how do I debug the process of a "fresh launch" from a URL? Hitting "Run" in Xcode automatically opens the app. Then, I have to suspend the app to reach Safari and access my test site. But if I close my suspended app, Xcode is no longer attached to it and I'm unable to debug.
These steps can be followed on the device. Founded at this link.
Run the app from Xcode to install it on your device and then stop it
from Xcode.
Force quit the app from the app switcher UI on the device.
Navigate to the scheme for the project in Xcode. Under the Run
section's Info tab, there is a radio button for "Wait for executable
to be launched". Make sure this is checked instead of the
"Automatically" option.
Run the app from Xcode. It will not open
on the device, but the debugger will wait for it to open and then it
will attach to it.
On the simulator as suggested by Marc-Alexandre Bérubé.
Run your app on the simulator.
Force quit the app on the simulator. Press cmd+shift+(hit h twice). Swipe the app up.
Open your terminal and enter this xcrun simctl openurl booted http://yourdomain/path.
You need to configure your Xcode app scheme to wait for the app to be launched manually.
Here is how you do it: http://blogmobile.itude.com/2013/09/03/how-to-debug-deep-linking-in-ios/.
You then need to copy the launch URL and paste it to Mobile Safari. This will launch your app, and make Xcode get attached to the running app process.
While the answers that mention activating "Wait for executable to be launched" are good in theory, for various reasons these didn't work for me. On the simulator, though Xcode claimed it had "attached", no logs or breakpoints were ever shown. On-device I was running iOS 13, building from Xcode 10, and using Xcode 11 to load, so I didn't have any debugging symbols. That was more of a personal problem, I suspect on device debugging may have worked.
What worked best for me was just opening up Console.app on my mac, and using the OSLog APIs to get a solid stream of caveman debugging from the simulator.
Run the app from Xcode on the simulator.
Then immediately quit it on the simulator via the app launched (Cmd-Shift-H * 2)
Launch the app by tapping a deep link I sent to myself via the Messages app
Observe my logs in Console.app
It's not pretty, but it is highly reliable.
It's also worth mentioning, that you can protect this useful feature by testing cold start deep-linking via XCUITest. You can call app.terminate in your XCUITests, then open a deep link (typically via a static web page you've setup, I use public GitHub wikis for this) and write tests and assert behaviors just like normal.
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.
I am working with Corona SDK for some time, and i really like it, but there is one thing, that i cant figure out: How to debug my code on a real device?
At the point, when my code runs great in the simulator, i usually compile it, and try it on the phone. But when there is some error, that doesn't bother the simulator, but pisses the phone off, i simply see an error message:
"This application encountered a Lua error (see logs) etc."
Me and my boss spent a whole day figuring out, that i made a require with a capital instead of lower case.
My question is: How to actually "see" that log? I tried to connect my device to DDMS, but i saw no relevant output. Is there a way to access that log (I'm testing on an android device)? Or is there a way to simulate the EXACT behavior of the phone in the simulator? Usually the phone freaks out because of i/o operations, and when using the wrong case.
The best way to debug on iOS devices is to use XCode's Organizer with your device plugged in via the USB port. On the left hand panel of Organizer, there will be a block for each device that XCode knows about. You may have to click on a button "Use device for debugging" or something similar so XCode can gather all the information it needs.
Once done, then you can use XCode to install the app to the device (you don't need to make an .ipa file, just copy the app to the device via Organizer). In that panel on the left, there is a link for "Console Log", click that and you can your print statements and other errors issued by Corona SDK.
Rob
If you don't have Xcode, you can try iPhone configuration utility. It is more light-weight than the xcode plus you can also use it on a windows machine.