├── README.md
├── android
├── settings.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── app
│ ├── src
│ │ └── main
│ │ │ ├── res
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── ic_user.png
│ │ │ │ ├── ic_logout.png
│ │ │ │ ├── ic_tasks.png
│ │ │ │ ├── ic_contacts.png
│ │ │ │ └── ic_loading.jpeg
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_logout.png
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values-v21
│ │ │ │ └── styles.xml
│ │ │ ├── drawable-v21
│ │ │ │ ├── ic_menu_send.xml
│ │ │ │ ├── ic_menu_slideshow.xml
│ │ │ │ ├── ic_menu_gallery.xml
│ │ │ │ ├── ic_menu_manage.xml
│ │ │ │ ├── ic_menu_camera.xml
│ │ │ │ └── ic_menu_share.xml
│ │ │ ├── values-w820dp
│ │ │ │ ├── dimens.xml
│ │ │ │ └── drawables.xml
│ │ │ ├── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── drawables.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ ├── menu
│ │ │ │ └── main_page.xml
│ │ │ └── layout
│ │ │ │ ├── list_activity.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── list_item.xml
│ │ │ │ ├── module_tab.xml
│ │ │ │ └── home_activity.xml
│ │ │ ├── assets
│ │ │ └── app_configuration.properties
│ │ │ ├── java
│ │ │ └── src
│ │ │ │ └── simple_app
│ │ │ │ ├── DataHandler.java
│ │ │ │ ├── MainActivity.java
│ │ │ │ ├── DataProvider.java
│ │ │ │ ├── HomeActivity.java
│ │ │ │ └── ListActivity.java
│ │ │ └── AndroidManifest.xml
│ ├── proguard-rules.pro
│ └── build.gradle
├── build.gradle
├── gradle.properties
├── gradlew.bat
└── gradlew
├── iOS
├── ZCRMSwiftAppTemplate
│ ├── ZCRMSwiftAppTemplate
│ │ ├── Assets.xcassets
│ │ │ ├── Contents.json
│ │ │ ├── tasks.imageset
│ │ │ │ ├── tasks_1.png
│ │ │ │ └── Contents.json
│ │ │ ├── userAvatar.imageset
│ │ │ │ ├── use.png
│ │ │ │ └── Contents.json
│ │ │ ├── logoutIcon.imageset
│ │ │ │ ├── close.png
│ │ │ │ └── Contents.json
│ │ │ ├── contacts.imageset
│ │ │ │ ├── icons8-contacts-480.png
│ │ │ │ └── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Bridging-Header.h
│ │ ├── ViewController.swift
│ │ ├── AppConfiguration.plist
│ │ ├── ListViewController.swift
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── HomeViewController.swift
│ │ └── AppDelegate.swift
│ └── ZCRMSwiftAppTemplate.xcodeproj
│ │ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ │ └── project.pbxproj
├── ZCRMiOS-umbrella.h
├── ZCRM
│ ├── ViewController.swift
│ ├── AppConfiguration.plist
│ ├── ListViewController.swift
│ ├── Info.plist
│ ├── HomeViewController.swift
│ ├── AppDelegate.swift
│ └── Main.storyboard
├── ZVCRM
│ ├── ViewController.swift
│ ├── AppConfiguration.plist
│ ├── ListViewController.swift
│ ├── Info.plist
│ ├── HomeViewController.swift
│ ├── AppDelegate.swift
│ └── Main.storyboard
└── Podfile
├── config.json
├── .gitignore
└── LICENSE
/README.md:
--------------------------------------------------------------------------------
1 | # ZCRM-Mobile-SDK-Template
2 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/drawable-hdpi/.DS_Store
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/ic_user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/drawable-hdpi/ic_user.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/mipmap-hdpi/ic_logout.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/ic_logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/drawable-hdpi/ic_logout.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/ic_tasks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/drawable-hdpi/ic_tasks.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/ic_contacts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/drawable-hdpi/ic_contacts.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/ic_loading.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/drawable-hdpi/ic_loading.jpeg
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/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 |
--------------------------------------------------------------------------------
/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "crm" : {
3 | "zcrm" : {
4 | "android" : "1.4.2",
5 | "iOS" : "0.0.1"
6 | },
7 | "zvcrm" : {
8 | "android" : "1.4.2",
9 | "iOS" : "0.0.0"
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/tasks.imageset/tasks_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/tasks.imageset/tasks_1.png
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/userAvatar.imageset/use.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/userAvatar.imageset/use.png
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/logoutIcon.imageset/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/logoutIcon.imageset/close.png
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/contacts.imageset/icons8-contacts-480.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zoho/ZCRM-Mobile-SDK-Template/master/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/contacts.imageset/icons8-contacts-480.png
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Mar 24 11:46:49 IST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/android/app/src/main/assets/app_configuration.properties:
--------------------------------------------------------------------------------
1 | appType=___VARIABLE_APPTYPE___
2 | mainActivityClass=___VARIABLE_MAINCLASS___
3 | oauthScopes=___VARIABLE_OAUTHSCOPES___
4 | apiBaseUrl=https://___VARIABLE_ApiBaseURL___
5 | #accessType=Production
6 | #domainSuffix=com
7 | #portalID=
8 | #showSignUp=false
9 | #minLogLevel=INFO
10 |
--------------------------------------------------------------------------------
/android/app/src/main/java/src/simple_app/DataHandler.java:
--------------------------------------------------------------------------------
1 | package src.simple_app;
2 |
3 | import android.graphics.Bitmap;
4 |
5 |
6 | public interface DataHandler {
7 |
8 | void setUserImage(Bitmap bitmap);
9 |
10 | void setUserName(String userName);
11 |
12 | void setOrganizationName(String organizationName);
13 | }
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | android/.idea/
2 | android/.gradle/
3 | android/app/build/
4 | android/local.properties
5 | android/android.iml
6 | android/app/app.iml
7 | iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate.xcodeproj/project.xcworkspace/xcshareddata/
8 | iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate.xcodeproj/project.xcworkspace/xcuserdata/
9 | iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate.xcodeproj/xcuserdata/
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/ic_menu_send.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #5b8ba3
5 | #5b8ba3
6 | #5b8ba3
7 | #277F9C
8 | #277F9C
9 | #0b5e7a
10 |
11 |
--------------------------------------------------------------------------------
/iOS/ZCRMiOS-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #include
14 | FOUNDATION_EXPORT double ZCRMiOSVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char ZCRMiOSVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 | 16dp
7 | 160dp
8 | 16dp
9 |
10 |
11 |
--------------------------------------------------------------------------------
/android/app/src/main/res/menu/main_page.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android/app/src/main/java/src/simple_app/MainActivity.java:
--------------------------------------------------------------------------------
1 | package src.simple_app;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 |
6 |
7 | public class MainActivity extends AppCompatActivity {
8 |
9 |
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.activity_main);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/list_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/logoutIcon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "close.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/tasks.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "tasks_1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/userAvatar.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "use.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Assets.xcassets/contacts.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "icons8-contacts-480.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/ic_menu_slideshow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/ic_menu_gallery.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/ic_menu_manage.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/iOS/ZCRM/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // ZCRMSwiftAppTemplate
4 | //
5 |
6 | import UIKit
7 |
8 | class ViewController: UIViewController {
9 |
10 |
11 | override func viewDidLoad() {
12 | super.viewDidLoad()
13 | // Do any additional setup after loading the view, typically from a nib.
14 |
15 | }
16 |
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/iOS/ZVCRM/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // ZCRMSwiftAppTemplate
4 | //
5 |
6 | import UIKit
7 |
8 | class ViewController: UIViewController {
9 |
10 |
11 | override func viewDidLoad() {
12 | super.viewDidLoad()
13 | // Do any additional setup after loading the view, typically from a nib.
14 |
15 | }
16 |
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // ZCRMSwiftAppTemplate
4 | //
5 |
6 | import UIKit
7 |
8 | class ViewController: UIViewController {
9 |
10 |
11 | override func viewDidLoad() {
12 | super.viewDidLoad()
13 | // Do any additional setup after loading the view, typically from a nib.
14 |
15 | }
16 |
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/drawables.xml:
--------------------------------------------------------------------------------
1 |
2 | - @android:drawable/ic_menu_camera
3 | - @android:drawable/ic_menu_gallery
4 | - @android:drawable/ic_menu_slideshow
5 | - @android:drawable/ic_menu_manage
6 | - @android:drawable/ic_menu_share
7 | - @android:drawable/ic_menu_send
8 |
9 |
--------------------------------------------------------------------------------
/iOS/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | target 'ZCRMSwiftAppTemplate' do
5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
6 | use_frameworks!
7 |
8 | pod 'ZCRMiOS', :git => 'https://github.com/zoho/CRM-iOSSDK.git'
9 |
10 | # Pods for ZCRMSwiftAppTemplate
11 |
12 | post_install do |installer|
13 | installer.pods_project.targets.each do |target|
14 | target.build_configurations.each do |config|
15 | config.build_settings['ENABLE_BITCODE'] = 'NO'
16 | end
17 | end
18 | end
19 |
20 | end
21 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/ic_menu_camera.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/vijay-1833/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-w820dp/drawables.xml:
--------------------------------------------------------------------------------
1 |
2 | - @android:drawable/ic_menu_camera
3 | - @android:drawable/ic_menu_gallery
4 | - @android:drawable/ic_menu_slideshow
5 | - @android:drawable/ic_menu_manage
6 | - @android:drawable/ic_menu_share
7 | - @android:drawable/ic_menu_send
8 | - @android:drawable/ic_menu_send
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
17 |
18 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/ic_menu_share.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | maven {
6 | url 'https://maven.zohodl.com'
7 | }
8 | jcenter()
9 | google()
10 | }
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:3.3.2'
13 |
14 | // NOTE: Do not place your application dependencies here; they belong
15 | // in the individual module build.gradle files
16 | }
17 | }
18 |
19 | allprojects {
20 | repositories {
21 | maven {
22 | url 'https://maven.zohodl.com'
23 | }
24 | jcenter()
25 | google()
26 | flatDir {
27 | dirs 'libs'
28 | }
29 | }
30 | }
31 |
32 | task clean(type: Delete) {
33 | delete rootProject.buildDir
34 | }
35 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/AppConfiguration.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ClientID
6 | ZCRMOAuthClientID
7 | ClientSecretID
8 | ZCRMOAuthClientSecret
9 | RedirectURLScheme
10 | ZCRMOAuthRedirectURL
11 | Type
12 | ZCRMAppType
13 | AccountsURL
14 | https://accounts.zoho.com
15 | AuthScopes
16 |
17 | ZohoCRM.settings.READ
18 | ZohoCRM.modules.ALL
19 | ZohoCRM.users.READ
20 | ZohoCRM.org.READ
21 | Aaaserver.profile.Read
22 |
23 | FirstLaunch
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | ## Project-wide Gradle settings.
2 | #
3 | # For more details on how to configure your build environment visit
4 | # http://www.gradle.org/docs/current/userguide/build_environment.html
5 | #
6 | # Specifies the JVM arguments used for the daemon process.
7 | # The setting is particularly useful for tweaking memory settings.
8 | # Default value: -Xmx1024m -XX:MaxPermSize=256m
9 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
10 | #
11 | # When configured, Gradle will run in incubating parallel mode.
12 | # This option should only be used with decoupled projects. More details, visit
13 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
14 | # org.gradle.parallel=true
15 | #Sun Feb 11 11:42:15 IST 2018
16 | systemProp.http.proxyHost=192.168.100.100
17 | org.gradle.jvmargs=-Xmx1536m
18 | systemProp.http.proxyPort=3128
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ___VARIABLE_AppName___
3 | ___VARIABLE_AppName___
4 | ___VARIABLE_ClientID___
5 | ___VARIABLE_ClientSecret___
6 | ___VARIABLE_RedirectURLScheme___://
7 | ___VARIABLE_RedirectURLScheme___
8 | ___VARIABLE_PortalID___
9 | https://accounts.zoho.com
10 |
11 | Open navigation drawer
12 | Close navigation drawer
13 |
14 | Contacts
15 | Tasks
16 | Welcome
17 | TODO
18 |
19 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 zoho
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/iOS/ZVCRM/AppConfiguration.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ClientID
6 | ___VARIABLE_ClientID___
7 | ClientSecretID
8 | ___VARIABLE_ClientSecret___
9 | RedirectURLScheme
10 | ___VARIABLE_RedirectURLScheme___
11 | Type
12 | ZVCRM
13 | AccountsURL
14 | https://accounts.zohoportal.com
15 | PortalID
16 | ___VARIABLE_PortalID___
17 | ApiBaseURL
18 | https://___VARIABLE_ApiBaseURL___
19 | ApiVersion
20 | v2
21 | OAuthScopes
22 |
23 | ZohoCRM.settings.READ
24 | ZohoCRM.modules.ALL
25 | ZohoCRM.users.READ
26 | ZohoCRM.org.READ
27 | Aaaserver.profile.Read
28 | profile.userphoto.READ
29 |
30 | FirstLaunch
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/iOS/ZCRM/AppConfiguration.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ClientID
6 | ___VARIABLE_ClientID___
7 | ClientSecretID
8 | ___VARIABLE_ClientSecret___
9 | RedirectURLScheme
10 | ___VARIABLE_RedirectURLScheme___
11 | Type
12 | ZCRM
13 | ApiVersion
14 | v2
15 | DomainSuffix
16 | com
17 | AccessType
18 | Production
19 | AccountsURL
20 | https://accounts.zoho.com
21 | LoginCustomization
22 | false
23 | OAuthScopes
24 |
25 | ZohoCRM.settings.READ
26 | ZohoCRM.modules.ALL
27 | ZohoCRM.users.READ
28 | ZohoCRM.org.READ
29 | Aaaserver.profile.Read
30 | profile.userphoto.READ
31 |
32 | FirstLaunch
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/iOS/ZCRM/ListViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ListViewController.swift
3 | // ZCRMSwiftAppTemplate
4 | //
5 |
6 | import UIKit
7 | import ZCRMiOS
8 |
9 | class ListViewController: UITableViewController {
10 |
11 | @IBOutlet var listView: UITableView!
12 | var entities: [ZCRMRecord] = [ZCRMRecord]()
13 | var module: String?
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | self.listView.dataSource = self
18 | }
19 | }
20 |
21 | extension ListViewController {
22 |
23 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
24 | return self.entities.count
25 | }
26 |
27 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
28 |
29 | let cell: UITableViewCell = self.tableView.dequeueReusableCell(withIdentifier: "cell")!
30 | let record: ZCRMRecord = self.entities[indexPath.row]
31 | do {
32 | if self.module == "Contacts" {
33 | cell.textLabel?.text = try record.getValue(ofField: "Last_Name") as? String
34 | } else if self.module == "Tasks" {
35 | cell.textLabel?.text = try record.getValue(ofField: "Subject") as? String
36 | }
37 | } catch {
38 | print(error)
39 | }
40 | return cell
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/iOS/ZVCRM/ListViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ListViewController.swift
3 | // ZCRMSwiftAppTemplate
4 | //
5 |
6 | import UIKit
7 | import ZCRMiOS
8 |
9 | class ListViewController: UITableViewController {
10 |
11 | @IBOutlet var listView: UITableView!
12 | var entities: [ZCRMRecord] = [ZCRMRecord]()
13 | var module: String?
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | self.listView.dataSource = self
18 | }
19 | }
20 |
21 | extension ListViewController {
22 |
23 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
24 | return self.entities.count
25 | }
26 |
27 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
28 |
29 | let cell: UITableViewCell = self.tableView.dequeueReusableCell(withIdentifier: "cell")!
30 | let record: ZCRMRecord = self.entities[indexPath.row]
31 | do {
32 | if self.module == "Contacts" {
33 | cell.textLabel?.text = try record.getValue(ofField: "Last_Name") as? String
34 | } else if self.module == "Tasks" {
35 | cell.textLabel?.text = try record.getValue(ofField: "Subject") as? String
36 | }
37 | } catch {
38 | print(error)
39 | }
40 | return cell
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
15 |
16 |
21 |
22 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/ListViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ListViewController.swift
3 | // ZCRMSwiftAppTemplate
4 | //
5 |
6 | import UIKit
7 | import ZCRMiOS
8 |
9 | class ListViewController: UITableViewController {
10 |
11 | @IBOutlet var listView: UITableView!
12 | var entities: [ZCRMRecord] = [ZCRMRecord]()
13 | var module: String?
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | self.listView.dataSource = self
18 | }
19 | }
20 |
21 | extension ListViewController {
22 |
23 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
24 | return self.entities.count
25 | }
26 |
27 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
28 |
29 | let cell: UITableViewCell = self.tableView.dequeueReusableCell(withIdentifier: "cell")!
30 | let record: ZCRMRecord = self.entities[indexPath.row]
31 | do {
32 | if self.module == "Contacts" {
33 | cell.textLabel?.text = try record.getValue(ofField: "Last_Name") as? String
34 | } else if self.module == "Tasks" {
35 | cell.textLabel?.text = try record.getValue(ofField: "Subject") as? String
36 | }
37 | } catch {
38 | print(error)
39 | }
40 | return cell
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | useLibrary 'org.apache.http.legacy'
5 | compileSdkVersion 28
6 |
7 | defaultConfig {
8 | applicationId "___VARIABLE_BUNDLEID___"
9 | minSdkVersion 18
10 | targetSdkVersion 28
11 | versionCode 1
12 | versionName "1.0"
13 | multiDexEnabled true
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 |
22 | compileOptions {
23 | sourceCompatibility JavaVersion.VERSION_1_7
24 | targetCompatibility JavaVersion.VERSION_1_7
25 | }
26 | packagingOptions {
27 | exclude 'META-INF/LICENSE.txt'
28 | exclude 'META-INF/LICENSE'
29 | exclude 'META-INF/DEPENDENCIES'
30 | exclude 'META-INF/dependencies.txt'
31 | }
32 | }
33 |
34 | dependencies {
35 |
36 | //noinspection GradleCompatible
37 | implementation 'com.android.support:design:28.0.0'
38 | testImplementation 'junit:junit:4.12'
39 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
40 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
41 | implementation 'com.android.support:appcompat-v7:28.0.0'
42 | implementation 'com.zoho.crm:android-java-sdk:1.0.2'
43 | }
44 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/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 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iOS/ZVCRM/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | 1.0
19 | CFBundleVersion
20 | 1
21 | NSAppTransportSecurity
22 |
23 | NSAllowsArbitraryLoads
24 |
25 | NSExceptionDomains
26 |
27 | zohoplatform.com
28 |
29 |
30 |
31 | CFBundleURLTypes
32 |
33 |
34 | CFBundleTypeRole
35 | Editor
36 | CFBundleURLSchemes
37 |
38 | ___VARIABLE_RedirectURLScheme___
39 |
40 |
41 |
42 | LSRequiresIPhoneOS
43 |
44 | UILaunchStoryboardName
45 | LaunchScreen
46 | UIMainStoryboardFile
47 | Main
48 | UIRequiredDeviceCapabilities
49 |
50 | armv7
51 |
52 | UISupportedInterfaceOrientations
53 |
54 | UIInterfaceOrientationPortrait
55 | UIInterfaceOrientationLandscapeLeft
56 | UIInterfaceOrientationLandscapeRight
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | 1.0
19 | CFBundleVersion
20 | 1
21 | NSAppTransportSecurity
22 |
23 | NSAllowsArbitraryLoads
24 |
25 | NSExceptionDomains
26 |
27 | zoho.com
28 |
29 | zoho.eu
30 |
31 |
32 |
33 | CFBundleURLTypes
34 |
35 |
36 | CFBundleTypeRole
37 | Editor
38 | CFBundleURLSchemes
39 |
40 | ZCRMOAuthRedirectURL
41 |
42 |
43 |
44 | LSRequiresIPhoneOS
45 |
46 | UILaunchStoryboardName
47 | LaunchScreen
48 | UIMainStoryboardFile
49 | Main
50 | UIRequiredDeviceCapabilities
51 |
52 | armv7
53 |
54 | UISupportedInterfaceOrientations
55 |
56 | UIInterfaceOrientationPortrait
57 | UIInterfaceOrientationLandscapeLeft
58 | UIInterfaceOrientationLandscapeRight
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/iOS/ZCRM/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | 1.0
19 | CFBundleVersion
20 | 1
21 | NSAppTransportSecurity
22 |
23 | NSAllowsArbitraryLoads
24 |
25 | NSExceptionDomains
26 |
27 | zoho.com
28 |
29 | zoho.eu
30 |
31 | zoho.cn
32 |
33 |
34 |
35 | CFBundleURLTypes
36 |
37 |
38 | CFBundleTypeRole
39 | Editor
40 | CFBundleURLSchemes
41 |
42 | ___VARIABLE_RedirectURLScheme___
43 |
44 |
45 |
46 | LSRequiresIPhoneOS
47 |
48 | UILaunchStoryboardName
49 | LaunchScreen
50 | UIMainStoryboardFile
51 | Main
52 | UIRequiredDeviceCapabilities
53 |
54 | armv7
55 |
56 | UISupportedInterfaceOrientations
57 |
58 | UIInterfaceOrientationPortrait
59 | UIInterfaceOrientationLandscapeLeft
60 | UIInterfaceOrientationLandscapeRight
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/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 | }
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/module_tab.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
20 |
21 |
22 |
26 |
27 |
28 |
33 |
38 |
39 |
40 |
41 |
42 |
52 |
53 |
62 |
63 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/app/src/main/java/src/simple_app/DataProvider.java:
--------------------------------------------------------------------------------
1 | package src.simple_app;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.BitmapFactory;
5 | import android.os.AsyncTask;
6 |
7 | import com.zoho.crm.library.common.CommonUtil;
8 | import com.zoho.crm.library.exception.ZCRMException;
9 | import com.zoho.crm.library.setup.metadata.ZCRMOrganization;
10 | import com.zoho.crm.library.setup.restclient.ZCRMRestClient;
11 | import com.zoho.crm.library.setup.users.ZCRMUser;
12 |
13 | import java.io.InputStream;
14 |
15 |
16 | public class DataProvider {
17 |
18 | private static DataProvider instance = new DataProvider();
19 | private String userName;
20 | private Bitmap userImage;
21 | private String organisationName;
22 | private apiTypes api;
23 |
24 | private DataProvider(){
25 |
26 | }
27 |
28 | public static DataProvider getInstance() {
29 | return instance;
30 | }
31 |
32 | private enum apiTypes {
33 | userName, organisationInformation, userImage
34 | }
35 |
36 | public void getUserImage(DataHandler handler) {
37 | if (userImage == null) {
38 | api = apiTypes.userImage;
39 | new APIRunner(handler).execute();
40 | } else {
41 | handler.setUserImage(userImage);
42 | }
43 | }
44 |
45 | public void getOrganisationName(DataHandler handler) {
46 | if (organisationName == null) {
47 | api = apiTypes.organisationInformation;
48 | new APIRunner(handler).execute();
49 | } else {
50 | handler.setOrganizationName(organisationName);
51 | }
52 |
53 | }
54 |
55 | public void getUserName(DataHandler handler) {
56 | if (userName == null) {
57 | api = apiTypes.userName;
58 | new APIRunner(handler).execute();
59 | } else {
60 | handler.setUserName(userName);
61 | }
62 | }
63 |
64 | private class APIRunner extends AsyncTask{
65 |
66 | private DataHandler dataHandler;
67 |
68 | public APIRunner(DataHandler dataHandler){
69 | super();
70 | this.dataHandler = dataHandler;
71 | }
72 |
73 | @Override
74 | protected Object doInBackground(Object[] objects) {
75 |
76 | final ZCRMRestClient restClient = ZCRMRestClient.getInstance();
77 | try {
78 | if (api == apiTypes.userName) {
79 |
80 | final ZCRMUser zcrmUser = (ZCRMUser) restClient.getCurrentUser().getData();
81 | userName = zcrmUser.getFullName();
82 | this.dataHandler.setUserName(userName);
83 | } else if (api == apiTypes.userImage) {
84 | final ZCRMUser zcrmUser = (ZCRMUser) restClient.getCurrentUser().getData();
85 | InputStream is = zcrmUser.downloadProfilePic(CommonUtil.PhotoSize.original).getFileAsStream();
86 | userImage = BitmapFactory.decodeStream(is, null, getBitMapOptions());
87 | this.dataHandler.setUserImage(userImage);
88 | } else if (api == apiTypes.organisationInformation) {
89 | organisationName = ((ZCRMOrganization) restClient.getOrganizationDetails().getData()).getCompanyName();
90 | this.dataHandler.setOrganizationName(organisationName);
91 | }
92 | } catch (ZCRMException ze) {
93 | ze.printStackTrace();
94 | } catch (Exception e) {
95 | e.printStackTrace();
96 | }
97 | return null;
98 | }
99 |
100 | private BitmapFactory.Options getBitMapOptions() {
101 |
102 | BitmapFactory.Options options = new BitmapFactory.Options();
103 | options.inJustDecodeBounds = false;
104 | options.inDither = false;
105 | options.inSampleSize = 1;
106 | options.inScaled = false;
107 | options.inPreferredConfig = Bitmap.Config.ARGB_8888;
108 | return options;
109 | }
110 | }
111 | }
112 |
113 |
--------------------------------------------------------------------------------
/iOS/ZCRM/HomeViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HomeViewController.swift
3 | // ZCRMSwiftAppTemplate
4 | //
5 |
6 | import UIKit
7 | import ZCRMiOS
8 |
9 | class HomeViewController: UIViewController {
10 |
11 | @IBOutlet weak var profileImage: UIImageView!
12 | @IBOutlet weak var userTextView: UITextView!
13 | @IBOutlet weak var contactsBtn: UIView!
14 | @IBOutlet weak var tasksBtn: UIView!
15 | @IBOutlet weak var contactsBtnText: UITextView!
16 | @IBOutlet weak var tasksBtnText: UITextView!
17 |
18 | private let restClient : ZCRMRestClient = ZCRMRestClient()
19 | private var records: [ZCRMRecord] = [ZCRMRecord]()
20 | private var module: String = ""
21 |
22 | override func viewDidLoad() {
23 | super.viewDidLoad()
24 |
25 | ( UIApplication.shared.delegate as! AppDelegate ).loadLoginView { ( success ) in
26 | if( success == true )
27 | {
28 | print( "Login successful" )
29 | self.setOrganizationTitle()
30 | self.showUserImage()
31 | }
32 | }
33 |
34 | self.addLogoutButton()
35 | self.addGestures()
36 | self.addShadows()
37 | self.renderNavBar()
38 | }
39 |
40 | override func didReceiveMemoryWarning() {
41 | super.didReceiveMemoryWarning()
42 | }
43 |
44 | @objc private func logout(_ sender: Any) {
45 |
46 | ( UIApplication.shared.delegate as! AppDelegate ).logout { (success) in
47 |
48 | if success {
49 | print("logout successfull")
50 | }
51 | }
52 | }
53 |
54 | private func showUserImage() {
55 |
56 | do {
57 | let currentUser: ZCRMUser = try self.restClient.getCurrentUser().getData() as! ZCRMUser
58 | let profilePicture: Data = try currentUser.downloadProfilePhoto().getFileData()
59 | self.profileImage.image = UIImage(data: profilePicture)
60 | self.userTextView.text = "Welcome, " + currentUser.getFullName()! + "!"
61 | self.profileImage.layer.cornerRadius = self.profileImage.frame.size.width / 2
62 |
63 | } catch {
64 | print(error)
65 | }
66 | }
67 |
68 | private func setOrganizationTitle() {
69 |
70 |
71 | do {
72 | let organization: ZCRMOrganisation = try self.restClient.getOrganisationDetails().getData() as! ZCRMOrganisation
73 | let title : String = organization.getCompanyName()
74 | self.navigationItem.title = title
75 | } catch {
76 | print(error)
77 | }
78 | }
79 |
80 | @objc private func showContacts(_ sender: Any) {
81 |
82 | self.getRecords(moduleApi: "Contacts")
83 | }
84 |
85 | @objc private func showTasks(_ sender: Any) {
86 |
87 | self.getRecords(moduleApi: "Tasks")
88 | }
89 |
90 | private func getRecords(moduleApi: String) {
91 |
92 | do {
93 | let module: ZCRMModule = ZCRMModule(moduleAPIName: moduleApi)
94 | self.records = try module.getRecords().getData() as! [ZCRMRecord]
95 | self.module = moduleApi
96 | } catch {
97 | print(error)
98 | }
99 | performSegue(withIdentifier: "listView", sender: self)
100 | }
101 |
102 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
103 |
104 | if segue.destination is ListViewController {
105 |
106 | let listViewController: ListViewController = (segue.destination as? ListViewController)!
107 | listViewController.entities = self.records
108 | listViewController.module = self.module
109 | }
110 | else {
111 | print(segue.destination)
112 | }
113 | }
114 |
115 | private func renderNavBar() {
116 |
117 | self.navigationController?.navigationBar.tintColor = .green
118 | let attrs = [NSAttributedStringKey.foregroundColor: UIColor.white, NSAttributedStringKey.font : UIFont.systemFont(ofSize: 22)]
119 | self.navigationController?.navigationBar.titleTextAttributes = attrs
120 | self.navigationController?.navigationBar.barTintColor = UIColor(red: 11/255, green: 94/255, blue: 122/255, alpha: 0)
121 |
122 | }
123 |
124 |
125 | private func addLogoutButton() {
126 |
127 | let button: UIButton = UIButton(frame: CGRect(x: 0, y: 0, width: 25, height: 25))
128 | button.setBackgroundImage(UIImage(named: "logoutIcon"), for: .normal)
129 | button.addTarget(self, action: #selector(self.logout(_:)), for: .touchUpInside)
130 | self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: button)
131 | }
132 |
133 | private func addGestures() {
134 |
135 | var tapGesture : UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.showContacts(_:)))
136 | self.contactsBtn.addGestureRecognizer(tapGesture);
137 | tapGesture = UITapGestureRecognizer(target: self, action: #selector(self.showTasks(_:)))
138 | self.tasksBtn.addGestureRecognizer(tapGesture)
139 | }
140 |
141 | private func addShadows() {
142 |
143 | self.contactsBtn.layer.borderColor = UIColor.gray.cgColor
144 | self.contactsBtn.layer.borderWidth = 0.6
145 | self.tasksBtn.layer.borderColor = UIColor.gray.cgColor
146 | self.tasksBtn.layer.borderWidth = 0.6
147 | self.contactsBtnText.font = UIFont.systemFont(ofSize: 16)
148 | self.tasksBtnText.font = UIFont.systemFont(ofSize: 16)
149 | self.userTextView.font = UIFont.systemFont(ofSize: 21)
150 |
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/iOS/ZVCRM/HomeViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HomeViewController.swift
3 | // ZCRMSwiftAppTemplate
4 | //
5 |
6 | import UIKit
7 | import ZCRMiOS
8 |
9 | class HomeViewController: UIViewController {
10 |
11 | @IBOutlet weak var profileImage: UIImageView!
12 | @IBOutlet weak var userTextView: UITextView!
13 | @IBOutlet weak var contactsBtn: UIView!
14 | @IBOutlet weak var tasksBtn: UIView!
15 | @IBOutlet weak var contactsBtnText: UITextView!
16 | @IBOutlet weak var tasksBtnText: UITextView!
17 |
18 | private let restClient : ZCRMRestClient = ZCRMRestClient()
19 | private var records: [ZCRMRecord] = [ZCRMRecord]()
20 | private var module: String = ""
21 |
22 | override func viewDidLoad() {
23 | super.viewDidLoad()
24 |
25 | ( UIApplication.shared.delegate as! AppDelegate ).loadLoginView { ( success ) in
26 | if( success == true )
27 | {
28 | print( "Login successful" )
29 | self.setOrganizationTitle()
30 | self.showUserImage()
31 | }
32 | }
33 |
34 | self.addLogoutButton()
35 | self.addGestures()
36 | self.addShadows()
37 | self.renderNavBar()
38 | }
39 |
40 | override func didReceiveMemoryWarning() {
41 | super.didReceiveMemoryWarning()
42 | }
43 |
44 | @objc private func logout(_ sender: Any) {
45 |
46 | ( UIApplication.shared.delegate as! AppDelegate ).logout { (success) in
47 |
48 | if success {
49 | print("logout successfull")
50 | }
51 | }
52 | }
53 |
54 | private func showUserImage() {
55 |
56 | do {
57 | let currentUser: ZCRMUser = try self.restClient.getCurrentUser().getData() as! ZCRMUser
58 | let profilePicture: Data = try currentUser.downloadProfilePhoto().getFileData()
59 | self.profileImage.image = UIImage(data: profilePicture)
60 | self.userTextView.text = "Welcome, " + currentUser.getFullName()! + "!"
61 | self.profileImage.layer.cornerRadius = self.profileImage.frame.size.width / 2
62 |
63 | } catch {
64 | print(error)
65 | }
66 | }
67 |
68 | private func setOrganizationTitle() {
69 |
70 |
71 | do {
72 | let organization: ZCRMOrganisation = try self.restClient.getOrganisationDetails().getData() as! ZCRMOrganisation
73 | let title : String = organization.getCompanyName()
74 | self.navigationItem.title = title
75 | } catch {
76 | print(error)
77 | }
78 | }
79 |
80 | @objc private func showContacts(_ sender: Any) {
81 |
82 | self.getRecords(moduleApi: "Contacts")
83 | }
84 |
85 | @objc private func showTasks(_ sender: Any) {
86 |
87 | self.getRecords(moduleApi: "Tasks")
88 | }
89 |
90 | private func getRecords(moduleApi: String) {
91 |
92 | do {
93 | let module: ZCRMModule = ZCRMModule(moduleAPIName: moduleApi)
94 | self.records = try module.getRecords().getData() as! [ZCRMRecord]
95 | self.module = moduleApi
96 | } catch {
97 | print(error)
98 | }
99 | performSegue(withIdentifier: "listView", sender: self)
100 | }
101 |
102 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
103 |
104 | if segue.destination is ListViewController {
105 |
106 | let listViewController: ListViewController = (segue.destination as? ListViewController)!
107 | listViewController.entities = self.records
108 | listViewController.module = self.module
109 | }
110 | else {
111 | print(segue.destination)
112 | }
113 | }
114 |
115 | private func renderNavBar() {
116 |
117 | self.navigationController?.navigationBar.tintColor = .green
118 | let attrs = [NSAttributedStringKey.foregroundColor: UIColor.white, NSAttributedStringKey.font : UIFont.systemFont(ofSize: 22)]
119 | self.navigationController?.navigationBar.titleTextAttributes = attrs
120 | self.navigationController?.navigationBar.barTintColor = UIColor(red: 11/255, green: 94/255, blue: 122/255, alpha: 0)
121 |
122 | }
123 |
124 |
125 | private func addLogoutButton() {
126 |
127 | let button: UIButton = UIButton(frame: CGRect(x: 0, y: 0, width: 25, height: 25))
128 | button.setBackgroundImage(UIImage(named: "logoutIcon"), for: .normal)
129 | button.addTarget(self, action: #selector(self.logout(_:)), for: .touchUpInside)
130 | self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: button)
131 | }
132 |
133 | private func addGestures() {
134 |
135 | var tapGesture : UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.showContacts(_:)))
136 | self.contactsBtn.addGestureRecognizer(tapGesture);
137 | tapGesture = UITapGestureRecognizer(target: self, action: #selector(self.showTasks(_:)))
138 | self.tasksBtn.addGestureRecognizer(tapGesture)
139 | }
140 |
141 | private func addShadows() {
142 |
143 | self.contactsBtn.layer.borderColor = UIColor.gray.cgColor
144 | self.contactsBtn.layer.borderWidth = 0.6
145 | self.tasksBtn.layer.borderColor = UIColor.gray.cgColor
146 | self.tasksBtn.layer.borderWidth = 0.6
147 | self.contactsBtnText.font = UIFont.systemFont(ofSize: 16)
148 | self.tasksBtnText.font = UIFont.systemFont(ofSize: 16)
149 | self.userTextView.font = UIFont.systemFont(ofSize: 21)
150 |
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/HomeViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HomeViewController.swift
3 | // ZCRMSwiftAppTemplate
4 | //
5 |
6 | import UIKit
7 | import ZCRMiOS
8 |
9 | class HomeViewController: UIViewController {
10 |
11 | @IBOutlet weak var profileImage: UIImageView!
12 | @IBOutlet weak var userTextView: UITextView!
13 | @IBOutlet weak var contactsBtn: UIView!
14 | @IBOutlet weak var tasksBtn: UIView!
15 | @IBOutlet weak var contactsBtnText: UITextView!
16 | @IBOutlet weak var tasksBtnText: UITextView!
17 |
18 | private let restClient : ZCRMRestClient = ZCRMRestClient()
19 | private var records: [ZCRMRecord] = [ZCRMRecord]()
20 | private var module: String = ""
21 |
22 | override func viewDidLoad() {
23 | super.viewDidLoad()
24 |
25 | ( UIApplication.shared.delegate as! AppDelegate ).loadLoginView { ( success ) in
26 | if( success == true )
27 | {
28 | print( "Login successful" )
29 | self.setOrganizationTitle()
30 | self.showUserImage()
31 | }
32 | }
33 |
34 | self.addLogoutButton()
35 | self.addGestures()
36 | self.addShadows()
37 | self.renderNavBar()
38 | }
39 |
40 | override func didReceiveMemoryWarning() {
41 | super.didReceiveMemoryWarning()
42 | }
43 |
44 | @objc private func logout(_ sender: Any) {
45 |
46 | ( UIApplication.shared.delegate as! AppDelegate ).logout { (success) in
47 |
48 | if success {
49 | print("logout successfull")
50 | }
51 | }
52 | }
53 |
54 | private func showUserImage() {
55 |
56 | do {
57 | let currentUser: ZCRMUser = try self.restClient.getCurrentUser().getData() as! ZCRMUser
58 | let profilePicture: Data = try currentUser.downloadProfilePhoto().getFileData()
59 | self.profileImage.image = UIImage(data: profilePicture)
60 | self.userTextView.text = "Welcome, " + currentUser.getFullName()! + "!"
61 | self.profileImage.layer.cornerRadius = self.profileImage.frame.size.width / 2
62 |
63 | } catch {
64 | print(error)
65 | }
66 | }
67 |
68 | private func setOrganizationTitle() {
69 |
70 |
71 | do {
72 | let organization: ZCRMOrganisation = try self.restClient.getOrganisationDetails().getData() as! ZCRMOrganisation
73 | let title : String = organization.getCompanyName()
74 | self.navigationItem.title = title
75 | } catch {
76 | print(error)
77 | }
78 | }
79 |
80 | @objc private func showContacts(_ sender: Any) {
81 |
82 | self.getRecords(moduleApi: "Contacts")
83 | }
84 |
85 | @objc private func showTasks(_ sender: Any) {
86 |
87 | self.getRecords(moduleApi: "Tasks")
88 | }
89 |
90 | private func getRecords(moduleApi: String) {
91 |
92 | do {
93 | let module: ZCRMModule = ZCRMModule(moduleAPIName: moduleApi)
94 | self.records = try module.getRecords().getData() as! [ZCRMRecord]
95 | self.module = moduleApi
96 | } catch {
97 | print(error)
98 | }
99 | performSegue(withIdentifier: "listView", sender: self)
100 | }
101 |
102 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
103 |
104 | if segue.destination is ListViewController {
105 |
106 | let listViewController: ListViewController = (segue.destination as? ListViewController)!
107 | listViewController.entities = self.records
108 | listViewController.module = self.module
109 | }
110 | else {
111 | print(segue.destination)
112 | }
113 | }
114 |
115 | private func renderNavBar() {
116 |
117 | self.navigationController?.navigationBar.tintColor = .green
118 | let attrs = [NSAttributedStringKey.foregroundColor: UIColor.white, NSAttributedStringKey.font : UIFont.systemFont(ofSize: 22)]
119 | self.navigationController?.navigationBar.titleTextAttributes = attrs
120 | self.navigationController?.navigationBar.barTintColor = UIColor(red: 11/255, green: 94/255, blue: 122/255, alpha: 0)
121 |
122 | }
123 |
124 |
125 | private func addLogoutButton() {
126 |
127 | let button: UIButton = UIButton(frame: CGRect(x: 0, y: 0, width: 25, height: 25))
128 | button.setBackgroundImage(UIImage(named: "logoutIcon"), for: .normal)
129 | button.addTarget(self, action: #selector(self.logout(_:)), for: .touchUpInside)
130 | self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: button)
131 | }
132 |
133 | private func addGestures() {
134 |
135 | var tapGesture : UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.showContacts(_:)))
136 | self.contactsBtn.addGestureRecognizer(tapGesture);
137 | tapGesture = UITapGestureRecognizer(target: self, action: #selector(self.showTasks(_:)))
138 | self.tasksBtn.addGestureRecognizer(tapGesture)
139 | }
140 |
141 | private func addShadows() {
142 |
143 | self.contactsBtn.layer.borderColor = UIColor.gray.cgColor
144 | self.contactsBtn.layer.borderWidth = 0.6
145 | self.tasksBtn.layer.borderColor = UIColor.gray.cgColor
146 | self.tasksBtn.layer.borderWidth = 0.6
147 | self.contactsBtnText.font = UIFont.systemFont(ofSize: 16)
148 | self.tasksBtnText.font = UIFont.systemFont(ofSize: 16)
149 | self.userTextView.font = UIFont.systemFont(ofSize: 21)
150 |
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/home_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
18 |
19 |
26 |
27 |
34 |
35 |
36 |
45 |
46 |
47 |
54 |
55 |
61 |
62 |
68 |
69 |
75 |
76 |
87 |
88 |
89 |
90 |
96 |
97 |
103 |
104 |
110 |
111 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // ZCRMSwiftAppTemplate
4 | //
5 |
6 | import UIKit
7 | import CoreData
8 | //import ZCRMiOS
9 |
10 | @UIApplicationMain
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 | var window: UIWindow?
14 | //var loginHandler : LoginActivity?
15 | private var appConfigurationDict : Dictionary< String, Any > = Dictionary< String, Any >()
16 |
17 | required override init()
18 | {
19 |
20 | }
21 |
22 |
23 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
24 | // Override point for customization after application launch.
25 |
26 | // loginHandler = LoginActivity.init()
27 | // self.readConfiguration()
28 | // let appConfig = CRMAppConfigUtil(appConfigDict: appConfigurationDict )
29 | // appConfig.setAppType( type : "ZCRM" )
30 | // loginHandler = LoginActivity(appConfigUtil: appConfig )
31 | // let alreadyLaunched = UserDefaults.standard.bool(forKey:"first")
32 | // if !alreadyLaunched {
33 | // loginHandler!.clearZCRMLoginFirstLaunch()
34 | // UserDefaults.standard.set(true, forKey: "first")
35 | // }
36 | // loginHandler!.initZCRMLogin( window : self.window )
37 | return true
38 | }
39 |
40 | func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
41 | // loginHandler?.zCRMLoginHandleURL(url: url, sourceApplication: sourceApplication, annotation: annotation)
42 | return true
43 | }
44 |
45 | func applicationWillResignActive(_ application: UIApplication) {
46 | // 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.
47 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
48 | }
49 |
50 | func applicationDidEnterBackground(_ application: UIApplication) {
51 | // 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.
52 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
53 | }
54 |
55 | func applicationWillEnterForeground(_ application: UIApplication) {
56 | // 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.
57 | }
58 |
59 | func applicationDidBecomeActive(_ application: UIApplication) {
60 | // 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.
61 | }
62 |
63 | func applicationWillTerminate(_ application: UIApplication) {
64 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
65 | // Saves changes in the application's managed object context before the application terminates.
66 | self.saveContext()
67 | }
68 |
69 | // MARK: - Core Data stack
70 |
71 | lazy var persistentContainer: NSPersistentContainer = {
72 | /*
73 | The persistent container for the application. This implementation
74 | creates and returns a container, having loaded the store for the
75 | application to it. This property is optional since there are legitimate
76 | error conditions that could cause the creation of the store to fail.
77 | */
78 | let container = NSPersistentContainer(name: "TestingWithPod")
79 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in
80 | if let error = error as NSError? {
81 | // Replace this implementation with code to handle the error appropriately.
82 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
83 |
84 | /*
85 | Typical reasons for an error here include:
86 | * The parent directory does not exist, cannot be created, or disallows writing.
87 | * The persistent store is not accessible, due to permissions or data protection when the device is locked.
88 | * The device is out of space.
89 | * The store could not be migrated to the current model version.
90 | Check the error message to determine what the actual problem was.
91 | */
92 | fatalError("Unresolved error \(error), \(error.userInfo)")
93 | }
94 | })
95 | return container
96 | }()
97 |
98 | // MARK: - Core Data Saving support
99 |
100 | func saveContext () {
101 | let context = persistentContainer.viewContext
102 | if context.hasChanges {
103 | do {
104 | try context.save()
105 | } catch {
106 | // Replace this implementation with code to handle the error appropriately.
107 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
108 | let nserror = error as NSError
109 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
110 | }
111 | }
112 | }
113 |
114 |
115 | private func readConfiguration()
116 | {
117 | if let path = Bundle.main.path(forResource : "AppConfiguration", ofType: "plist" )
118 | {
119 | self.appConfigurationDict = NSDictionary( contentsOfFile : path ) as! Dictionary< String, Any >
120 | }
121 | else
122 | {
123 | print("####### appConfigurationDict is empty ######" )
124 | }
125 | }
126 |
127 | }
128 |
129 |
130 |
--------------------------------------------------------------------------------
/android/app/src/main/java/src/simple_app/HomeActivity.java:
--------------------------------------------------------------------------------
1 | package src.simple_app;
2 |
3 | import android.app.AlertDialog;
4 | import android.content.Context;
5 | import android.content.DialogInterface;
6 | import android.content.Intent;
7 | import android.graphics.Bitmap;
8 | import android.os.Bundle;
9 | import android.support.annotation.Nullable;
10 | import android.support.v7.app.AppCompatActivity;
11 | import android.view.Menu;
12 | import android.view.MenuItem;
13 | import android.view.View;
14 | import android.widget.ImageView;
15 | import android.widget.LinearLayout;
16 | import android.widget.TextView;
17 | import android.widget.Toast;
18 |
19 | import com.zoho.crm.library.exception.ZCRMException;
20 | import com.zoho.crm.sdk.android.zcrmandroid.activity.ZohoCRMSDK;
21 |
22 | public class HomeActivity extends AppCompatActivity implements DataHandler {
23 |
24 | private ImageView myImage;
25 | private TextView userNameView;
26 | private LinearLayout contactsView;
27 | private LinearLayout tasksView;
28 | private static DataProvider dataProvider = DataProvider.getInstance();
29 |
30 | @Override
31 | protected void onCreate(@Nullable Bundle savedInstanceState) {
32 | super.onCreate(savedInstanceState);
33 | setContentView(R.layout.home_activity) ;
34 | showLogin();
35 | }
36 |
37 | @Override
38 | public boolean onCreateOptionsMenu(Menu menu) {
39 | getMenuInflater().inflate(R.menu.main_page, menu);
40 | return true;
41 | }
42 |
43 | @Override
44 | public boolean onOptionsItemSelected(MenuItem item) {
45 | // Take appropriate action for each action item click
46 | switch (item.getItemId()) {
47 | case R.id.signout:
48 | new AlertDialog.Builder(this)
49 | .setTitle("Sign Out")
50 | .setMessage("Are you sure you want to sign out?")
51 | .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
52 | public void onClick(DialogInterface dialog, int which) {
53 | logout();
54 | }
55 | })
56 | .setNegativeButton("No", new DialogInterface.OnClickListener() {
57 | public void onClick(DialogInterface dialog, int which) {
58 | // user doesn't want to logout
59 | }
60 | })
61 | .show();
62 | return true;
63 | default:
64 | return false;
65 | }
66 | }
67 |
68 | private void showLogin() {
69 |
70 | final Context context = this;
71 | try {
72 | ZohoCRMSDK zohoCRMSDK = ZohoCRMSDK.getInstance(getApplicationContext());
73 | zohoCRMSDK.init(getAssets(), new ZohoCRMSDK.ZCRMInitCallback() {
74 | @Override
75 | public void onSuccess() {
76 | runOnUiThread(new Runnable() {
77 | @Override
78 | public void run() {
79 | loadViews();
80 | }
81 | });
82 | }
83 |
84 | @Override
85 | public void onFailed(ZCRMException e) {
86 | runOnUiThread(new Runnable() {
87 | @Override
88 | public void run() {
89 | Toast.makeText(context, "Login failed.", Toast.LENGTH_SHORT).show();
90 | }
91 | });
92 | }
93 | });
94 | } catch (Exception e) {
95 | e.printStackTrace();
96 | }
97 | }
98 |
99 |
100 | private void logout()
101 | {
102 | final Context context = this;
103 | ZohoCRMSDK.getInstance(this).logout(new ZohoCRMSDK.ZCRMLogoutCallback() {
104 | @Override
105 | public void onSuccess() {
106 | runOnUiThread(new Runnable() {
107 | @Override
108 | public void run() {
109 | showLogin();
110 | }
111 | });
112 | }
113 |
114 | @Override
115 | public void onFailed() {
116 | runOnUiThread(new Runnable() {
117 | @Override
118 | public void run() {
119 | Toast.makeText(context, "Logout failed.", Toast.LENGTH_SHORT).show();
120 | }
121 | });
122 | }
123 | });
124 | }
125 |
126 | private void loadViews() {
127 |
128 |
129 | myImage = findViewById(R.id.imageView);
130 | userNameView = findViewById(R.id.userName);
131 | contactsView = (LinearLayout) findViewById(R.id.contactsRecords);
132 | tasksView = (LinearLayout) findViewById(R.id.tasksRecords);
133 | LinearLayout linearLayout = findViewById(R.id.mainView);
134 | if (linearLayout == null){
135 | System.out.println();
136 | }
137 | if (contactsView == null) {
138 | System.out.println();
139 | }
140 | if (tasksView == null) {
141 | System.out.println();
142 | }
143 | setOnclickListener();
144 |
145 | }
146 |
147 |
148 | private void setOnclickListener() {
149 |
150 | contactsView.setOnClickListener(new View.OnClickListener() {
151 | @Override
152 | public void onClick(View view) {
153 | startActivity("Contacts");
154 | }
155 | });
156 |
157 | tasksView.setOnClickListener(new View.OnClickListener() {
158 | @Override
159 | public void onClick(View view) {
160 | startActivity("Tasks");
161 | }
162 | });
163 |
164 | dataProvider.getUserImage(this);
165 | }
166 |
167 | private void startActivity(String moduleApiName) {
168 |
169 | Intent intent = new Intent(getApplicationContext(), ListActivity.class);
170 | intent.putExtra("module", moduleApiName);
171 | startActivity(intent);
172 |
173 | }
174 |
175 |
176 |
177 | public void setUserImage(final Bitmap bMap) {
178 |
179 | runOnUiThread(new Runnable() {
180 | @Override
181 | public void run() {
182 |
183 | if (bMap != null) {
184 | myImage.setImageBitmap(bMap);
185 | } else {
186 | myImage.setImageResource(R.drawable.ic_user);
187 | }
188 | }
189 | });
190 | dataProvider.getUserName(this);
191 | }
192 |
193 | public void setUserName(final String userName) {
194 |
195 | runOnUiThread(new Runnable() {
196 | @Override
197 | public void run() {
198 | final String userNameWithMsg = "Welcome " + userName + "!";
199 | userNameView.setText(userNameWithMsg);
200 | }
201 | });
202 | dataProvider.getOrganisationName(this);
203 | }
204 |
205 |
206 | public void setOrganizationName(final String orgName) {
207 |
208 | runOnUiThread(new Runnable() {
209 | @Override
210 | public void run() {
211 | if (getSupportActionBar() != null) {
212 | getSupportActionBar().setTitle(orgName);
213 | }
214 | }
215 | });
216 | }
217 |
218 | }
219 |
--------------------------------------------------------------------------------
/iOS/ZVCRM/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // ___PROJECTNAME___
4 | //
5 |
6 | import UIKit
7 | import CoreData
8 | import ZCRMiOS
9 |
10 | @UIApplicationMain
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 | var window: UIWindow?
14 | var loginHandler : ZVCRMLoginHandler?
15 | private var appConfigurationDict : Dictionary< String, Any > = Dictionary< String, Any >()
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 |
20 | self.initZVCRMSDK()
21 | return true
22 | }
23 |
24 | func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
25 | loginHandler?.iamLoginHandleURL(url: url, sourceApplication: sourceApplication, annotation: annotation)
26 | return true
27 | }
28 |
29 | func application( _ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
30 | let sourceapp = options[ UIApplicationOpenURLOptionsKey.sourceApplication ]
31 | loginHandler?.iamLoginHandleURL( url : url, sourceApplication : sourceapp as? String, annotation: "" )
32 | return true
33 | }
34 |
35 | func applicationWillResignActive(_ application: UIApplication) {
36 | // 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.
37 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
38 | }
39 |
40 | func applicationDidEnterBackground(_ application: UIApplication) {
41 | // 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.
42 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
43 | }
44 |
45 | func applicationWillEnterForeground(_ application: UIApplication) {
46 | // 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.
47 | }
48 |
49 | func applicationDidBecomeActive(_ application: UIApplication) {
50 | // 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.
51 | }
52 |
53 | func applicationWillTerminate(_ application: UIApplication) {
54 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
55 | // Saves changes in the application's managed object context before the application terminates.
56 | self.saveContext()
57 | }
58 |
59 | // MARK: - Core Data stack
60 |
61 | lazy var persistentContainer: NSPersistentContainer = {
62 | /*
63 | The persistent container for the application. This implementation
64 | creates and returns a container, having loaded the store for the
65 | application to it. This property is optional since there are legitimate
66 | error conditions that could cause the creation of the store to fail.
67 | */
68 | let container = NSPersistentContainer(name: "Your Products Name")
69 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in
70 | if let error = error as NSError? {
71 | // Replace this implementation with code to handle the error appropriately.
72 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
73 |
74 | /*
75 | Typical reasons for an error here include:
76 | * The parent directory does not exist, cannot be created, or disallows writing.
77 | * The persistent store is not accessible, due to permissions or data protection when the device is locked.
78 | * The device is out of space.
79 | * The store could not be migrated to the current model version.
80 | Check the error message to determine what the actual problem was.
81 | */
82 | fatalError("Unresolved error \(error), \(error.userInfo)")
83 | }
84 | })
85 | return container
86 | }()
87 |
88 | // MARK: - Core Data Saving support
89 |
90 | func saveContext () {
91 | let context = persistentContainer.viewContext
92 | if context.hasChanges {
93 | do {
94 | try context.save()
95 | } catch {
96 | // Replace this implementation with code to handle the error appropriately.
97 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
98 | let nserror = error as NSError
99 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
100 | }
101 | }
102 | }
103 |
104 | func initZVCRMSDK()
105 | {
106 | do
107 | {
108 | loginHandler = ZVCRMLoginHandler.init()
109 | self.readConfiguration()
110 | let appConfig = CRMAppConfigUtil(appConfigDict: appConfigurationDict )
111 | appConfig.setAppType( type : "ZVCRM" )
112 | loginHandler = try ZVCRMLoginHandler( appConfigUtil : appConfig )
113 | let alreadyLaunched = UserDefaults.standard.bool( forKey :"first" )
114 | if !alreadyLaunched {
115 | loginHandler!.clearIAMLoginFirstLaunch()
116 | UserDefaults.standard.set(true, forKey: "first")
117 | }
118 | loginHandler!.initIAMLogin( window : self.window )
119 | }
120 | catch
121 | {
122 | print( "Error occured in AppDelegate.initZVCRMSDK(). Details : \( error )" )
123 | }
124 | }
125 |
126 | private func readConfiguration()
127 | {
128 | if let path = Bundle.main.path( forResource : "AppConfiguration", ofType: "plist" )
129 | {
130 | self.appConfigurationDict = NSDictionary( contentsOfFile : path ) as! Dictionary< String, Any >
131 | }
132 | else
133 | {
134 | print("####### appConfigurationDict is empty ######" )
135 | }
136 | }
137 |
138 | func loadLoginView( completion : @escaping( Bool ) -> () )
139 | {
140 | if let path = Bundle.main.path(forResource : "AppConfiguration", ofType: "plist" )
141 | {
142 | let plist = NSMutableDictionary( contentsOfFile : path )
143 | if( plist?["FirstLaunch"]! as? Bool == false )
144 | {
145 | loginHandler!.handleLogin(completion: { ( success ) in
146 | completion( success )
147 | })
148 | plist?.setValue( true, forKey : "FirstLaunch" )
149 | plist?.write( toFile : path, atomically : false )
150 | }
151 | }
152 | }
153 |
154 | func logout( completion : @escaping ( Bool ) -> () )
155 | {
156 | loginHandler!.logout( completion: { ( success ) in
157 | completion( success )
158 | } )
159 | }
160 |
161 | }
162 |
163 |
164 |
--------------------------------------------------------------------------------
/iOS/ZCRM/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // ___PROJECTNAME___
4 | //
5 | // Created by ___FULLUSERNAME___ on ___DATE___.
6 | // Copyright © ___FULLUSERNAME___. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import CoreData
11 | import ZCRMiOS
12 |
13 | @UIApplicationMain
14 | class AppDelegate: UIResponder, UIApplicationDelegate {
15 |
16 | var window: UIWindow?
17 | var loginHandler : ZCRMLoginHandler?
18 | private var appConfigurationDict : Dictionary< String, Any > = Dictionary< String, Any >()
19 |
20 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
21 | // Override point for customization after application launch.
22 |
23 | self.initZCRMSDK()
24 | return true
25 | }
26 |
27 | func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
28 | loginHandler?.iamLoginHandleURL(url: url, sourceApplication: sourceApplication, annotation: annotation)
29 | return true
30 | }
31 |
32 | func application( _ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
33 | let sourceapp = options[ UIApplicationOpenURLOptionsKey.sourceApplication ]
34 | loginHandler?.iamLoginHandleURL( url : url, sourceApplication : sourceapp as? String, annotation: "" )
35 | return true
36 | }
37 |
38 | func applicationWillResignActive(_ application: UIApplication) {
39 | // 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.
40 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
41 | }
42 |
43 | func applicationDidEnterBackground(_ application: UIApplication) {
44 | // 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.
45 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
46 | }
47 |
48 | func applicationWillEnterForeground(_ application: UIApplication) {
49 | // 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.
50 | }
51 |
52 | func applicationDidBecomeActive(_ application: UIApplication) {
53 | // 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.
54 | }
55 |
56 | func applicationWillTerminate(_ application: UIApplication) {
57 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
58 | // Saves changes in the application's managed object context before the application terminates.
59 | self.saveContext()
60 | }
61 |
62 | // MARK: - Core Data stack
63 |
64 | lazy var persistentContainer: NSPersistentContainer = {
65 | /*
66 | The persistent container for the application. This implementation
67 | creates and returns a container, having loaded the store for the
68 | application to it. This property is optional since there are legitimate
69 | error conditions that could cause the creation of the store to fail.
70 | */
71 | let container = NSPersistentContainer(name: "TestingWithPod")
72 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in
73 | if let error = error as NSError? {
74 | // Replace this implementation with code to handle the error appropriately.
75 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
76 |
77 | /*
78 | Typical reasons for an error here include:
79 | * The parent directory does not exist, cannot be created, or disallows writing.
80 | * The persistent store is not accessible, due to permissions or data protection when the device is locked.
81 | * The device is out of space.
82 | * The store could not be migrated to the current model version.
83 | Check the error message to determine what the actual problem was.
84 | */
85 | fatalError("Unresolved error \(error), \(error.userInfo)")
86 | }
87 | })
88 | return container
89 | }()
90 |
91 | // MARK: - Core Data Saving support
92 |
93 | func saveContext () {
94 | let context = persistentContainer.viewContext
95 | if context.hasChanges {
96 | do {
97 | try context.save()
98 | } catch {
99 | // Replace this implementation with code to handle the error appropriately.
100 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
101 | let nserror = error as NSError
102 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
103 | }
104 | }
105 | }
106 |
107 | func initZCRMSDK()
108 | {
109 | do
110 | {
111 | loginHandler = ZCRMLoginHandler.init()
112 | self.readConfiguration()
113 | let appConfig = CRMAppConfigUtil(appConfigDict: appConfigurationDict )
114 | appConfig.setAppType( type : "ZCRM" )
115 | loginHandler = try ZCRMLoginHandler(appConfigUtil: appConfig )
116 | let alreadyLaunched = UserDefaults.standard.bool(forKey:"first")
117 | if !alreadyLaunched {
118 | loginHandler!.clearIAMLoginFirstLaunch()
119 | UserDefaults.standard.set(true, forKey: "first")
120 | }
121 | loginHandler!.initIAMLogin( window : self.window )
122 | }
123 | catch
124 | {
125 | print( "Error occured in AppDelegate.initZCRMSDK(). Details : \( error )" )
126 | }
127 | }
128 |
129 | private func readConfiguration()
130 | {
131 | if let path = Bundle.main.path(forResource : "AppConfiguration", ofType: "plist" )
132 | {
133 | self.appConfigurationDict = NSDictionary( contentsOfFile : path ) as! Dictionary< String, Any >
134 | }
135 | else
136 | {
137 | print("####### appConfigurationDict is empty ######" )
138 | }
139 | }
140 |
141 | func loadLoginView( completion : @escaping ( Bool ) -> () )
142 | {
143 | if let path = Bundle.main.path(forResource : "AppConfiguration", ofType: "plist" )
144 | {
145 | let plist = NSMutableDictionary( contentsOfFile : path )
146 | if( plist?["FirstLaunch"]! as? Bool == false )
147 | {
148 | loginHandler!.handleLogin(completion: { ( success ) in
149 | completion( success )
150 | })
151 | plist?.setValue( true, forKey : "FirstLaunch" )
152 | plist?.write( toFile : path, atomically : false )
153 | }
154 | }
155 | }
156 |
157 | func logout( completion : @escaping ( Bool ) -> () )
158 | {
159 | loginHandler!.logout( completion: { ( success ) in
160 | completion( success )
161 | } )
162 | }
163 |
164 | }
165 |
166 |
167 |
--------------------------------------------------------------------------------
/android/app/src/main/java/src/simple_app/ListActivity.java:
--------------------------------------------------------------------------------
1 | package src.simple_app;
2 |
3 | import android.content.Context;
4 | import android.os.AsyncTask;
5 | import android.os.Bundle;
6 | import android.support.v4.widget.SwipeRefreshLayout;
7 | import android.support.v7.app.AppCompatActivity;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.AdapterView;
12 | import android.widget.ArrayAdapter;
13 | import android.widget.ListView;
14 | import android.widget.ProgressBar;
15 | import android.widget.TextView;
16 |
17 | import com.zoho.crm.library.crud.ZCRMModule;
18 | import com.zoho.crm.library.crud.ZCRMRecord;
19 | import com.zoho.crm.library.exception.ZCRMException;
20 | import com.zoho.crm.library.setup.restclient.ZCRMRestClient;
21 | import com.zoho.crm.sdk.android.zcrmandroid.activity.ZCRMBaseActivity;
22 |
23 | import java.util.ArrayList;
24 | import java.util.Iterator;
25 | import java.util.List;
26 |
27 |
28 | public class ListActivity extends ZCRMBaseActivity {
29 |
30 | public static ArrayAdapter adapter;
31 | public static ListView recordList;
32 | public static List records = new ArrayList();
33 | public static List storeList = new ArrayList();
34 | private static String moduleApiName;
35 |
36 | ProgressBar mProgress;
37 | SwipeRefreshLayout refreshLayout;
38 | TextView emptyList;
39 | TextView loading;
40 |
41 | @Override
42 | protected void onCreate(Bundle savedInstanceState) {
43 |
44 | super.onCreate(savedInstanceState);
45 | setContentView(R.layout.module_tab);
46 |
47 | moduleApiName = getIntent().getStringExtra("module");
48 | getSupportActionBar().setTitle(moduleApiName);
49 |
50 | emptyList = (TextView) findViewById(R.id.textView32);
51 | emptyList.setText("");
52 | loading = (TextView) findViewById(R.id.loading);
53 | initiatePage();
54 | }
55 |
56 | public void initiatePage() {
57 | initiateList();
58 |
59 | refreshLayout = findViewById(R.id.modulerefresh);
60 | refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
61 | @Override
62 | public void onRefresh() {
63 | clearList();
64 | ApiModeRunner runner = new ApiModeRunner();
65 | runner.execute();
66 | }
67 | });
68 |
69 | mProgress = findViewById(R.id.moduleprogress);
70 | mProgress.setVisibility(ProgressBar.VISIBLE);
71 | loading.setText("LOADING.. please wait."); //No I18N
72 |
73 | ApiModeRunner runner = new ApiModeRunner();
74 | runner.execute();
75 | }
76 |
77 | public void recordList() throws ZCRMException {
78 | ZCRMRecord zcrmRecord;
79 | Iterator itr = records.iterator();
80 | while (itr.hasNext()) {
81 | zcrmRecord = (ZCRMRecord) itr.next();
82 | addRecordToList(zcrmRecord, new RecordListAdapter());
83 | }
84 | setPageRefreshingOff();
85 | }
86 |
87 | public void initiateList() {
88 | recordList = findViewById(R.id.listView);
89 | recordList.setAdapter(adapter);
90 | records.clear();
91 | storeList.clear();
92 |
93 | recordList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
94 | @Override
95 | public void onItemClick(final AdapterView adapterView, View view, final int position, long idy) {
96 | //load record's detail page here
97 | }
98 | });
99 |
100 | }
101 |
102 | public void addRecordToList(ZCRMRecord zcrmRecord, Object recordListHandler) {
103 | storeList.add(zcrmRecord);
104 | adapter = (ArrayAdapter) recordListHandler;
105 | recordList.setAdapter(adapter);
106 | }
107 |
108 | public void setPageRefreshingOff() {
109 | refreshLayout.setRefreshing(false);
110 | mProgress.setVisibility(ProgressBar.INVISIBLE);
111 | loading.setText("");
112 |
113 | if (records.isEmpty()) {
114 | emptyList.setText("Seems you have nothing...");
115 | }
116 | }
117 |
118 | public void clearList() {
119 | records.clear();
120 | storeList.clear();
121 | }
122 |
123 | class RecordListAdapter extends ArrayAdapter {
124 | public RecordListAdapter() {
125 | super(getBaseApplicationContext(), R.layout.list_item, storeList);
126 | }
127 |
128 | @Override
129 | public View getView(int position, View view, ViewGroup parent) {
130 | if (view == null) {
131 | LayoutInflater inflater = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
132 | view = inflater.inflate(R.layout.list_item, parent, false);
133 | }
134 |
135 | ZCRMRecord record = (ZCRMRecord) storeList.get(position);
136 | try {
137 | TextView primaryField = view.findViewById(R.id.textView4);
138 | TextView secondaryField = view.findViewById(R.id.textView5);
139 | TextView tertiaryField = view.findViewById(R.id.textView6);
140 | String primaryFieldValue = "";
141 | String secondaryFieldValue = "";
142 | String tertiaryFieldValue = "";
143 |
144 | if (moduleApiName.equals("Contacts")) {
145 |
146 | if (record.getFieldValue("First_Name") != null) {
147 | primaryFieldValue += record.getFieldValue("First_Name") + " ";
148 | }
149 | primaryFieldValue += record.getFieldValue("Last_Name");
150 |
151 | if (record.getFieldValue("Email") == null) {
152 | secondaryFieldValue = "No Email";
153 | } else {
154 | secondaryFieldValue = record.getFieldValue("Email").toString();
155 | }
156 | if (record.getFieldValue("Phone") == null) {
157 | tertiaryFieldValue = "No Phone";
158 | } else {
159 | tertiaryFieldValue = record.getFieldValue("Phone").toString();
160 | }
161 |
162 | } else if (moduleApiName.equals("Tasks")) {
163 |
164 | primaryFieldValue = record.getFieldValue("Subject").toString();
165 | secondaryFieldValue = record.getFieldValue("Status").toString();
166 | tertiaryFieldValue = record.getFieldValue("Priority").toString();
167 | }
168 |
169 |
170 | primaryField.setText(primaryFieldValue);
171 | secondaryField.setText(secondaryFieldValue);
172 | tertiaryField.setText(tertiaryFieldValue);
173 |
174 | } catch (ZCRMException e) {
175 | e.printStackTrace();
176 | }
177 |
178 | return view;
179 | }
180 | }
181 |
182 | class ApiModeRunner extends AsyncTask {
183 |
184 | private String resp;
185 |
186 |
187 | @Override
188 | protected String doInBackground(String... params) {
189 | try {
190 | ZCRMModule module = ZCRMRestClient.getInstance().getModuleInstance(moduleApiName);
191 | records = module.getRecords().getData();
192 | resp = "success";
193 | } catch (Exception e) {
194 | e.printStackTrace();
195 | resp = e.getMessage();
196 | }
197 | return resp;
198 | }
199 |
200 | @Override
201 | protected void onPostExecute(String result) {
202 | try {
203 | recordList();
204 | } catch (ZCRMException e) {
205 | e.printStackTrace();
206 | }
207 | }
208 |
209 | @Override
210 | protected void onPreExecute() {
211 | }
212 |
213 | @Override
214 | protected void onProgressUpdate(String... text) {
215 | }
216 | }
217 |
218 | }
219 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 48;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1F9F99FD1F8299D900756AD9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F9F99FC1F8299D900756AD9 /* AppDelegate.swift */; };
11 | 1F9F9A021F8299D900756AD9 /* AppConfiguration.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1F9F9A011F8299D900756AD9 /* AppConfiguration.plist */; };
12 | 1F9F9A051F8299D900756AD9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F9F9A041F8299D900756AD9 /* ViewController.swift */; };
13 | 1F9F9A0A1F8299D900756AD9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1F9F9A081F8299D900756AD9 /* Main.storyboard */; };
14 | 1F9F9A0C1F8299D900756AD9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1F9F9A0B1F8299D900756AD9 /* Assets.xcassets */; };
15 | 1F9F9A0F1F8299D900756AD9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1F9F9A0D1F8299D900756AD9 /* LaunchScreen.storyboard */; };
16 | FED6839A2122A21A0063A823 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FED683982122A21A0063A823 /* HomeViewController.swift */; };
17 | FED6839B2122A21A0063A823 /* ListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FED683992122A21A0063A823 /* ListViewController.swift */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXFileReference section */
21 | 1F9F99F71F8299D900756AD9 /* ZCRMSwiftAppTemplate.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZCRMSwiftAppTemplate.app; sourceTree = BUILT_PRODUCTS_DIR; };
22 | 1F9F99FA1F8299D900756AD9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
23 | 1F9F99FC1F8299D900756AD9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
24 | 1F9F99FF1F8299D900756AD9 /* ZCRMiOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ZCRMiOS.framework; sourceTree = ""; };
25 | 1F9F9A011F8299D900756AD9 /* AppConfiguration.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = AppConfiguration.plist; sourceTree = ""; };
26 | 1F9F9A031F8299D900756AD9 /* Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = ""; };
27 | 1F9F9A041F8299D900756AD9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
28 | 1F9F9A091F8299D900756AD9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
29 | 1F9F9A0B1F8299D900756AD9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
30 | 1F9F9A0E1F8299D900756AD9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
31 | FED683982122A21A0063A823 /* HomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; };
32 | FED683992122A21A0063A823 /* ListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListViewController.swift; sourceTree = ""; };
33 | /* End PBXFileReference section */
34 |
35 | /* Begin PBXFrameworksBuildPhase section */
36 | 1F9F99F41F8299D900756AD9 /* Frameworks */ = {
37 | isa = PBXFrameworksBuildPhase;
38 | buildActionMask = 2147483647;
39 | files = (
40 | );
41 | runOnlyForDeploymentPostprocessing = 0;
42 | };
43 | /* End PBXFrameworksBuildPhase section */
44 |
45 | /* Begin PBXGroup section */
46 | 1F9F99EE1F8299D900756AD9 = {
47 | isa = PBXGroup;
48 | children = (
49 | 1F9F99F91F8299D900756AD9 /* ZCRMSwiftAppTemplate */,
50 | 1F9F99F81F8299D900756AD9 /* Products */,
51 | );
52 | sourceTree = "";
53 | };
54 | 1F9F99F81F8299D900756AD9 /* Products */ = {
55 | isa = PBXGroup;
56 | children = (
57 | 1F9F99F71F8299D900756AD9 /* ZCRMSwiftAppTemplate.app */,
58 | );
59 | name = Products;
60 | sourceTree = "";
61 | };
62 | 1F9F99F91F8299D900756AD9 /* ZCRMSwiftAppTemplate */ = {
63 | isa = PBXGroup;
64 | children = (
65 | FED683982122A21A0063A823 /* HomeViewController.swift */,
66 | FED683992122A21A0063A823 /* ListViewController.swift */,
67 | 1F9F99FA1F8299D900756AD9 /* Info.plist */,
68 | 1F9F99FC1F8299D900756AD9 /* AppDelegate.swift */,
69 | 1F9F9A011F8299D900756AD9 /* AppConfiguration.plist */,
70 | 1F9F9A031F8299D900756AD9 /* Bridging-Header.h */,
71 | 1F9F9A041F8299D900756AD9 /* ViewController.swift */,
72 | 1F9F9A081F8299D900756AD9 /* Main.storyboard */,
73 | 1F9F9A0B1F8299D900756AD9 /* Assets.xcassets */,
74 | 1F9F9A0D1F8299D900756AD9 /* LaunchScreen.storyboard */,
75 | 1F9F99FE1F8299D900756AD9 /* Frameworks */,
76 | );
77 | path = ZCRMSwiftAppTemplate;
78 | sourceTree = "";
79 | };
80 | 1F9F99FE1F8299D900756AD9 /* Frameworks */ = {
81 | isa = PBXGroup;
82 | children = (
83 | 1F9F99FF1F8299D900756AD9 /* ZCRMiOS.framework */,
84 | );
85 | name = Frameworks;
86 | sourceTree = "";
87 | };
88 | /* End PBXGroup section */
89 |
90 | /* Begin PBXNativeTarget section */
91 | 1F9F99F61F8299D900756AD9 /* ZCRMSwiftAppTemplate */ = {
92 | isa = PBXNativeTarget;
93 | buildConfigurationList = 1F9F9A281F8299D900756AD9 /* Build configuration list for PBXNativeTarget "ZCRMSwiftAppTemplate" */;
94 | buildPhases = (
95 | 1F9F99F31F8299D900756AD9 /* Sources */,
96 | 1F9F99F41F8299D900756AD9 /* Frameworks */,
97 | 1F9F99F51F8299D900756AD9 /* Resources */,
98 | );
99 | buildRules = (
100 | );
101 | dependencies = (
102 | );
103 | name = ZCRMSwiftAppTemplate;
104 | productName = ZCRMSwiftAppTemplate;
105 | productReference = 1F9F99F71F8299D900756AD9 /* ZCRMSwiftAppTemplate.app */;
106 | productType = "com.apple.product-type.application";
107 | };
108 | /* End PBXNativeTarget section */
109 |
110 | /* Begin PBXProject section */
111 | 1F9F99EF1F8299D900756AD9 /* Project object */ = {
112 | isa = PBXProject;
113 | attributes = {
114 | LastSwiftUpdateCheck = 0900;
115 | LastUpgradeCheck = 0900;
116 | ORGANIZATIONNAME = ZCRMSwiftAppTemplateOrg;
117 | TargetAttributes = {
118 | 1F9F99F61F8299D900756AD9 = {
119 | CreatedOnToolsVersion = 9.0;
120 | ProvisioningStyle = Automatic;
121 | };
122 | };
123 | };
124 | buildConfigurationList = 1F9F99F21F8299D900756AD9 /* Build configuration list for PBXProject "ZCRMSwiftAppTemplate" */;
125 | compatibilityVersion = "Xcode 8.0";
126 | developmentRegion = en;
127 | hasScannedForEncodings = 0;
128 | knownRegions = (
129 | en,
130 | Base,
131 | );
132 | mainGroup = 1F9F99EE1F8299D900756AD9;
133 | productRefGroup = 1F9F99F81F8299D900756AD9 /* Products */;
134 | projectDirPath = "";
135 | projectRoot = "";
136 | targets = (
137 | 1F9F99F61F8299D900756AD9 /* ZCRMSwiftAppTemplate */,
138 | );
139 | };
140 | /* End PBXProject section */
141 |
142 | /* Begin PBXResourcesBuildPhase section */
143 | 1F9F99F51F8299D900756AD9 /* Resources */ = {
144 | isa = PBXResourcesBuildPhase;
145 | buildActionMask = 2147483647;
146 | files = (
147 | 1F9F9A0A1F8299D900756AD9 /* Main.storyboard in Resources */,
148 | 1F9F9A0C1F8299D900756AD9 /* Assets.xcassets in Resources */,
149 | 1F9F9A0F1F8299D900756AD9 /* LaunchScreen.storyboard in Resources */,
150 | 1F9F9A021F8299D900756AD9 /* AppConfiguration.plist in Resources */,
151 | );
152 | runOnlyForDeploymentPostprocessing = 0;
153 | };
154 | /* End PBXResourcesBuildPhase section */
155 |
156 | /* Begin PBXSourcesBuildPhase section */
157 | 1F9F99F31F8299D900756AD9 /* Sources */ = {
158 | isa = PBXSourcesBuildPhase;
159 | buildActionMask = 2147483647;
160 | files = (
161 | 1F9F9A051F8299D900756AD9 /* ViewController.swift in Sources */,
162 | 1F9F99FD1F8299D900756AD9 /* AppDelegate.swift in Sources */,
163 | FED6839B2122A21A0063A823 /* ListViewController.swift in Sources */,
164 | FED6839A2122A21A0063A823 /* HomeViewController.swift in Sources */,
165 | );
166 | runOnlyForDeploymentPostprocessing = 0;
167 | };
168 | /* End PBXSourcesBuildPhase section */
169 |
170 | /* Begin PBXVariantGroup section */
171 | 1F9F9A081F8299D900756AD9 /* Main.storyboard */ = {
172 | isa = PBXVariantGroup;
173 | children = (
174 | 1F9F9A091F8299D900756AD9 /* Base */,
175 | );
176 | name = Main.storyboard;
177 | sourceTree = "";
178 | };
179 | 1F9F9A0D1F8299D900756AD9 /* LaunchScreen.storyboard */ = {
180 | isa = PBXVariantGroup;
181 | children = (
182 | 1F9F9A0E1F8299D900756AD9 /* Base */,
183 | );
184 | name = LaunchScreen.storyboard;
185 | sourceTree = "";
186 | };
187 | /* End PBXVariantGroup section */
188 |
189 | /* Begin XCBuildConfiguration section */
190 | 1F9F9A261F8299D900756AD9 /* Debug */ = {
191 | isa = XCBuildConfiguration;
192 | buildSettings = {
193 | ALWAYS_SEARCH_USER_PATHS = NO;
194 | CLANG_ANALYZER_NONNULL = YES;
195 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
196 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
197 | CLANG_CXX_LIBRARY = "libc++";
198 | CLANG_ENABLE_MODULES = YES;
199 | CLANG_ENABLE_OBJC_ARC = YES;
200 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
201 | CLANG_WARN_BOOL_CONVERSION = YES;
202 | CLANG_WARN_COMMA = YES;
203 | CLANG_WARN_CONSTANT_CONVERSION = YES;
204 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
205 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
206 | CLANG_WARN_EMPTY_BODY = YES;
207 | CLANG_WARN_ENUM_CONVERSION = YES;
208 | CLANG_WARN_INFINITE_RECURSION = YES;
209 | CLANG_WARN_INT_CONVERSION = YES;
210 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
211 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
212 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
213 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
214 | CLANG_WARN_STRICT_PROTOTYPES = YES;
215 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
216 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
217 | CLANG_WARN_UNREACHABLE_CODE = YES;
218 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
219 | CODE_SIGN_IDENTITY = "iPhone Developer";
220 | COPY_PHASE_STRIP = NO;
221 | DEBUG_INFORMATION_FORMAT = dwarf;
222 | ENABLE_STRICT_OBJC_MSGSEND = YES;
223 | ENABLE_TESTABILITY = YES;
224 | GCC_C_LANGUAGE_STANDARD = gnu11;
225 | GCC_DYNAMIC_NO_PIC = NO;
226 | GCC_NO_COMMON_BLOCKS = YES;
227 | GCC_OPTIMIZATION_LEVEL = 0;
228 | GCC_PREPROCESSOR_DEFINITIONS = (
229 | "DEBUG=1",
230 | "$(inherited)",
231 | );
232 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
233 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
234 | GCC_WARN_UNDECLARED_SELECTOR = YES;
235 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
236 | GCC_WARN_UNUSED_FUNCTION = YES;
237 | GCC_WARN_UNUSED_VARIABLE = YES;
238 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
239 | MTL_ENABLE_DEBUG_INFO = YES;
240 | ONLY_ACTIVE_ARCH = YES;
241 | SDKROOT = iphoneos;
242 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
243 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
244 | };
245 | name = Debug;
246 | };
247 | 1F9F9A271F8299D900756AD9 /* Release */ = {
248 | isa = XCBuildConfiguration;
249 | buildSettings = {
250 | ALWAYS_SEARCH_USER_PATHS = NO;
251 | CLANG_ANALYZER_NONNULL = YES;
252 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
253 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
254 | CLANG_CXX_LIBRARY = "libc++";
255 | CLANG_ENABLE_MODULES = YES;
256 | CLANG_ENABLE_OBJC_ARC = YES;
257 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
258 | CLANG_WARN_BOOL_CONVERSION = YES;
259 | CLANG_WARN_COMMA = YES;
260 | CLANG_WARN_CONSTANT_CONVERSION = YES;
261 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
262 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
263 | CLANG_WARN_EMPTY_BODY = YES;
264 | CLANG_WARN_ENUM_CONVERSION = YES;
265 | CLANG_WARN_INFINITE_RECURSION = YES;
266 | CLANG_WARN_INT_CONVERSION = YES;
267 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
268 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
269 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
270 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
271 | CLANG_WARN_STRICT_PROTOTYPES = YES;
272 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
273 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
274 | CLANG_WARN_UNREACHABLE_CODE = YES;
275 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
276 | CODE_SIGN_IDENTITY = "iPhone Developer";
277 | COPY_PHASE_STRIP = NO;
278 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
279 | ENABLE_NS_ASSERTIONS = NO;
280 | ENABLE_STRICT_OBJC_MSGSEND = YES;
281 | GCC_C_LANGUAGE_STANDARD = gnu11;
282 | GCC_NO_COMMON_BLOCKS = YES;
283 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
284 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
285 | GCC_WARN_UNDECLARED_SELECTOR = YES;
286 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
287 | GCC_WARN_UNUSED_FUNCTION = YES;
288 | GCC_WARN_UNUSED_VARIABLE = YES;
289 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
290 | MTL_ENABLE_DEBUG_INFO = NO;
291 | SDKROOT = iphoneos;
292 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
293 | VALIDATE_PRODUCT = YES;
294 | };
295 | name = Release;
296 | };
297 | 1F9F9A291F8299D900756AD9 /* Debug */ = {
298 | isa = XCBuildConfiguration;
299 | buildSettings = {
300 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
301 | CODE_SIGN_STYLE = Automatic;
302 | FRAMEWORK_SEARCH_PATHS = (
303 | "$(inherited)",
304 | "$(PROJECT_DIR)/ZCRMSwiftAppTemplate",
305 | );
306 | INFOPLIST_FILE = ZCRMSwiftAppTemplate/Info.plist;
307 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
308 | PRODUCT_BUNDLE_IDENTIFIER = com.zcrmSwiftAppTemplateOrg.ZCRMSwiftAppTemplate;
309 | PRODUCT_NAME = "$(TARGET_NAME)";
310 | SWIFT_VERSION = 4.0;
311 | TARGETED_DEVICE_FAMILY = "1,2";
312 | };
313 | name = Debug;
314 | };
315 | 1F9F9A2A1F8299D900756AD9 /* Release */ = {
316 | isa = XCBuildConfiguration;
317 | buildSettings = {
318 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
319 | CODE_SIGN_STYLE = Automatic;
320 | FRAMEWORK_SEARCH_PATHS = (
321 | "$(inherited)",
322 | "$(PROJECT_DIR)/ZCRMSwiftAppTemplate",
323 | );
324 | INFOPLIST_FILE = ZCRMSwiftAppTemplate/Info.plist;
325 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
326 | PRODUCT_BUNDLE_IDENTIFIER = com.zcrmSwiftAppTemplateOrg.ZCRMSwiftAppTemplate;
327 | PRODUCT_NAME = "$(TARGET_NAME)";
328 | SWIFT_VERSION = 4.0;
329 | TARGETED_DEVICE_FAMILY = "1,2";
330 | };
331 | name = Release;
332 | };
333 | /* End XCBuildConfiguration section */
334 |
335 | /* Begin XCConfigurationList section */
336 | 1F9F99F21F8299D900756AD9 /* Build configuration list for PBXProject "ZCRMSwiftAppTemplate" */ = {
337 | isa = XCConfigurationList;
338 | buildConfigurations = (
339 | 1F9F9A261F8299D900756AD9 /* Debug */,
340 | 1F9F9A271F8299D900756AD9 /* Release */,
341 | );
342 | defaultConfigurationIsVisible = 0;
343 | defaultConfigurationName = Release;
344 | };
345 | 1F9F9A281F8299D900756AD9 /* Build configuration list for PBXNativeTarget "ZCRMSwiftAppTemplate" */ = {
346 | isa = XCConfigurationList;
347 | buildConfigurations = (
348 | 1F9F9A291F8299D900756AD9 /* Debug */,
349 | 1F9F9A2A1F8299D900756AD9 /* Release */,
350 | );
351 | defaultConfigurationIsVisible = 0;
352 | defaultConfigurationName = Release;
353 | };
354 | /* End XCConfigurationList section */
355 | };
356 | rootObject = 1F9F99EF1F8299D900756AD9 /* Project object */;
357 | }
358 |
--------------------------------------------------------------------------------
/iOS/ZCRM/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
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 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
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 |
210 |
--------------------------------------------------------------------------------
/iOS/ZVCRM/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
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 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
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 |
210 |
--------------------------------------------------------------------------------
/iOS/ZCRMSwiftAppTemplate/ZCRMSwiftAppTemplate/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
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 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
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 |
210 |
--------------------------------------------------------------------------------