instruments

Programmatically get iOS device screenshot from the connected Mac computer

柔情痞子 提交于 2019-11-29 06:35:30
I know it's possible to get a screenshot programmatically from code in the iOS application, and to manually get screenshots from Xcode and Instruments (Instruments also automatically takes screenshots during UIAutomation test failures). What I would like to find is a programatic way (with code running on the Mac, not the device) to grab screenshots from the device onto the Mac which it is plugged into. Is there an API (or command-line parameters) into Xcode or Instruments to get access to this screenshot feature? Or (ideally) to interface to the device and get a screenshot directly, the same

Symbol not found: _CFXMLNodeGetInfoPtr when start Instruments

試著忘記壹切 提交于 2019-11-29 05:45:54
I am developing a iPhone app and everything works fine so far. I can build and start the app in the simulator. But when I now start the app with Instruments I got the error: Dyld Error Message: Symbol not found: _CFXMLNodeGetInfoPtr Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation I've googled but did not find a solution. Hope somebody can help me out. Thx I think you're linking against

Record values of Performance Monitor Counters (PM events) on OS X without Instruments

依然范特西╮ 提交于 2019-11-29 04:29:54
问题 In Xcode's Instruments, there is a tool called Counters that exposes low-level counter information provided by the CPU, such as the number of instructions executed or number of cache misses: This is similar to the Linux syscall perf_event_open introduced in Linux 2.6.32. On Linux, I can use perf_event_open then start/stop profiling around the section of my code I'm interested in. I'd like to record the same type of stats on OS X: counting the instructions (etc.) that a certain piece of code

Recursive Blocks in Objective-C leaking in ARC

北慕城南 提交于 2019-11-29 03:31:47
So I'm using recursive blocks. I understand that for a block to be recursive it needs to be preceded by the __block keyword, and it must be copied so it can be put on the heap. However, when I do this, it is showing up as a leak in Instruments. Does anybody know why or how I can get around it? Please note in the code below I've got references to a lot of other blocks, but none of them are recursive. __block NSDecimalNumber *(^ProcessElementStack)(LinkedList *, NSString *) = [^NSDecimalNumber *(LinkedList *cformula, NSString *function){ LinkedList *list = [[LinkedList alloc] init]; NSDictionary

Instruments show leak in main.m (Xcode 4.3.1)

我的未来我决定 提交于 2019-11-29 01:28:11
I am developing an app using ARC When profiling my app in instruments for memory leaks it shows leaks at the following function: #import <UIKit/UIKit.h> #import "AppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } Does this indicate a problem somewhere else in my code? This is the stack trace 0 libsystem_c.dylib malloc 1 libsystem_c.dylib strdup 2 libnotify_sim.dylib token_table_add 3 libnotify_sim.dylib notify_register_mach_port 4 libnotify_sim.dylib notify_register_dispatch 5

iPhone 4 profile power consumption (with instruments)

≯℡__Kan透↙ 提交于 2019-11-28 19:15:25
问题 I have an app that I added a lot of animation to. The app also used "iPhone sleep preventer" to play silent audio. Since then, I noticed that the battery consumption increased by up to 4 times! I'd like to find a method to profile the power consumption (I think I saw an option in Instruments) to find and eliminate the offending method(s). Where would I start looking for information like this? Currently I have the phone left on the desk for ~3 hours to record power drain over time. Is there a

Instruments does not work on XCode 4 with device

落爺英雄遲暮 提交于 2019-11-28 18:51:00
Until very recently, instruments worked fine. I don't know what I did to make it mad, but now it won't attach to any device that I try to Profile with; no device at all. I've tried an iPhone, iPad, and 2 iPod touches; no luck! I'm using XCode 4. Here is the sequence of events: With device attached, click Product->Profile. App compiles onto device. Instruments launches, but an error sound is heard The record button is grayed out. Choose Target doesn't allow me to attach or choose target (empty list). Background points: Profile is set to Debug build within the Scheme of the project. This is true

use instruments - leaks with a device

穿精又带淫゛_ 提交于 2019-11-28 18:15:40
问题 I'm starting to use Instruments-Leaks with an iPhone 3G. When I try to run the app with Instruments on the iPhone I obtain Target failed to run: Remote exception encountered: 'Failed to get task for pid 280' Ideas? The only time I succeed in running the app with instruments it run very slow, I couldn't test it. What are the steps to run the app on the device searching for leaks? 回答1: The solution for me was to make sure that my Profile scheme was using the "debug" and not "release" build

Understanding Instruments in Xcode, testing for leaks

天涯浪子 提交于 2019-11-28 16:54:22
问题 I just started using Instruments, a nice little tool for testing memory allocations/ leaks and all that great stuff. But I'm pretty confused at how it works... Ive looked for tutorials explaining how to work with it, but no tutorials explained what to do with it. I'll try to explain this: I have it set up to whenever I run my Xcode app, Instruments tracks everything. But the stuff that instruments record makes no sense to me. There was one leak discovered, and after that it started leaking

Xcode Instruments - Enable NSZombie Detection? Where is it?

时光毁灭记忆、已成空白 提交于 2019-11-28 12:39:14
I have watched this video http://www.markj.net/iphone-memory-debug-nszombie/ The guy shows an option called Enable NSZombie Detection on Allocations inside instruments, but my Instruments doesn't shows this option. This guy's video was done using a one year old version of Instruments and I am using Xcode 3.2.5. Do you guys know where this option is now? How can I enable it for iPhone apps? thanks In XCode 4.0, this 'Enable Zombie' option is only present in iPhone simulator and not when you profile on actual device. The zombie option is available in Xcode 3.2.6 under the allocations tool if you