随笔分类 -  iosDebug

iosDebug
摘要:From:http://blog.csdn.net/naruto_ku/article/details/8779203在进行iOS开发时,偶尔会碰到libc++abi.dylib handler threw exception,这种错误,而且这种错误也不打印任何相关的信息。可以使用@try{ } @catch(NSException *exception) { } @finally { } 将有问题的代码放到try块中,然后就可以在catch块里打印出出错信息,调试起来很方便。这种机制在iOS的体系架构中效率比较低,所以不建议放到产品代码中,只适合用来调试。 阅读全文
posted @ 2013-09-16 14:27 superchao 阅读(255) 评论(0) 推荐(0)
摘要:在真机运行程序的时候提示“Could not launch 'app name'”,No such file or directory (/Users/apple/Library/Developer/Xcode/DerivedData/mytest-ejkagqxooxgmtdfsdoygtyzflibe/Build/Products/Debug-iphoneos/mytest.app/mytest)解决方法:先退出xcode,再把/Users/apple/Library/Developer/Xcode/DerivedData/下面的东西都删除(DerivedData本身不要删 阅读全文
posted @ 2012-10-18 17:11 superchao 阅读(299) 评论(0) 推荐(0)
摘要:得益于这个帖子:http://www.cocoachina.com/bbs/read.php?tid=96925感谢楼主neutyz&cocoachina症状Certificate identity 'iPhone Developer: xxxx ho(2J123456HA)' appears more than once in the keychain. The codesign tool requires there only be one.解决办法原因是keychain access中存在过期的'iPhone Distribution: xxxx' 阅读全文
posted @ 2012-10-09 11:15 superchao 阅读(326) 评论(0) 推荐(0)
摘要:摘自:http://blog.chinaunix.net/uid-20676637-id-1641711.html如果你更新了profile,再编译iphone项目,发现下面的错误,那你无论如何clean也不会成功,那真是让人恼火阿"Provisioning profile XXXX can't be found"这 时候,先copy那行出错信息,然后关闭这个项目,打开finder到你的项目文件xxxx.xcodeproj上面按鼠标右键,选择Show Package Contents菜单,在新打开的finder的,找到project.pbxproj,使用一个文本ed 阅读全文
posted @ 2012-10-09 11:14 superchao 阅读(274) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/8377970/xcode-ios-project-only-shows-my-mac-64-bit-but-not-simulator-or-device 阅读全文
posted @ 2012-09-28 10:42 superchao 阅读(311) 评论(0) 推荐(0)
摘要:'Undefined symbols for architecture i386: "_OBJC_CLASS_$_CustomTabBar", referenced from objc-class-ref inViewController.old: symbol(s) not found for architecture i386clang: error: linker command failed with exit code 1 (use -v to see invocation)'问题原因:我xcode版本为4.3.1,在引入CustomTabBar时 阅读全文
posted @ 2012-09-20 10:52 superchao 阅读(716) 评论(0) 推荐(0)
摘要:摘自:http://blog.chinaunix.net/uid-20676637-id-1641711.html如果你更新了profile,再编译iphone项目,发现下面的错误,那你无论如何clean也不会成功,那真是让人恼火阿" Provisioning profile XXXX can't be found"这 时候,先copy那行出错信息,然后关闭这个项目,打开finder到你的项目文件xxxx.xcodeproj上面按鼠标右键,选择Show Package Contents菜单,在新打开的finder的,找到project.pbxproj,使用一个文本e 阅读全文
posted @ 2012-09-07 17:30 superchao 阅读(142) 评论(0) 推荐(0)
摘要:在开发过程中一般会用到NSLog(<#NSString *format, ...#>)来获得具体的信息。但当我们发布app时,一步一步的去找NSLog(<#NSString *format, ...#>),并屏蔽掉,这样比较浪费时间还很累。我们可以采用预编译的方式来简化这个问题。1.在***-Prefix.pch里面添加#ifdef DEBUG# define DLog(...) NSLog(__VA_ARGS__)#else# define DLog(...) /* */#endif#define ALog(...) NSLog(__VA_ARGS__)2.进入Xco 阅读全文
posted @ 2012-09-05 10:43 superchao 阅读(1271) 评论(0) 推荐(0)
摘要:在一个tableView中加入两个自定义cell时,出现了如下错误,在网上找了一下出现这个问题的原因很多。我所遇到的是第二次加载第二个cell时,才会出现。'-[NSIndexPath setTableViewStyle:]: unrecognized selector sent to instance 0x7fb28b0解决方法:在定义cell时,加入 if([[cell.contentView subviews] count] >0) { for (UIView *temp in [cell.contentView subviews]) { [temp removeFromS 阅读全文
posted @ 2012-08-15 21:01 superchao 阅读(711) 评论(0) 推荐(0)
摘要:一开始选了ARC,没关系"Build Settings"and turn off the option"Objective-C Automatic Reference Counting" NO'release' is unavailable: not available in automatic reference counting mode..解决办法:You need to turn offAutomatic Reference Counting. You do this by clicking on your project in 阅读全文
posted @ 2012-08-07 17:46 superchao 阅读(318) 评论(0) 推荐(0)