# How to make a custom class for Multipeer Connectivity

**URL:** <https://forums.swift.org/t/how-to-make-a-custom-class-for-multipeer-connectivity/16523>\
**Category:** Core Libraries\
**Tags:** class\
**Created:** [September 27, 2018, 8:39pm UTC](https://forums.swift.org/t/how-to-make-a-custom-class-for-multipeer-connectivity/16523 "2018-09-27T20:39:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tonyboom123](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@Tonyboom123](https://forums.swift.org/u/Tonyboom123)\
**Post date:** [September 27, 2018, 8:39pm UTC](https://forums.swift.org/t/how-to-make-a-custom-class-for-multipeer-connectivity/16523/1 "2018-09-27T20:39:24Z")

</div>

So I was asking a question in the Apple Forums on how to keep a multipeer connectivity through view controllers and someone answered saying that I needed to make a custom class and run the multipeer code in there. I have no idea how I would do this. Can someone private message me or something? Also, how would I call this data in my view controller's swift file?
