{"id":26182693,"url":"https://github.com/100mslive/100ms-roomkit-ios","last_synced_at":"2025-04-14T23:15:56.938Z","repository":{"id":193077230,"uuid":"685917199","full_name":"100mslive/100ms-roomkit-ios","owner":"100mslive","description":"100ms Roomkit SDK for iOS","archived":false,"fork":false,"pushed_at":"2025-02-06T08:07:50.000Z","size":3108,"stargazers_count":11,"open_issues_count":4,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T23:15:48.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://100ms-roomkit-ios.vercel.app","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/100mslive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-01T10:00:51.000Z","updated_at":"2025-04-14T17:55:29.000Z","dependencies_parsed_at":"2024-01-29T08:47:12.057Z","dependency_job_id":"82908bf1-16dc-403e-b9f7-0556415ea586","html_url":"https://github.com/100mslive/100ms-roomkit-ios","commit_stats":null,"previous_names":["100mslive/100ms-roomkit-ios"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100mslive%2F100ms-roomkit-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100mslive%2F100ms-roomkit-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100mslive%2F100ms-roomkit-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100mslive%2F100ms-roomkit-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/100mslive","download_url":"https://codeload.github.com/100mslive/100ms-roomkit-ios/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975329,"owners_count":21192210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-11T22:23:46.160Z","updated_at":"2025-04-14T23:15:56.921Z","avatar_url":"https://github.com/100mslive.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎉 100ms RoomKit SDK ＆ Sample App 🚀\n\nRoomKit SDK for iOS enables you to integrate our production-ready conferencing and livestreaming UI into your own app effortlessly. This README will guide you through the integration process and provide examples of common use cases.\n  \n## Pre-requisites\n- **100ms account**: You will need a 100ms account to create rooms and generate tokens. If you don't have one yet, you can create it [here](https://dashboard.100ms.live/signup). Once you've created an account, navigate to the 100ms dashboard and generate [room-codes](https://www.100ms.live/docs/get-started/v2/get-started/prebuilt/room-codes/overview) and [auth-tokens](https://www.100ms.live/docs/get-started/v2/get-started/security-and-tokens#auth-token-for-client-sdks) following the provided guides.\n- **Xcode 14 or higher**: This is required for building iOS applications.\n- **iOS 15 or higher**: Ensure your device or simulator is running this version or higher.\n- **NSMicrophoneUsageDescription**: You need to provide a valid description for microphone usage in your app's `info.plist` file.\n- **NSCameraUsageDescription**: Similar to the microphone, you need to provide a valid description for camera usage in your app's `info.plist` file.\n\n👀 To see an example app implementation of a conferencing/livestreaming app using 100ms RoomKit SDK, checkout the [example repository](https://github.com/100mslive/100ms-roomkit-example).\n\nTo experience the example app made using RoomKit, you can download the app from **TestFlight** to your iOS device here: https://testflight.apple.com/join/Pb4aTS0t\n\n## Integration\n\nYou can integrate RoomKit SDK into your project using Swift Package Manager (SPM). Follow these steps:\n\n1. Open your Xcode project.\n2. Navigate to `File` \u003e `Add Package Dependency`.\n3. In the dialog that appears, enter the following URL as the package source: https://github.com/100mslive/100ms-roomkit-ios.git\n4. Click `Next` and follow the prompts to add the package to your project.\n\n## RoomKit Basics\n\n### Import SDK\nYou import the RoomKit SDK with following import statement\n\n```swift\nimport HMSRoomKit\n```\n\n### Instantiate HMSPrebuiltView\nYou use SwiftUI view called HMSPrebuiltView to instantiate a production-ready conferencing and livestreaming UI. You can either pass a [room-code](https://www.100ms.live/docs/get-started/v2/get-started/prebuilt/room-codes/overview) or an [auth-token](https://www.100ms.live/docs/get-started/v2/get-started/security-and-tokens#auth-token-for-client-sdks) to HMSPrebuiltView.\n\n#### Initialize HMSPrebuiltView with a room code\n\n```swift\n// Initialize with room code\nHMSPrebuiltView(roomCode: /*pass room code as string here*/)\n```\n\n#### Initialize HMSPrebuiltView with an auth token\n\n```swift\n// Initialize with auth token\nHMSPrebuiltView(token: /*pass role's auth token as string here*/)\n```\n\n## Example usage\n\n### Fully Featured Conferencing/Livestreaming App with Room Code\n\nTo create a fully-featured conferencing/Livestreaming app with just a room code for a role, use the following code snippet. Make sure to pass a valid room code as a string:\n\n```swift\nimport SwiftUI\nimport HMSRoomKit\n\nstruct ContentView: View {\n    var body: some View {\n        HMSPrebuiltView(roomCode: /*pass room code as string here*/)\n    }\n}\n```\n\n### Fully Featured Conferencing/Livestreaming App with Auth Token\n\nTo create a fully-featured conferencing/Livestreaming app with just an Auth Token for a role, use the following code snippet. Pass the role's auth token as a string:\n\n```swift\nimport SwiftUI\nimport HMSRoomKit\n\nstruct ContentView: View {\n    var body: some View {\n        HMSPrebuiltView(token: /*pass role's auth token as string here*/)\n    }\n}\n```\n\nFollowing demo video shows you how to integrate RoomKit SDK in your app by follwing instructions above\n\n![Demo Video](https://github.com/100mslive/100ms-roomkit-ios/assets/103245157/9947e072-af6c-4381-80af-8128c82f3f2c)\n\n### Adding Screen Sharing Feature\n\nTo add screen sharing to your app that uses Prebuilt, follow these steps:\n\n1. Use the code snippet below, replacing the placeholders with your App Group ID and Broadcast Upload Extension's bundle ID:\n\n```swift\nimport SwiftUI\nimport HMSRoomKit\n\nstruct ContentView: View {\n    var body: some View {\n        HMSPrebuiltView(roomCode: \"qsw-mik-seb\")\n          .screenShare(appGroupName: \"group.live.100ms.videoapp.roomkit\", screenShareBroadcastExtensionBundleId: \"live.100ms.videoapp.roomkit.Screenshare\")\n    }\n}\n```\n\n2. Ensure you have set up a broadcast upload extension target in your app and connected it with 100ms-ios-broadcast-sdk. For detailed instructions, refer to [this guide](https://github.com/100mslive/100ms-ios-broadcast-sdk).\n\n### Showing Prebuilt Screen Conditionally\n\nTo conditionally display the Prebuilt Screen from other views in your app, use the following code snippet:\n\n```swift\nimport SwiftUI\nimport HMSRoomKit\n\nstruct ContentView: View {\n    \n    @State var roomCode = \"\"\n    @State var isMeetingViewPresented = false\n    \n    var body: some View {\n        \n        if isMeetingViewPresented \u0026\u0026 !roomCode.isEmpty {\n            \n            HMSPrebuiltView(roomCode: roomCode, onDismiss: {\n                isMeetingViewPresented = false\n            })\n        }\n        else {\n            VStack {\n                TextField(\"Enter Room Code\", text: $roomCode)\n                Button {\n                    isMeetingViewPresented.toggle()\n                } label: {\n                    Text(\"Join\")\n                }\n            }\n        }\n    }\n}\n```\n\nThis code allows you to conditionally display the Prebuilt Screen based on user input.\n\n# How to make changes, debug, preview and contribute to RoomKit\n\n1. Clone https://github.com/100mslive/100ms-roomkit-ios, https://github.com/100mslive/100ms-roomkit-models-ios and https://github.com/100mslive/100ms-roomkit-example in same folder.\n2. Open **HMSRoomKitDevelopmentProject** Xcode project inside **100ms-roomkit-example** repo.\n\n\u003cimg width=\"906\" alt=\"Screenshot 2023-11-20 at 2 15 02 PM\" src=\"https://github.com/100mslive/100ms-roomkit-ios/assets/103245157/ab54a8e5-8884-44d6-80b5-b844a91eded8\"\u003e\n\n3. In HMSRoomKitDevelopmentProject Xcode project, use **HMSRoomKitDevelopment** target scheme to run the app in simulator or device. Use **HMSRoomKitPreview** target to see SwiftUI preview of files under **HMSRoomKit folder** (HMSRoomKit source files).\n\n\u003cimg width=\"348\" alt=\"Screenshot 2023-09-13 at 5 44 58 PM\" src=\"https://github.com/100mslive/100ms-roomkit-ios/assets/103245157/dff9264c-966f-4487-bb1c-a7d3d0f22b0b\"\u003e\n\n5. Before making changes, drag and drop local instances of 100ms-roomkit-ios and 100ms-roomkit-models-ios repo to Xcode so that development project uses editable version of the local SPM repo. You can make changes to files in HMSRoomKit folder (**HMSRoomKit source files**) or HMSRoomModels folder (**HMSRoomModels source files**) to add a feature/improvement or fix any issue.\n\n\u003cimg width=\"317\" alt=\"Screenshot 2023-11-20 at 2 16 21 PM\" src=\"https://github.com/100mslive/100ms-roomkit-ios/assets/103245157/41415b08-1093-4372-b47a-8a6225350cab\"\u003e\n\n7. Once you are done, create PRs with your changes to **main branch** of **respective repos**.\n\n\u003cimg width=\"993\" alt=\"Screenshot 2023-09-13 at 5 51 01 PM\" src=\"https://github.com/100mslive/100ms-roomkit-ios/assets/103245157/d1102bde-e081-4857-af2b-4bb969feeffb\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F100mslive%2F100ms-roomkit-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F100mslive%2F100ms-roomkit-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F100mslive%2F100ms-roomkit-ios/lists"}