dmrschmidt / DSWaveformImage

Generate waveform images from audio files on iOS, macOS & visionOS in Swift. Native SwiftUI & UIKit views.
MIT License
978 stars 109 forks source link

crash in iOS 17 #88

Closed ReimannSamuel closed 5 months ago

ReimannSamuel commented 6 months ago

crash occurs in DSWaveformImage package in ios 17.

dmrschmidt commented 6 months ago

Hey @ReimannSamuel,

thanks for reporting this, but I need a little more context to look at this in any meaningful way.

First, which version of the library are you using? Please make sure it is the most recent, v14.2.1.

Once that is confirmed, can you provide a stack trace? And which exact version of iOS 17 are you running and on what device / simulator?

Appreciate your help.

ReimannSamuel commented 6 months ago

Thanks for the response @dmrschmidt , Im not using the pod , Im using the package dependencies. Im running in iphone 12(iOS version - 17.1.0) . Can i replace the package dependencies with the latest pod?

dmrschmidt commented 6 months ago

If by pod you mean "CocoaPods", the support for this has been dropped a long while ago. So using Swift Package Manager is definitely the approach to use, yes.

Screenshot 2023-12-08 at 13 52 19

You should make sure that you're on 14.2.1, as there have been various bug fixes which may be the cause of your crash.

If you have been using an older major version, whether you need to do any changes to your code, depends on how you used it. There's migration hints towards the bottom of the README.

Once you are on 14.2.1 and the crash still persists, I can look into it if you provide me with a stack trace of the crash and some context on your code that caused it.

ReimannSamuel commented 6 months ago

Thanks for your support @dmrschmidt , Version 13.0.2 is working fine in iOS version - 17.1.0

dmrschmidt commented 6 months ago

OK that's great to hear. I still highly recommend updating to 14.2.1 though, as there have been significant improvements made since 13.0.2.

ReimannSamuel commented 6 months ago

Sure @dmrschmidt . I have one more question related to waveforms. Im using the WaveformImage in the tableviewcell. Waveforms keep updating and flickering while scrolling the tableview. Need solution for this issue badly. Please do the needful

dmrschmidt commented 6 months ago

Right. So the waveform view is not meant to be used for high performance scenarios. The library shouldn't make any assumptions here because everyone's need will vary wildly.

If you're generating and scrolling through a lot of waveforms while maintaining good performance, you should use WaveformImageDrawer directly. Generate the images you need and cache them in a way suitable to your application.

You would then just render them in a standard UIImageView.

ReimannSamuel commented 6 months ago

Is there any sample project for this? If yes pls share the github link . It will be more useful for u

dmrschmidt commented 6 months ago

There currently unfortunately is not, no. And I won't find any time in the near future to do so. I might add something eventually to the example project, but again, it'll be of limited use as UICollectionViews / UITableViews typically get complex in different ways in different apps. This part is also something quite far outside the scope / concerns of this library.

The API for generating the waveform images is illustrated in the README but that's the easy part.

ReimannSamuel commented 6 months ago

Thank you so much for your support @dmrschmidt