【1】、Xcode8代码出现ubsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 2016-09-14 17:18:55.843428 MyApp[6880:340837]
解决办法:【product】-【scheme】-【Edit Scheme】-【Run】-【Argument】-【Environment Variable】添加keyValue【OS_ACTIVITY_MODE disable】可以停止输出打印此日志
遗留问题:还会出现Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x10a39a910) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x10a1c4210). One of the two will be used. Which one is undefined.
【3】iOS10字体隐藏问题
label的话写一个扩展类
@implementation UILabel (Extend) - (void)lableAdaptIOS10{ CGFloat iOS10 = [[UIDevice currentDevice] systemVersion].floatValue >= 10; if (iOS10) { // self UIFont 的preferredFontForTextStyle: 意思是指定一个样式,并让字体大小符合用户设定的字体大小。 [self sizeToFit]; // self.font =[UIFont preferredFontForTextStyle: UIFontTextStyleHeadline]; //是否更新字体的变化 // self.adjustsFontForContentSizeCategory = YES; } }[4] StroyBoard问题
<1>Xcode 打开SB频繁出现崩溃现象
<2>Xcode 打开SB后 约束出现大量警告⚠️
[5] NSLog打印问题
[plain] view plain copy [] -[NWConcrete_tcp_connection dealloc] 11 [] nw_socket_handle_socket_event Event mask: 0x4 [] nw_socket_handle_socket_event Socket received WRITE_CLOSE event [] nw_socket_handle_socket_event Event mask: 0x4 [] nw_socket_handle_socket_event Socket received WRITE_CLOSE event] tcp_connection_cancel 5 [] nw_socket_handle_socket_event Event mask: 0x4] nw_socket_handle_socket_event Socket received WRITE_CLOSE event [] nw_endpoint_handler_cancel [5 192.168.2.51:1999 ready proxy (satisfied)]] -[NWConcrete_nw_endpoint_proxy cancelWithHandler:forced:] [5 192.168.2.51:1999 cancelled proxy (null)]] nw_endpoint_handler_cancel [5.1 192.168.2.51:1999 ready socket-flow (satisfied)] [] nw_endpoint_flow_protocol_disconnected [5.1 192.168.2.51:1999 cancelled socket-flow (null)] Output protocol disconnected [] nw_endpoint_handler_cancel [5.2 192.168.2.51:1999 initial path (null)] [] -[NWConcrete_tcp_connection dealloc] 5
解决方法1:
在文件开头加入 #ifdef DEBUG #define NSLog(FORMAT, ...) fprintf(stderr,"%s\n",[[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); #else #define NSLog(...) #endif 即可。
解决方法2:
第一步:
第二步:
第三步:
添加参数:
Name :OS_ACTIVITY_MODE
Value : disable
[6] xcode8莫名其妙crash
以前也会有这个问题,具体不清楚 命令行
xcrun simctl list devices | grep -v '^[-=]' | cut -d "(" -f2 | cut -d ")" -f1 | xargs -I {} xcrun simctl delete "{}"