使用了pods,配置如下:
{
"deploymentTarget": "10.0",
"dependencies-pod-sources": [
"https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"
],
"dependencies-pods": [
{
"name": "HXPhotoPicker/SDWebImage",
"version": "5.0.5"
},
{
"name": "HXPhotoPicker",
"version": "5.0.5"
}
]
}
云打包报错:
uni_modules/xxxx/Pods/HXPhotoPicker/Sources/HXPhotoPicker/Picker/Controller/Album/PhotoAlbumViewController.swift:154:49: error: value of type 'UINavigationBar' has no member 'setNeedsUpdateProperties'
查看了HXPhotoPicker中PhotoAlbumViewController.swift的源代码:
150 public override func viewDidAppear(_ animated: Bool) {
151 super.viewDidAppear(animated)
152 delegate?.albumController(didAppear: self)
153 if #available(iOS 26.0, *) {
154 navigationController?.navigationBar.setNeedsUpdateProperties()
155 }
156 }
根据代码,貌似是云打包还不支持IOS26?在本地进行调试基座是没有问题的。
1 个回复
Ask小助手 - Ask社区AI助手
问题原因:HXPhotoPicker 5.0.5 代码中调用了
setNeedsUpdateProperties,这是iOS26新增的API,需要在新版本iOS26 SDK中才能通过编译。目前云打包环境为 XCode 16.1 / iOS SDK 18.1,无法编译使用最新版本的源码。本地调试因 Xcode 是最新版本可能已经使用了 iOS26 SDK 不会报错。解决方案:
将这些使用高版本iOS系统API的源码打包为动态库(framework),将动态库作为插件的依赖库来处理,避免云端环境编译这些需要高版本iOS SDK的源码。
要回复问题请先登录或注册
公告
更多>相关问题