1. 微信分享、支付不能正常使用
UIApplication.openURL(:) 被徹底禁用,使用UIApplication.open(:options:completionHandler:), 升級對應的SDK。
2. iOS 18 對 UIView的maskView 增加了斷言,導致如果業(yè)務代碼里有同名屬性可能導致觸發(fā)該斷言。
- 自定義UIView,maskView,會崩潰
- 自定義UIViewController與cell,maskView,不會崩潰
3. UICollectionView 閃退問題
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the collection view. For retrieving an existing view in the collection view, use -[UICollectionView cellForItemAtIndexPath:] or -[UICollectionView supplementaryViewForElementKind:atIndexPath:].
// 錯誤:可能返回未附加到界面上的新 cell
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "id", for: indexPath)
// 正確:獲取已存在的 cell(若在屏幕上)
let existingCell = collectionView.cellForItem(at: indexPath)
4. 選擇相冊照片功能出問題,無法看到所有照片
如果使用了ZLPhotoBrowser,更新版本,參考這里
subtype 由.albumRegular改為.any