1.Xcode打印一堆拉七八糟的信息
Xcode的菜單欄 Product > Scheme > Edit Scheme
Variables 里面加上: OS_ACTIVITY_MODE = disable
2.注釋不能用了
注釋 "Command" + "/" 不能用了
$ sudo /usr/libexec/xpccachectl
輸入命令在重啟電腦就好了
3.私有權(quán)限設(shè)置
由于iOS10對(duì) Security and Privacy Enhancements安全和保密性增強(qiáng),在申請(qǐng)很多私有權(quán)限時(shí)盒使,都需要添加描述,不添加會(huì)crash煤禽。 所以我們需要在info plist 中添加描述信息墨坚。
NSBluetoothPeripheralUsageDescription //訪問藍(lán)牙
NSCalendarsUsageDescription //訪問日歷
NSCameraUsageDescription //相機(jī)
NSContactsUsageDescription //通訊錄
NSHealthShareUsageDescription // 訪問健康分享
NSHealthUpdateUsageDescription // 訪問健康更新
NSHomeKitUsageDescription //HomeKit
NSLocationAlwaysUsageDescription // 始終訪問位置
NSLocationWhenInUseUsageDescription //在使用期間訪問位置
NSMicrophoneUsageDescription // 麥克風(fēng)
NSMotionUsageDescription // 訪問運(yùn)動(dòng)與健身
NSPhotoLibraryUsageDescription // 相冊(cè)
NSRemindersUsageDescription // 訪問提醒事項(xiàng)
NSSiriUsageDescription // Siri
NSSpeechRecognitionUsageDescription //語音識(shí)別
NSVideoSubscriberAccountUsageDescription // 視頻這塊的認(rèn)證
NSVoIPUsageDescription // VoIP通話
例如我們常用的相機(jī)和相冊(cè):
<key>NSCameraUsageDescription</key>
<string>允許使用相機(jī)</string>
// <string> Allows the use of the camera</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>允許訪問相冊(cè)</string>
// <string>Allow access to the photo album</string>
填的string會(huì)在彈出用戶允許時(shí)展示在描述里,如果描述空著提交AppStore時(shí)會(huì)被拒絕凤类。
4.iOS10系統(tǒng)下MJRefresh最新版英文系統(tǒng)閃退
MJRefresh作用常用的第三方開源庫,新版在國(guó)際化時(shí)判斷'-'符號(hào)出現(xiàn)問題,會(huì)導(dǎo)致閃退
MJRefreshComponent.m文件
或者直接全文搜索"zh-Hans"
將if ([UIDevice currentDevice].systemVersion.floatValue >= 9.0) {}一塊全部刪除,
將語言直接設(shè)置為中文
NSString *language = @"zh-Hans";