1> Assertion failure in -[UICollectionView _createPreparedSupplementaryViewForElementOfKind:atIndexPath:withLayoutAttributes:applyAttributes:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3599.6/UICollectionView.m:2161
問題描述
在創(chuàng)建UICollectionVIew的頭部視圖的時候 ,返回的是nil舒萎,就會出現(xiàn)這個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調(diào)試出現(xiàn)了這個錯誤提示“control may reach end of non-void function”市埋。
同樣的項目在Xcode10.3之前沒有問題黎泣,但升級Xcode10.3以后項目中有好幾處出現(xiàn)了這個錯誤。
問題分析
函數(shù)在類的實現(xiàn)里面沒有寫返回值
解決方法
在函數(shù)內(nèi)加上相對應(yīng)類型的返回值就行了
4>:在集成QQ登錄的時候控制臺打印
{"ret":100008,"msg":"client request's api name is not existed"}
錯誤原因
因為App內(nèi)設(shè)置的AppID和appsecret不正確腰素。
解決方法
檢查設(shè)置AppID和AppSecreat地方替換成正確的即可聘裁。
5:在集成微信登錄的時候出現(xiàn)獲取不到access_token的問題控制臺打印
{"errcode":40125,"errmsg":"invalid appsecret, view more at http://t.cn/RAEkdVq, hints: [ req_id: NfnD36yFe-WOxDWA ]"}
錯誤原因
提示appsecret有問題,App內(nèi)是寫死的appsecret弓千,在以前集成微信分享的時候衡便,感覺appsecret不會有問題,也查詢了很多信息洋访,沒有解決镣陕。誰知道appsecret居然被后臺的同學(xué)重置過,讓后臺的同學(xué)發(fā)了一下重置過后的appsecret問題就解決了姻政。
解決方法
找到正確的appsecret或者在微信后臺重置appsecret即可呆抑。
6:building for iOS-armv7 but attempting to link with file built for iOS-arm64
錯誤原因
出現(xiàn)這個原因是該文件不支持ARMV7架構(gòu),但是項目是需要支持ARMV7架構(gòu)的
解決方法
打一個支持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次就可以了下載下來了食绿。每個人的網(wǎng)絡(luò)環(huán)境不一樣侈咕,根據(jù)實際網(wǎng)絡(luò)情況來定。這個方式解決的可能性為50%器紧。有同學(xué)有更改的方式歡迎在下方留言耀销。