Git Product home page Git Product logo

groupactivitiespuppies's Introduction

GroupActivitiesPuppies

This is s proof-of-concept demonstrator for the new Group Activities for FaceTime available with iOS 15. It's an extension of my MultipeerPuppies proof-of-concept demonstrator.

Here's a link to video of an early version.

Acknowledgments:

The talk at WWDC2021 that got me started playing with Group Activities. It includes a demo and parts of the code for a shared whiteboard app.

Thanks to @_inside for tweeting this and getting me off my duff. I spent an afternoon making this work.

This is the SharePlay introduction video.

This talk has useful tidbits for starting the session, even if your application has nothing to do with media.

This talk also has useful tidbits.

Objects and Protocols

GroupStateObserver

This object will tell you if a FaceTime call is in progress. Its observable boolean member variable, isElegibleForGroupSession turns true if you have a connection.

ActivityType: GroupActivity

GroupActivity is a protocol to define the topic for the session. The session is tied to a particular activity.

GroupSession<ActivityType>

I don't know if an application may have multiple types of sessions going at one time. It is at least possible. An activity type is necessary but not suffient to identify a session. Two different apps using the same activityIdentifier will not connect.

GroupSessionMessenger

This is the source and sink for messages in the session. Create it, passing the session object, when you get a new or modified session.

GroupActivityHandler

This class distills what I currently know about GroupActivities.

  • It will handle sessions for one activity.
  • It will send and receive messages so long as they conform to the GroupActivityMessage protocol, which adds requirements for a UUID based identifier and a timestamp to the base requirement that messages conform to Codable. This way the handler can tell if a message is older than the most recent one received.
  • I tried to remove any app specific logic from it.
  • It provides a delegate based interface to GroupActivities

Areas for Further Study

I still don't understand the session life cycle. I don't know what backgrounding and foregrounding the app actually does to a session, or how to recover from it.

groupactivitiespuppies's People

Contributors

bwake2012 avatar hemanttokopedia avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hemanttokopedia

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.