Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stored properties cannot be marked unavailable with '@available' #789

Closed
UtkuDalmaz opened this issue Jun 5, 2023 · 12 comments
Closed

Stored properties cannot be marked unavailable with '@available' #789

UtkuDalmaz opened this issue Jun 5, 2023 · 12 comments

Comments

@UtkuDalmaz
Copy link

Getting this error in xcode 15 beta

Screenshot 2023-06-06 at 02 25 16
@corentios
Copy link

Same here

@phoenisis
Copy link

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 😟 )

@UtkuDalmaz
Copy link
Author

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?

@funsiyuan
Copy link

same here (Xcode 15 Beta2) 😿

@nvnthermawan12
Copy link

nvnthermawan12 commented Jun 23, 2023

I also discovered the error on xcode 15 beta 2
Hopefully, someone can fix it

@corentios
Copy link

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

@nvnthermawan12
Copy link

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?

@corentios
Copy link

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?

I've never used these variables, but if you have, I'd advise you to check whether you use them in your project.

@nvnthermawan12
Copy link

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?

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
        }
    } 

LawrenceNorman added a commit to LawrenceNorman/YPImagePicker that referenced this issue Jun 27, 2023
fix for xcode 15 beta 2: remove lines that cause: Stored properties cannot be marked unavailable with '@available' Yummypets#789  -> In Xcode 15 beta 2
@LawrenceNorman
Copy link

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

@NikKovIos
Copy link
Collaborator

NikKovIos commented Sep 21, 2023

Fixed here 4ad0956
A temporary way for use: pod 'YPImagePicker', :git => 'https://github.com/Yummypets/YPImagePicker.git', :commit => '4ad09560321182b73ed415c543a77bc83b80a3f2'

@mauldyputra
Copy link

mauldyputra commented Sep 27, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants