---
title: "init(type:primary:)"
framework: corebluetooth
role: symbol
role_heading: Initializer
path: "corebluetooth/cbmutableservice/init(type:primary:)"
---

# init(type:primary:)

Creates a newly initialized mutable service specified by UUID and service type.

## Declaration

```swift
init(type UUID: CBUUID, primary isPrimary: Bool)
```

## Parameters

- `UUID`: A 128-bit UUID that identifies the service.
- `isPrimary`: A Boolean value that indicates whether the type of service is primary or secondary. If the value is doc://com.apple.documentation/documentation/Swift/true, the type of service is primary. If the value is doc://com.apple.documentation/documentation/Swift/false, the type of service is secondary.

## Return Value

Return Value A newly initialized mutable service.

## Discussion

Discussion For more information, see Core Bluetooth Programming Guide.
