xcode 技巧、用法 杂记

************

sdk文档位置

~/Library/Developer/Shared/Documentation/DocSets/. --文档目录

************

header search path resursive递归方法,在结尾加“/**”

如:

/Users/user/Downloads/CorePlot_1.0/Source/framework/**

************

Xcode 4: Fatal: Not a git repository


fix:

1. Open Xcode and go to Window > Organizer
2. Find under repositories your project. It might be two entries if you use something like SVN.
3. Make sure it says "TypeGit"
4. Mark the repository entry and hit backspace or delete (on mac)
5. Done

************

xcode 4.2 禁用ARC功能

fix: 在项目属性中将Object-C Automatic Reference Counting设置为NO即可
********
修改<AppName>-Prefix.pch ,增加全局宏代码
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"[文件名:%s]\n" "[函数名:%s]\n" "[行号:%d] \n" fmt), __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...);
#endif
*****
报错:
Couldn't register com.XXXXX.deviceapp with the bootstrap server. Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger.Program received signal:  “SIGABRT”. 

方法:
重启ios设备
******
在project-setting中找到 “Run Static Analyzer” 键,然后把值修改为“YES”.这样在编码的时候,xcode就可以自动为我们检查内存泄露了.
*****
xcode 加载reporsity,如果失败,将url的头换成svn://试试
*********
关闭/开启 ARC.

iOS5 xcode4.2 引入了ARC (AutomicReferenceCounting) ,开启/关闭方法如下:

Xcode 4.2: 点击项目后,
Build Settings -> Apple LLVM compiler 3.0 - Language -> Objective-C Automatic Referencing Counting, 默认是YES 设置为NO即可。

*******

如何在XCode4中设置NSZombieEnabled & MallocStackLogging

In order to fix the issue about "EXC_BAD_ACCESS", we can set NSZombieEnabled & MallocStackLogging


How to set them in Xcode 4?

1)Product->Edit Scheme...->Run...->EnvironmentVariables.

Of course , the other way is :click Product->Run... when holding on alt and option keys.

2)add NSZombieEnabled,set the value with YES

3)add MallocStackLogging, set the value with YES.


forMallocStackLogging:

shell malloc_history 53395 0x79ceda0

53395 ProcessID

OBJECT ADDRESS 0x79ceda0




·


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值