1. 微信分享、支付不能正常使用
UIApplication.openURL(:) 被彻底禁用,使用UIApplication.open(:options:completionHandler:), 升级对应的SDK。
2. iOS 18 对 UIView的maskView 增加了断言,导致如果业务代码里有同名属性可能导致触发该断言。
- 自定义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