1

I am trying to implement audio visualizer to AVAudioPlayer from many days, tried different libraries but not succeeded. Now I found a library displayers but the problem is it's in Objective-C, now I don't know how to use it in the swift code. Here is the link of library https://github.com/agilie/DisPlayers-Audio-Visualizers. Please guide me in this regard or suggest me a good visualizer in Swift.

1

1 Answer 1

2

In order to use objective-c libraries or classes in a swift project you must use the bridging headers.

There's the apple documentation of importing this kind of project into a swift project:

https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_objective-c_into_swift

If you're still stuck you should follow this tutorial:

https://medium.com/ios-os-x-development/swift-and-objective-c-interoperability-2add8e6d6887

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.