This help page is for users in Creator 6. If you are in the older version (Creator 5), click here. Know your Creator version.
Registering your iOS app with Zoho generates a Client ID and Client Secret combination. These are required to allow your iOS app to integrate with your Creator application. To register your iOS app with Zoho:




#import <ZohoPortalAuthKit/ZohoPortalAuth.h>
import ZCUIFramework
classSceneDelegate: UIResponder, UIWindowSceneDelegate {_
var window: UIWindow?
func scene(scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {["aaaserver.profile.READ","zohocontacts.userphoto.READ","ZohoContacts.contactapi.READ","ZohoCreator.meta.CREATE","ZohoCreator.meta.READ","ZohoCreator.meta.UPDATE","ZohoCreator.meta.DELETE","ZohoCreator.data.CREATE","ZohoCreator.data.READ","ZohoCreator.data.UPDATE","ZohoCreator.data.DELETE","Stratus.stratusop.READ","ZohoCRM.modules.READ","ZohoCRM.users.READ"]
if let windowScene = scene as? UIWindowScene {
let window = UIWindow(windowScene: windowScene)
}
let scope ="<Your Client ID>"
let clientID ="<Your Client Secret>"
let clientSecret ="<Your Portal id>"
let portalId ="<Your Url Scheme>"
let urlScheme ="https://accounts.zohoportal.com"
let accountsUrl =//enter the accounts URL of your respective DC. For eg: EU users use'https://accounts.zohoportal.eu'.nil
ZohoPortalAuth.initWithClientID(clientID, clientSecret: clientSecret, portalID: portalId, scope: scope, urlScheme: urlScheme, mainWindow: self.window!, accountsPortalURL: accountsUrl)
// To verify if the app is already logged in
ZohoPortalAuth.getOauth2Token {
(token, error) in
if token =={_
// Not logged in
self.showLoginScreen()
} else {
// App logged in already.
// Ensure to use the following line of code in your iOS app before you utilize any of Creator SDK’s methods
Creator.configure(uiDelegate: self)
}
}
}
func scene(scene: UIScene, openURLContexts URLContexts: Set <UIOpenURLContext> ) {
if let context = URLContexts.first {
let _ = ZohoPortalAuth.handleURL(context.url,
sourceApplication: context.options.sourceApplication,
annotation: context.options.annotation)
}
}
}
extension SceneDelegate: ZCUIServiceDelegate {
func oAuthToken(with completion: @escaping AccessTokenCompletion) {
ZohoPortalAuth.getOauth2Token {
(token, error) in
completion(token, error)
}
}
func openURL(for openURLTasks: [OpenUrlTask]) {
// Get Call back here when openurl have query string "zc_MobileSDK_HandleOpenURL=true"
}
}
func showLoginScreen() {
ZohoPortalAuth.presentZohoPortalSign( in: {nil
(token, error) in
if token !={
//login success
}
})
}
func logout() {nil
ZohoPortalAuth.revokeAccessToken {
(error) in
if error =={
//Logout Successfully
}
else {
//Error Occurred
}
}
}
Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.
If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.
All-in-one knowledge management and training platform for your employees and customers.
You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.