XCODE8 iOS10控制臺打印如下問題
nwlog simulate crash inner block invoke dlopen CrashReporterSupport failed
nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
解決方法
- 到 Edit Scheme (快捷鍵 command + shift + <)
2.選擇 Arguments 選項
3.添加變量 OS_ACTIVITY_MODE = disable
模擬器問題Failed to chmod /Users/jiangweike/Library/Developer/CoreSimulator/Devices/9C834755-B9C5-4861-BEDA-3D55E2F8F38D/data/Library/Caches/com.apple.containermanagerd/Bundle/Application/B4D1D665-8793-4F07-AF29-D5E3D68F3D5C/AJPhotoPickerExample.app/AJPhotoPickerExample : No such file or directory
解決方法 重啟模擬器
pod第三方之后,真機(jī)編譯報錯
Pods was rejected as an implicit dependency for 'libPods.a' because its architectures '' didn't contain all required architectures 'XXX'
Target 'XX' of project 'Pods' was rejected as an implicit dependency for 'libPods-XX.a' because its architectures 'arm64' didn't contain all required architectures 'armv7 arm64'
解決方法:targets-> app, then Build Settings,Tried to set Architectures to standard (armv7, armv7s, arm64), set Build Active Architecture Only (Debug) to Yes.
我發(fā)現(xiàn)設(shè)置完YES之后編譯成功再次設(shè)置為NO,也只會警告不會報錯了.
iOS10增加了訪問權(quán)限設(shè)置 媒體庫那幾個需要在info.plist加上,不然會有莫名的錯誤...(有時候不會報具體的可分析的錯誤,會報紅色bad指針的問題!或者直接閃退!)
崩潰:[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.
這個是拍照動作引起的崩潰,在升Xcode+iOS10之前都是好的辈赋,升級之后谚攒,需要在plist文件中添加相冊****權(quán)限蹋绽。相應(yīng)的麥克風(fēng)腺怯,通訊錄轨奄,如果項目中涉及到了裳仆,也需要添加相應(yīng)的權(quán)限溉箕。報錯的相應(yīng)key值:
通信錄:****NSContactsUsageDescription
麥克風(fēng):NSMicrophoneUsageDescription
**** 相冊:NSPhotoLibraryUsageDescription****
這里僅以相冊的為例:
plist文件里面添加,Privacy - Photo Library Usage Description肴茄,Value值為描述晌畅,彈出的提示框會顯示出來。
升到iOS10之后寡痰,需要設(shè)置權(quán)限的有:
麥克風(fēng)權(quán)限:Privacy - Microphone Usage Description 是否允許此App使用你的麥克風(fēng)抗楔?
相機(jī)權(quán)限: Privacy - Camera Usage Description 是否允許此App使用你的相機(jī)?
相冊權(quán)限: Privacy - Photo Library Usage Description 是否允許此App訪問你的媒體資料庫拦坠?
通訊錄權(quán)限: Privacy - Contacts Usage Description 是否允許此App訪問你的通訊錄连躏?
藍(lán)牙權(quán)限:Privacy - Bluetooth Peripheral Usage Description 是否許允此App使用藍(lán)牙?
語音轉(zhuǎn)文字權(quán)限:Privacy - Speech Recognition Usage Description 是否允許此App使用語音識別贞滨?
日歷權(quán)限:Privacy - Calendars Usage Description
定位權(quán)限:Privacy - Location When In Use Usage Description
定位權(quán)限: Privacy - Location Always Usage Description
位置權(quán)限:Privacy - Location Usage Description
媒體庫權(quán)限:Privacy - Media Library Usage Description
健康分享權(quán)限:Privacy - Health Share Usage Description
健康更新權(quán)限:Privacy - Health Update Usage Description
運動使用權(quán)限:Privacy - Motion Usage Description
音樂權(quán)限:Privacy - Music Usage Description
提醒使用權(quán)限:Privacy - Reminders Usage Description
Siri使用權(quán)限:Privacy - Siri Usage Description
電視供應(yīng)商使用權(quán)限:Privacy - TV Provider Usage Description
視頻用戶賬號使用權(quán)限:Privacy - Video Subscriber Account Usage Description
(電視供應(yīng)商使用權(quán)限和視頻用戶賬號使用權(quán)限沖突!!!好像就是一個東西啊,反正添加就沖突!,都對應(yīng)<key>NSVideoSubscriberAccountUsageDescription</key>)
<key>NSCameraUsageDescription</key>
<string>是否允許此App使用你的相機(jī)入热?</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>是否允許此App訪問你的相冊資源庫?</string>
<key>NSMicrophoneUsageDescription</key>
<string>是否允許此App使用你的麥克風(fēng)?</string>
<key>NSContactsUsageDescription</key>
<string>是否允許此App訪問你的通訊錄晓铆?</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>是否許允此App使用藍(lán)牙勺良?</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>是否允許此App使用語音識別?</string>
<key>NSCalendarsUsageDescription</key>
<string>是否允許此App使用日歷骄噪?</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>是否允許此App需要時能通過您的地理位置信息獲取您周邊的相關(guān)數(shù)據(jù)?</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>是否允許此App總是通過您的地理位置信息獲取您周邊的相關(guān)數(shù)據(jù)?</string>
<key>NSLocationUsageDescription</key>
<string>是否允許次App訪問你的地理位置?</string>
<key>NSAppleMusicUsageDescription</key>
<string>是否允許此App訪問你的媒體庫?</string>
<key>NSHealthShareUsageDescription</key>
<string>是否允許此App訪問你的健康分享?</string>
<key>NSHealthUpdateUsageDescription</key>
<string>是否允許此App訪問你的健康更新?</string>
<key>NSMotionUsageDescription</key>
<string>是否允許此App訪問你的運動權(quán)限?</string>
<key>kTCCServiceMediaLibrary</key>
<string>是否允許此App訪問你的音樂?</string>
<key>NSRemindersUsageDescription</key>
<string>是否允許此App訪問你的提醒?</string>
<key>NSSiriUsageDescription</key>
<string>是否允許此App訪問你的Siri?</string>
<key>NSVideoSubscriberAccountUsageDescription</key>
<string>是否允許此App訪問你的電視供應(yīng)商?</string>