# Accessing the default Device manager on iOS standalone

**URL:** <https://forum.juce.com/t/accessing-the-default-device-manager-on-ios-standalone/42146>\
**Category:** MacOSX and iOS\
**Created:** [October 10, 2020, 10:56am UTC](https://forum.juce.com/t/accessing-the-default-device-manager-on-ios-standalone/42146 "2020-10-10T10:56:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulDriessen](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@PaulDriessen](https://forum.juce.com/u/PaulDriessen)\
**Post date:** [October 10, 2020, 10:56am UTC](https://forum.juce.com/t/accessing-the-default-device-manager-on-ios-standalone/42146/1 "2020-10-10T10:56:06Z")

</div>

Not too experienced with JUCE, I’ve run into a probably very trivial issue.

I have made auv3 plugins for iOS. I want to show the default juce device manager in the standalone, so that users also can use it standalone.  
I looked at the tutorial, but the real AudioDeviceManager that is used there, is not available in AudioProcessorEditor.  
I added a fake AudioDeviceManager audioDevice, and the manager component is visible and working on screen, but it doesnt seem to work for the audio.  
So I most likely need to connect to the real AudioDeviceManager, which I can not find…

```
 AudioDeviceManager audioDevice;
 AudioDeviceSelectorComponent audioSetup;

JuceDemoPluginAudioProcessorEditor (JuceDemoPluginAudioProcessor& owner)
    : AudioProcessorEditor (owner),
    audioSetup(audioDevice,
    0, // minimum input channels
    256, // maximum input channels
    0, // minimum output channels
    256, // maximum output channels
    false, // ability to select midi inputs
    false, // ability to select midi output device
    false, // treat channels as stereo pairs
    false), // hide advanced options

```

tnx in advance!

---

<div class="post-metadata">

**Author:** ![cpr2323](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/cpr2323/32/18682_2.png) [@cpr2323](https://forum.juce.com/u/cpr2323)\
**Post date:** [October 10, 2020, 1:38pm UTC](https://forum.juce.com/t/accessing-the-default-device-manager-on-ios-standalone/42146/2 "2020-10-10T13:38:58Z")

</div>

Why are you accessing the ADM from a plugin? Plugins operate on audio to/from the hosting application, not the underlying audio subsystem.

---

<div class="post-metadata">

**Author:** ![PaulDriessen](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@PaulDriessen](https://forum.juce.com/u/PaulDriessen)\
**Post date:** [October 10, 2020, 1:40pm UTC](https://forum.juce.com/t/accessing-the-default-device-manager-on-ios-standalone/42146/3 "2020-10-10T13:40:09Z")

</div>

when you choose auv3 as a target in xcode, the standalone is also created.  
In that standalone I want to access teh ADM

---

<div class="post-metadata">

**Author:** ![PaulDriessen](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@PaulDriessen](https://forum.juce.com/u/PaulDriessen)\
**Post date:** [October 10, 2020, 11:16pm UTC](https://forum.juce.com/t/accessing-the-default-device-manager-on-ios-standalone/42146/4 "2020-10-10T23:16:31Z")

</div>

Solved it this way, I just leave it here for other peeps with same problem to find  
this.  
if someone with more expertise knows how to do it more elegantly: please tell! I just hacked it this way 😉

**You need one extra include**  
#include “juce\_audio\_plugin\_client/Standalone/juce\_StandaloneFilterWindow.h”

**Then in AudioProcessorEditor the following code:**

```
//First a pointer to circumvent requirements
 AudioDeviceSelectorComponent* audioSetupP;

     if(processor.wrapperType == wrapperType_Standalone)
                {
                      auto pluginHolder = StandalonePluginHolder::getInstance();
                       AudioDeviceSelectorComponent* mySetup = new AudioDeviceSelectorComponent
                               (pluginHolder->deviceManager,
                               1, // minimum input channels
                               2, // maximum input channels
                               2, // minimum output channels
                               2, // maximum output channels
                               false, // ability to select midi inputs
                               false, // ability to select midi output device
                               false, // treat channels as stereo pairs
                                false);
                        audioSetupP = mySetup;
                        addAndMakeVisible(audioSetupP); 
                }

```

**In resized():**

```
auto r = getLocalBounds().reduced (12);
   if(processor.wrapperType == wrapperType_Standalone)
{
 audioSetupP->setBounds(r.removeFromTop(100)); 
}
```
