Posts

Post not yet marked as solved
0 Replies
451 Views
When adding a map anywhere in our project whether it be through a xib, storyboard or programmatically will crash the app. This crash occurs on a physical device. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[VKMapView layer]: unrecognized selector sent to instance 0x109695d60' I'm using xcode 14.1 OS Ventura 13.0.1 MacBook Pro 16in 2019
Posted
by fozlong.
Last updated
.
Post not yet marked as solved
0 Replies
446 Views
I have two phones running different iOS, one with iOS 12.4.1 and one with iOS 13. I have a AVMutableVideoComposition that adds fade in and out on a video. This function has always works and still currntly works on 12.4.1 but with iOS 13 it just creates a black video with sound. let urlAsset = AVURLAsset(url: inputURL, options: nil) guard let exportSession = AVAssetExportSession(asset: urlAsset, presetName: AVAssetExportPresetHighestQuality) else { handler(nil) return } exportSession.outputURL = outputURL exportSession.outputFileType = AVFileType.m4v exportSession.shouldOptimizeForNetworkUse = true let composition = AVMutableVideoComposition(propertiesOf: urlAsset) let clipVideoTrack = urlAsset.tracks(withMediaType: AVMediaType.video)[0] let timeDuration = CMTimeMake(value: 1, timescale: 1) let layer = AVMutableVideoCompositionLayerInstruction(assetTrack: clipVideoTrack) //MARK: Fade in effect layer.setOpacityRamp( fromStartOpacity: 0.0, toEndOpacity: 1.0, timeRange: CMTimeRange(start: CMTime.zero, duration: timeDuration)) //MARK: Fade out effect let startTime = CMTimeSubtract(urlAsset.duration, CMTimeMake(value: 1, timescale: 1)) layer.setOpacityRamp( fromStartOpacity: 1.0, toEndOpacity: 0.0, timeRange: CMTimeRangeMake(start: startTime, duration: timeDuration) ) let instruction = AVMutableVideoCompositionInstruction() instruction.layerInstructions = [layer] instruction.timeRange = CMTimeRangeMake(start: CMTime.zero, duration: urlAsset.duration) composition.instructions = [instruction] exportSession.videoComposition = composition exportSession.exportAsynchronously { () -> Void in handler(exportSession) print("compress video has completed") }
Posted
by fozlong.
Last updated
.