Is it possible to disable Novocaine on iOS once the manager is started?

StackOverflow https://stackoverflow.com/questions/15421912

  •  23-03-2022
  •  | 
  •  

Вопрос

I am using Novocaine for an iOS app. Novocaine uses a singleton instance to handle audio IO ([Novocaine audioManager]), but it seems to be impossible to release this instance method or to disable the audio manager once it gets started for the first time.

This will cause problems when I try to open a video preview controller that wants to play audio and video at the same time. When this controller tries to control audio output for the device the app crashes.

Do you know a way to disable the singleton instance of Novocaine?

Это было полезно?

Решение

Well, I found out that this is not possible using the "standard" Novocaine manager.

To solve the problem I had to modify the open-source Novocaine tool adding a custom method to tear down the audio manager when I do not need it to "work" (the -tearDownAudio method, that works in conjunction with -setupAudio).

Please, take a look at the forked project on Github.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top