Welcome to the documentation for the Skyware SDK. This guide aims to provide detailed information on how to integrate and use the Skyware SDK in your iOS apps. Skyware SDK offers a set of tools and features that allow developers to easily integrate Skyware’s services into their applications.
Getting Started
To get started with the Skyware SDK, follow the steps below:
- Create a new Xcode project or open an existing project.
- Download the Skyware SDK from the official website.
- Extract the downloaded SDK and locate the
Skyware.framework
file. - Drag and drop the
Skyware.framework
file into your Xcode project. - In the dialog that appears, select “Copy items if needed” and choose your target.
- Open the
.plist
file for your project and add the following key-value pairs:
<key>NSCameraUsageDescription</key>
<string>Your custom description for camera usage</string>
<key>NSMicrophoneUsageDescription</key>
<string>Your custom description for microphone usage</string>
The above step adds the necessary permissions for camera and microphone usage to the app’s Info.plist
file.
At this point, you have successfully integrated the Skyware SDK into your project.
Configuring the SDK
Before using the Skyware SDK, you need to configure it with your account credentials. Follow the steps below:
Go to the AppDelegate file of your project.
#import <Skyware/Skyware.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Initialize the Skyware SDK with your credentials
[Skyware initializeWithAppId:@"YOUR_APP_ID" appSecret:@"YOUR_APP_SECRET"];
return YES;
}
Replace YOUR_APP_ID
and YOUR_APP_SECRET
with your actual app credentials provided by Skyware.
Using Skyware SDK
The Skyware SDK provides several methods and features that you can use in your application. Below are some common use cases:
Logging In
To allow users to log in to your app, you can use the following method:
[Skyware loginWithCompletion:^(BOOL success, NSError *error) {
if (success) {
// User successfully logged in
} else {
// Error occurred during login
}
}];
This method presents a login screen to the user and returns a completion block indicating the success or failure of the login attempt.
Playing a Video
To play a video using the Skyware SDK, you can use the following method:
[Skyware playVideoWithURL:@"VIDEO_URL" completion:^(BOOL success, NSError *error) {
if (success) {
// Video playback started successfully
} else {
// Error occurred during video playback
}
}];
Replace VIDEO_URL
with the actual URL of the video you want to play. The method plays the video and returns a completion block indicating the success or failure of the playback.
Additional Resources
For more information, refer to the following resources:
- Official Skyware SDK Documentation: https://example.com
- Developer Forum: https://example.com/forum
These resources provide additional guidance, support, and examples for using the Skyware SDK.