---
title: "shareOptionsWithOptionsGroups:"
framework: sharedwithyoucore
role: symbol
role_heading: Type Method
path: "sharedwithyoucore/swcollaborationshareoptions/shareoptionswithoptionsgroups:"
---

# shareOptionsWithOptionsGroups:

Creates and initializes a collaboration share options object with the array of groups.

## Declaration

```occ
+ (SWCollaborationShareOptions *) shareOptionsWithOptionsGroups:(NSArray<SWCollaborationOptionsGroup *> *) optionsGroups;
```

## Parameters

- `optionsGroups`: An array of doc://com.apple.sharedwithyou/documentation/SharedWithYouCore/SWCollaborationOptionsGroup objects to customize how the system shares the collaboration.

## Return Value

Return Value A SWCollaborationShareOptions object.

## See Also

### Creating share options

- [init(coder:)](sharedwithyoucore/swcollaborationshareoptions/init(coder:).md)
- [init(optionsGroups:)](sharedwithyoucore/swcollaborationshareoptions/init(optionsgroups:).md)
- [init(optionsGroups:summary:)](sharedwithyoucore/swcollaborationshareoptions/init(optionsgroups:summary:).md)
- [shareOptionsWithOptionsGroups:summary:](sharedwithyoucore/swcollaborationshareoptions/shareoptionswithoptionsgroups:summary:.md)
