sauchye / iosdev_notes

iOS Dev Tips(一些零散的iOS知识tips)
19 stars 5 forks source link

Xcode Tips #7

Open sauchye opened 9 years ago

sauchye commented 9 years ago

Xcode Update( iOS lastest SDK )

Could not find developer disk image

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

fix :System Preferences->TCP/IP->DHCP Client ID: 4.2.2.2

http://stackoverflow.com/questions/11279491/a-server-with-the-specified-hostname-could-not-be-found

Xcode Error

Bundle display name Null

console:

alloc: *** error for object 0xfffffffffffffffc: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

fix: Bundle display name add AppName

Sketch

http://www.jianshu.com/p/45eef5465185

在pch文件宏定义#define bundle id @"com.sauchye.SYADView" 会在CFBundle.h报错,注释掉即可,建议删除,不删除会出现坑的。


Your session has expired. Please log in.

你的账号过期,建议仔细检查快捷键cmd+,,检查账号,这是一个坑,当你有登录多个开发者账号时,可能会出现。

Your session has expired. Please log in

https://forums.developer.apple.com/thread/23674

消除Xcode警告

参考:http://my.oschina.net/joanfen/blog/493807

Build Settings - Customer Compiler Flags - Other Warning Flags添加 -Wno-shorten-64-to-32 -Wno-sizeof-array-argument -Wno-sizeof-pointer-memaccess

Xcode Theme

https://github.com/vinhnx/Ciapre-Xcode-theme 1 2 3 4

sauchye commented 9 years ago

Mac快捷键大全

https://support.apple.com/zh-cn/HT201236

http://blog.csdn.net/totogo2010/article/details/7640612

sauchye commented 8 years ago

Terminal Tips

提示如下错误,说明权限不够,所以在前面添加sudo

ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

fir 打包,内测

https://github.com/FIRHQ/fir-cli/blob/master/README.md

忽略警告⚠️

#pragma clang diagnostic push
#pragma clang diagnostic ignored"-Wdeprecated-declarations"
    //写在这个中间的代码,都不会被编译器提示-Wdeprecated-declarations类型的警告
#pragma clang diagnostic pop
sauchye commented 7 years ago

macOS升级后出现一直需要访问钥匙串问题

http://blog.csdn.net/xdrt81y/article/details/44244815

Xcode unicode 字符串

#ifdef DEBUG
#define NSLog(FORMAT, ...) fprintf(stderr,"Log Print>>>\n %s:%d   %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String],__LINE__, [[[NSString alloc] initWithData:[[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] dataUsingEncoding:NSUTF8StringEncoding] encoding:NSNonLossyASCIIStringEncoding] UTF8String]);
#else
#define NSLog(...)
#endif