The ScreenPort SDK allows app developers to receive video and audio from ScreenPort devices over USB or network.
The SDK is currently available for the following Apple platforms:
- iOS and iPadOS
- macOS (via Mac Catalyst)
- tvOS (network connections only)
The SDK is available as a Swift Package. To add it to your project, follow these steps:
- Navigate to Project Settings in Xcode, then Package Dependencies.
- Click the plus button to add a dependency and paste the URL of this repository into the search field:
https://github.com/in2core/screenportsdk.git
- Select a Dependency Rule, either:
- Up to Next Major Version, entering
1.0.0
into the left text field and leaving the right field blank (recommended), or - Branch, entering
main
into the branch name field.
- Up to Next Major Version, entering
- Click Add Package and wait for package resolution.
- Select the target to add the package product to, then click Add Package again.
- Add the
NSLocalNetworkUsageDescription
andNSBonjourServices
keys from Info.plist into your project’s Info.plist. Due to a known issue, this step is currently required even if you only plan to use USB connections. - Add the following entitlements into your project’s entitlements file:
com.apple.security.device.usb
com.apple.security.network.client
com.apple.security.network.server
- Use
import ScreenPortSDK
in your code.
See the documentation for details on how to use the SDK. This package includes a demo project showing how to stream from ScreenPort devices using SwiftUI and UIKit.