Stored properties cannot be marked unavailable with '@available'
Getting this error in xcode 15 beta
Same here
I'm wondering if this project is still being maintained, but I'm encountering the same error (and some other libraries are also experiencing the same issue 😟 )
I'm wondering if this project is still being maintained, but I'm encountering the same error (and some other libraries are also experiencing the same issue 😟 )
Might it be a bug in Xcode rather than a code bug?
same here (Xcode 15 Beta2) 😿
I also discovered the error on xcode 15 beta 2 Hopefully, someone can fix it
Only fix to build it locally is to delete theses lines in : https://github.com/Yummypets/YPImagePicker/blob/master/Source/Configuration/YPImagePickerConfiguration.swift
/// Migration
@available(iOS, obsoleted: 3.0.0, renamed: "video.compression")
public var videoCompression: String = AVAssetExportPresetHighestQuality
@available(iOS, obsoleted: 3.0.0, renamed: "video.fileType")
public var videoExtension: AVFileType = .mov
@available(iOS, obsoleted: 3.0.0, renamed: "video.recordingTimeLimit")
public var videoRecordingTimeLimit: TimeInterval = 60.0
@available(iOS, obsoleted: 3.0.0, renamed: "video.libraryTimeLimit")
public var videoFromLibraryTimeLimit: TimeInterval = 60.0
@available(iOS, obsoleted: 3.0.0, renamed: "video.minimumTimeLimit")
public var videoMinimumTimeLimit: TimeInterval = 3.0
@available(iOS, obsoleted: 3.0.0, renamed: "video.trimmerMaxDuration")
public var trimmerMaxDuration: Double = 60.0
@available(iOS, obsoleted: 3.0.0, renamed: "video.trimmerMinDuration")
public var trimmerMinDuration: Double = 3.0
@available(iOS, obsoleted: 3.0.0, renamed: "library.onlySquare")
public var onlySquareImagesFromLibrary = false
@available(iOS, obsoleted: 3.0.0, renamed: "library.onlySquare")
public var onlySquareFromLibrary = false
@available(iOS, obsoleted: 3.0.0, renamed: "targetImageSize")
public var libraryTargetImageSize = YPImageSize.original
@available(iOS, obsoleted: 3.0.0, renamed: "library.mediaType")
public var showsVideoInLibrary = false
@available(iOS, obsoleted: 3.0.0, renamed: "library.mediaType")
public var libraryMediaType = YPlibraryMediaType.photo
@available(iOS, obsoleted: 3.0.0, renamed: "library.maxNumberOfItems")
public var maxNumberOfItems = 1
Only fix to build it locally is to delete theses lines in : https://github.com/Yummypets/YPImagePicker/blob/master/Source/Configuration/YPImagePickerConfiguration.swift
/// Migration @available(iOS, obsoleted: 3.0.0, renamed: "video.compression") public var videoCompression: String = AVAssetExportPresetHighestQuality @available(iOS, obsoleted: 3.0.0, renamed: "video.fileType") public var videoExtension: AVFileType = .mov @available(iOS, obsoleted: 3.0.0, renamed: "video.recordingTimeLimit") public var videoRecordingTimeLimit: TimeInterval = 60.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.libraryTimeLimit") public var videoFromLibraryTimeLimit: TimeInterval = 60.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.minimumTimeLimit") public var videoMinimumTimeLimit: TimeInterval = 3.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.trimmerMaxDuration") public var trimmerMaxDuration: Double = 60.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.trimmerMinDuration") public var trimmerMinDuration: Double = 3.0 @available(iOS, obsoleted: 3.0.0, renamed: "library.onlySquare") public var onlySquareImagesFromLibrary = false @available(iOS, obsoleted: 3.0.0, renamed: "library.onlySquare") public var onlySquareFromLibrary = false @available(iOS, obsoleted: 3.0.0, renamed: "targetImageSize") public var libraryTargetImageSize = YPImageSize.original @available(iOS, obsoleted: 3.0.0, renamed: "library.mediaType") public var showsVideoInLibrary = false @available(iOS, obsoleted: 3.0.0, renamed: "library.mediaType") public var libraryMediaType = YPlibraryMediaType.photo @available(iOS, obsoleted: 3.0.0, renamed: "library.maxNumberOfItems") public var maxNumberOfItems = 1
Doesn't it cause any errors elsewhere?
Only fix to build it locally is to delete theses lines in : https://github.com/Yummypets/YPImagePicker/blob/master/Source/Configuration/YPImagePickerConfiguration.swift
/// Migration @available(iOS, obsoleted: 3.0.0, renamed: "video.compression") public var videoCompression: String = AVAssetExportPresetHighestQuality @available(iOS, obsoleted: 3.0.0, renamed: "video.fileType") public var videoExtension: AVFileType = .mov @available(iOS, obsoleted: 3.0.0, renamed: "video.recordingTimeLimit") public var videoRecordingTimeLimit: TimeInterval = 60.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.libraryTimeLimit") public var videoFromLibraryTimeLimit: TimeInterval = 60.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.minimumTimeLimit") public var videoMinimumTimeLimit: TimeInterval = 3.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.trimmerMaxDuration") public var trimmerMaxDuration: Double = 60.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.trimmerMinDuration") public var trimmerMinDuration: Double = 3.0 @available(iOS, obsoleted: 3.0.0, renamed: "library.onlySquare") public var onlySquareImagesFromLibrary = false @available(iOS, obsoleted: 3.0.0, renamed: "library.onlySquare") public var onlySquareFromLibrary = false @available(iOS, obsoleted: 3.0.0, renamed: "targetImageSize") public var libraryTargetImageSize = YPImageSize.original @available(iOS, obsoleted: 3.0.0, renamed: "library.mediaType") public var showsVideoInLibrary = false @available(iOS, obsoleted: 3.0.0, renamed: "library.mediaType") public var libraryMediaType = YPlibraryMediaType.photo @available(iOS, obsoleted: 3.0.0, renamed: "library.maxNumberOfItems") public var maxNumberOfItems = 1Doesn't it cause any errors elsewhere?
I've never used these variables, but if you have, I'd advise you to check whether you use them in your project.
Only fix to build it locally is to delete theses lines in : https://github.com/Yummypets/YPImagePicker/blob/master/Source/Configuration/YPImagePickerConfiguration.swift
/// Migration @available(iOS, obsoleted: 3.0.0, renamed: "video.compression") public var videoCompression: String = AVAssetExportPresetHighestQuality @available(iOS, obsoleted: 3.0.0, renamed: "video.fileType") public var videoExtension: AVFileType = .mov @available(iOS, obsoleted: 3.0.0, renamed: "video.recordingTimeLimit") public var videoRecordingTimeLimit: TimeInterval = 60.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.libraryTimeLimit") public var videoFromLibraryTimeLimit: TimeInterval = 60.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.minimumTimeLimit") public var videoMinimumTimeLimit: TimeInterval = 3.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.trimmerMaxDuration") public var trimmerMaxDuration: Double = 60.0 @available(iOS, obsoleted: 3.0.0, renamed: "video.trimmerMinDuration") public var trimmerMinDuration: Double = 3.0 @available(iOS, obsoleted: 3.0.0, renamed: "library.onlySquare") public var onlySquareImagesFromLibrary = false @available(iOS, obsoleted: 3.0.0, renamed: "library.onlySquare") public var onlySquareFromLibrary = false @available(iOS, obsoleted: 3.0.0, renamed: "targetImageSize") public var libraryTargetImageSize = YPImageSize.original @available(iOS, obsoleted: 3.0.0, renamed: "library.mediaType") public var showsVideoInLibrary = false @available(iOS, obsoleted: 3.0.0, renamed: "library.mediaType") public var libraryMediaType = YPlibraryMediaType.photo @available(iOS, obsoleted: 3.0.0, renamed: "library.maxNumberOfItems") public var maxNumberOfItems = 1Doesn't it cause any errors elsewhere?
I've never used these variables, but if you have, I'd advise you to check whether you use them in your project.
I tried this one and everything okay
@available(iOS, obsoleted: 3.0.0, renamed: "video.compression")
public var videoCompression: String {
get {
return AVAssetExportPresetHighestQuality
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "video.fileType")
public var videoExtension: AVFileType {
get {
return .mov
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "video.recordingTimeLimit")
public var videoRecordingTimeLimit: TimeInterval {
get {
return 60.0
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "video.libraryTimeLimit")
public var videoFromLibraryTimeLimit: TimeInterval {
get {
return 60.0
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "video.minimumTimeLimit")
public var videoMinimumTimeLimit: TimeInterval {
get {
return 3.0
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "video.trimmerMaxDuration")
public var trimmerMaxDuration: Double {
get {
return 60.0
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "video.trimmerMinDuration")
public var trimmerMinDuration: Double {
get {
return 3.0
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "library.onlySquare")
public var onlySquareImagesFromLibrary: Bool {
get {
return false
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "library.onlySquare")
public var onlySquareFromLibrary: Bool {
get {
return false
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "targetImageSize")
public var libraryTargetImageSize: Any {
get {
return YPImageSize.original
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "library.mediaType")
public var showsVideoInLibrary: Bool {
get {
return false
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "library.mediaType")
public var libraryMediaType: Any {
get {
return YPlibraryMediaType.photo
}
}
@available(iOS, obsoleted: 3.0.0, renamed: "library.maxNumberOfItems")
public var maxNumberOfItems: Int {
get {
return 1
}
}
For all of you trying to compile on XCode 15, I made a fork of this for now until we get changes, on https://github.com/LawrenceNorman/YPImagePicker.git To use it, you'll need to remove your YPImagePicker via swift package manager and then use my forked one and it should work. Here are the steps and replacing: Remove the Existing YPImagePicker -Open your Xcode project. -Select your project file in the Project Navigator. -In the middle pane, select your application target, then go to the "Swift Packages" tab. -You'll see YPImagePicker in the list of added packages. Select it and click the minus ("-") button. Add Your Forked Repository as a Dependency After you've removed the original YPImagePicker, go to File -> Swift Packages -> Add Package Dependency via: https://github.com/LawrenceNorman/YPImagePicker.git
Fixed here https://github.com/Yummypets/YPImagePicker/commit/4ad09560321182b73ed415c543a77bc83b80a3f2
A temporary way for use: pod 'YPImagePicker', :git => 'https://github.com/Yummypets/YPImagePicker.git', :commit => '4ad09560321182b73ed415c543a77bc83b80a3f2'
Fixed here 4ad0956 A temporary way for use:
pod 'YPImagePicker', :git => 'https://github.com/Yummypets/YPImagePicker.git', :commit => '4ad09560321182b73ed415c543a77bc83b80a3f2'
not compatible with minimum deployment ios 11