Cocoapods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate UserVision into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'UserVision'
end
Then, run the following command:
$ pod install
Manually
UserVision does not provide Dynamic Framework support yet.
- Swift 3.0, 3.1, 3.2 or Objective C
- iOS 9.0+
- Alamofire 4.4 (If used in your project)
Add UVAuthEmail and UVAuthSecret key-value pairs to your project's info.plist file.
These fields are required and will be provided by UserVision.
Add Privacy - Microphone Usage Description key-value pair to project's info.plist file.
This field is required if you're planning to record audio with UserVision.
- Import UserVision in your Appdelegate.swift
import UserVision
- Initialize UserVision in your didFinishLaunchingWithOptions function.
Parameters:
-
rootViewController -> UIViewController
-
type -> RecordType (Optional parameter, default value is .audioScreen)
.screen
Records only screen without audio..audioScreen
Records screen and audio at the same time. (Recommended) -
quality -> RecordQuality (Optional parameter, default value is .mid)
.low
fps = 5.mid
fps = 10 (Recommended).high
fps = 18
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
self.window = UserVision.with(rootViewController: (window?.rootViewController)!, type: .audioScreen, quality: .mid)
return true
}
- Edit your
applicationDidBecomeActive
andapplicationWillTerminated
.
func applicationDidBecomeActive(_ application: UIApplication) {
UserVision.shared.startSession()
}
func applicationWillTerminate(_ application: UIApplication) {
UserVision.shared.stopSession()
}
- If you want to end recording when home button is pressed, you can optionally call
stopSession()
atapplicationDidEnterBackground
.
func applicationDidEnterBackground(_ application: UIApplication) {
UserVision.shared.stopSession()
}
UserVision.shared.startSession()
UserVision.shared.stopSession()
UserVision is built and maintained by Appyist.
Appyist
Appyist develops software and designs that redefine borders on Apple platforms; trains young people by the values of culture they have created and develops a perception of quality that is assessed by the values of passion while bringing together the madly passionate ones in Turkey at monthly TurkishKit events.
UserVision is released under the Apache License.