# App Group Folder Access

**URL:** <https://forum.juce.com/t/app-group-folder-access/23102>\
**Category:** MacOSX and iOS\
**Created:** [June 28, 2017, 6:01pm UTC](https://forum.juce.com/t/app-group-folder-access/23102 "2017-06-28T18:01:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [June 29, 2017, 7:13am UTC](https://forum.juce.com/t/app-group-folder-access/23102/3 "2017-06-29T07:13:26Z")

</div>

In NOISE we don’t use the `NSFileManager` at all to locate shared resources. We simply use JUCE’s `File::getSpecialLocation (File::invokedExecutableFile)` which will return the path of the AUv3 if you’re code is executing inside the AUv3. You can then, for example, get the `Resources` directory of the parent app bundle. Something like this (not tested):

```
File getSharedResourceFolder()
{
    File bundle = File::getSpecialLocation (File::invokedExecutableFile).getParentDirectory();

    // macOS uses Contents/MacOS structrue, iOS bundle structure is flat
   #if JUCE_MAC
    bundle = bundle.getParentDirectory().getParentDirectory();
   #endif

    // appex is in a PlugIns folder inside the parent bundle
    if (SystemStats::isRunningInAppExtensionSandbox())
        bundle = bundle.getParentDirectory().getParentDirectory();

   #if JUCE_MAC
    bundle = bundle.getChildFile ("Resources");
   #endif

    return bundle;
}

```

If both the AUv3 and the parent app are in the same app group then both will be able to access this resource folder. Also note, that currently, there is no way in the Projucer to add your app/AUv3 to an app group. You need to do this manually in Xcode every time you re-save your `.jucer` file:

 ![](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/1/1a78198128c636ec56c1f8b0cbeb73603c002fa4.png)

I think it also requires you to register the app group with Apple online somehow - but Xcode should complain when you try to tick the app group box and you haven’t set this up online correctly.

---

_[View the full topic](https://forum.juce.com/t/app-group-folder-access/23102)._
