Method | Method detail |
---|---|
Protocol to add with class | |
callToLaunchedBackedCreatorMethod() | Convenient to load baked creator module and its protocol callback methods. |
callToLaunchedBackedCreatorMethod() | Convenient setter method to report a post data set. |
getCreatorOptionsScreen() | Convenient to load baked creator option screen module → Creator camera module and its protocol callback methods. |
callToLaunchedBackedContentPostingMethod() | Convenient to load baked creator posting screen module. |
Sample API Call |
import GluedInCreatorSDK
class FeedMethodViewController: UIViewController, CreatorProtocol, CreatorOptionsViewDelegate {
}
self.navigationController?.pushViewController(
GluedInCreator.shared.getCreatorCameraScreenBasedOn(
creatorContentType: .video,
delegate: self) ?? UIViewController(),
animated: true)
// Baked Launch method to launch creator module from camera screen
// Option to open Image or Video recording on camera screen
// Controller can be open from any button or bottom bar or load screen or any user interction option
@IBAction func callToLaunchedBackedCreatorMethod(_ sender: Any) {
self.navigationController?.pushViewController(
GluedInCreator.shared.getCreatorCameraScreenBasedOn(
creatorContentType: .video,
delegate: self) ?? UIViewController(),
animated: true)
}
//MARK: - Baked creator delegate method
func openCreator() {
print("open creator delegate method")
}
func dismissCreator() {
print("dismissCreator delegate method")
}
func startRecording() {
print("startRecording delegate method")
}
func stopRecording() {
print("stopRecording delegate method")
}
func addFilter() {
print("addFilter delegate method")
}
func removeFilter() {
print("removeFilter delegate method")
}
func selectSound() {
print("selectSound delegate method")
}
func uploadFromGallery() {
print("uploadFromGallery delegate method")
}
func postVideo() {
print("postVideo delegate method")
}
func saveToDraft() {
print("saveToDraft delegate method")
}
func onVideoCreated(success: Bool, assetPath: String, assetType: String) {
print("onVideoCreated delegate method")
print(assetPath)
print(assetType)
}
func didPosted(navigationController: UINavigationController?) {
print("didPosted delegate method")
}
func goToProfile(user: String?, navigationController: UINavigationController?) {
print("goToProfile delegate method")
print(user)
}
self.navigationController?.pushViewController(
GluedInCreator.shared.getCreatorOptionsScreen(
delegate: self) ?? UIViewController(),
animated: true)
// Baked Launch method to launch creator module from option screen from where user can decide whetear he can go for Image or Video
// Controller can be open from any button or bottom bar or load screen or any user interction option
@IBAction func callToLaunchedBackedCameraOptionMethod(_ sender: Any) {
self.navigationController?.pushViewController(
GluedInCreator.shared.getCreatorOptionsScreen(
delegate: self) ?? UIViewController(),
animated: true)
}
self.navigationController?.pushViewController(
GluedInCreator.shared.getContentPostScreen(
context: "context value",
delegate: self) ?? UIViewController(),
animated: true)
// Baked Launch method to launch creator module from option screen from where user can decide whetear he can go for Image or Video
// Controller can be open from any button or bottom bar or load screen or any user interction option
@IBAction func callToLaunchedBackedContentPostingMethod(_ sender: Any) {
self.navigationController?.pushViewController(
GluedInCreator.shared.getContentPostScreen(
context: "context value",
delegate: self) ?? UIViewController(),
animated: true)
}
*
Make Auth class object at class variable level
var auth: Auth? = nil
*/
auth?.userSignIn(
email: txtEmail.text ?? "",
password: txtPassword.text ?? "",
firebaseToken: "",
deviceId: getDeviceUUID(),
deviceType: getDevicePlatForm(),
success: { [weak self] result in
guard let weakSelf = self else { return }
UserDefaults.standard.set(true, forKey: "isLogin")
// Action for sign in success
}, failure: { [weak self] error in
guard let weakSelf = self else { return }
// Action for Fail
})