Backed Creator User interaction SDK methods - GluedIn developer
Backed Creator User interaction SDK methods
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
  • Protocol to add with class:
    • CreatorProtocol
    • CreatorOptionsViewDelegate
                                  		
                                  			import GluedInCreatorSDK
      
      class FeedMethodViewController: UIViewController, CreatorProtocol, CreatorOptionsViewDelegate {
      
       }
                                  		
                                  	
  • Baked Creator camera controller launch on Button click:
    SDK class: GluedinCreator
    Method: callToLaunchedBackedCreatorMethod
    Protocol Methods:
    • openCreator()
    • dismissCreator()
    • startRecording()
    • stopRecording()
    • addFilter()
    • removeFilter()
    • selectSound()
    • uploadFromGallery()
    • postVideo()
    • saveToDraft()
    • onVideoCreated(success: Bool, assetPath: String, assetType: String)
    • didPosted(navigationController: UINavigationController?)
    • goToProfile(user: String?, navigationController: UINavigationController?)
    Convenient to load baked creator module and its protocol callback methods.
         
      self.navigationController?.pushViewController(
    
                GluedInCreator.shared.getCreatorCameraScreenBasedOn(
    
                    creatorContentType: .video,
    
                    delegate: self) ?? UIViewController(),
    
                animated: true)
                            	
                            
    How to call ?
      
    // 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)
    
        }
        
    
  • Creator Protocol methods:
    CallBack methods: call back methods to use and know the user interaction/Activity.
    Method: callToLaunchedBackedCreatorMethod
        
      //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)
    
        }
                            	
                            
  • Baked Creator Option controller launch on Button click:
    SDK class: GluedinCreator
    methods: getCreatorOptionsScreen
    • didSelectCreatorOption()
    • didSelectCancelOption()
    Convenient to load baked creator option screen module → Creator camera module and its protocol callback methods.
    	
    self.navigationController?.pushViewController(
    
         GluedInCreator.shared.getCreatorOptionsScreen(
    
                    delegate: self) ?? UIViewController(),
    
                animated: true)
    	
    
    How to call ?
          
    // 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)
    
        }
                            	
                            
  • Baked Creator Posting controller launch on Button click:
    SDK class: GluedinCreator
    methods: callToLaunchedBackedContentPostingMethod
    Convenient to load baked creator posting screen module.
    	
    self.navigationController?.pushViewController(
    
                GluedInCreator.shared.getContentPostScreen(
    
                    context: "context value",
    
                    delegate: self) ?? UIViewController(),
    
                animated: true)
    	
    
    How to call ?
                            	
                            		 // 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)
    
        }
                            	
                            
Sample API call
On the Sign-in button click calls the user sign-in Method as shown below.

                  
                   *

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

            })
        
Start for free, pay as you grow
No credit card required.