The samples in this repository demonstrate how to use the Aircore MediaPanel SDK. For more information, check out the getting started guide or the API reference.
git clone https://github.com/aircoreio/aircore-media-panel-ios-samples.git
- Ensure you have Xcode 13.3+ installed.
- Open Finder and navigate to the directory where you checked out the code.
- For the SwiftUI sample, launch
aircore-media-panel-ios-samples
->MediaPanel-SwiftUI
->MediaPanel-SwiftUI.xcodeproj
. - For the Swift sample, launch
aircore-media-panel-ios-samples
->MediaPanel-UIKit-Swift
->MediaPanel-UIKit-Swift.xcodeproj
. - For the Objective-C sample, launch
aircore-media-panel-ios-samples
->MediaPanel-UIKit-ObjC
->MediaPanel-UIKit-ObjC.xcodeproj
.
- From the Xcode Project Navigator, open the
Info.plist
file. - Replace
INSERT_PUBLISHABLE_API_KEY_FROM_DEVELOPER_DASHBOARD
with a Publishable API Key from the developer dashboard. - Open
MediaPanel_SwiftUIApp.swift
for the SwiftUI sample,ViewController.swift
for the Swift sample, orViewController.m
for the Objective-C sample. - Change these values as per your needs:
let userId = UUID.init().uuidString // Replace with any unique ID that represents your user in your system.
lazy var userName = "User " + userId.prefix(5) // Replace with any name that represents your user in your system.
lazy var userAvatarURL = URL(string: "https://i.pravatar.cc/300?u=" + userId) // Replace with a url for a profile picture that represents your user in your system.
let channel = "sample-app" // Replace with any unique name/id that represents a channel in your system.
NSString *userId = [NSUUID UUID].UUIDString; // Replace with any unique ID that represents your user in your system.
NSString *userName = [NSString stringWithFormat:@"User %@", [userId substringToIndex:5]]; // Replace with any name that represents your user in your system.
NSString *avatarUrl = [NSString stringWithFormat:@"https://i.pravatar.cc/300?u=%@", userId]; // Replace with a url for a profile picture that represents your user in your system.
NSString *const kChannelId = @"sample-app"; // Replace with any unique name/id that represents a channel in your system.
- Choose a simulator or an actual device (if you're running on a M1 mac)
- Tap the ▷ button to run the sample