@@ -128,15 +128,18 @@ class Store implements Finalizable {
128
128
///
129
129
/// Case sensitivity can also be set for each query.
130
130
///
131
- /// ## macOS application group
131
+ /// ## Sandboxed macOS apps
132
132
///
133
- /// When creating a sandboxed macOS app use [macosApplicationGroup] to
134
- /// specify the application group .
133
+ /// To use ObjectBox in a sandboxed macOS app, [create an app group] (https://developer.apple.com/documentation/xcode/configuring-app-groups)
134
+ /// and pass the ID to [macosApplicationGroup] .
135
135
///
136
- /// This string value is the `DEVELOPMENT_TEAM` you can find in your Xcode
137
- /// settings, plus an application-specific suffix.
138
- /// Also check that all `macos/Runner/*.entitlements` contain a <dict> section
139
- /// with this value, for example:
136
+ /// Note: due to limitations in macOS the ID can be at most 19 characters long.
137
+ ///
138
+ /// By convention, the ID is `<Developer team ID>.<group name>` .
139
+ ///
140
+ /// You can verify the ID is correctly configured, by checking that the
141
+ /// `macos/Runner/*.entitlements` files contain the relevant key and value,
142
+ /// for example:
140
143
///
141
144
/// ```
142
145
/// <dict>
@@ -147,7 +150,10 @@ class Store implements Finalizable {
147
150
/// </dict>
148
151
/// ```
149
152
///
150
- /// Note: due to limitations in macOS the value must be at most 19 characters.
153
+ /// This is required to enable additional interprocess communication (IPC),
154
+ /// like POSIX semaphores, used by mutexes in the ObjectBox database library
155
+ /// for macOS. Specifically, macOS requires that semaphore names are prefixed
156
+ /// with an application group ID.
151
157
///
152
158
/// ## Maximum database size
153
159
///
@@ -231,6 +237,12 @@ class Store implements Finalizable {
231
237
ArgumentError .value (macosApplicationGroup, 'macosApplicationGroup' ,
232
238
'Must be at most 20 characters long' );
233
239
}
240
+ // This is required to enable additional interprocess communication
241
+ // (IPC) in sandboxed apps (https://developer.apple.com/documentation/xcode/configuring-app-groups),
242
+ // like POSIX semaphores, used by mutexes in the ObjectBox database
243
+ // library. macOS requires that semaphore names are prefixed with an
244
+ // application group ID.
245
+ // See the constructor docs for more details.
234
246
withNativeString (macosApplicationGroup, C .posix_sem_prefix_set);
235
247
}
236
248
_checkStoreDirectoryNotOpen ();
0 commit comments