Skip to main content

iOS / macOS SDK installation and setup

The current release is MeshStreamKit 1.0.8. One package includes iOS device components and universal iOS simulator and macOS components.

MeshStreamKit provides P2P media delivery acceleration for iOS and macOS applications. Its Objective-C APIs integrate with AVPlayer and compatible third-party players.

Official packages, sample projects, and release notes are available in the SDK repository.

Requirements​

EnvironmentMinimum OS version
iOS deviceiOS 15
iOS simulator (Intel / Apple Silicon)iOS 15
macOS (Intel / Apple Silicon)macOS 12

Swift Package Manager integration requires an Xcode version that supports Swift Tools 5.9.

Before you begin​

  • Create an application in the console and obtain an SDK Key for the target platform.
  • Confirm that the application's Bundle ID matches its console registration.
  • A playable HLS .m3u8, DASH .mpd, or an MP4/MP3 URL with Range support.
  • Verify that the target player can play the original media URL.

Install the SDK​

Choose CocoaPods, Swift Package Manager, or manual integration. Use one installation method per application target.

CocoaPods​

Add the dependency to your Podfile:

platform :ios, '15.0'

target 'YourApp' do
pod 'MeshStreamKit', '1.0.8'
end

Install the dependency:

pod install --repo-update

Open the generated .xcworkspace. For macOS projects, change the platform declaration to platform :osx, '12.0'.

Swift Package Manager​

In Xcode, choose File → Add Package Dependencies and enter:

https://github.com/Mesh-Stream/meshstream-p2p-ios-sdk.git

Select exact version 1.0.8 and add MeshStreamKit to the application target.

Manual integration​

Download the latest stable package from the SDK repository. Extract it, add MeshStreamKit.xcframework to the application target's Frameworks, Libraries, and Embedded Content, and select Embed & Sign.

Verify the package's integrity using the SHA-256 checksum in the matching release manifest.

Updating the SDK​

CocoaPods resolves a version that satisfies the project's dependency constraints on first installation. Subsequent installations use the version recorded in Podfile.lock. The example above pins exact version 1.0.8. To upgrade, first change the version in Podfile to your target published version, then run:

pod update MeshStreamKit --repo-update

For Swift Package Manager, first change the Exact Version requirement in Xcode's Package Dependencies to the target published version, then update the package dependency. An update command cannot move an exact dependency pin to another version while its requirement remains unchanged. For manual integration, replace the complete XCFramework and verify the new version's checksum.

Keep Podfile.lock or Package.resolved in version control and validate upgrades before releasing the application.

App configuration​

The SDK reads the application's Bundle ID automatically. No additional service address is required. Configure the following permissions for each platform.

iOS​

The SDK playback URL uses an HTTP loopback proxy. Your player needs access to this proxy even when the media origin uses HTTPS. Merge the following setting into the application target's Info.plist:

<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>

If NSAppTransportSecurity already exists, merge this key into its dictionary and retain the other ATS restrictions. Add only the additional exceptions required by your media origins.

macOS​

macOS applications also play through the local HTTP proxy. Merge the ATS local networking setting above into the application's Info.plist.

Applications with App Sandbox enabled require these network entitlements:

  • com.apple.security.network.client
  • com.apple.security.network.server

Next step​

After completing the setup above, continue to Quick integration to create a session, connect your player, and release playback resources.