These docs are for v1.0. Click to read the latest docs for v2.0.

Adding SDK

To use the SDK into your project you can have 2 approaches:

  1. Adding the SDK via Cocoapod (Recommended)
  2. Manually adding the Smartech.framework

Adding the SDK via Cocoapod (Recommended)

πŸ“˜

#ProTip

The most convenient way to use Smartech SDK in your iOS project is with CocoaPods, which is a dependency manager for Swift and Objective-C projects.

Always commit your code before you add any new frameworks.

For more details visit the official docs here.

  1. To install CocoaPods in your system, run the below command in your terminal.
sudo gem install cocoapods
  1. If you’re using CocoaPods first time, run the below command in your terminal to create a local CocoaPods spec mirror, else you can go to step 4.
pod setup
  1. Close your Xcode project and navigate to the project’s root directory and initialize the CocoaPods by running the below command, this will create a new file named Podfile which will be used to manage your project dependency.
pod init
  1. Now open the Podfile in your preferred text editor or run the below command which will open in your default text editor.
open Podfile
  1. In the Podfile you need to add the Smartech-iOS-SDK dependency.
pod 'Smartech-iOS-SDK'
  1. The complete Podfile can be found below. (Your Podfile may be different as we have only added one dependency).
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
 
#app target
target 'YourAppTarget' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  use_frameworks!
  # Pods for YourAppTarget
pod 'Smartech-iOS-SDK'
end

πŸ“˜

#ProTip

Always specify the platform version on which you plan to target the app deployment which should be 10 or above 10. (Here in the example we have platform :ios, '10.0')

  1. Run the following command to install the added pods in your Podfile.
pod install

Once your installation is complete, you will have to open the workspace file (YOUR-PROJECT-NAME.xcworkspace) that is created.

You can refer the below video for detailed steps for adding the framework via CocoaPods. If you are unable to view the video then you can download the steps in PDF format from here.

πŸ“˜

Note:

If you want to update only a pod you can use the following command:
pod update POD_NAME

And if want to update a pod to a specific version then you need to mention the version of that pod in the Podfile besides pod name, example:
pod 'POD_NAME', '1.1'
and then you can use the update command mentioned above to update that pod to the mentioned version.

Manually adding the Smartech.framework

Following are the steps you need to perform to add framework manually:

  1. You can download the Netcore Smartech SDK from our GitHub repository or GitHub Master Direct Link.
  2. Unzip the downloaded file. You can find the framework file in the following folder structure flow Smartech-iOS-SDK-master > Frameworks > Smartech > Smartech.framework.
  3. Now in your Xcode project right-click on Project Name in project inspector and select the 'Add Files' option.
  4. Navigate to the folder in your system where Smartech.framework is located.
  5. Make sure you have selected copy items if needed and the App target.
  6. Click on the Add Option.
  7. Click on the β€˜+’ button under Development Assets, this section is below Frameworks, Libraries, and Embedded Content.
  8. Search for Smartech.framework, select it, and click on Add.

You can refer to the PDF for detailed steps for manually adding the framework in your project.