解决Xcode报错Stored properties cannot be marked unavailable with ‘@available‘

简介: 解决Xcode报错Stored properties cannot be marked unavailable with ‘@available‘

出现场景

打开一个IOS老项目时,Xcode提示以下错误

@available(iOS, unavailable) //Stored properties cannot be marked unavailable with '@available'

解决方案

我们只需要把unavailable改成*号,同时增加版本号的限制。

//  @available(iOS, unavailable)
@available(iOS 15.0, *)

或者在Pod中将指定版本改为14.0以上。

相关文章
|
iOS开发
Xcode报错解决方法:ld: symbol(s) not found for architecture arm64
Xcode报错解决方法:ld: symbol(s) not found for architecture arm64
3012 0
|
30天前
|
iOS开发 MacOS Perl
解决Xcode运行IOS报错:redefinition of module ‘Firebase‘和could not build module ‘CoreFoundation‘
解决Xcode运行IOS报错:redefinition of module ‘Firebase‘和could not build module ‘CoreFoundation‘
64 4
|
30天前
|
iOS开发 Perl
解决Xcode15报错:DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS
解决Xcode15报错:DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS
48 1
|
4月前
|
iOS开发
Xcode报错“compact unwind compressed function offset doesn‘t fit in 24 bits
Xcode报错“compact unwind compressed function offset doesn‘t fit in 24 bits
40 1
|
iOS开发
Xcode运行报错The certificate used to sign “XXX” has either expired or has been revoked.解决办法
Xcode运行报错The certificate used to sign “XXX” has either expired or has been revoked.解决办法
220 0
|
iOS开发
Xcode运行报错Failed to prepare device for development.解决办法
Xcode运行报错Failed to prepare device for development.解决办法
632 0
|
开发者 iOS开发
Xcode运行报错The operation couldn’t be completed. Unable to launch xxx because it has an invalid code...
Xcode运行报错The operation couldn’t be completed. Unable to launch xxx because it has an invalid code...
796 0
|
API iOS开发
iOS 开发 - Xcode8下self.view.layer不能addSublayer,报错
iOS 开发 - Xcode8下self.view.layer不能addSublayer,报错
67 0
iOS 开发 - Xcode8下self.view.layer不能addSublayer,报错
|
iOS开发
Xcode报错Expected selector for Objective-C and Expected method body
Xcode报错Expected selector for Objective-C and Expected method body
209 0
Xcode报错Expected selector for Objective-C and Expected method body
|
iOS开发
Xcode报错"The working copy 'xxx' has uncommitted changes"解决方案
Xcode报错"The working copy 'xxx' has uncommitted changes"解决方案
88 0