Folders.UbiquityContainer
-------------------------

Queries path for an iCloud container.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Folders](component_Folders.md) | [15.2](newinversion152.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "Folders.UbiquityContainer" { ; ContainerIdentifier } ) 

**MBS**( **"Folders.UbiquityContainer";** /\* Queries path for an iCloud container. \*/  
**$ContainerIdentifier**) /\* Optional; The fully-qualified container identifier for an iCloud container directory. The string you specify must not contain wildcards and must be of the form &lt;TEAMID&gt;.&lt;CONTAINER&gt;, where &lt;TEAMID&gt; is your development team ID and &lt;CONTAINER&gt; is the bundle identifier of the container you want to access.  
The container identifiers for your app must be declared in the com.apple.developer.ubiquity-container-identifiers array of the .entitlements property list file in your Xcode project.  
If you specify "" for this parameter, this method returns the first container listed in the com.apple.developer.ubiquity-container-identifiers entitlement array.e.g. "com.apple.test" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ContainerIdentifier | The fully-qualified container identifier for an iCloud container directory. The string you specify must not contain wildcards and must be of the form &lt;TEAMID&gt;.&lt;CONTAINER&gt;, where &lt;TEAMID&gt; is your development team ID and &lt;CONTAINER&gt; is the bundle identifier of the container you want to access.   The container identifiers for your app must be declared in the com.apple.developer.ubiquity-container-identifiers array of the .entitlements property list file in your Xcode project.   If you specify "" for this parameter, this method returns the first container listed in the com.apple.developer.ubiquity-container-identifiers entitlement array. | "com.apple.test" | Optional |

### Result

Returns text or error.

### Description

Queries path for an iCloud container.  
Returns the path for the iCloud container associated with the specified identifier and establishes access to that container.  
  
You use this method to determine the location of your app’s ubiquity container directories and to configure your app’s initial iCloud access. The first time you call this method for a given ubiquity container, the system extends your app’s sandbox to include that container. In iOS, you must call this method at least once before trying to search for cloud-based files in the ubiquity container. If your app accesses multiple ubiquity containers, call this method once for each container.   
  
You can use the URL returned by this method to build paths to files and directories within your app’s ubiquity container. Each app that syncs documents to the cloud must have at least one associated ubiquity container in which to put those files. This container can be unique to the app or shared by multiple apps.  
  
Returns a path pointing to the specified ubiquity container, or "" if the container could not be located or if iCloud storage is unavailable for the current user or device.  
  
Calls URLForUbiquityContainerIdentifier in NSFileManager internally.  
### Examples

Query container for my application:

 MBS ( "Folders.UbiquityContainer"; "")  
### Release notes

- **Version 15.2**
    - Added [Folders.UbiquityContainer](https://www.mbsplugins.eu/FoldersUbiquityContainer.shtml) function.

### Blog Entries

- [News in MBS FileMaker Plugin 15.2](https://www.mbsplugins.de/archive/2025-05-13/News_in_MBS_FileMaker_Plugin_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.2pr3](https://www.mbsplugins.de/archive/2025-04-10/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 8th April 2025 , last changed 17th January 2026

  
[Folders.SystemTemporary](FoldersSystemTemporary.md) - [Folders.UserDesktop](FoldersUserDesktop.md)

[HTML Version](FoldersUbiquityContainer.shtml)