instruments

XCode iPhone simulator does not look like an iPhone

百般思念 提交于 2019-12-29 05:11:06
问题 Silly question, but.. I am not been able to see the device appearance when running the iPhone simulator. I don't remember after which XCode update this started but the iPhone simulator shows only as a simple window without showing the device case like it used to be (see this image). That's how my simulator looks like: Is there a way to make it look like an actual iPhone 5? EDIT: Unfortunately in my hardware->device options I see only iPhone retina (which is currently selected), but there are

Can't launch my app in Instruments: At least one target failed to launch

房东的猫 提交于 2019-12-28 03:23:27
问题 I have all my code signing entitlements set correctly. Running the app on my phone is fine, but launching it in instruments gives me an error message: Error Starting Recording At least one target failed to launch; aborting run And then: Target failed to run. Permisson to debug [app name] was denied. The app must be signed with a development identity (i.e. iOS Developer) Any ideas how I could stop this from happening? Doesn't happen on my iPad. 回答1: Edit the scheme for your target and under

Instruments ObjectAlloc: Explanation of Live Bytes & Overall Bytes

谁都会走 提交于 2019-12-28 03:18:37
问题 I'm using Instument's ObjectAlloc tool in an attempt to understand what the memory my application (iPhone) is doing and when and where it is doing it. I would really like a basic explanation of these statistics: Live Bytes Living Transitory Overall Bytes When I am trying to work out how much memory my application is using, am I to look at Live Bytes or Overall Bytes? Does this include leaked memory? What are Transitory objects? Thanks 回答1: ObjectAlloc tracks all memory allocation and

Leaking NSAutoreleasePool

徘徊边缘 提交于 2019-12-25 12:11:32
问题 I'm working on an app and have 1 leak left. The leaked object is NSAutoreleasePool, size is 32 bytes. In the stacktrace only foundation methods are called. I have no clue how to resolve this. In simulator no leaks reported, on the device only this leak. Any idea's? The autoreleasepool is one I define myself. In my viewcontroller I call: [self performSelectorInBackground:@selector(getDetailInfo:) withObject:self.infoID]; This is getDetailInfo: - (void)getDetailInfo:(NSString *)theID {

Leaking NSAutoreleasePool

好久不见. 提交于 2019-12-25 12:10:04
问题 I'm working on an app and have 1 leak left. The leaked object is NSAutoreleasePool, size is 32 bytes. In the stacktrace only foundation methods are called. I have no clue how to resolve this. In simulator no leaks reported, on the device only this leak. Any idea's? The autoreleasepool is one I define myself. In my viewcontroller I call: [self performSelectorInBackground:@selector(getDetailInfo:) withObject:self.infoID]; This is getDetailInfo: - (void)getDetailInfo:(NSString *)theID {

“componentsSeparatedByString” Memory leak

邮差的信 提交于 2019-12-25 07:59:06
问题 I am facing some strange memory leak in our existing iPad application, Here is a function which gives memory leak in instrument -(NSString *)retriveInfo:(NSString*)fromstring:(NSString*)searchstring { NSArray *arrRetrive = [fromstring componentsSeparatedByString:searchstring]; if([arrRetrive count]!=0){ if ([arrRetrive count]!=1){ NSString *strDisplayOrder = [arrRetrive objectAtIndex:1]; arrRetrive = [strDisplayOrder componentsSeparatedByString:@"<"]; //MEMORY LEAK } } return [arrRetrive

instruments reports libsystem_c leak

好久不见. 提交于 2019-12-25 05:03:47
问题 I have a very strange, very repeatable leak that doesn't appear to have anything to do with the functions I have defined. As you can see the responsible library is lybsystem_c. Instruments reports a 48B leak when I scroll my grouped table view down below the screen (by dragging very fast). It bounces back, and the red bar appears. Has anyone experienced this issue? Does anyone understand how I might be responsible for this? Is there a way to prove this is a framework bug? Or an Instruments

Lower the CPU usage of an app

拟墨画扇 提交于 2019-12-24 20:34:55
问题 I am having an issue with CPU usage. When I starts my app its animation starts at good speed and all of sudden animation speed gets lower down and then app gets crashed. But when I checked the app with Activity Monitor(Instrument) my app use CPU near about 80%-90%. I am unable reduce the CPU usage. CODE: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint location; UITouch *touch = [[event allTouches] anyObject]; location = [touch locationInView:self.view]; } -(void

iOS UI Automation Testing in Travis CI

╄→гoц情女王★ 提交于 2019-12-24 15:33:23
问题 I have one small project which I want to test with travis (just to have that green batch on Github) which is https://github.com/SocialbitGmbH/SwiftAddressBook . It requires access to ABAddressbook which can only be given by dismissing an alert when asking for access. So I´m trying to run an UI Automation script to achieve this, which succeeds locally but fails on the remote server with the message Instruments Usage Error : Specified target process is invalid: Example/DerivedData

Custom instruments how to output aggregations like dtrace script

♀尐吖头ヾ 提交于 2019-12-24 09:58:37
问题 I am trying to convert below dtrace script to custom instrument. How should we configure the END probe to show the output the aggregated output. pid$target:myApp:main:entry/((pid == $target))/{ starttime = timestamp; } objc$target:myApp*::entry/((pid == $target))/{ starttimeformethod[probemod,probefunc] = timestamp; methodhasenteredatleastonce[probemod,probefunc] = 1; } objc$target:myApp*::return/((( /*XRAYPREDICATELHS*/(methodhasenteredatleastonce[probemod,probefunc] == 1/*XRAYPREDICATERHS*/