Coder Social home page Coder Social logo

agoraio / video-sdk-samples-ios Goto Github PK

View Code? Open in Web Editor NEW
6.0 9.0 0.0 3.8 MB

Home Page: https://agoraio.github.io/video-sdk-samples-ios/

Swift 99.75% Shell 0.25%
agora agora-sdk agoraio documentation examples ios swift swiftui video-streaming vonage

video-sdk-samples-ios's Introduction

Video SDK for iOS reference app

This app demonstrates the using Agora's Video SDK for real-time communication in a SwiftUI app.

This example app is a robust and comprehensive documentation reference app for iOS, designed to enhance your productivity and understanding. It's built to be flexible, easily extensible, and beginner-friendly.

To understand the contents better, you can go to Agora's Documentation, which explains each example in more detail.

Samples

You'll find numerous examples illustrating the functionality and features of this reference app in the root directory. Each example is self-contained in its own directory, providing an easy way to understand how to use the app. For more information about each example, see the README file within its directory.

Get Started

Core Functionality

Integrate Features

Prerequisites

Before getting started with this example app, please ensure you have the following software installed on your machine:

  • Xcode 13.0 or later.
  • Swift 5.5 or later.
  • An iOS device or emulator running iOS 13.0 or later.

Run this project

  1. Clone the repository

    To clone the repository to your local machine, open Terminal and navigate to the directory where you want to clone the repository. Then, use the following command:

    git clone https://github.com/AgoraIO/video-sdk-samples-ios.git
  2. Open the project

    Navigate to Example-App, and open Docs-Examples.xcodeproj.

    All dependencies are installed with Swift Package Manager, so will be fetched automatically by Xcode.

  3. Update Signing

    As with any Xcode project, head to the target, "Signing & Capabilities", and add your team, and modify the bundle identifier to make it unique.

  4. Modify the project configuration

The app loads connection parameters from the config.json file. Ensure that the file is populated with the required parameter values before running the application.

- `uid`: The user ID associated with the application.
- `appId`: (Required) The unique ID for the application obtained from [Agora Console](https://console.agora.io). 
- `channelName`: The default name of the channel to join.
- `rtcToken`:An token generated for `channelName`. You generate a temporary token using the [Agora token builder](https://agora-token-generator-demo.vercel.app/).
- `serverUrl`: The URL for the token generator. See [Secure authentication with tokens](authentication-workflow) for information on how to set up a token server.
- `tokenExpiryTime`: The time in seconds after which a token expires.

If a valid serverUrl is provided, all samples use the token server to obtain a token except the SDK quickstart project that uses the rtcToken. If a serverUrl is not specified, all samples except Secure authentication with tokens use the rtcToken from config.json.

  1. Build and run the project

    To build and run the project, use the build button (Cmd+R) in Xcode. Select your preferred device/simulator as the scheme.

Screenshots

Landing page Call quality best practice Custom video and audio sources Screen share, volume control and mute
Landing page of the application Two streams and quality details in the top left of each stream Custom camera using the ultra wide iPhone capture Local and remote olume control + screen sharing option

Contact

If you have any questions, issues, or suggestions, please file an issue in our GitHub Issue Tracker.

video-sdk-samples-ios's People

Contributors

billy-the-fish avatar maxxfrazer avatar nirm2009 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

video-sdk-samples-ios's Issues

integrating agora iOS

Hello Im trying to integrate agora within the Hustles iOS application. Specifically I want to integrate: audio only chat rooms, audio/video 1-1 calls with offline push, and broadcasting where only 1 user can publish audio/video and other users can join in. I tried going through the agora documentation but Im pretty new to this and can't get it right. I'd appreciate it if an agora dev can help me out to set up a basic workflow. Here's what I have so far: https://github.com/ak3zaidan/agora_intro

App Wont build

Having an issue with sample app that wont built, simulator Or Device:
Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
DVTErrorCreationDateKey = "2024-02-09 17:03:07 +0000";
IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
NSURL = "file:///Users/omerberger/Library/Developer/Xcode/DerivedData/Docs-Examples-gentheeudqxlvegkrjxpvxnzzaah/Build/Products/Debug-iphoneos/Docs-Examples.app/";
}

Unable to Install “Agora Video Doc Companion”
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Please try again later.
Recovery Suggestion: Appex bundle at "/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.t1Bam7/extracted/Docs-Examples.app/PlugIns/screenSharer.appex" with identifier "agora-examples3" does not have expected identifier prefix "agora-examples."

Appex bundle at "/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.t1Bam7/extracted/Docs-Examples.app/PlugIns/screenSharer.appex" with identifier "agora-examples3" does not have expected identifier prefix "agora-examples."
Domain: MIInstallerErrorDomain
Code: 37
User Info: {
FunctionName = "-[MIAppExtensionBundle validateBundleMetadataWithError:]";
LegacyErrorString = AppexBundleIDNotPrefixed;
SourceFileLine = 235;
}

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_isCoreDevice" = 1;
"device_isWireless" = 1;
"device_model" = "iPhone15,4";
"device_osBuild" = "17.2.1 (21C66)";
"device_platform" = "com.apple.platform.iphoneos";
"dvt_coredevice_version" = "355.7.7";
"dvt_mobiledevice_version" = "1643.60.2";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 1924;
"operation_errorCode" = 37;
"operation_errorDomain" = "com.apple.dt.CoreDeviceError.3002.IXUserPresentableErrorDomain.1.MIInstallerErrorDomain";
"operation_errorWorker" = IDEInstallCoreDeviceWorker;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphoneos";
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 1;
"param_diag_checker_tpc_enable" = 1;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 0;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 99;
"param_launcher_substyle" = 8192;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.application";
"param_structuredConsoleMode" = 1;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos17.2";
"sdk_osVersion" = "17.2";
"sdk_variant" = iphoneos;
}

