iOS Xamarin CPIK Libraries

Contents

Introduction

This guide provides details on how to get started with iOS Xamarin CPIK libraries. The CPIK libraries package includes the following:

Sample App

  • Source code of the sample application
  • Sample application APK that can be install on an iOS device

Libraries & Resources

  • Libs/CPIKBinding.dll: Your application uses this library to integrate CPIK libraries
  • Asset/copilot_resources.bundle

Note: When downloading files, be sure to download the latest version of CoPilot and to only include files from that version in your project. The Xamarin interface is available for the iOS platform. This interface results in all iOS compatible APIs being supported within Xamarin iOS. It has not been noted on individual APIs that they are also compatible on Xamarin via this interface as it is always true unless stated otherwise.

Sample App

Source Code

  1. Open the CPIK_Xamarin.sln from Sample App/Source Code/CPIK_Xamarin.sln in Visual Studio. It contains all of the information required to run CoPilot (i.e. libraries, assets, etc.).
  2. You can run com.alk.CPIKXamarinSampleApp.ipa to install the sample app directly into the device.

Libraries & Resources

Libs /CPIKBinding.dll

This is binding library to interface with CoPilot. All the libraries are wrapped into CPIKBinding.dll by using the Xamarin Binding Library project. You need to add a reference to this library into your application.

Assets

Copy Library and Resource/assets/copilot_resources.bundle into your project. Copy the entire assets folder located under Library and Resource/assets/ to <Your project>/Resources/ folder in your project.

The assets folder contains vital information to run CoPilot (i.e. theme, config files, skins, etc). If you have existing an assets folder in your project, please merge the content. Make sure that entire folder under Assets is added to Xamarin and set BuildAction to BundleResource.

Library Integration instructions

Setup instructions:

  1. Reference Library & Resource/libs/ CPIKBinding.dll in your project to access all of the classes/members of the CPIK libraries library.
  2. Extract the Library & Resource/assets/copilot_resources.bundle folder from the library package into your project (usually <Your project>/Resources/). Make sure to set BuildAction to BundleResource.

Develop!

Use the included sample application as a guide. This sample application is meant to demonstrate how to properly integrate CoPilot into your application. If you’re just getting started, take a look at MainAPIListViewController.cs and Appdelegate.cs. They demonstrate how to register and receive the callbacks as well as how to launch the different screens.

API Documentation

The API documentation detailed on this site references the classes and their members. It also contains the signature of each member of the classes, including description and usage. The documentation contains syntax for Java and Objective C. Developers can easily map the relevant syntax with C# in Xamarin. You can also check the syntax in Xamarin by exploring CPIKBinding.dll by adding a reference in your project.

Last updated August 16, 2021.