https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-ios
iOS SDK for interfacing with the Amazon Kinesis Video Streams Signaling Service.
https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-ios
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.0%) to scientific vocabulary
Keywords
Repository
iOS SDK for interfacing with the Amazon Kinesis Video Streams Signaling Service.
Basic Info
Statistics
- Stars: 69
- Watchers: 13
- Forks: 32
- Open Issues: 3
- Releases: 0
Topics
Metadata Files
README.md
Amazon Kinesis Video iOS WebRTC Sample
[](https://img.shields.io/github/actions/workflow/status/awslabs/amazon-kinesis-video-streams-webrtc-sdk-ios/ci.yml) [](https://opensource.org/licenses/Apache-2.0)This sample demonstrates the Amazon Kinesis Video Streams and Kinesis Video Signaling framework found in the AWS Mobile SDK for iOS with Google WebRTC.
For more information, see What Is Amazon Kinesis Video Streams with WebRTC and WebRTC SDK for iOS. You can learn more about Google WebRTC's native API's here.
Requirements
- See ci.yml for supported iOS and XCode versions.
Download the WebRTC SDK in iOS
To download the WebRTC SDK in iOS, run the following command:
bash
git clone https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-ios.git
Using XCode to build the project
Install XCode. You can install XCode from https://developer.apple.com/download/all/
The AWS Mobile SDK for iOS is available through CocoaPods. If CocoaPods is not installed, install it using the following command. Note that Ruby will also be installed, as it is a dependency of Cocoapods.
bash brew install cocoapods pod setupThe following cocoa pod dependencies are included in the Podfile and need to be
pod install'ed:
- Starscream
- Common Crytpo
- WebRTC.framework: this is the GoogleWebRTC module framework package (bit code disabled).
- AWSMobileClient
- AWSCognito
- AWSKinesisVideo
- AWSKinesisVideoSignaling
Change directories to the directory containing the Podfile and run the install command:
bash
cd amazon-kinesis-video-streams-webrtc-sdk-ios/Swift
pod cache clean --all
pod install --repo-update
Create an Amazon Cognito User Pool. Follow steps 2-3 in the AWS KVS Android WebRTC Repo.
To open the project, you can choose between these two methods:
- Open XCode, select "Open a project or file", and choose AWSKinesisVideoWebRTCDemoApp.xcworkspace, OR
- Run the following command from the Swift folder.
bash xed .
Open KvsiOSApp/Constants.swift. Set
CognitoIdentityUserPoolRegion,CognitoIdentityUserPoolId,CognitoIdentityUserPoolAppClientId,CognitoIdentityUserPoolAppClientSecretandCognitoIdentityPoolIdto the values obtained in step 3.
Example Constants.swift
```swift
let cognitoIdentityUserPoolRegion = AWSRegionType.USWest2
let cognitoIdentityUserPoolId = "us-west-2_qRsTuVwXy"
let cognitoIdentityUserPoolAppClientId = "0123456789abcdefghijklmnop"
let cognitoIdentityUserPoolAppClientSecret = "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmno"
let cognitoIdentityPoolId = "us-west-2:01234567-89ab-cdef-0123-456789abcdef"
```
Open KvsiOSApp/awsconfiguration.json and replace the "REPLACEME" values with the values obtained earlier.
Example awsconfiguration.json
json
{
"Version": "1.0",
"CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "us-west-2:01234567-89ab-cdef-0123-456789abcdef",
"Region": "us-west-2"
}
}
},
"IdentityManager": {
"Default": {}
},
"CognitoUserPool": {
"Default": {
"AppClientSecret": "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmno",
"AppClientId": "0123456789abcdefghijklmnop",
"PoolId": "us-west-2_qRsTuVwXy",
"Region": "us-west-2"
}
}
}
- To build and run, click the play button at the top of the XCode UI.
Run the iOS Sample Application
Building the iOS sample application installs the AWSKinesisVideoWebRTCDemoApp on your iOS device. Using this app, you can verify live audio/video streaming between mobile, web and IoT device clients (camera). The procedure below describes some of these scenarios.
Complete the following steps:
- On your iOS device, open AWSKinesisVideoWebRTCDemoApp and login using the AWS user credentials from Set Up an AWS Account and Create an Administrator. (Note: Cognito settings can be tuned through your Cognito User Pool in the AWS management Console)
- On successful sign-in, the channel configuration view is displayed where the channel-name, client-id (optional) and region-name have to be configured.
Run the Integration Tests
- To run the integration tests, the test user has to be created with the appropriate test password as in the AWSKinesisVideoWebRTCDemoAppUITests/TestConstants.swift file.
Note
- Ensure that in all the cases described below, both the client applications use the same signaling channel name, region, viewer-id/client-id and the AWS account id.
- Please note that a master should be started first before the viewer connects to it.
Peer to Peer Streaming between two iOS devices: master and viewer:
- Start one iOS device in master mode for starting a new session using a channel name (e.g. demo). Remote peer will be joining as viewer to this master.
- Currently, there can be only one master for a channel at any given time.
- Use another iOS device to connect to the same channel name (started up in the above step set up as a master) in viewer mode. This will connect to an existing session (channel) where a master was connected previously.
Peer to Peer Streaming between Embedded SDK master and iOS device:
- Run KVS WebRTC embedded SDK (in C) in master mode on a camera device.
- Start the iOS device in viewer mode – you should be able to see the local video preview in the lower right side of the screen and also the larger part of the screen should stream the remote video view.
Peer to Peer Streaming between iOS device as master and Web browser as viewer:
- Start one iOS device in master mode for starting a new session using a channel name (e.g. demo)
- Start the Web Browser using the Javascript SDK (JS with audio selected) and start it as viewer.
- Verify media showing up from the iOS device and also from the browser.
Note
- This sample application has been tested in iPhone XS and iPhone 6.
Troubleshooting
Scripting Bridge could not launch application /Applications/Xcode.app
Check that `XCode.app` is in your `Applications` folder.
No such module 'AWSCognitoIdentityProvider'
Open the project by selecting the `.xcworkspace` file or using the `xed .` command, not the `.xcodeproj` file.
Could not build module 'UIKit'
Try reinstalling XCode, restarting your MAC, and reinstalling the Pods. Run the following commands from the same directory containing the [Podfile](Swift).
```
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData
pod deintegrate
rm -f Podfile.lock
pod setup
pod install --repo-update
```
Then, run a clean build in XCode by going to `Product > Clean Build Folder` (or using ⌘+⇧+K) before clicking the play button.
Could not find module 'AWSMobileClient' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator
Open Build settings.
* In XCode, switch to the file viewer, scroll down and double-click on the Pods with the XCode symbol next to it. At the top, switch the tab to `Build settings`, and check that `All` and `Combined` are selected.
In the `Architectures > Architectures` setting, add `x86_64`.
Alternatively, you can try enabling Rosetta: `Finder > Applications > XCode > Get Info > ✓ Enable Rosetta`
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid region type.'
Double check that [Constants.swift](Swift/KVSiOSApp/Constants.swift) contains a valid region. See [AWSRegionType](https://aws-amplify.github.io/aws-sdk-ios/docs/reference/AWSCore/Enums/AWSRegionType.html) for more info.
Unable to create channel. Please validate all the input fields
Check that the values in `Constants.swift` and `awsconfiguration.json` are set correctly. See the examples above to ensure your values match the same format.
Additionally, check that the IAM role has the appropriate `kinesisvideo` permissions.
License
This library is licensed under the Apache 2.0 License.
Owner
- Name: Amazon Web Services - Labs
- Login: awslabs
- Kind: organization
- Location: Seattle, WA
- Website: http://amazon.com/aws/
- Repositories: 914
- Profile: https://github.com/awslabs
AWS Labs
GitHub Events
Total
- Issues event: 3
- Watch event: 4
- Delete event: 1
- Issue comment event: 12
- Push event: 2
- Pull request review event: 5
- Pull request event: 4
- Fork event: 5
- Create event: 1
Last Year
- Issues event: 3
- Watch event: 4
- Delete event: 1
- Issue comment event: 12
- Push event: 2
- Pull request review event: 5
- Pull request event: 4
- Fork event: 5
- Create event: 1
Issues and Pull Requests
Last synced: almost 2 years ago
All Time
- Total issues: 72
- Total pull requests: 17
- Average time to close issues: 2 months
- Average time to close pull requests: 7 days
- Total issue authors: 50
- Total pull request authors: 6
- Average comments per issue: 3.26
- Average comments per pull request: 0.82
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 16
- Pull requests: 11
- Average time to close issues: 2 months
- Average time to close pull requests: 10 days
- Issue authors: 10
- Pull request authors: 3
- Average comments per issue: 1.88
- Average comments per pull request: 0.73
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- MrShiY (4)
- bijuC1983 (4)
- HiLittlePiper (4)
- Emefar (3)
- OwlRepo (3)
- Bhoon-coding (3)
- archidvignesh (3)
- mehmetcy84 (2)
- vivekgadgeon (2)
- gkamath (2)
- maxwell44 (2)
- ankitsaini56 (2)
- SanthoshMKunthe (2)
- bravepiper (1)
- DaisukeNagata (1)
Pull Request Authors
- sirknightj (8)
- stefankiesz (4)
- dswamina (3)
- niyatim23 (2)
- ankitsaini56 (1)
- pablogeek (1)
- Json031 (1)
- disa6302 (1)