ARVideoKit icon indicating copy to clipboard operation
ARVideoKit copied to clipboard

broken with Xcode 11.0 beta 1?

Open anushkmittal opened this issue 5 years ago • 3 comments

anushkmittal avatar Jun 13 '19 00:06 anushkmittal

An issue is happening at the PHLivePhotoPlus class.

Cannot override 'init' which has been marked unavailable and 'init()' is unavailable

    @objc public override init() {
        super.init()
    }
    
    @objc public init(photo:PHLivePhoto) {
        super.init()
        livePhoto = photo
    }

Can anyone support us with this issue?

  • Xcode Beta 1 running macOS 10.15 Beta 1.

giogus avatar Jun 19 '19 00:06 giogus

same issue here too... Anyone solve it?

Rthangavel avatar Jul 03 '19 07:07 Rthangavel

don't inherit PHLivePhoto.

Author intent to write a packet of PHLivePhoto class. Thats totally the wrong way. ❌

🤔

// this is a PHLivePhoto 🤔
let livePhotoPlus: PHLivePhotoPlus
// this is also a PHLivePhoto 😡😡😡
livePhotoPlus.livePhoto

@objc public class PHLivePhotoPlus: PHLivePhoto {
    internal var pairedVideoPath:URL?
    internal var keyPhotoPath:URL?
    
    /// A `PHLivePhoto` object that returns the Live Photo content from `PHLivePhotoPlus`.
    @objc public var livePhoto:PHLivePhoto?
    
    @objc public override init() {
        super.init()
    }
    
    @objc public init(photo:PHLivePhoto) {
        super.init()
        livePhoto = photo
    }
...
}

SHOULD BE LIKE THIS

@objc public class PHLivePhotoPlus: NSObject {
    internal var pairedVideoPath:URL?
    internal var keyPhotoPath:URL?
    
    /// A `PHLivePhoto` object that returns the Live Photo content from `PHLivePhotoPlus`.
    @objc public var livePhoto: PHLivePhoto?
    
    @objc public override init() {
        super.init()
    }
    
    @objc public init(photo: PHLivePhoto) {
        super.init()
        livePhoto = photo
    }
...
}

#94 PR

wolfcon avatar Aug 21 '19 09:08 wolfcon