1> Assertion failure in -[UICollectionView _createPreparedSupplementaryViewForElementOfKind:atIndexPath:withLayoutAttributes:applyAttributes:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3599.6/UICollectionView.m:2161
問題描述
在創建UICollectionVIew的頭部視圖的時候 ,返回的是nil,就會出現這個bug ,不是沒有注冊的問題。
解決方法
檢查- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;這個方法里面的返回值是否有問題。
2> [MT] IBPlatformTool: *** Failed to launch tool with description <IBCocoaTouchPlatformToolDescription: 0x7fc6a5370400> System content for IBCocoaTouchFramework-EightAndLater <IBScaleFactorDeviceTypeDescription: 0x7fc69dd4bee0> scaleFactor=2x: Failed to find or create execution context for description '<IBCocoaTouchPlatformToolDescription: 0x7fc6a5370400> System content for IBCocoaTouchFramework-EightAndLater <IBScaleFactorDeviceTypeDescription: 0x7fc69dd4bee0> scaleFactor=2x'. These intermediate objects were non-nil: IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x),iOS 12.4 (12.4 - 16G73-com.apple.CoreSimulator.SimRuntime.iOS-12-4
: Failed to find a suitable device for the type IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) with runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4 (Failure reason: Failed to create new simulator device that matches IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) for runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4 (Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-12-4)):
Underlying Errors:
Description: Failed to find a suitable device for the type IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) with runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4
Failure Reason: Failed to create new simulator device that matches IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) for runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4 (Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-12-4)
Underlying Errors:
Description: Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-12-4
解決方法
先command+Shift+K,然后command+option+shift+K ,然后重啟電腦。(解決方法就是這個神奇)
3> control may reach end of non-void function
今天用Code調試出現了這個錯誤提示“control may reach end of non-void function”。
同樣的項目在Xcode10.3之前沒有問題,但升級Xcode10.3以后項目中有好幾處出現了這個錯誤。
問題分析
函數在類的實現里面沒有寫返回值
解決方法
在函數內加上相對應類型的返回值就行了
4>:在集成QQ登錄的時候控制臺打印
{"ret":100008,"msg":"client request's api name is not existed"}
錯誤原因
因為App內設置的AppID和appsecret不正確。
解決方法
檢查設置AppID和AppSecreat地方替換成正確的即可。
5:在集成微信登錄的時候出現獲取不到access_token的問題控制臺打印
{"errcode":40125,"errmsg":"invalid appsecret, view more at http://t.cn/RAEkdVq, hints: [ req_id: NfnD36yFe-WOxDWA ]"}
錯誤原因
提示appsecret有問題,App內是寫死的appsecret,在以前集成微信分享的時候,感覺appsecret不會有問題,也查詢了很多信息,沒有解決。誰知道appsecret居然被后臺的同學重置過,讓后臺的同學發了一下重置過后的appsecret問題就解決了。
解決方法
找到正確的appsecret或者在微信后臺重置appsecret即可。
6:building for iOS-armv7 but attempting to link with file built for iOS-arm64
錯誤原因
出現這個原因是該文件不支持ARMV7架構,但是項目是需要支持ARMV7架構的
解決方法
打一個支持armv7格式的該文件的包,再拖到項目里面。
6
[!] Error installing Toast
[!] /usr/bin/git clone https://github.com/scalessec/Toast.git /var/folders/cq/2r617rsn6jz320whyfvxyrf40000gn/T/d20210319-4938-m7fgkf --template= --single-branch --depth 1 --branch 4.0.0
Cloning into '/var/folders/cq/2r617rsn6jz320whyfvxyrf40000gn/T/d20210319-4938-m7fgkf'...
fatal: unable to access 'https://github.com/scalessec/Toast.git/': Failed to connect to github.com port 443: Operation timed out
錯誤原因
連接github.com超時
解決方法
一直pod install,我是大約10次就可以了下載下來了。每個人的網絡環境不一樣,根據實際網絡情況來定。這個方式解決的可能性為50%。有同學有更改的方式歡迎在下方留言。