├── README.md ├── DeskUIComponent-ManualDownload.zip └── DeskSDKDemo ├── DeskSDKDemo ├── Utility │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── default.imageset │ │ │ ├── default.pdf │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Extension.swift │ ├── Constant.swift │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ └── Main.storyboard ├── ExtenalDeskSDKDemo.xcdatamodeld │ ├── .xccurrentversion │ └── ExtenalDeskSDKDemo.xcdatamodel │ │ └── contents ├── Info.plist ├── Controller │ ├── DetailViewController.swift │ ├── TicketListController.swift │ └── HomeController.swift ├── Views │ └── HeaderView.swift └── AppDelegate.swift ├── Podfile ├── DeskSDKDemo-Bridging-Header.h └── DeskSDKDemo.xcodeproj ├── xcuserdata └── rajesh-2098.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── xcschememanagement.plist │ └── ExtenalDeskSDKDemo.xcscheme ├── project.xcworkspace ├── contents.xcworkspacedata ├── xcuserdata │ └── rajesh-2098.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcshareddata │ └── IDEWorkspaceChecks.plist └── project.pbxproj /README.md: -------------------------------------------------------------------------------- 1 | # Desk-iOSSampleApp 2 | -------------------------------------------------------------------------------- /DeskUIComponent-ManualDownload.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoho/Desk-iOSSampleApp/master/DeskUIComponent-ManualDownload.zip -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Utility/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /DeskSDKDemo/Podfile: -------------------------------------------------------------------------------- 1 | 2 | target 'DeskSDKDemo' do 3 | use_frameworks! 4 | pod 'ZohoAuth' 5 | pod 'ZohoDeskUIKit' 6 | pod 'ZohoDeskSDK' 7 | end 8 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import 6 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Utility/Assets.xcassets/default.imageset/default.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoho/Desk-iOSSampleApp/master/DeskSDKDemo/DeskSDKDemo/Utility/Assets.xcassets/default.imageset/default.pdf -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo.xcodeproj/xcuserdata/rajesh-2098.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/ExtenalDeskSDKDemo.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Utility/Assets.xcassets/default.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "default.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo.xcodeproj/project.xcworkspace/xcuserdata/rajesh-2098.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zoho/Desk-iOSSampleApp/master/DeskSDKDemo/DeskSDKDemo.xcodeproj/project.xcworkspace/xcuserdata/rajesh-2098.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/ExtenalDeskSDKDemo.xcdatamodeld/ExtenalDeskSDKDemo.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Utility/Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Extension.swift 3 | // DeskSDKDemo 4 | // 5 | // Created by Rajeshkumar Lingavel on 26/05/18. 6 | // Copyright © 2018 rajesh-2098. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension UIImageView { 12 | func showImage(_ imageURLString: String) { 13 | DispatchQueue.global().async { 14 | let data = try? Data(contentsOf: URL(string: imageURLString)!) 15 | DispatchQueue.main.async { 16 | self.image = data != nil ? UIImage(data: data!) : UIImage(named: "default.png") 17 | } 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Utility/Constant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Constant.swift 3 | // DeskSDKDemo 4 | // 5 | // Created by Rajeshkumar Lingavel on 26/05/18. 6 | // Copyright © 2018 rajesh-2098. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Constant { 12 | static let mainStoryBoardName = "Main" 13 | 14 | static let ticketControllerId = "TicketListController" 15 | static let detailControllerId = "DetailViewController" 16 | static let profileControllerId = "ProfileViewController" 17 | 18 | static let userProfileURL = "https://profile.zoho.com/api/v1/user/self/profile?include=emails,locale,photo" 19 | 20 | static let titleClose = "Close" 21 | } 22 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo.xcodeproj/xcuserdata/rajesh-2098.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ExtenalDeskSDKDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 92B64A9E20A053DD00B19060 16 | 17 | primary 18 | 19 | 20 | 92B64AB520A053E500B19060 21 | 22 | primary 23 | 24 | 25 | 92B64AC020A053E500B19060 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 0.0.8 19 | CFBundleURLTypes 20 | 21 | 22 | CFBundleTypeRole 23 | Editor 24 | CFBundleURLName 25 | <#URLScheme from account.zoho.com developer console #> 26 | CFBundleURLSchemes 27 | 28 | supportsdk 29 | 30 | 31 | 32 | CFBundleVersion 33 | 1 34 | LSRequiresIPhoneOS 35 | 36 | UILaunchStoryboardName 37 | LaunchScreen 38 | UIMainStoryboardFile 39 | Main 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UISupportedInterfaceOrientations~ipad 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationPortraitUpsideDown 54 | UIInterfaceOrientationLandscapeLeft 55 | UIInterfaceOrientationLandscapeRight 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Utility/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Controller/DetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.swift 3 | // DeskSDKDemo 4 | // 5 | // Created by Rajeshkumar Lingavel on 15/05/18. 6 | // Copyright © 2018 rajesh-2098. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ZohoDeskUIKit 11 | 12 | class DetailViewController: UIViewController { 13 | 14 | fileprivate var orgId = "" 15 | fileprivate var ticketId = "" 16 | 17 | @IBOutlet weak var activityIndicatorView:UIActivityIndicatorView? 18 | 19 | override func viewDidLoad() { 20 | super.viewDidLoad() 21 | configureViews() 22 | if #available(iOS 11.0, *) { 23 | navigationController?.navigationBar.prefersLargeTitles = false 24 | navigationItem.largeTitleDisplayMode = .never 25 | } 26 | 27 | } 28 | 29 | func configure(orgId:String,ticketId:String){ 30 | self.orgId = orgId 31 | self.ticketId = ticketId 32 | 33 | addTicketDetailView() 34 | 35 | } 36 | 37 | private func configureViews(){ 38 | activityIndicatorView?.startAnimating() 39 | activityIndicatorView?.activityIndicatorViewStyle = .whiteLarge 40 | activityIndicatorView?.color = .gray 41 | } 42 | 43 | func addTicketDetailView() -> Void{ 44 | let configuration = ZDTicketDetailViewConfiguration(orgId: self.orgId, ticketId: ticketId) 45 | configuration.limit = 50 46 | let ticketdetails = ZDTicketDetailView(frame: self.view.bounds, configuration: configuration) 47 | ticketdetails.autoresizingMask = [.flexibleWidth,.flexibleHeight] 48 | ticketdetails.delegate = self 49 | view.addSubview(ticketdetails) 50 | view.sendSubview(toBack: ticketdetails) 51 | } 52 | 53 | override func didReceiveMemoryWarning() { 54 | super.didReceiveMemoryWarning() 55 | } 56 | } 57 | 58 | extension DetailViewController : ZDTicketdetailViewDelegate{ 59 | func shouldLoadMoreData(ticketdetail: ZDTicketDetailView) -> Bool { 60 | return true 61 | } 62 | 63 | func didBeginLoadingData(ticketdetail: ZDTicketDetailView) { 64 | activityIndicatorView?.startAnimating() 65 | } 66 | 67 | func didEndLoadingData(ticketdetail: ZDTicketDetailView, error: Error?, statusCode: Int) { 68 | activityIndicatorView?.stopAnimating() 69 | } 70 | 71 | 72 | } 73 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Controller/TicketListController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // DeskSDKDemo 4 | // 5 | // Created by rajesh-2098 on 07/05/18. 6 | // Copyright © 2018 rajesh-2098. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ZohoDeskUIKit 11 | import ZohoDeskSDK 12 | 13 | class TicketListController: UIViewController { 14 | var orgId = "" 15 | var refreshControl:UIRefreshControl? 16 | var viewId = "" 17 | @IBOutlet weak var activityIndicator:UIActivityIndicatorView? 18 | 19 | @IBOutlet weak var ticketView:ZDTicketListView? 20 | 21 | override func viewDidLoad() { 22 | super.viewDidLoad() 23 | configureViews() 24 | addTicketListComponent() 25 | } 26 | override func viewDidDisappear(_ animated: Bool) { 27 | super.viewDidDisappear(animated) 28 | ticketView = nil 29 | } 30 | 31 | 32 | private func addTicketListComponent(){ 33 | let configuration = ZDTicketListConfiguration(orgId: orgId) 34 | configuration.from = 0 35 | configuration.limit = 50 36 | configuration.viewId = self.viewId 37 | configuration.sortBy = "recentThread" 38 | 39 | ticketView = ZDTicketListView(frame: self.view.bounds, configuration: configuration) 40 | ticketView?.delegate = self 41 | ticketView?.autoresizingMask = [.flexibleWidth,.flexibleHeight] 42 | view.addSubview(ticketView!) 43 | view.sendSubview(toBack: ticketView!) 44 | } 45 | 46 | private func configureViews(){ 47 | activityIndicator?.activityIndicatorViewStyle = .whiteLarge 48 | activityIndicator?.color = .gray 49 | 50 | if #available(iOS 11.0, *) { 51 | navigationController?.navigationBar.prefersLargeTitles = true 52 | navigationItem.largeTitleDisplayMode = .automatic 53 | } 54 | } 55 | 56 | 57 | func showDetail(ticketId:String){ 58 | let storyBoard : UIStoryboard = UIStoryboard(name: Constant.mainStoryBoardName, bundle:nil) 59 | let nextViewController = storyBoard.instantiateViewController(withIdentifier: Constant.detailControllerId) as! DetailViewController 60 | nextViewController.configure(orgId: self.orgId, ticketId: ticketId) 61 | self.navigationController?.pushViewController(nextViewController, animated:true) 62 | 63 | } 64 | 65 | override func didReceiveMemoryWarning() { 66 | super.didReceiveMemoryWarning() 67 | } 68 | 69 | } 70 | 71 | extension TicketListController:ZDTicketListViewDelegate{ 72 | func didSelectTicket(ticketList: ZDTicketListView, configuration: ZDTicketListConfiguration, ticketId: String, index: Int) { 73 | 74 | showDetail(ticketId: ticketId) 75 | } 76 | 77 | public func shouldLoadMoreData(ticketList: ZDTicketListView) -> Bool { 78 | return true 79 | } 80 | 81 | public func didBeginLoadingData(ticketList: ZDTicketListView, from: Int) { 82 | if from > 0{return} 83 | view.bringSubview(toFront: activityIndicator!) 84 | activityIndicator?.isHidden = false 85 | activityIndicator?.startAnimating() 86 | print("Start Loading") 87 | } 88 | 89 | public func didEndLoadingData(ticketList: ZDTicketListView, error: Error?, statusCode: Int) { 90 | activityIndicator?.stopAnimating() 91 | print("End Loading - \(error.debugDescription) - statusCode - \(statusCode)") 92 | } 93 | } 94 | 95 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Utility/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Views/HeaderView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HomeConrollerHeaderView.swift 3 | // DeskSDKDemo 4 | // 5 | // Created by Rajeshkumar Lingavel on 30/05/18. 6 | // Copyright © 2018 rajesh-2098. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import ZohoDeskSDK 11 | class HeaderView: UIView { 12 | @IBOutlet weak var profileImage:UIImageView? 13 | @IBOutlet weak var name:UILabel? 14 | @IBOutlet weak var emailId:UILabel? 15 | 16 | var dataModel:Profile? 17 | 18 | override func awakeFromNib() { 19 | backgroundColor = UIColor(red:0.95, green:0.95, blue:0.95, alpha:1.00) 20 | profileImage?.layer.masksToBounds = true 21 | profileImage?.layer.cornerRadius = 40 22 | getProfileInformation() 23 | } 24 | 25 | func updateData(){ 26 | 27 | self.getProfileImage(imageURLString:"https://profile.zoho.com/api/v1/user/\(dataModel?.primaryEmail ?? "")/photo") { (imageData) in 28 | self.profileImage?.image = UIImage(data: imageData ?? Data()) ?? UIImage(named: "default.png") 29 | } 30 | 31 | self.name?.text = dataModel?.displyName ?? "" 32 | self.emailId?.text = dataModel?.primaryEmail ?? "" 33 | 34 | } 35 | 36 | } 37 | 38 | 39 | //MARK:- Network Methods 40 | extension HeaderView{ 41 | 42 | func getProfileInformation(){ 43 | guard let profileURL = URL(string: Constant.userProfileURL) else{return} 44 | ZDAPIExtension.makeAPIRequest(url: profileURL, method: "GET", paramType: "path", parameters: Parameters(), header: Headers()) { [weak self] (responceData, error, statusCode) in 45 | 46 | guard let selfObject = self else{return} 47 | if let responce = responceData{ 48 | DispatchQueue.main.async { 49 | selfObject.dataModel = Profile(json: selfObject.toJSON(data: responce) as? [String:AnyObject]) 50 | selfObject.updateData() 51 | } 52 | } 53 | else{ 54 | 55 | selfObject.showAlert(message: error?.localizedDescription ?? "Error while load Profile", onComplition: { 56 | selfObject.getProfileInformation() 57 | }) 58 | } 59 | 60 | } 61 | } 62 | 63 | func getProfileImage(imageURLString:String,onComplition:@escaping ((Data?)->())) -> Void{ 64 | guard let imageURL = URL(string: imageURLString) else{return} 65 | ZDAPIExtension.makeAPIRequest(url: imageURL, method: "GET", paramType: "path", parameters: ["photo_size":"medium"], header: Headers()) { (responceData, error, statusCode) in 66 | DispatchQueue.main.async { 67 | onComplition(responceData) 68 | } 69 | } 70 | } 71 | 72 | func showAlert(message:String,onComplition:@escaping (()->())){ 73 | let alertController = UIAlertController(title: "Error", message: message, preferredStyle: .alert) 74 | let retry = UIAlertAction(title: "Retry", style: UIAlertActionStyle.default) { 75 | UIAlertAction in 76 | onComplition() 77 | } 78 | alertController.addAction(retry) 79 | getTopViewController()?.present(alertController, animated: true, completion: nil) 80 | 81 | } 82 | 83 | func toJSON(data:Data) -> AnyObject?{ 84 | do { 85 | return try JSONSerialization.jsonObject(with: data, options: []) as AnyObject 86 | } catch _ { 87 | return nil 88 | } 89 | } 90 | 91 | internal func getTopViewController() -> UIViewController?{ 92 | if var topController = UIApplication.shared.keyWindow?.rootViewController { 93 | while let presentedViewController = topController.presentedViewController { 94 | topController = presentedViewController 95 | } 96 | return topController 97 | } 98 | return nil 99 | } 100 | 101 | } 102 | 103 | class Profile { 104 | 105 | var displyName = "" 106 | var photoURl:String? 107 | var primaryEmail = "" 108 | 109 | init?(json:[String:AnyObject]?) { 110 | guard let profile = json?["profile"] as? [String:AnyObject] else{return nil} 111 | 112 | self.displyName = (profile["display_name"] as? String) ?? "User" 113 | self.primaryEmail = (profile["primary_email"] as? String) ?? "" 114 | self.photoURl = profile["photo_url"] as? String 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo.xcodeproj/xcuserdata/rajesh-2098.xcuserdatad/xcschemes/ExtenalDeskSDKDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // DeskSDKDemo 4 | // 5 | // Created by rajesh-2098 on 07/05/18. 6 | // Copyright © 2018 rajesh-2098. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CoreData 11 | import ZohoDeskUIKit 12 | import ZohoDeskSDK 13 | 14 | @UIApplicationMain 15 | class AppDelegate: UIResponder, UIApplicationDelegate,ZDAuthentication { 16 | 17 | var window: UIWindow? 18 | func getToken(completion: @escaping ((String) -> ())) { 19 | ZohoAuth.getOauth2Token { (token, error) in 20 | let token = "Zoho-oauthtoken \(token ?? "")" 21 | completion(token) 22 | } 23 | } 24 | 25 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 26 | 27 | // Override point for customization after application launch. 28 | //Possible options: "ZDDomain.us","ZDDomain.eu" 29 | let configuration = SDKConfiguration(domain: ZDDomain.us) 30 | ZohoDeskSDK(configuration: configuration) 31 | ZohoDeskSDK.delegete = self 32 | 33 | let scope = ["Desk.tickets.ALL","Desk.tickets.READ","Desk.tickets.WRITE","Desk.tickets.UPDATE","Desk.tickets.CREATE","Desk.tickets.DELETE","Desk.contacts.READ","Desk.contacts.WRITE","Desk.contacts.UPDATE","Desk.contacts.CREATE","Desk.tasks.ALL","Desk.tasks.WRITE","Desk.tasks.READ","Desk.tasks.CREATE","Desk.tasks.UPDATE","Desk.tasks.DELETE","Desk.basic.READ","Desk.basic.CREATE","Desk.settings.ALL","Desk.settings.WRITE","Desk.settings.READ","Desk.settings.CREATE","Desk.settings.UPDATE","Desk.settings.DELETE","Desk.search.READ","Zohosearch.securesearch.READ","aaaserver.profile.READ","zohocontacts.userphoto.READ","ZohoSupport.feeds.ALL","ZohoSupport.basic.ALL","VirtualOffice.messages.CREATE","profile.userphoto.UPDATE","profile.userinfo.READ","profile.orguserphoto.READ", 34 | ] 35 | 36 | 37 | ZohoAuth.initWithClientID(<#ClientID#>, clientSecret:<#ClientSecret#>, scope: scope, urlScheme: <#urlScheme#>, mainWindow: (UIApplication.shared.delegate?.window)!, accountsURL: "https://accounts.zoho.com") 38 | return true 39 | 40 | } 41 | 42 | func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { 43 | let sourceapplication = options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String 44 | let annotation = options[UIApplicationOpenURLOptionsKey.annotation] 45 | ZohoAuth.handleURL(url, sourceApplication: sourceapplication, annotation: annotation) 46 | return true 47 | 48 | } 49 | 50 | ///Note that "application:openURL:options:" is only available in iOS 10 and above. If you are building with an older version of the iOS SDK, you can use: 51 | func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { 52 | return ZohoAuth.handleURL(url, sourceApplication: sourceApplication, annotation: annotation) 53 | } 54 | 55 | 56 | 57 | func applicationWillResignActive(_ application: UIApplication) { 58 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 59 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 60 | } 61 | 62 | func applicationDidEnterBackground(_ application: UIApplication) { 63 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 64 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 65 | } 66 | 67 | func applicationWillEnterForeground(_ application: UIApplication) { 68 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 69 | } 70 | 71 | func applicationDidBecomeActive(_ application: UIApplication) { 72 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 73 | } 74 | 75 | func applicationWillTerminate(_ application: UIApplication) { 76 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 77 | // Saves changes in the application's managed object context before the application terminates. 78 | 79 | } 80 | } 81 | 82 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Controller/HomeController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HomeController.swift 3 | // DeskSDKDemo 4 | // 5 | // Created by Rajeshkumar Lingavel on 26/05/18. 6 | // Copyright © 2018 rajesh-2098. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ZohoDeskSDK 11 | 12 | class HomeController: UIViewController { 13 | var orgId = ""{ 14 | didSet{ 15 | getAllViews() 16 | } 17 | } 18 | let cellReuseIdentifier = "Cell" 19 | 20 | @IBOutlet weak var tableView:UITableView? 21 | @IBOutlet weak var activityIndicatorView:UIActivityIndicatorView? 22 | var dataSource:[ZDView]?{ 23 | didSet{ 24 | tableView?.reloadData() 25 | } 26 | } 27 | 28 | override func viewDidLoad() { 29 | super.viewDidLoad() 30 | getToken() 31 | configurateNavigation() 32 | configureViews() 33 | } 34 | 35 | 36 | private func configureViews(){ 37 | 38 | activityIndicatorView?.startAnimating() 39 | activityIndicatorView?.activityIndicatorViewStyle = .whiteLarge 40 | activityIndicatorView?.color = .gray 41 | 42 | self.tableView?.tableFooterView = UIView() 43 | 44 | 45 | } 46 | 47 | func configurateNavigation(){ 48 | self.title = "All Views" 49 | if #available(iOS 11.0, *) { 50 | navigationController?.navigationBar.prefersLargeTitles = true 51 | navigationItem.largeTitleDisplayMode = .automatic 52 | } 53 | } 54 | 55 | func showTicketController(viewId:String){ 56 | let storyBoard : UIStoryboard = UIStoryboard(name: Constant.mainStoryBoardName, bundle:nil) 57 | let ticketViewController = storyBoard.instantiateViewController(withIdentifier: Constant.ticketControllerId) as! TicketListController 58 | ticketViewController.orgId = orgId 59 | ticketViewController.viewId = viewId 60 | self.navigationController?.pushViewController(ticketViewController, animated:true) 61 | 62 | } 63 | 64 | func showAlert(message:String,onComplition:@escaping (()->())){ 65 | let alertController = UIAlertController(title: "Error", message: message, preferredStyle: .alert) 66 | let retry = UIAlertAction(title: "Retry", style: UIAlertActionStyle.default) { 67 | UIAlertAction in 68 | onComplition() 69 | } 70 | alertController.addAction(retry) 71 | self.present(alertController, animated: true, completion: nil) 72 | } 73 | 74 | @IBAction func logOut(){ 75 | activityIndicatorView?.startAnimating() 76 | ZohoAuth.revokeAccessToken { [weak self] (error) in 77 | guard let selfObject = self else{return} 78 | DispatchQueue.main.async { 79 | selfObject.activityIndicatorView?.stopAnimating() 80 | if let errorMsg = error{ 81 | selfObject.showAlert(message: errorMsg.localizedDescription , onComplition: { 82 | selfObject.logOut() 83 | }) 84 | return 85 | } 86 | selfObject.showLoginPage() 87 | } 88 | } 89 | } 90 | 91 | override func didReceiveMemoryWarning() { 92 | super.didReceiveMemoryWarning() 93 | // Dispose of any resources that can be recreated. 94 | } 95 | } 96 | 97 | 98 | // MARK: - Authentication Methods 99 | extension HomeController{ 100 | func getToken(){ 101 | ZohoAuth.getOauth2Token {[weak self] (token, error) in 102 | DispatchQueue.main.async { 103 | if token == nil{ 104 | self?.showLoginPage() 105 | } 106 | else{ 107 | self?.getAllOrganization() 108 | } 109 | } 110 | } 111 | } 112 | 113 | func showLoginPage(){ 114 | ZohoAuth.presentZohoSign { [weak self] (token, error) in 115 | guard let selfObject = self else{return} 116 | if let errorObject = error{ 117 | selfObject.showAlert(message: errorObject.localizedDescription, onComplition: { 118 | selfObject.showLoginPage() 119 | }) 120 | } 121 | else{ 122 | selfObject.getAllOrganization() 123 | } 124 | 125 | } 126 | } 127 | } 128 | 129 | extension HomeController : UITableViewDelegate,UITableViewDataSource{ 130 | // number of rows in table view 131 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 132 | return self.dataSource?.count ?? 0 133 | } 134 | 135 | // create a cell for each table view row 136 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 137 | guard let cell = tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier) else{return UITableViewCell()} 138 | cell.textLabel?.text = dataSource?[indexPath.row].name 139 | return cell 140 | } 141 | 142 | // method to run when table view cell is tapped 143 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 144 | if let viewId = dataSource?[indexPath.row].id { 145 | showTicketController(viewId: viewId) 146 | } 147 | } 148 | 149 | } 150 | 151 | //MARK:- NetworkMethods 152 | extension HomeController{ 153 | 154 | func getAllOrganization(){ 155 | activityIndicatorView?.startAnimating() 156 | ZDOrganizationAPIHandler.getAllOrganizations { [weak self] (organizations, error, statusCode) in 157 | DispatchQueue.main.async { 158 | guard let selfObject = self else{return} 159 | if let org = organizations?.first,error == nil { 160 | selfObject.orgId = org.id 161 | } 162 | else{ 163 | selfObject.showAlert(message: error?.localizedDescription ?? "Error while load organizations", onComplition: { 164 | selfObject.getAllOrganization() 165 | }) 166 | } 167 | } 168 | } 169 | } 170 | /// This method will get all views from Desk SDK. 171 | func getAllViews(){ 172 | if orgId.isEmpty{return} 173 | ZDViewsAPIHandler.listAllViews(self.orgId, department: "allDepartment") { [weak self] (views, error, statusCode) in 174 | DispatchQueue.main.async { 175 | guard let selfObject = self else{return} 176 | 177 | selfObject.activityIndicatorView?.stopAnimating() 178 | if let viewObjects = views{ 179 | selfObject.dataSource = viewObjects.sorted(by: { $0.name < $1.name}) 180 | } 181 | else if let errorObject = error{ 182 | selfObject.showAlert(message: errorObject.localizedDescription, onComplition: { 183 | selfObject.getAllViews() 184 | }) 185 | } 186 | 187 | } 188 | } 189 | } 190 | } 191 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo/Utility/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | ProximaNova-Regular 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 65 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | -------------------------------------------------------------------------------- /DeskSDKDemo/DeskSDKDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3F3C56CD5D01140F4F3BDA86 /* Pods_DeskSDKDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A110C467C2858F6721E3602 /* Pods_DeskSDKDemo.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 11 | 92322C0D20A44050003272E3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 92322C0C20A44050003272E3 /* Main.storyboard */; }; 12 | 927D267220AAF1DA00D692A8 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927D267120AAF1DA00D692A8 /* DetailViewController.swift */; }; 13 | 9285B56620BDDE6A002182FB /* HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9285B56520BDDE6A002182FB /* HeaderView.swift */; }; 14 | 92B64AA320A053DD00B19060 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92B64AA220A053DD00B19060 /* AppDelegate.swift */; }; 15 | 92B64AA520A053DD00B19060 /* TicketListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92B64AA420A053DD00B19060 /* TicketListController.swift */; }; 16 | 92B64AAD20A053E400B19060 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 92B64AAC20A053E400B19060 /* Assets.xcassets */; }; 17 | 92B64AB020A053E400B19060 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 92B64AAE20A053E400B19060 /* LaunchScreen.storyboard */; }; 18 | 92EC563320B938610019298C /* HomeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92EC563220B938610019298C /* HomeController.swift */; }; 19 | 92EC563C20B958AC0019298C /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92EC563B20B958AC0019298C /* Constant.swift */; }; 20 | 92EC564020B964A20019298C /* Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92EC563F20B964A20019298C /* Extension.swift */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXCopyFilesBuildPhase section */ 24 | 923A8C532111C32C002942A0 /* Embed Frameworks */ = { 25 | isa = PBXCopyFilesBuildPhase; 26 | buildActionMask = 2147483647; 27 | dstPath = ""; 28 | dstSubfolderSpec = 10; 29 | files = ( 30 | ); 31 | name = "Embed Frameworks"; 32 | runOnlyForDeploymentPostprocessing = 0; 33 | }; 34 | /* End PBXCopyFilesBuildPhase section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | 8A110C467C2858F6721E3602 /* Pods_DeskSDKDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DeskSDKDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 92086CC120C07D4E00496690 /* ZohoDeskSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ZohoDeskSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 92086CC320C07D4E00496690 /* ZohoDeskUIKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ZohoDeskUIKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 92322C0C20A44050003272E3 /* Main.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 41 | 923A8C542111C33A002942A0 /* ZohoDeskSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ZohoDeskSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 923A8C562111C33A002942A0 /* ZohoDeskUIKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ZohoDeskUIKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 927D267120AAF1DA00D692A8 /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; }; 44 | 9285B56520BDDE6A002182FB /* HeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; }; 45 | 92B64A9F20A053DD00B19060 /* DeskSDKDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DeskSDKDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 92B64AA220A053DD00B19060 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 47 | 92B64AA420A053DD00B19060 /* TicketListController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicketListController.swift; sourceTree = ""; }; 48 | 92B64AAC20A053E400B19060 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | 92B64AAF20A053E400B19060 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 50 | 92B64AB120A053E400B19060 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 92B64B1720A16E1D00B19060 /* DeskSDKDemo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DeskSDKDemo-Bridging-Header.h"; sourceTree = ""; }; 52 | 92EC563220B938610019298C /* HomeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeController.swift; sourceTree = ""; }; 53 | 92EC563B20B958AC0019298C /* Constant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; 54 | 92EC563F20B964A20019298C /* Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extension.swift; sourceTree = ""; }; 55 | B475A4C4FEA05804C5BF3C23 /* Pods-DeskSDKDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DeskSDKDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-DeskSDKDemo/Pods-DeskSDKDemo.release.xcconfig"; sourceTree = ""; }; 56 | CF6B15240AC6776313DCCFDB /* Pods-DeskSDKDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DeskSDKDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DeskSDKDemo/Pods-DeskSDKDemo.debug.xcconfig"; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 92B64A9C20A053DD00B19060 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | 3F3C56CD5D01140F4F3BDA86 /* Pods_DeskSDKDemo.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 1187EEB59099CB8E9DFCAEF9 /* Pods */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | CF6B15240AC6776313DCCFDB /* Pods-DeskSDKDemo.debug.xcconfig */, 75 | B475A4C4FEA05804C5BF3C23 /* Pods-DeskSDKDemo.release.xcconfig */, 76 | ); 77 | name = Pods; 78 | sourceTree = ""; 79 | }; 80 | 16DE5EF9752C797765079748 /* Frameworks */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 923A8C542111C33A002942A0 /* ZohoDeskSDK.framework */, 84 | 923A8C562111C33A002942A0 /* ZohoDeskUIKit.framework */, 85 | 92086CC120C07D4E00496690 /* ZohoDeskSDK.framework */, 86 | 92086CC320C07D4E00496690 /* ZohoDeskUIKit.framework */, 87 | 8A110C467C2858F6721E3602 /* Pods_DeskSDKDemo.framework */, 88 | ); 89 | name = Frameworks; 90 | sourceTree = ""; 91 | }; 92 | 9285B57020BDE4B7002182FB /* Controller */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 92EC563220B938610019298C /* HomeController.swift */, 96 | 92B64AA420A053DD00B19060 /* TicketListController.swift */, 97 | 927D267120AAF1DA00D692A8 /* DetailViewController.swift */, 98 | ); 99 | path = Controller; 100 | sourceTree = ""; 101 | }; 102 | 9285B57120BDE4C9002182FB /* Views */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 9285B56520BDDE6A002182FB /* HeaderView.swift */, 106 | ); 107 | path = Views; 108 | sourceTree = ""; 109 | }; 110 | 9285B57220BDE4D2002182FB /* Utility */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 92B64AAC20A053E400B19060 /* Assets.xcassets */, 114 | 92B64AAE20A053E400B19060 /* LaunchScreen.storyboard */, 115 | 92322C0C20A44050003272E3 /* Main.storyboard */, 116 | 92EC563B20B958AC0019298C /* Constant.swift */, 117 | 92EC563F20B964A20019298C /* Extension.swift */, 118 | ); 119 | path = Utility; 120 | sourceTree = ""; 121 | }; 122 | 92B64A9620A053DD00B19060 = { 123 | isa = PBXGroup; 124 | children = ( 125 | 92B64AA120A053DD00B19060 /* DeskSDKDemo */, 126 | 92B64AA020A053DD00B19060 /* Products */, 127 | 1187EEB59099CB8E9DFCAEF9 /* Pods */, 128 | 16DE5EF9752C797765079748 /* Frameworks */, 129 | 92B64B1720A16E1D00B19060 /* DeskSDKDemo-Bridging-Header.h */, 130 | ); 131 | sourceTree = ""; 132 | }; 133 | 92B64AA020A053DD00B19060 /* Products */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 92B64A9F20A053DD00B19060 /* DeskSDKDemo.app */, 137 | ); 138 | name = Products; 139 | sourceTree = ""; 140 | }; 141 | 92B64AA120A053DD00B19060 /* DeskSDKDemo */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | 92B64AA220A053DD00B19060 /* AppDelegate.swift */, 145 | 9285B57020BDE4B7002182FB /* Controller */, 146 | 9285B57120BDE4C9002182FB /* Views */, 147 | 9285B57220BDE4D2002182FB /* Utility */, 148 | 92B64AB120A053E400B19060 /* Info.plist */, 149 | ); 150 | path = DeskSDKDemo; 151 | sourceTree = ""; 152 | }; 153 | /* End PBXGroup section */ 154 | 155 | /* Begin PBXNativeTarget section */ 156 | 92B64A9E20A053DD00B19060 /* DeskSDKDemo */ = { 157 | isa = PBXNativeTarget; 158 | buildConfigurationList = 92B64ACA20A053E500B19060 /* Build configuration list for PBXNativeTarget "DeskSDKDemo" */; 159 | buildPhases = ( 160 | 853E3DDEF1ECC66F1A4BAE3F /* [CP] Check Pods Manifest.lock */, 161 | 92B64A9B20A053DD00B19060 /* Sources */, 162 | 92B64A9C20A053DD00B19060 /* Frameworks */, 163 | 92B64A9D20A053DD00B19060 /* Resources */, 164 | 19710A6CCAF3101C847B5246 /* [CP] Embed Pods Frameworks */, 165 | 923A8C532111C32C002942A0 /* Embed Frameworks */, 166 | ); 167 | buildRules = ( 168 | ); 169 | dependencies = ( 170 | ); 171 | name = DeskSDKDemo; 172 | productName = ExtenalDeskSDKDemo; 173 | productReference = 92B64A9F20A053DD00B19060 /* DeskSDKDemo.app */; 174 | productType = "com.apple.product-type.application"; 175 | }; 176 | /* End PBXNativeTarget section */ 177 | 178 | /* Begin PBXProject section */ 179 | 92B64A9720A053DD00B19060 /* Project object */ = { 180 | isa = PBXProject; 181 | attributes = { 182 | LastSwiftUpdateCheck = 0930; 183 | LastUpgradeCheck = 0930; 184 | ORGANIZATIONNAME = "rajesh-2098"; 185 | TargetAttributes = { 186 | 92B64A9E20A053DD00B19060 = { 187 | CreatedOnToolsVersion = 9.3; 188 | LastSwiftMigration = 0930; 189 | }; 190 | }; 191 | }; 192 | buildConfigurationList = 92B64A9A20A053DD00B19060 /* Build configuration list for PBXProject "DeskSDKDemo" */; 193 | compatibilityVersion = "Xcode 9.3"; 194 | developmentRegion = en; 195 | hasScannedForEncodings = 0; 196 | knownRegions = ( 197 | en, 198 | Base, 199 | ); 200 | mainGroup = 92B64A9620A053DD00B19060; 201 | productRefGroup = 92B64AA020A053DD00B19060 /* Products */; 202 | projectDirPath = ""; 203 | projectRoot = ""; 204 | targets = ( 205 | 92B64A9E20A053DD00B19060 /* DeskSDKDemo */, 206 | ); 207 | }; 208 | /* End PBXProject section */ 209 | 210 | /* Begin PBXResourcesBuildPhase section */ 211 | 92B64A9D20A053DD00B19060 /* Resources */ = { 212 | isa = PBXResourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | 92322C0D20A44050003272E3 /* Main.storyboard in Resources */, 216 | 92B64AB020A053E400B19060 /* LaunchScreen.storyboard in Resources */, 217 | 92B64AAD20A053E400B19060 /* Assets.xcassets in Resources */, 218 | ); 219 | runOnlyForDeploymentPostprocessing = 0; 220 | }; 221 | /* End PBXResourcesBuildPhase section */ 222 | 223 | /* Begin PBXShellScriptBuildPhase section */ 224 | 19710A6CCAF3101C847B5246 /* [CP] Embed Pods Frameworks */ = { 225 | isa = PBXShellScriptBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | ); 229 | inputPaths = ( 230 | "${SRCROOT}/Pods/Target Support Files/Pods-DeskSDKDemo/Pods-DeskSDKDemo-frameworks.sh", 231 | "${BUILT_PRODUCTS_DIR}/ZohoDeskSDK/ZohoDeskSDK.framework", 232 | "${BUILT_PRODUCTS_DIR}/ZohoDeskUIKit/ZohoDeskUIKit.framework", 233 | ); 234 | name = "[CP] Embed Pods Frameworks"; 235 | outputPaths = ( 236 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZohoDeskSDK.framework", 237 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZohoDeskUIKit.framework", 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | shellPath = /bin/sh; 241 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DeskSDKDemo/Pods-DeskSDKDemo-frameworks.sh\"\n"; 242 | showEnvVarsInLog = 0; 243 | }; 244 | 853E3DDEF1ECC66F1A4BAE3F /* [CP] Check Pods Manifest.lock */ = { 245 | isa = PBXShellScriptBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | ); 249 | inputPaths = ( 250 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 251 | "${PODS_ROOT}/Manifest.lock", 252 | ); 253 | name = "[CP] Check Pods Manifest.lock"; 254 | outputPaths = ( 255 | "$(DERIVED_FILE_DIR)/Pods-DeskSDKDemo-checkManifestLockResult.txt", 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | shellPath = /bin/sh; 259 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 260 | showEnvVarsInLog = 0; 261 | }; 262 | /* End PBXShellScriptBuildPhase section */ 263 | 264 | /* Begin PBXSourcesBuildPhase section */ 265 | 92B64A9B20A053DD00B19060 /* Sources */ = { 266 | isa = PBXSourcesBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | 92B64AA520A053DD00B19060 /* TicketListController.swift in Sources */, 270 | 92B64AA320A053DD00B19060 /* AppDelegate.swift in Sources */, 271 | 9285B56620BDDE6A002182FB /* HeaderView.swift in Sources */, 272 | 92EC563320B938610019298C /* HomeController.swift in Sources */, 273 | 92EC563C20B958AC0019298C /* Constant.swift in Sources */, 274 | 927D267220AAF1DA00D692A8 /* DetailViewController.swift in Sources */, 275 | 92EC564020B964A20019298C /* Extension.swift in Sources */, 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | /* End PBXSourcesBuildPhase section */ 280 | 281 | /* Begin PBXVariantGroup section */ 282 | 92B64AAE20A053E400B19060 /* LaunchScreen.storyboard */ = { 283 | isa = PBXVariantGroup; 284 | children = ( 285 | 92B64AAF20A053E400B19060 /* Base */, 286 | ); 287 | name = LaunchScreen.storyboard; 288 | sourceTree = ""; 289 | }; 290 | /* End PBXVariantGroup section */ 291 | 292 | /* Begin XCBuildConfiguration section */ 293 | 92B64AC820A053E500B19060 /* Debug */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | ALWAYS_SEARCH_USER_PATHS = NO; 297 | CLANG_ANALYZER_NONNULL = YES; 298 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 299 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 300 | CLANG_CXX_LIBRARY = "libc++"; 301 | CLANG_ENABLE_MODULES = YES; 302 | CLANG_ENABLE_OBJC_ARC = YES; 303 | CLANG_ENABLE_OBJC_WEAK = YES; 304 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 305 | CLANG_WARN_BOOL_CONVERSION = YES; 306 | CLANG_WARN_COMMA = YES; 307 | CLANG_WARN_CONSTANT_CONVERSION = YES; 308 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 309 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 310 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 311 | CLANG_WARN_EMPTY_BODY = YES; 312 | CLANG_WARN_ENUM_CONVERSION = YES; 313 | CLANG_WARN_INFINITE_RECURSION = YES; 314 | CLANG_WARN_INT_CONVERSION = YES; 315 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 316 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 317 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 318 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 319 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 320 | CLANG_WARN_STRICT_PROTOTYPES = YES; 321 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 322 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 323 | CLANG_WARN_UNREACHABLE_CODE = YES; 324 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 325 | CODE_SIGN_IDENTITY = "iPhone Developer"; 326 | COPY_PHASE_STRIP = NO; 327 | DEBUG_INFORMATION_FORMAT = dwarf; 328 | ENABLE_STRICT_OBJC_MSGSEND = YES; 329 | ENABLE_TESTABILITY = YES; 330 | GCC_C_LANGUAGE_STANDARD = gnu11; 331 | GCC_DYNAMIC_NO_PIC = NO; 332 | GCC_NO_COMMON_BLOCKS = YES; 333 | GCC_OPTIMIZATION_LEVEL = 0; 334 | GCC_PREPROCESSOR_DEFINITIONS = ( 335 | "DEBUG=1", 336 | "$(inherited)", 337 | ); 338 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 339 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 340 | GCC_WARN_UNDECLARED_SELECTOR = YES; 341 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 342 | GCC_WARN_UNUSED_FUNCTION = YES; 343 | GCC_WARN_UNUSED_VARIABLE = YES; 344 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 345 | MTL_ENABLE_DEBUG_INFO = YES; 346 | ONLY_ACTIVE_ARCH = YES; 347 | SDKROOT = iphoneos; 348 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 349 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 350 | }; 351 | name = Debug; 352 | }; 353 | 92B64AC920A053E500B19060 /* Release */ = { 354 | isa = XCBuildConfiguration; 355 | buildSettings = { 356 | ALWAYS_SEARCH_USER_PATHS = NO; 357 | CLANG_ANALYZER_NONNULL = YES; 358 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 359 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 360 | CLANG_CXX_LIBRARY = "libc++"; 361 | CLANG_ENABLE_MODULES = YES; 362 | CLANG_ENABLE_OBJC_ARC = YES; 363 | CLANG_ENABLE_OBJC_WEAK = YES; 364 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 365 | CLANG_WARN_BOOL_CONVERSION = YES; 366 | CLANG_WARN_COMMA = YES; 367 | CLANG_WARN_CONSTANT_CONVERSION = YES; 368 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 369 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 370 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 371 | CLANG_WARN_EMPTY_BODY = YES; 372 | CLANG_WARN_ENUM_CONVERSION = YES; 373 | CLANG_WARN_INFINITE_RECURSION = YES; 374 | CLANG_WARN_INT_CONVERSION = YES; 375 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 376 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 377 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 378 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 379 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 380 | CLANG_WARN_STRICT_PROTOTYPES = YES; 381 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 382 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | CODE_SIGN_IDENTITY = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu11; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SWIFT_COMPILATION_MODE = wholemodule; 402 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 403 | VALIDATE_PRODUCT = YES; 404 | }; 405 | name = Release; 406 | }; 407 | 92B64ACB20A053E500B19060 /* Debug */ = { 408 | isa = XCBuildConfiguration; 409 | baseConfigurationReference = CF6B15240AC6776313DCCFDB /* Pods-DeskSDKDemo.debug.xcconfig */; 410 | buildSettings = { 411 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 412 | CLANG_ENABLE_MODULES = YES; 413 | CODE_SIGN_STYLE = Automatic; 414 | DEVELOPMENT_TEAM = TZ824L8Y37; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = "$(SRCROOT)/DeskSDKDemo/Info.plist"; 417 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 418 | LD_RUNPATH_SEARCH_PATHS = ( 419 | "$(inherited)", 420 | "@executable_path/Frameworks", 421 | ); 422 | PRODUCT_BUNDLE_IDENTIFIER = com.zoho.deskSDKDemo; 423 | PRODUCT_NAME = "$(TARGET_NAME)"; 424 | SWIFT_OBJC_BRIDGING_HEADER = "DeskSDKDemo-Bridging-Header.h"; 425 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 426 | SWIFT_VERSION = 3.0; 427 | TARGETED_DEVICE_FAMILY = "1,2"; 428 | }; 429 | name = Debug; 430 | }; 431 | 92B64ACC20A053E500B19060 /* Release */ = { 432 | isa = XCBuildConfiguration; 433 | baseConfigurationReference = B475A4C4FEA05804C5BF3C23 /* Pods-DeskSDKDemo.release.xcconfig */; 434 | buildSettings = { 435 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 436 | CLANG_ENABLE_MODULES = YES; 437 | CODE_SIGN_STYLE = Automatic; 438 | DEVELOPMENT_TEAM = TZ824L8Y37; 439 | ENABLE_BITCODE = NO; 440 | INFOPLIST_FILE = "$(SRCROOT)/DeskSDKDemo/Info.plist"; 441 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 442 | LD_RUNPATH_SEARCH_PATHS = ( 443 | "$(inherited)", 444 | "@executable_path/Frameworks", 445 | ); 446 | PRODUCT_BUNDLE_IDENTIFIER = com.zoho.deskSDKDemo; 447 | PRODUCT_NAME = "$(TARGET_NAME)"; 448 | SWIFT_OBJC_BRIDGING_HEADER = "DeskSDKDemo-Bridging-Header.h"; 449 | SWIFT_VERSION = 3.0; 450 | TARGETED_DEVICE_FAMILY = "1,2"; 451 | }; 452 | name = Release; 453 | }; 454 | /* End XCBuildConfiguration section */ 455 | 456 | /* Begin XCConfigurationList section */ 457 | 92B64A9A20A053DD00B19060 /* Build configuration list for PBXProject "DeskSDKDemo" */ = { 458 | isa = XCConfigurationList; 459 | buildConfigurations = ( 460 | 92B64AC820A053E500B19060 /* Debug */, 461 | 92B64AC920A053E500B19060 /* Release */, 462 | ); 463 | defaultConfigurationIsVisible = 0; 464 | defaultConfigurationName = Release; 465 | }; 466 | 92B64ACA20A053E500B19060 /* Build configuration list for PBXNativeTarget "DeskSDKDemo" */ = { 467 | isa = XCConfigurationList; 468 | buildConfigurations = ( 469 | 92B64ACB20A053E500B19060 /* Debug */, 470 | 92B64ACC20A053E500B19060 /* Release */, 471 | ); 472 | defaultConfigurationIsVisible = 0; 473 | defaultConfigurationName = Release; 474 | }; 475 | /* End XCConfigurationList section */ 476 | }; 477 | rootObject = 92B64A9720A053DD00B19060 /* Project object */; 478 | } 479 | --------------------------------------------------------------------------------