Chuyển tới nội dung chính

Quick Start: iOS

Get VLPlay SDK running in your iOS project in under 5 minutes. [PLACEHOLDER] This guide assumes you have already created a VLPlay application on your VLPlay representative and have your App ID ready. VLPlay SDK for iOS supports both Swift Package Manager and CocoaPods.

[PLACEHOLDER] The SDK is built as an XCFramework and ships with full Swift concurrency support (async/await). Initialization takes a single line of code in your AppDelegate or @main struct.

Step 1: Add Package (Swift Package Manager)

In Xcode, go to File → Add Package Dependencies and enter:

SDK package provided by your VLPlay representative

Select version 1.0.0 or later.

Alternatively, using CocoaPods:

Podfile
pod 'VLPlaySDK', '~> 1.0'

Step 2: Initialize the SDK

AppDelegate.swift
import UIKit
import VLPlaySDK

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
VLPlaySDK.initialize(
appId: "YOUR_APP_ID",
clientSecret: "YOUR_CLIENT_SECRET"
)
return true
}
}

Step 3: Verify

import VLPlaySDK

print("VLPlay SDK version: \(VLPlaySDK.version)")

Next: Full iOS Installation Guide