Ios AVDRegister-AppleAVDCheckPlatform()返回FALSE

Ios AVDRegister-AppleAVDCheckPlatform()返回FALSE,ios,swift,xcode,Ios,Swift,Xcode,我有一个imagePickerController,它选择视频,然后通过一个函数分割视频 我的问题是,在我第一次运行它时,它打印出AVDRegister-AppleAVDCheckPlatform(),返回FALSE,并且表视图为空,没有错误。但是我第二次运行代码时效果很好 同样的问题还没有得到回答 func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [

我有一个
imagePickerController
,它选择视频,然后通过一个函数分割视频

我的问题是,在我第一次运行它时,它打印出
AVDRegister-AppleAVDCheckPlatform(),返回FALSE
,并且表视图为空,没有错误。但是我第二次运行代码时效果很好 同样的问题还没有得到回答

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {

    videoURL = info[UIImagePickerController.InfoKey.mediaURL] as? NSURL
    self.dismiss(animated: true, completion: nil)
    print("VIDEO URL : ", videoURL!)

    // gets duration of video in seconds
    let asset = AVAsset(url: videoURL! as URL)
    let length = Float(asset.duration.value) / Float(asset.duration.timescale)
    print("video length: \(length) seconds")
    lengthOfVid = length
    numOfRows =  Int(ceil(lengthOfVid / Float(duration!)))

    //alert dialog if length of video is > 15 mins i.e 900s
    if length > 900 {
        let alert = UIAlertController(title: NSLocalizedString("alertTitle", comment: "alertTitle"),
                                      message: NSLocalizedString("alertMessage", comment: "alertMessage"),
                                      preferredStyle: .alert)
        alert.addAction(UIAlertAction(title: NSLocalizedString("alertCancel", comment: "alertCancel"), style: .cancel))
        self.present(alert, animated: true, completion: nil)

    } else {
        //run on background thread
        DispatchQueue.global(qos: .userInteractive).async {
            self.trimingVideo(videoURL: self.videoURL!, repititions: self.numOfRows)

        }
    }
}