Entrypoint Configurations
  • Go to scene delegate and import GluedIn SDK as show below.
  • Launch Gluedin Dashboard as a Guest user on Button click: call Gluedin Root tab view controller and initiate the navigation flow which is best fit for your application. We show sample code below:
    			 
    			   
      @IBAction func launchGluedinTabAsGuest(_ sender: Any) {
            GluedIn.shared.initSdk {
                let gluedinTab:UITabBarController = GluedIn.shared.rootTabController() ?? UITabBarController()
                self.navigationController?.pushViewController(gluedinTab, animated: true)
            } failure: { error, code in
                print(error)
            }
        }
    
    
    			 
    			 
  • Launch Gluedin SDK with Authentication Module: call Gluedin Signin screen method to init gluedin authentication module before going any other screen and process the navigation flow which fits to your application. We show the sample code below:
    				 
    				   
     @IBAction func launchGluedinAuthScreen(_ sender: Any) {
            GluedIn.shared.initSdk {
                let rootController =  GluedIn.shared.rootControllerWithSignIn()
                self.navigationController?.pushViewController(rootController ?? UIViewController(), animated: true)
            } failure: { error, code in
                print(error)
            }
        }
    
    
    				 
    				 
  • Register User and launch Gluedin Root controller as a authenticated user: call to register the user method with multiple parameter and call the root controller once you get the call back from register user method. We show the sample code below:
    				 
    				   
     @IBAction func registerUserAndlaunchGluedin(_ sender: Any) {
            GluedIn.shared.initSdk {
                GluedIn.shared.quickLaunch(email: "amitch184@gmail.com",
                                           password: "123456789",
                                           firebaseToken: "",
                                           deviceId: "1234",
                                           deviceType: "ios",
                                           fullName: "amit",
                                           autoCreate: true,
                                           termConditionAccepted: true) { [weak self] vw in
                    guard let weakSelf = self else { return }
                    weakSelf.navigationController?.pushViewController(vw ?? UIViewController(), animated: true)
                } failure: { err,arg  in
                    print(err)
                    print(arg)
                }
            } failure: { err,arg  in
                print(err)
                print(arg)
            }
        }
    
    
    				 
    				 
  • Initialised GluedInSDK and call entry point:call Signin controller at root view controller or any other entry point from where you wanted to get entered in GluedIn SDK (i.e. On Tabbar controller/ any button click). Please see below implementation for rootviewcontroller on scene delegate. Replace “willConnectTo” inside scene delegate class.
    				 
    				   
      func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
            guard let windowScene = scene as? UIWindowScene else { return }
            window = UIWindow(windowScene: windowScene)
            window?.rootViewController = UIStoryboard(name: "LaunchScreen", bundle: nil).instantiateInitialViewController()
            window?.makeKeyAndVisible()
            let controller: UIViewController = GluedinSDK.shared.rootControllerWithSignIn() ?? UIViewController()
                let navigationController = UINavigationController(rootViewController: controller ?? UIViewController())
                self.window?.rootViewController = navigationController
        }
    				 
    				 
  • Deeplink changes: follow the below steps,
    • Register with firebase and create an app for iOS app (Add Firebase to your Apple project | Firebase for Apple platforms ).
    • Add an associated domain, received from firebase console, under the associated domain in the "singing and capabilities" section. Refer below image as highlighted in red.