diff --git a/Documentation/Home.md b/Documentation/Home.md
deleted file mode 100755
index 18c40f0..0000000
--- a/Documentation/Home.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Types
-
- - [MultipeerConfiguration](MultipeerConfiguration)
- - [MultipeerConfiguration.Invitation](MultipeerConfiguration_Invitation)
- - [MultipeerConfiguration.Security](MultipeerConfiguration_Security)
- - [MultipeerDataSource](MultipeerDataSource)
- - [MultipeerTransceiver](MultipeerTransceiver)
- - [Peer](Peer)
diff --git a/Documentation/MultipeerConfiguration.md b/Documentation/MultipeerConfiguration.md
deleted file mode 100755
index a76f954..0000000
--- a/Documentation/MultipeerConfiguration.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# MultipeerConfiguration
-
-Configures several aspects of the multipeer communication.
-
-``` swift
-public struct MultipeerConfiguration
-```
-
-## Initializers
-
-### `init(serviceType:peerName:defaults:security:invitation:)`
-
-Creates a new configuration.
-
-``` swift
-public init(serviceType: String, peerName: String, defaults: UserDefaults, security: Security, invitation: Invitation)
-```
-
-#### Parameters
-
- - serviceType: This must be the same accross your app running on multiple devices, it must be a short string. Check Apple's docs on `MCNearbyServiceAdvertiser` for more info on the limitations for this field.
- - peerName: A display name for this peer that will be shown to nearby peers.
- - defaults: An instance of `UserDefaults` that's used to store this peer's identity so that it remains stable between different sessions. If you use MultipeerKit in app extension make sure to use a shared app group if you wish to maintain a stable identity.
- - security: The security configuration.
- - invitation: Defines how the multipeer connection handles newly discovered peers. New peers can be invited automatically, invited with a custom context or not invited at all, in which case you must invite them manually.
-
-## Properties
-
-### `serviceType`
-
-This must be the same accross your app running on multiple devices,
-it must be a short string.
-
-``` swift
-var serviceType: String
-```
-
-Check Apple's docs on `MCNearbyServiceAdvertiser` for more info on the limitations for this field.
-
-### `peerName`
-
-A display name for this peer that will be shown to nearby peers.
-
-``` swift
-var peerName: String
-```
-
-### `defaults`
-
-An instance of `UserDefaults` that's used to store this peer's identity so that it
-remains stable between different sessions. If you use MultipeerKit in app extensions,
-make sure to use a shared app group if you wish to maintain a stable identity.
-
-``` swift
-var defaults: UserDefaults
-```
-
-### `security`
-
-The security configuration.
-
-``` swift
-var security: Security
-```
-
-### `invitation`
-
-Defines how the multipeer connection handles newly discovered peers.
-
-``` swift
-var invitation: Invitation
-```
-
-### `` `default` ``
-
-The default configuration, uses the service type `MKSVC`, the name of the device/computer as the
-display name, `UserDefaults.standard`, the default security configuration and automatic invitation.
-
-``` swift
-let `default`
-```
diff --git a/Documentation/MultipeerConfiguration/index.html b/Documentation/MultipeerConfiguration/index.html
new file mode 100755
index 0000000..5fa9d9d
--- /dev/null
+++ b/Documentation/MultipeerConfiguration/index.html
@@ -0,0 +1,1358 @@
+
+
+
This must be the same accross your app running on multiple devices, it must be a short string. Check Apple's docs on MCNearbyServiceAdvertiser for more info on the limitations for this field.
+
+
+
+
peerName
+
String
+
A display name for this peer that will be shown to nearby peers.
+
+
+
+
defaults
+
UserDefaults
+
An instance of UserDefaults that's used to store this peer's identity so that it remains stable between different sessions. If you use MultipeerKit in app extension make sure to use a shared app group if you wish to maintain a stable identity.
+
+
+
+
security
+
Security
+
The security configuration.
+
+
+
+
invitation
+
Invitation
+
Defines how the multipeer connection handles newly discovered peers. New peers can be invited automatically, invited with a custom context or not invited at all, in which case you must invite them manually.
+
+
+
+
+
+
+
+
Properties
+
+
+
+ serviceType
+
+
varserviceType: String
+
+
This must be the same accross your app running on multiple devices,
+it must be a short string.
+
+
+
+
Check Apple's docs on MCNearbyServiceAdvertiser for more info on the limitations for this field.
+
+
+
+
+
+ peerName
+
+
varpeerName: String
+
+
A display name for this peer that will be shown to nearby peers.
+
+
+
+
+
+ defaults
+
+
vardefaults: UserDefaults
+
+
An instance of UserDefaults that's used to store this peer's identity so that it
+remains stable between different sessions. If you use MultipeerKit in app extensions,
+make sure to use a shared app group if you wish to maintain a stable identity.
+
+
+
+
+
+ security
+
+
varsecurity: Security
+
+
The security configuration.
+
+
+
+
+
+ invitation
+
+
varinvitation: Invitation
+
+
Defines how the multipeer connection handles newly discovered peers.
+
+
+
+
+
+ `default`
+
+
let`default`
+
+
The default configuration, uses the service type MKSVC, the name of the device/computer as the
+display name, UserDefaults.standard, the default security configuration and automatic invitation.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Documentation/MultipeerConfiguration_Invitation.md b/Documentation/MultipeerConfiguration_Invitation.md
deleted file mode 100755
index a32bdab..0000000
--- a/Documentation/MultipeerConfiguration_Invitation.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# MultipeerConfiguration.Invitation
-
-Defines how the multipeer connection handles newly discovered peers.
-New peers can be invited automatically, invited with a custom context and timeout,
-or not invited at all, in which case you must invite them manually.
-
-``` swift
-public enum Invitation
-```
-
-## Enumeration Cases
-
-### `automatic`
-
-When `.automatic` is used, all found peers will be immediately invited to join the session.
-
-``` swift
-case automatic
-```
-
-### `custom`
-
-Use `.custom` when you want to control the invitation of new peers to your session,
-but still invite them at the time of discovery.
-
-``` swift
-case custom(: (Peer) throws -> (context: Data, timeout: TimeInterval)?)
-```
-
-### `none`
-
-Use `.none` when you want to manually invite peers by calling `invite` in `MultipeerTransceiver`.
-
-``` swift
-case none
-```
diff --git a/Documentation/MultipeerConfiguration_Invitation/index.html b/Documentation/MultipeerConfiguration_Invitation/index.html
new file mode 100755
index 0000000..5cedb97
--- /dev/null
+++ b/Documentation/MultipeerConfiguration_Invitation/index.html
@@ -0,0 +1,1266 @@
+
+
+
+
+
+ MultipeerKit - MultipeerConfiguration.Invitation
+
+
+
+
+
+
+ MultipeerKit
+
+ Documentation
+
+ Beta
+
+
+
+
+
+
+
+
+
Defines how the multipeer connection handles newly discovered peers.
+New peers can be invited automatically, invited with a custom context and timeout,
+or not invited at all, in which case you must invite them manually.
+
+
+
+
+
Enumeration Cases
+
+
+
+ automatic
+
+
caseautomatic
+
+
When .automatic is used, all found peers will be immediately invited to join the session.
Use .custom when you want to control the invitation of new peers to your session,
+but still invite them at the time of discovery.
+
+
+
+
+
+ none
+
+
casenone
+
+
Use .none when you want to manually invite peers by calling invite in MultipeerTransceiver.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Documentation/MultipeerConfiguration_Security.md b/Documentation/MultipeerConfiguration_Security.md
deleted file mode 100755
index f34d2f5..0000000
--- a/Documentation/MultipeerConfiguration_Security.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# MultipeerConfiguration.Security
-
-Configures security-related aspects of the multipeer connection.
-
-``` swift
-public struct Security
-```
-
-## Nested Type Aliases
-
-### `InvitationHandler`
-
-``` swift
-public typealias InvitationHandler = (Peer, Data?, @escaping (Bool) -> Void) -> Void
-```
-
-## Initializers
-
-### `init(identity:encryptionPreference:invitationHandler:)`
-
-``` swift
-public init(identity: [Any]?, encryptionPreference: MCEncryptionPreference, invitationHandler: @escaping InvitationHandler)
-```
-
-## Properties
-
-### `identity`
-
-An array of information that can be used to identify the peer to other nearby peers.
-
-``` swift
-var identity: [Any]?
-```
-
-The first object in this array should be a `SecIdentity` object that provides the local peer’s identity.
-
-The remainder of the array should contain zero or more additional SecCertificate objects that provide any
-intermediate certificates that nearby peers might require when verifying the local peer’s identity.
-These certificates should be sent in certificate chain order.
-
-Check Apple's `MCSession` docs for more information.
-
-### `encryptionPreference`
-
-Configure the level of encryption to be used for communications.
-
-``` swift
-var encryptionPreference: MCEncryptionPreference
-```
-
-### `invitationHandler`
-
-A custom closure to be used when handling invitations received by remote peers.
-
-``` swift
-var invitationHandler: InvitationHandler
-```
-
-It receives the `Peer` that sent the invitation, a custom `Data` value
-that's a context that can be used to customize the invitation,
-and a closure to be called with `true` to accept the invitation or `false` to reject it.
-
-The default implementation accepts all invitations.
-
-### `` `default` ``
-
-The default security configuration, which has no identity, uses no encryption and accepts all invitations.
-
-``` swift
-let `default`
-```
diff --git a/Documentation/MultipeerConfiguration_Security/index.html b/Documentation/MultipeerConfiguration_Security/index.html
new file mode 100755
index 0000000..064ff67
--- /dev/null
+++ b/Documentation/MultipeerConfiguration_Security/index.html
@@ -0,0 +1,1311 @@
+
+
+
+
+
+ MultipeerKit - MultipeerConfiguration.Security
+
+
+
+
+
+
+ MultipeerKit
+
+ Documentation
+
+ Beta
+
+
+
+
+
+
+
+
+
+ Structure
+ MultipeerConfiguration.Security
+
+
+
publicstructSecurity
+
+
Configures security-related aspects of the multipeer connection.
An array of information that can be used to identify the peer to other nearby peers.
+
+
+
+
The first object in this array should be a SecIdentity object that provides the local peer’s identity.
+
+
The remainder of the array should contain zero or more additional SecCertificate objects that provide any
+intermediate certificates that nearby peers might require when verifying the local peer’s identity.
+These certificates should be sent in certificate chain order.
+
+
Check Apple's MCSession docs for more information.
+
+
+
+
+
+ encryptionPreference
+
+
varencryptionPreference: MCEncryptionPreference
+
+
Configure the level of encryption to be used for communications.
+
+
+
+
+
+ invitationHandler
+
+
varinvitationHandler: InvitationHandler
+
+
A custom closure to be used when handling invitations received by remote peers.
+
+
+
+
It receives the Peer that sent the invitation, a custom Data value
+that's a context that can be used to customize the invitation,
+and a closure to be called with true to accept the invitation or false to reject it.
+
+
The default implementation accepts all invitations.
+
+
+
+
+
+ `default`
+
+
let`default`
+
+
The default security configuration, which has no identity, uses no encryption and accepts all invitations.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Documentation/MultipeerDataSource.md b/Documentation/MultipeerDataSource.md
deleted file mode 100755
index f359435..0000000
--- a/Documentation/MultipeerDataSource.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# MultipeerDataSource
-
-``` swift
-@available(tvOS 13.0, *) @available(OSX 10.15, *) @available(iOS 13.0, *) public final class MultipeerDataSource: ObservableObject
-```
-
-## Inheritance
-
-`ObservableObject`
-
-## Initializers
-
-### `init(transceiver:)`
-
-Initializes a new data source.
-
-``` swift
-public init(transceiver: MultipeerTransceiver)
-```
-
-#### Parameters
-
- - transceiver: The transceiver to be used by this data source. Note that the data source will set `availablePeersDidChange` on the transceiver, so if you wish to use that closure yourself, you won't be able to use the data source.
-
-## Properties
-
-### `transceiver`
-
-``` swift
-let transceiver: MultipeerTransceiver
-```
-
-### `availablePeers`
-
-Peers currently available for invitation, connection and data transmission.
-
-``` swift
-var availablePeers: [Peer]
-```
diff --git a/Documentation/MultipeerDataSource/index.html b/Documentation/MultipeerDataSource/index.html
new file mode 100755
index 0000000..462b504
--- /dev/null
+++ b/Documentation/MultipeerDataSource/index.html
@@ -0,0 +1,1323 @@
+
+
+
+
+
+ MultipeerKit - MultipeerDataSource
+
+
+
+
+
+
+ MultipeerKit
+
+ Documentation
+
+ Beta
+
+
+
+
+
+
+
+
+
The transceiver to be used by this data source. Note that the data source will set availablePeersDidChange on the transceiver, so if you wish to use that closure yourself, you won't be able to use the data source.
Peers currently available for invitation, connection and data transmission.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Documentation/MultipeerTransceiver.md b/Documentation/MultipeerTransceiver.md
deleted file mode 100755
index 42e0d73..0000000
--- a/Documentation/MultipeerTransceiver.md
+++ /dev/null
@@ -1,137 +0,0 @@
-# MultipeerTransceiver
-
-Handles all aspects related to the multipeer communication.
-
-``` swift
-public final class MultipeerTransceiver
-```
-
-## Initializers
-
-### `init(configuration:)`
-
-Initializes a new transceiver.
-
-``` swift
-public init(configuration: MultipeerConfiguration = .default)
-```
-
-#### Parameters
-
- - configuration: The configuration, uses the default configuration if none specified.
-
-## Properties
-
-### `availablePeersDidChange`
-
-Called on the main queue when available peers have changed (new peers discovered or peers removed).
-
-``` swift
-var availablePeersDidChange: ([Peer]) -> Void
-```
-
-### `peerAdded`
-
-Called on the main queue when a new peer discovered.
-
-``` swift
-var peerAdded: (Peer) -> Void
-```
-
-### `peerRemoved`
-
-Called on the main queue when a peer removed.
-
-``` swift
-var peerRemoved: (Peer) -> Void
-```
-
-### `availablePeers`
-
-All peers currently available for invitation, connection and data transmission.
-
-``` swift
-var availablePeers: [Peer]
-```
-
-## Methods
-
-### `receive(_:using:)`
-
-Configures a new handler for a specific `Codable` type.
-
-``` swift
-public func receive(_ type: T.Type, using closure: @escaping (_ payload: T) -> Void)
-```
-
-MultipeerKit communicates data between peers as JSON-encoded payloads which originate with
-`Codable` entities. You register a closure to handle each specific type of entity,
-and this closure is automatically called by the framework when a remote peer sends
-a message containing an entity that decodes to the specified type.
-
-#### Parameters
-
- - type: The `Codable` type to receive.
- - closure: The closure that will be called whenever a payload of the specified type is received.
- - payload: The payload decoded from the remote message.
-
-### `resume()`
-
-Resumes the transceiver, allowing this peer to be discovered and to discover remote peers.
-
-``` swift
-public func resume()
-```
-
-### `stop()`
-
-Stops the transceiver, preventing this peer from discovering and being discovered.
-
-``` swift
-public func stop()
-```
-
-### `broadcast(_:)`
-
-Sends a message to all connected peers.
-
-``` swift
-public func broadcast(_ payload: T)
-```
-
-#### Parameters
-
- - payload: The payload to be sent.
-
-### `send(_:to:)`
-
-Sends a message to a specific peer.
-
-``` swift
-public func send(_ payload: T, to peers: [Peer])
-```
-
-#### Parameters
-
- - payload: The payload to be sent.
- - peers: An array of peers to send the message to.
-
-### `invite(_:with:timeout:completion:)`
-
-Manually invite a peer for communicating.
-
-``` swift
-public func invite(_ peer: Peer, with context: Data?, timeout: TimeInterval, completion: InvitationCompletionHandler?)
-```
-
-You can call this method to manually invite a peer for communicating if you set the
-`invitation` parameter to `.none` in the transceiver's `configuration`.
-
-> Warning: If the invitation parameter is not set to `.none`, you shouldn't call this method, since the transceiver does the inviting automatically.
-
-#### Parameters
-
- - peer: The peer to be invited.
- - context: Custom data to be sent alongside the invitation.
- - timeout: How long to wait for the remote peer to accept the invitation.
- - completion: Called when the invitation succeeds or fails.
diff --git a/Documentation/MultipeerTransceiver/index.html b/Documentation/MultipeerTransceiver/index.html
new file mode 100755
index 0000000..50bf9b1
--- /dev/null
+++ b/Documentation/MultipeerTransceiver/index.html
@@ -0,0 +1,1498 @@
+
+
+
+
+
+ MultipeerKit - MultipeerTransceiver
+
+
+
+
+
+
+ MultipeerKit
+
+ Documentation
+
+ Beta
+
+
+
+
+
+
+
+
+
+ Class
+ MultipeerTransceiver
+
+
+
publicfinalclassMultipeerTransceiver
+
+
Handles all aspects related to the multipeer communication.
Configures a new handler for a specific Codable type.
+
+
+
+
MultipeerKit communicates data between peers as JSON-encoded payloads which originate with
+Codable entities. You register a closure to handle each specific type of entity,
+and this closure is automatically called by the framework when a remote peer sends
+a message containing an entity that decodes to the specified type.
+
+
+
Parameters
+
+
+
+
+
Name
+
Type
+
Description
+
+
+
+
+
type
+
T.Type
+
The Codable type to receive.
+
+
+
+
closure
+
@escaping (_ payload: T) -> Void
+
The closure that will be called whenever a payload of the specified type is received.
+
+
+
+
payload
+
+
The payload decoded from the remote message.
+
+
+
+
+
+
+
+ resume()
+
+
publicfuncresume()
+
+
Resumes the transceiver, allowing this peer to be discovered and to discover remote peers.
+
+
+
+
+
+ stop()
+
+
publicfuncstop()
+
+
Stops the transceiver, preventing this peer from discovering and being discovered.
Defines how the multipeer connection handles newly discovered peers.
+New peers can be invited automatically, invited with a custom context and timeout,
+or not invited at all, in which case you must invite them manually.
+
+
+
+
+
+
+
+
+
+
diff --git a/gendocs.sh b/gendocs.sh
new file mode 100755
index 0000000..bc49638
--- /dev/null
+++ b/gendocs.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+swift-doc generate Sources/MultipeerKit/Public\ API --module-name MultipeerKit --output Documentation --format=html
\ No newline at end of file