System Information

macOS Version 14.3 (Build 23D56)
Xcode 15.2 (22503) (Build 15C500b)
Timestamp: 2024-02-09T12:03:07-05:00

Failure Reason: Failed to create promise.
User Info: {
DVTErrorCreationDateKey = "2024-02-09 17:02:27 +0000";
FunctionName = "+[IXPlaceholder _placeholderForBundle:client:withParent:installType:metadata:placeholderType:mayBeDeltaPackage:error:]";
IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher;
SimCallingSelector = "installApplication:withOptions:error:";
SourceFileLine = 869;
}

Failed to set app extension placeholders for agora-examples
Domain: IXErrorDomain
Code: 2
Failure Reason: Failed to create promise.
User Info: {
FunctionName = "+[IXPlaceholder _placeholderForBundle:client:withParent:installType:metadata:placeholderType:mayBeDeltaPackage:error:]";
SourceFileLine = 869;
}

Attempted to set app extension placeholder promise with bundle ID agora-examples3 that does not match required prefix of agora-examples. for parent
Domain: IXErrorDomain
Code: 8
Failure Reason: Mismatched bundle IDs.
User Info: {
FunctionName = "-[IXPlaceholder setAppExtensionPlaceholderPromises:error:]";
SourceFileLine = 1382;
}

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_model" = "iPhone15,4";
"device_osBuild" = "17.0.1 (21A342)";
"device_platform" = "com.apple.platform.iphonesimulator";
"dvt_coredevice_version" = "355.7.7";
"dvt_mobiledevice_version" = "1643.60.2";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 88;
"operation_errorCode" = 2;
"operation_errorDomain" = IXErrorDomain;
"operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphonesimulator";
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 1;
"param_diag_checker_tpc_enable" = 1;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 0;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 0;
"param_launcher_substyle" = 0;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.application";
"param_structuredConsoleMode" = 1;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphonesimulator17.2";
"sdk_osVersion" = "17.2";
"sdk_variant" = iphonesimulator;
}

System Information

macOS Version 14.3 (Build 23D56)
Xcode 15.2 (22503) (Build 15C500b)
Timestamp: 2024-02-09T12:02:27-05:00

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.